25#ifndef _mtsStateIndex_h
26#define _mtsStateIndex_h
75 BaseType(), TimeIndex(0), TimeTicks(0), BufferLength(0)
81 TimeIndex(index), TimeTicks(ticks), BufferLength(
Length)
110 TimeIndex = BufferLength-1;
118 TimeIndex =
static_cast<int>(TimeTicks % BufferLength);
125 return (tmp -= number);
130 return (TimeIndex == that.TimeIndex && TimeTicks == that.TimeTicks);
135 return !(*
this == that);
139 void ToStream(std::ostream & outputStream)
const override;
142 void ToStreamRaw(std::ostream & outputStream,
const char delimiter =
' ',
143 bool headerOnly =
false,
const std::string & headerPrefix =
"")
const override;
mtsGenericObject(void)
Definition mtsGenericObject.h:77
Definition mtsStateIndex.h:50
mtsStateIndex(double timestamp, int index, TimeTicksType ticks, int Length)
Definition mtsStateIndex.h:79
mtsStateIndex & operator--()
Definition mtsStateIndex.h:106
bool operator==(const mtsStateIndex &that) const
Definition mtsStateIndex.h:129
void DeSerializeRaw(std::istream &inputStream) override
void SerializeRaw(std::ostream &outputStream) const override
unsigned long long int TimeTicksType
Definition mtsStateIndex.h:56
void ToStream(std::ostream &outputStream) const override
mtsGenericObject BaseType
Definition mtsStateIndex.h:59
TimeTicksType Ticks(void) const
Definition mtsStateIndex.h:98
void ToStreamRaw(std::ostream &outputStream, const char delimiter=' ', bool headerOnly=false, const std::string &headerPrefix="") const override
mtsStateIndex & operator-=(int number)
Definition mtsStateIndex.h:116
bool operator!=(const mtsStateIndex &that) const
Definition mtsStateIndex.h:134
mtsStateIndex operator-(int number)
Definition mtsStateIndex.h:123
int Index(void) const
Definition mtsStateIndex.h:93
mtsStateIndex()
Definition mtsStateIndex.h:74
~mtsStateIndex()
Definition mtsStateIndex.h:85
int Length(void) const
Definition mtsStateIndex.h:88
#define CMN_DECLARE_SERVICES_INSTANTIATION(className)
Definition cmnClassRegisterMacros.h:199
const int CMN_DYNAMIC_CREATION
Definition cmnClassRegisterMacros.h:328
Declaration of cmnDeSerializer and functions cmnDeSerializeRaw.
#define CISST_EXPORT
Definition cmnExportMacros.h:50
#define CMN_LOG_ALLOW_DEFAULT
Definition cmnLogLoD.h:76
Declaration of cmnSerializer and functions cmnSerializeRaw.
Defines mtsGenericObject.