cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mtsComponentState.h
Go to the documentation of this file.
1 // file automatically generated, do not modify
2 // cisst version: 1.0.5
3 // source file: /home/adeguet1/catkin_ws/src/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 /* source line: 25 */
18 
19 // mts-proxy set to declaration-only
23 
24 
25 /* source line: 1 */
26 /* source line: 18 */
27 
30 // Always include last
32 
33 /* source line: 25 */
35 {
36  /* default constructors and destructors. */
37  public:
38  mtsComponentState(void);
39  mtsComponentState(const mtsComponentState & other);
41 
42 /* source line: 26 */
43 
64  /* source line: 54 */
65 public:
66  enum Enum {CONSTRUCTED, INITIALIZING, READY, ACTIVE, FINISHING, FINISHED };
67  static std::string EnumToString(const Enum & value) throw (std::runtime_error);
68  static Enum EnumFromString(const std::string & value) throw (std::runtime_error);
69 /* source line: 82 */
70  protected:
72  public:
73  /* accessors is set to: all */
74  void GetState(mtsComponentState::Enum & placeHolder) const;
75  void SetState(const mtsComponentState::Enum & newValue);
76  /* accessors is set to: all */
77  const mtsComponentState::Enum & State(void) const;
78  mtsComponentState::Enum & State(void);
80 /* source line: 92 */
81 
83  const ThisType & operator = (const Enum & value);
84 
86  bool operator == (const ThisType & state) const;
87  bool operator != (const ThisType & state) const;
88 
90  bool operator < (const ThisType & state) const;
91  bool operator <= (const ThisType & state) const;
92 
94  bool operator > (const ThisType & state) const;
95  bool operator >= (const ThisType & state) const;
96 
97  public:
98  /* ctor-all-member is set to: true */
100  /* default methods */
101  public:
102  void SerializeRaw(std::ostream & outputStream) const;
103  void DeSerializeRaw(std::istream & inputStream);
104  void ToStream(std::ostream & outputStream) const;
105  void ToStreamRaw(std::ostream & outputStream, const char delimiter = ' ',
106  bool headerOnly = false, const std::string & headerPrefix = "") const;
107  /* default data methods */
108  public:
109  void Copy(const mtsComponentState & source);
110  void SerializeBinary(std::ostream & outputStream) const throw (std::runtime_error);
111  void DeSerializeBinary(std::istream & inputStream, const cmnDataFormat & localFormat, const cmnDataFormat & remoteFormat) throw (std::runtime_error);
112  void SerializeText(std::ostream & outputStream, const char delimiter = ',') const throw (std::runtime_error);
113  std::string SerializeDescription(const char delimiter = ',', const std::string & userDescription = "") const;
114  void DeSerializeText(std::istream & inputStream, const char delimiter = ',') throw (std::runtime_error);
115  std::string HumanReadable(void) const;
116  bool ScalarNumberIsFixed(void) const;
117  size_t ScalarNumber(void) const;
118  double Scalar(const size_t index) const throw (std::out_of_range);
119  std::string ScalarDescription(const size_t index, const std::string & userDescription = "") const throw (std::out_of_range);
120 #if CISST_HAS_JSON
121  void SerializeTextJSON(Json::Value & jsonValue) const;
122  void DeSerializeTextJSON(const Json::Value & jsonValue) throw (std::runtime_error);
123 #endif // CISST_HAS_JSON
124 
125 }; // mtsComponentState
126 
127 // mts-proxy set to declaration-only
129 CMN_DECLARE_SERVICES_INSTANTIATION(mtsComponentStateProxy);
130 
131 /* default functions */
132 void CISST_EXPORT cmnSerializeRaw(std::ostream & outputStream, const mtsComponentState & object);
133 void CISST_EXPORT cmnDeSerializeRaw(std::istream & inputStream, mtsComponentState & placeHolder);
134 /* data functions */
135 template <> class cmnData<mtsComponentState > {
136 public:
137  enum {IS_SPECIALIZED = 1};
139  static void Copy(DataType & data, const DataType & source) {
140  data.Copy(source);
141  }
142  static std::string SerializeDescription(const DataType & data, const char delimiter, const std::string & userDescription) {
143  return data.SerializeDescription(delimiter, userDescription);
144  }
145  static void SerializeBinary(const DataType & data, std::ostream & outputStream) throw (std::runtime_error) {
146  data.SerializeBinary(outputStream);
147  }
148  static void DeSerializeBinary(DataType & data, std::istream & inputStream, const cmnDataFormat & localFormat, const cmnDataFormat & remoteFormat) throw (std::runtime_error) {
149  data.DeSerializeBinary(inputStream, localFormat, remoteFormat);
150  }
151  static void SerializeText(const DataType & data, std::ostream & outputStream, const char delimiter = ',') throw (std::runtime_error) {
152  data.SerializeText(outputStream, delimiter);
153  }
154  static void DeSerializeText(DataType & data, std::istream & inputStream, const char delimiter = ',') throw (std::runtime_error) {
155  data.DeSerializeText(inputStream, delimiter);
156  }
157  static std::string HumanReadable(const DataType & data) {
158  return data.HumanReadable();
159  }
160  static bool ScalarNumberIsFixed(const DataType & data) {
161  return data.ScalarNumberIsFixed();
162  }
163  static size_t ScalarNumber(const DataType & data) {
164  return data.ScalarNumber();
165  }
166  static std::string ScalarDescription(const DataType & data, const size_t index, const std::string & userDescription = "") throw (std::out_of_range) {
167  return data.ScalarDescription(index, userDescription);
168  }
169  static double Scalar(const DataType & data, const size_t index) throw (std::out_of_range) {
170  return data.Scalar(index);
171  }
172 };
173 inline std::ostream & operator << (std::ostream & outputStream, const mtsComponentState & data) {
174  outputStream << cmnData<mtsComponentState >::HumanReadable(data);
175  return outputStream;
176 }
177 #if CISST_HAS_JSON
178 template <> void CISST_EXPORT cmnDataJSON<mtsComponentState >::SerializeText(const mtsComponentState & data, Json::Value & jsonValue);
179 template <> void CISST_EXPORT cmnDataJSON<mtsComponentState >::DeSerializeText(mtsComponentState & data, const Json::Value & jsonValue) throw (std::runtime_error);
180 #endif // CISST_HAS_JSON
183 #if CISST_HAS_JSON
185 #endif // CISST_HAS_JSON
186 
187 
188 #endif // _cisstMultiTask_mtsComponentState_h
static std::string HumanReadable(const DataType &data)
Definition: mtsComponentState.h:157
#define CISST_EXPORT
Definition: cmnExportMacros.h:50
void SerializeText(std::ostream &outputStream, const char delimiter= ',') const
void Copy(const mtsComponentState &source)
Definition: cmnDataFormat.h:32
static size_t ScalarNumber(const DataType &data)
Definition: mtsComponentState.h:163
static double Scalar(const DataType &data, const size_t index)
Definition: mtsComponentState.h:169
Class registration macros.
std::string ScalarDescription(const size_t index, const std::string &userDescription="") const
static bool ScalarNumberIsFixed(const DataType &data)
Definition: mtsComponentState.h:160
#define CMN_DECLARE_DATA_FUNCTIONS_JSON_FOR_ENUM(_enum)
Definition: cmnDataFunctionsEnumMacros.h:100
bool ScalarNumberIsFixed(void) const
mtsGenericObjectProxy< mtsComponentState > mtsComponentStateProxy
Definition: mtsComponentState.h:128
Enum
Definition: mtsComponentState.h:66
static void DeSerializeText(DataType &data, std::istream &inputStream, const char delimiter= ',')
Definition: mtsComponentState.h:154
std::ostream & operator<<(std::ostream &outputStream, const mtsComponentState &data)
Definition: mtsComponentState.h:173
void DeSerializeText(std::istream &inputStream, const char delimiter= ',')
mtsComponentState::Enum mState
Definition: mtsComponentState.h:71
static std::string ScalarDescription(const DataType &data, const size_t index, const std::string &userDescription="")
Definition: mtsComponentState.h:166
static void Copy(DataType &data, const DataType &source)
Definition: mtsComponentState.h:139
Forward declarations and #define for cisstMultiTask.
Definition: mtsComponentState.h:34
Definition: cmnDataFunctions.h:53
Definition: mtsComponentState.h:66
static void DeSerializeBinary(DataType &data, std::istream &inputStream, const cmnDataFormat &localFormat, const cmnDataFormat &remoteFormat)
Definition: mtsComponentState.h:148
Definition: cmnDataFunctions.h:56
static void SerializeBinary(const DataType &data, std::ostream &outputStream)
Definition: mtsComponentState.h:145
Defines cmnClassServices.
void CISST_EXPORT cmnSerializeRaw(std::ostream &outputStream, const mtsComponentState &object)
CMN_DECLARE_SERVICES_INSTANTIATION(mtsComponentStateProxy)
size_t ScalarNumber(void) const
std::string SerializeDescription(const char delimiter= ',', const std::string &userDescription="") const
Rules of exporting.
std::string CISST_EXPORT cmnDataHumanReadable_mtsComponentState_Enum(const mtsComponentState::Enum &data)
mtsComponentState DataType
Definition: mtsComponentState.h:138
Definition: mtsGenericObjectProxy.h:45
static void SerializeText(const DataType &data, std::ostream &outputStream, const char delimiter= ',')
Definition: mtsComponentState.h:151
std::string HumanReadable(void) const
void CISST_EXPORT cmnDeSerializeRaw(std::istream &inputStream, mtsComponentState &placeHolder)
mtsComponentState ThisType
Definition: mtsComponentState.h:79
static std::string SerializeDescription(const DataType &data, const char delimiter, const std::string &userDescription)
Definition: mtsComponentState.h:142
CMN_DATA_SPECIALIZATION_FOR_ENUM_USER_HUMAN_READABLE(mtsComponentState::Enum, int, cmnDataHumanReadable_mtsComponentState_Enum)