cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mtsExecutionResult.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/../mtsExecutionResult.cdg
4 
5 #pragma once
6 #ifndef _cisstMultiTask_mtsExecutionResult_h
7 #define _cisstMultiTask_mtsExecutionResult_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  mtsExecutionResult(void);
41 
42 /* source line: 32 */
43 public:
44  enum Enum {UNDEFINED, COMMAND_SUCCEEDED, COMMAND_QUEUED, FUNCTION_NOT_BOUND, COMMAND_HAS_NO_MAILBOX, COMMAND_DISABLED, INTERFACE_COMMAND_MAILBOX_FULL, COMMAND_ARGUMENT_QUEUE_FULL, INVALID_INPUT_TYPE, METHOD_OR_FUNCTION_FAILED, NETWORK_ERROR, INVALID_COMMAND_ID, ARGUMENT_DYNAMIC_CREATION_FAILED, SERIALIZATION_ERROR, DESERIALIZATION_ERROR, NO_FINISHED_EVENT };
45  static std::string EnumToString(const Enum & value) throw (std::runtime_error);
46  static Enum EnumFromString(const std::string & value) throw (std::runtime_error);
47 /* source line: 100 */
48  protected:
50  public:
51  /* accessors is set to: all */
52  void GetValue(mtsExecutionResult::Enum & placeHolder) const;
53  void SetValue(const mtsExecutionResult::Enum & newValue);
54  /* accessors is set to: all */
55  const mtsExecutionResult::Enum & Value(void) const;
56  mtsExecutionResult::Enum & Value(void);
58 /* source line: 110 */
59 
61  const ThisType & operator = (const Enum & value);
62 
64  bool operator == (const ThisType & state) const;
65  bool operator != (const ThisType & state) const;
66 
68  static const std::string ToString(const Enum & value);
69 
71  Enum GetResult(void) const { return Value(); }
72 
74  bool IsOK(void) const;
75 
78  operator bool (void) const;
79 
80  public:
81  /* ctor-all-member is set to: true */
83  /* default methods */
84  public:
85  void SerializeRaw(std::ostream & outputStream) const;
86  void DeSerializeRaw(std::istream & inputStream);
87  void ToStream(std::ostream & outputStream) const;
88  void ToStreamRaw(std::ostream & outputStream, const char delimiter = ' ',
89  bool headerOnly = false, const std::string & headerPrefix = "") const;
90  /* default data methods */
91  public:
92  void Copy(const mtsExecutionResult & source);
93  void SerializeBinary(std::ostream & outputStream) const throw (std::runtime_error);
94  void DeSerializeBinary(std::istream & inputStream, const cmnDataFormat & localFormat, const cmnDataFormat & remoteFormat) throw (std::runtime_error);
95  void SerializeText(std::ostream & outputStream, const char delimiter = ',') const throw (std::runtime_error);
96  std::string SerializeDescription(const char delimiter = ',', const std::string & userDescription = "") const;
97  void DeSerializeText(std::istream & inputStream, const char delimiter = ',') throw (std::runtime_error);
98  std::string HumanReadable(void) const;
99  bool ScalarNumberIsFixed(void) const;
100  size_t ScalarNumber(void) const;
101  double Scalar(const size_t index) const throw (std::out_of_range);
102  std::string ScalarDescription(const size_t index, const std::string & userDescription = "") const throw (std::out_of_range);
103 #if CISST_HAS_JSON
104  void SerializeTextJSON(Json::Value & jsonValue) const;
105  void DeSerializeTextJSON(const Json::Value & jsonValue) throw (std::runtime_error);
106 #endif // CISST_HAS_JSON
107 
108 }; // mtsExecutionResult
109 
110 // mts-proxy set to declaration-only
112 CMN_DECLARE_SERVICES_INSTANTIATION(mtsExecutionResultProxy);
113 
114 /* default functions */
115 void CISST_EXPORT cmnSerializeRaw(std::ostream & outputStream, const mtsExecutionResult & object);
116 void CISST_EXPORT cmnDeSerializeRaw(std::istream & inputStream, mtsExecutionResult & placeHolder);
117 /* data functions */
118 template <> class cmnData<mtsExecutionResult > {
119 public:
120  enum {IS_SPECIALIZED = 1};
122  static void Copy(DataType & data, const DataType & source) {
123  data.Copy(source);
124  }
125  static std::string SerializeDescription(const DataType & data, const char delimiter, const std::string & userDescription) {
126  return data.SerializeDescription(delimiter, userDescription);
127  }
128  static void SerializeBinary(const DataType & data, std::ostream & outputStream) throw (std::runtime_error) {
129  data.SerializeBinary(outputStream);
130  }
131  static void DeSerializeBinary(DataType & data, std::istream & inputStream, const cmnDataFormat & localFormat, const cmnDataFormat & remoteFormat) throw (std::runtime_error) {
132  data.DeSerializeBinary(inputStream, localFormat, remoteFormat);
133  }
134  static void SerializeText(const DataType & data, std::ostream & outputStream, const char delimiter = ',') throw (std::runtime_error) {
135  data.SerializeText(outputStream, delimiter);
136  }
137  static void DeSerializeText(DataType & data, std::istream & inputStream, const char delimiter = ',') throw (std::runtime_error) {
138  data.DeSerializeText(inputStream, delimiter);
139  }
140  static std::string HumanReadable(const DataType & data) {
141  return data.HumanReadable();
142  }
143  static bool ScalarNumberIsFixed(const DataType & data) {
144  return data.ScalarNumberIsFixed();
145  }
146  static size_t ScalarNumber(const DataType & data) {
147  return data.ScalarNumber();
148  }
149  static std::string ScalarDescription(const DataType & data, const size_t index, const std::string & userDescription = "") throw (std::out_of_range) {
150  return data.ScalarDescription(index, userDescription);
151  }
152  static double Scalar(const DataType & data, const size_t index) throw (std::out_of_range) {
153  return data.Scalar(index);
154  }
155 };
156 inline std::ostream & operator << (std::ostream & outputStream, const mtsExecutionResult & data) {
157  outputStream << cmnData<mtsExecutionResult >::HumanReadable(data);
158  return outputStream;
159 }
160 #if CISST_HAS_JSON
161 template <> void CISST_EXPORT cmnDataJSON<mtsExecutionResult >::SerializeText(const mtsExecutionResult & data, Json::Value & jsonValue);
162 template <> void CISST_EXPORT cmnDataJSON<mtsExecutionResult >::DeSerializeText(mtsExecutionResult & data, const Json::Value & jsonValue) throw (std::runtime_error);
163 #endif // CISST_HAS_JSON
166 #if CISST_HAS_JSON
168 #endif // CISST_HAS_JSON
169 
170 
171 #endif // _cisstMultiTask_mtsExecutionResult_h
#define CISST_EXPORT
Definition: cmnExportMacros.h:50
void Copy(const mtsExecutionResult &source)
std::string ToString()
Definition: cisstVectorEigenAddons.h:30
CMN_DECLARE_SERVICES_INSTANTIATION(mtsExecutionResultProxy)
static std::string ScalarDescription(const DataType &data, const size_t index, const std::string &userDescription="")
Definition: mtsExecutionResult.h:149
Definition: mtsExecutionResult.h:44
Definition: cmnDataFormat.h:32
void SerializeText(std::ostream &outputStream, const char delimiter= ',') const
Class registration macros.
mtsGenericObjectProxy< mtsExecutionResult > mtsExecutionResultProxy
Definition: mtsExecutionResult.h:111
static bool ScalarNumberIsFixed(const DataType &data)
Definition: mtsExecutionResult.h:143
void CISST_EXPORT cmnSerializeRaw(std::ostream &outputStream, const mtsExecutionResult &object)
mtsExecutionResult DataType
Definition: mtsExecutionResult.h:121
static void SerializeText(const DataType &data, std::ostream &outputStream, const char delimiter= ',')
Definition: mtsExecutionResult.h:134
void DeSerializeText(std::istream &inputStream, const char delimiter= ',')
static void DeSerializeBinary(DataType &data, std::istream &inputStream, const cmnDataFormat &localFormat, const cmnDataFormat &remoteFormat)
Definition: mtsExecutionResult.h:131
Enum
Definition: mtsExecutionResult.h:44
#define CMN_DECLARE_DATA_FUNCTIONS_JSON_FOR_ENUM(_enum)
Definition: cmnDataFunctionsEnumMacros.h:100
static size_t ScalarNumber(const DataType &data)
Definition: mtsExecutionResult.h:146
std::string CISST_EXPORT cmnDataHumanReadable_mtsExecutionResult_Enum(const mtsExecutionResult::Enum &data)
Forward declarations and #define for cisstMultiTask.
bool ScalarNumberIsFixed(void) const
Definition: cmnDataFunctions.h:53
Definition: cmnDataFunctions.h:56
static void DeSerializeText(DataType &data, std::istream &inputStream, const char delimiter= ',')
Definition: mtsExecutionResult.h:137
std::string SerializeDescription(const char delimiter= ',', const std::string &userDescription="") const
static std::string HumanReadable(const DataType &data)
Definition: mtsExecutionResult.h:140
Defines cmnClassServices.
static std::string SerializeDescription(const DataType &data, const char delimiter, const std::string &userDescription)
Definition: mtsExecutionResult.h:125
mtsExecutionResult ThisType
Definition: mtsExecutionResult.h:57
size_t ScalarNumber(void) const
Definition: mtsExecutionResult.h:34
static void Copy(DataType &data, const DataType &source)
Definition: mtsExecutionResult.h:122
mtsExecutionResult::Enum mValue
Definition: mtsExecutionResult.h:49
void CISST_EXPORT cmnDeSerializeRaw(std::istream &inputStream, mtsExecutionResult &placeHolder)
Rules of exporting.
Enum GetResult(void) const
Definition: mtsExecutionResult.h:71
Definition: mtsGenericObjectProxy.h:45
std::string ScalarDescription(const size_t index, const std::string &userDescription="") const
static void SerializeBinary(const DataType &data, std::ostream &outputStream)
Definition: mtsExecutionResult.h:128
std::ostream & operator<<(std::ostream &outputStream, const mtsExecutionResult &data)
Definition: mtsExecutionResult.h:156
std::string HumanReadable(void) const
CMN_DATA_SPECIALIZATION_FOR_ENUM_USER_HUMAN_READABLE(mtsExecutionResult::Enum, int, cmnDataHumanReadable_mtsExecutionResult_Enum)
static double Scalar(const DataType &data, const size_t index)
Definition: mtsExecutionResult.h:152