![]() |
MAK RTIspy API Documentation for HLA 1.3
|
00001 /******************************************************************************* 00002 ** Copyright (c) 2005 MaK Technologies, Inc. 00003 ** All rights reserved. 00004 *******************************************************************************/ 00005 /******************************************************************************* 00006 ** $RCSfile: logicalTimeImplUnsignedInteger.h,v $ $Revision: 1.2 $ $State: Exp $ 00007 *******************************************************************************/ 00008 00009 #ifndef RTI_LogicalTimeImplUnsignedInteger_H_ 00010 #define RTI_LogicalTimeImplUnsignedInteger_H_ 00011 00012 #include <RTI/LogicalTime.h> 00013 #include <RTI/logicalTimeIntervalImplUnsignedInteger.h> 00014 00015 class RTI_EXPORT_FEDTIME LogicalTimeImplUnsignedInteger : public rti1516::LogicalTime 00016 { 00017 public: 00018 static std::wstring theImplementationName; 00019 00020 public: 00021 // Constructors 00022 LogicalTimeImplUnsignedInteger(); 00023 LogicalTimeImplUnsignedInteger(DtLtU64 const & value); 00024 LogicalTimeImplUnsignedInteger(rti1516::LogicalTime const & value); 00025 LogicalTimeImplUnsignedInteger(LogicalTimeImplUnsignedInteger const & value); 00026 00027 // Destructor 00028 virtual ~LogicalTimeImplUnsignedInteger() 00029 throw (); 00030 00031 // Basic accessors/mutators 00032 virtual void setInitial(); 00033 virtual bool isInitial() const; 00034 00035 virtual void setFinal(); 00036 virtual bool isFinal() const; 00037 00038 // Assignment 00039 virtual rti1516::LogicalTime& operator= (rti1516::LogicalTime const & value) 00040 throw ( 00041 rti1516::InvalidLogicalTime); 00042 00043 virtual 00044 rti1516::LogicalTime& 00045 operator+= (rti1516::LogicalTimeInterval const & addend) 00046 throw ( 00047 rti1516::IllegalTimeArithmetic, 00048 rti1516::InvalidLogicalTimeInterval); 00049 00050 virtual 00051 rti1516::LogicalTime& 00052 operator-= (rti1516::LogicalTimeInterval const & subtrahend) 00053 throw ( 00054 rti1516::IllegalTimeArithmetic, 00055 rti1516::InvalidLogicalTimeInterval); 00056 00057 virtual 00058 bool 00059 operator> (rti1516::LogicalTime const & value) const 00060 throw ( 00061 rti1516::InvalidLogicalTime); 00062 00063 virtual 00064 bool 00065 operator< (rti1516::LogicalTime const & value) const 00066 throw ( 00067 rti1516::InvalidLogicalTime); 00068 00069 virtual 00070 bool 00071 operator== (rti1516::LogicalTime const & value) const 00072 throw ( 00073 rti1516::InvalidLogicalTime); 00074 00075 virtual 00076 bool 00077 operator>= (rti1516::LogicalTime const & value) const 00078 throw ( 00079 rti1516::InvalidLogicalTime); 00080 00081 virtual 00082 bool 00083 operator<= (rti1516::LogicalTime const & value) const 00084 throw ( 00085 rti1516::InvalidLogicalTime); 00086 00087 // Generates an encoded value that can be used to send 00088 // LogicalTimes to other federates in updates or interactions 00089 virtual rti1516::VariableLengthData encode() const; 00090 00091 // Alternate encode for directly filling a buffer 00092 virtual unsigned long encodedLength() const; 00093 virtual unsigned long encode(void* buffer, unsigned long bufferSize) const 00094 throw (rti1516::CouldNotEncode); 00095 00096 // Decode VariableLengthData into self 00097 virtual void decode(rti1516::VariableLengthData const & VariableLengthData) 00098 throw ( 00099 rti1516::InternalError, 00100 rti1516::CouldNotDecode); 00101 00102 // Alternate decode that reads directly from a buffer 00103 virtual void decode(void* buffer, unsigned long bufferSize) 00104 throw ( 00105 rti1516::InternalError, 00106 rti1516::CouldNotDecode); 00107 00108 virtual std::wstring toString() const; 00109 00110 // Returns the name of the implementation, as needed by 00111 // createFederationExecution. 00112 virtual std::wstring implementationName() const; 00113 00114 00115 public: 00116 //----------------------------------------------------------------- 00117 // Implementation functions 00118 //----------------------------------------------------------------- 00119 virtual DtLtU64 getTime() const; 00120 00121 //----------------------------------------------------------------- 00122 // Implementation operators 00123 //----------------------------------------------------------------- 00124 virtual LogicalTimeImplUnsignedInteger& operator= (const LogicalTimeImplUnsignedInteger&) 00125 throw (rti1516::InvalidLogicalTime); 00126 00127 virtual rti1516::LogicalTime& operator= (DtLtU64 const & value) 00128 throw (rti1516::InvalidLogicalTime); 00129 00130 virtual rti1516::LogicalTime& operator+= (DtLtU64 const & value) 00131 throw (rti1516::InvalidLogicalTime); 00132 00133 virtual rti1516::LogicalTime& operator-= (DtLtU64 const & value) 00134 throw (rti1516::InvalidLogicalTime); 00135 00136 virtual bool operator== (DtLtU64 const & value) const 00137 throw (rti1516::InvalidLogicalTime); 00138 00139 virtual bool operator!= (DtLtU64 const & value) const 00140 throw (rti1516::InvalidLogicalTime); 00141 00142 virtual bool operator!= (rti1516::LogicalTime const & value) const 00143 throw (rti1516::InvalidLogicalTime); 00144 00145 virtual bool operator> (DtLtU64 const & value) const 00146 throw (rti1516::InvalidLogicalTime); 00147 00148 virtual bool operator< (DtLtU64 const & value) const 00149 throw (rti1516::InvalidLogicalTime); 00150 00151 virtual bool operator>= (DtLtU64 const & value) const 00152 throw (rti1516::InvalidLogicalTime); 00153 00154 virtual bool operator<= (DtLtU64 const & value) const 00155 throw (rti1516::InvalidLogicalTime); 00156 00157 private: 00158 00159 friend class LogicalTimeIntervalImplUnsignedInteger; 00160 00161 //----------------------------------------------------------------- 00162 // Implementation member variables 00163 //----------------------------------------------------------------- 00164 DtLtU64 myLogicalTime; 00165 DtLtU64 myZero; 00166 DtLtU64 myEpsilon; 00167 DtLtU64 myPositiveInfinity; 00168 00169 }; 00170 00171 00172 #endif // RTI_LogicalTimeImplUnsignedInteger_H_ 00173