26 #ifndef _mtsStateIndex_h
27 #define _mtsStateIndex_h
76 BaseType(), TimeIndex(0), TimeTicks(0), BufferLength(0)
82 TimeIndex(index), TimeTicks(ticks), BufferLength(Length)
111 TimeIndex = BufferLength-1;
119 TimeIndex =
static_cast<int>(TimeTicks % BufferLength);
126 return (tmp -= number);
131 return (TimeIndex == that.TimeIndex && TimeTicks == that.TimeTicks);
136 return !(*
this == that);
140 virtual void ToStream(std::ostream & outputStream)
const;
143 virtual void ToStreamRaw(std::ostream & outputStream,
const char delimiter =
' ',
144 bool headerOnly =
false,
const std::string & headerPrefix =
"")
const;
158 #endif // _mtsStateIndex_h
#define CISST_EXPORT
Definition: cmnExportMacros.h:50
mtsStateIndex & operator--()
Definition: mtsStateIndex.h:107
~mtsStateIndex()
Definition: mtsStateIndex.h:86
Declaration of cmnSerializer and functions cmnSerializeRaw.
virtual void SerializeRaw(std::ostream &outputStream) const
virtual void DeSerializeRaw(std::istream &inputStream)
TimeTicksType Ticks(void) const
Definition: mtsStateIndex.h:99
bool operator==(const mtsStateIndex &that) const
Definition: mtsStateIndex.h:130
mtsStateIndex operator-(int number)
Definition: mtsStateIndex.h:124
virtual void ToStream(std::ostream &outputStream) const
Base class for high level objects.
Definition: cmnGenericObject.h:51
Base class for data object in cisstMultiTask.
Definition: mtsGenericObject.h:56
int Length(void) const
Definition: mtsStateIndex.h:89
mtsStateIndex()
Definition: mtsStateIndex.h:75
mtsStateIndex & operator-=(int number)
Definition: mtsStateIndex.h:117
Defines mtsGenericObject.
#define CMN_DECLARE_SERVICES(hasDynamicCreation, lod)
Definition: cmnClassRegisterMacros.h:116
mtsGenericObject BaseType
Definition: mtsStateIndex.h:60
unsigned long long int TimeTicksType
Definition: mtsStateIndex.h:57
bool operator!=(const mtsStateIndex &that) const
Definition: mtsStateIndex.h:135
Declaration of cmnDeSerializer and functions cmnDeSerializeRaw.
mtsStateIndex(double timestamp, int index, TimeTicksType ticks, int Length)
Definition: mtsStateIndex.h:80
Definition: mtsStateIndex.h:51
const int CMN_DYNAMIC_CREATION
Definition: cmnClassRegisterMacros.h:331
virtual void ToStreamRaw(std::ostream &outputStream, const char delimiter= ' ', bool headerOnly=false, const std::string &headerPrefix="") const
#define CMN_DECLARE_SERVICES_INSTANTIATION(className)
Definition: cmnClassRegisterMacros.h:202
int Index(void) const
Definition: mtsStateIndex.h:94
#define CMN_LOG_ALLOW_DEFAULT
Definition: cmnLogLoD.h:76