cisst-saw
Loading...
Searching...
No Matches
mtsComponentState.h
Go to the documentation of this file.
1// file automatically generated, do not modify
2// cisst version: 1.5.0
3// source file: /Users/anton/devel/cisst-saw-doxygen/tmp/cisst-saw/cisst/cisstMultiTask/code/../mtsComponentState.cdg
4
5#pragma once
6#ifndef _cisstMultiTask_mtsComponentState_h
7#define _cisstMultiTask_mtsComponentState_h
8
11#if CISST_HAS_JSON
13#endif // CISST_HAS_JSON
14
15/* source line: 1 */
16
17
18
19// for mts-proxy
23
24/* source line: 1 */
25/* source line: 18 */
26
29// Always include last
31
32/* source line: 25 */
34{
35 /* default constructors and destructors. */
36 public:
41
42/* source line: 26 */
43
64 /* source line: 54 */
65public:
67static std::string EnumToString(const Enum & value) CISST_THROW(std::runtime_error);
68static Enum EnumFromString(const std::string & value) CISST_THROW(std::runtime_error);
69static const std::vector<int> & EnumVectorInt(void);
70static const std::vector<std::string> & EnumVectorString(void);
71/* source line: 82 */
72 protected:
74 public:
75 /* accessors is set to: all */
76#ifndef SWIG
77 void GetState(mtsComponentState::Enum & placeHolder) const;
78#endif
79 inline mtsComponentState::Enum GetState(void) const {
80 return mState;
81 }
82 void SetState(const mtsComponentState::Enum & newValue);
83 /* accessors is set to: all */
84 const mtsComponentState::Enum & State(void) const;
87/* source line: 92 */
88
90 const ThisType & operator = (const Enum & value);
91
93 bool operator == (const ThisType & state) const;
94 bool operator != (const ThisType & state) const;
95
97 bool operator < (const ThisType & state) const;
98 bool operator <= (const ThisType & state) const;
99
101 bool operator > (const ThisType & state) const;
102 bool operator >= (const ThisType & state) const;
103
104 public:
105 /* ctor-all-member is set to: true */
107 /* default methods */
108 public:
109 void SerializeRaw(std::ostream & outputStream) const;
110 void DeSerializeRaw(std::istream & inputStream);
111 void ToStream(std::ostream & outputStream) const;
112 void ToStreamRaw(std::ostream & outputStream, const char delimiter = ' ',
113 bool headerOnly = false, const std::string & headerPrefix = "") const;
114 /* default data methods */
115 public:
116 void Copy(const mtsComponentState & source);
117 void SerializeBinary(std::ostream & outputStream) const CISST_THROW(std::runtime_error);
118 void DeSerializeBinary(std::istream & inputStream, const cmnDataFormat & localFormat, const cmnDataFormat & remoteFormat) CISST_THROW(std::runtime_error);
119 void SerializeText(std::ostream & outputStream, const char delimiter = ',') const CISST_THROW(std::runtime_error);
120 std::string SerializeDescription(const char delimiter = ',', const std::string & userDescription = "") const;
121 void DeSerializeText(std::istream & inputStream, const char delimiter = ',') CISST_THROW(std::runtime_error);
122 std::string HumanReadable(void) const;
123 bool ScalarNumberIsFixed(void) const;
124 size_t ScalarNumber(void) const;
125 double Scalar(const size_t index) const CISST_THROW(std::out_of_range);
126 std::string ScalarDescription(const size_t index, const std::string & userDescription = "") const CISST_THROW(std::out_of_range);
127#if CISST_HAS_JSON
128 void SerializeTextJSON(Json::Value & jsonValue) const;
129 void DeSerializeTextJSON(const Json::Value & jsonValue) CISST_THROW(std::runtime_error);
130#endif // CISST_HAS_JSON
131
132}; // mtsComponentState
133
134// mts-proxy set to declaration-only
137
138/* default functions */
139void CISST_EXPORT cmnSerializeRaw(std::ostream & outputStream, const mtsComponentState & object);
140void CISST_EXPORT cmnDeSerializeRaw(std::istream & inputStream, mtsComponentState & placeHolder);
141/* data functions */
142template <> class cmnData<mtsComponentState > {
143public:
144 enum {IS_SPECIALIZED = 1};
146 static void Copy(DataType & data, const DataType & source) {
147 data.Copy(source);
148 }
149 static std::string SerializeDescription(const DataType & data, const char delimiter, const std::string & userDescription) {
150 return data.SerializeDescription(delimiter, userDescription);
151 }
152 static void SerializeBinary(const DataType & data, std::ostream & outputStream) CISST_THROW(std::runtime_error) {
153 data.SerializeBinary(outputStream);
154 }
155 static void DeSerializeBinary(DataType & data, std::istream & inputStream, const cmnDataFormat & localFormat, const cmnDataFormat & remoteFormat) CISST_THROW(std::runtime_error) {
156 data.DeSerializeBinary(inputStream, localFormat, remoteFormat);
157 }
158 static void SerializeText(const DataType & data, std::ostream & outputStream, const char delimiter = ',') CISST_THROW(std::runtime_error) {
159 data.SerializeText(outputStream, delimiter);
160 }
161 static void DeSerializeText(DataType & data, std::istream & inputStream, const char delimiter = ',') CISST_THROW(std::runtime_error) {
162 data.DeSerializeText(inputStream, delimiter);
163 }
164 static std::string HumanReadable(const DataType & data) {
165 return data.HumanReadable();
166 }
167 static bool ScalarNumberIsFixed(const DataType & data) {
168 return data.ScalarNumberIsFixed();
169 }
170 static size_t ScalarNumber(const DataType & data) {
171 return data.ScalarNumber();
172 }
173 static std::string ScalarDescription(const DataType & data, const size_t index, const std::string & userDescription = "") CISST_THROW(std::out_of_range) {
174 return data.ScalarDescription(index, userDescription);
175 }
176 static double Scalar(const DataType & data, const size_t index) CISST_THROW(std::out_of_range) {
177 return data.Scalar(index);
178 }
179};
180inline std::ostream & operator << (std::ostream & outputStream, const mtsComponentState & data) {
181 outputStream << cmnData<mtsComponentState >::HumanReadable(data);
182 return outputStream;
183}
184#if CISST_HAS_JSON
185template <> void CISST_EXPORT cmnDataJSON<mtsComponentState >::SerializeText(const mtsComponentState & data, Json::Value & jsonValue);
186template <> void CISST_EXPORT cmnDataJSON<mtsComponentState >::DeSerializeText(mtsComponentState & data, const Json::Value & jsonValue) CISST_THROW(std::runtime_error);
187#endif // CISST_HAS_JSON
190#if CISST_HAS_JSON
192#endif // CISST_HAS_JSON
193
194
195#endif // _cisstMultiTask_mtsComponentState_h
static void DeSerializeText(DataType &data, std::istream &inputStream, const char delimiter=',') CISST_THROW(std
Definition mtsComponentState.h:161
static bool ScalarNumberIsFixed(const DataType &data)
Definition mtsComponentState.h:167
mtsComponentState DataType
Definition mtsComponentState.h:145
static void Copy(DataType &data, const DataType &source)
Definition mtsComponentState.h:146
static size_t ScalarNumber(const DataType &data)
Definition mtsComponentState.h:170
static std::string HumanReadable(const DataType &data)
Definition mtsComponentState.h:164
static std::string ScalarDescription(const DataType &data, const size_t index, const std::string &userDescription="") CISST_THROW(std
Definition mtsComponentState.h:173
static std::string SerializeDescription(const DataType &data, const char delimiter, const std::string &userDescription)
Definition mtsComponentState.h:149
static void SerializeText(const DataType &data, std::ostream &outputStream, const char delimiter=',') CISST_THROW(std
Definition mtsComponentState.h:158
@ IS_SPECIALIZED
Definition mtsComponentState.h:144
static void SerializeBinary(const DataType &data, std::ostream &outputStream) CISST_THROW(std
Definition mtsComponentState.h:152
static double Scalar(const DataType &data, const size_t index) CISST_THROW(std
Definition mtsComponentState.h:176
static void DeSerializeBinary(DataType &data, std::istream &inputStream, const cmnDataFormat &localFormat, const cmnDataFormat &remoteFormat) CISST_THROW(std
Definition mtsComponentState.h:155
Definition cmnDataFormat.h:30
Definition cmnDataFunctions.h:51
Definition mtsComponentState.h:34
void SetState(const mtsComponentState::Enum &newValue)
Enum
Definition mtsComponentState.h:66
@ READY
Definition mtsComponentState.h:66
@ ACTIVE
Definition mtsComponentState.h:66
@ FINISHED
Definition mtsComponentState.h:66
@ INITIALIZING
Definition mtsComponentState.h:66
@ FINISHING
Definition mtsComponentState.h:66
@ CONSTRUCTED
Definition mtsComponentState.h:66
bool ScalarNumberIsFixed(void) const
void SerializeBinary(std::ostream &outputStream) const CISST_THROW(std void DeSerializeBinary(std::istream &inputStream, const cmnDataFormat &localFormat, const cmnDataFormat &remoteFormat) CISST_THROW(std void SerializeText(std::ostream &outputStream, const char delimiter=',') const CISST_THROW(std std::string SerializeDescription(const char delimiter=',', const std::string &userDescription="") const
Definition mtsComponentState.h:120
void SerializeRaw(std::ostream &outputStream) const
void GetState(mtsComponentState::Enum &placeHolder) const
void DeSerializeText(std::istream &inputStream, const char delimiter=',') CISST_THROW(std std::string HumanReadable(void) const
Definition mtsComponentState.h:122
void ToStreamRaw(std::ostream &outputStream, const char delimiter=' ', bool headerOnly=false, const std::string &headerPrefix="") const
size_t ScalarNumber(void) const
mtsComponentState ThisType
Definition mtsComponentState.h:86
void DeSerializeRaw(std::istream &inputStream)
mtsComponentState::Enum mState
Definition mtsComponentState.h:73
mtsComponentState::Enum & State(void)
mtsComponentState::Enum GetState(void) const
Definition mtsComponentState.h:79
void ToStream(std::ostream &outputStream) const
void Copy(const mtsComponentState &source)
static std::string static EnumToString(const Enum &value) CISST_THROW(std Enum static EnumFromString(const std::string &value) CISST_THROW(std const std::vector< int > & EnumVectorInt(void)
Definition mtsComponentState.h:69
const mtsComponentState::Enum & State(void) const
mtsComponentState(const mtsComponentState &other)
mtsComponentState(const mtsComponentState::Enum &newState)
static const std::vector< std::string > & EnumVectorString(void)
Definition mtsGenericObjectProxy.h:376
Class registration macros.
#define CMN_DECLARE_SERVICES_INSTANTIATION(className)
Definition cmnClassRegisterMacros.h:199
Defines cmnClassServices.
#define CMN_DECLARE_DATA_FUNCTIONS_JSON_FOR_ENUM(_enum)
Definition cmnDataFunctionsEnumMacros.h:97
#define CMN_DATA_SPECIALIZATION_FOR_ENUM_USER_HUMAN_READABLE(_enum, _promotedType, _humanReadableFunction)
Definition cmnDataFunctionsEnumMacros.h:26
void cmnDeSerializeRaw(std::istream &inputStream, _elementType &data) CISST_THROW(std
Definition cmnDeSerializer.h:82
#define CISST_EXPORT
Definition cmnExportMacros.h:50
#define CISST_THROW(exceptionParameter)
Somewhat portable compilation warning message. This works with very recent versions of gcc (4....
Definition cmnPortability.h:559
void cmnSerializeRaw(std::ostream &outputStream, const _elementType &data) CISST_THROW(std
Definition cmnSerializer.h:76
mtsGenericObjectProxy< mtsComponentState > mtsComponentStateProxy
Definition mtsComponentState.h:135
std::string CISST_EXPORT cmnDataHumanReadable_mtsComponentState_Enum(const mtsComponentState::Enum &data)
std::ostream & operator<<(std::ostream &outputStream, const mtsComponentState &data)
Definition mtsComponentState.h:180
Rules of exporting.
Forward declarations and #define for cisstMultiTask.
STL namespace.
bool operator==(const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix) const
Definition vctDynamicConstMatrixBase.h:715
bool operator!=(const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &otherMatrix) const
Definition vctDynamicConstMatrixBase.h:743
ThisType & operator=(const vctDynamicConstMatrixBase< __matrixOwnerType, __elementType > &otherMatrix)
Definition vctDynamicMatrix.h:255