![]() |
MAK RTIspy API Documentation for HLA 1.3
|
00001 /*********************************************************************** 00002 The IEEE hereby grants a general, royalty-free license to copy, distribute, 00003 display and make derivative works from this material, for all purposes, 00004 provided that any use of the material contains the following 00005 attribution: "Reprinted with permission from IEEE 1516.1(TM)-2010". 00006 Should you require additional information, contact the Manager, Standards 00007 Intellectual Property, IEEE Standards Association (stds-ipr@ieee.org). 00008 ***********************************************************************/ 00009 /*********************************************************************** 00010 IEEE 1516.1 High Level Architecture Interface Specification C++ API 00011 File: RTI/time/HLAinteger64Interval.h 00012 ***********************************************************************/ 00013 00014 #ifndef RTI_HLAinteger64Interval_H_ 00015 #define RTI_HLAinteger64Interval_H_ 00016 00017 #include <RTI/LogicalTimeInterval.h> 00018 #include <RTI/encoding/EncodingConfig.h> 00019 00020 // Defines interface for HLAinteger64Time which presents an integer-based 00021 // interval representation in the range 0 - 2^63-1. The encoded representation 00022 // is HLAinteger64BE (signed, 64-bit, big-endian). 00023 00024 namespace rti1516e 00025 { 00026 class HLAinteger64IntervalImpl; 00027 00028 class RTI_EXPORT HLAinteger64Interval : public rti1516e::LogicalTimeInterval 00029 { 00030 public: 00031 00032 // Constructors 00033 HLAinteger64Interval (); 00034 00035 HLAinteger64Interval ( 00036 HLAinteger64Interval const & rhs); 00037 00038 HLAinteger64Interval ( 00039 rti1516e::LogicalTimeInterval const & rhs); 00040 00041 HLAinteger64Interval ( 00042 Integer64); 00043 00044 // Destructor 00045 virtual ~HLAinteger64Interval() 00046 throw (); 00047 00048 // Basic accessors/mutators 00049 00050 virtual void setZero (); 00051 00052 virtual bool isZero () const; 00053 00054 virtual void setEpsilon (); 00055 00056 virtual bool isEpsilon () const; 00057 00058 // Operators 00059 00060 virtual rti1516e::LogicalTimeInterval& operator= ( 00061 rti1516e::LogicalTimeInterval const & value) 00062 throw (rti1516e::InvalidLogicalTimeInterval); 00063 00064 virtual rti1516e::LogicalTimeInterval& operator+= ( 00065 rti1516e::LogicalTimeInterval const & addend) 00066 throw (rti1516e::IllegalTimeArithmetic, 00067 rti1516e::InvalidLogicalTimeInterval); 00068 00069 virtual rti1516e::LogicalTimeInterval& operator-= ( 00070 rti1516e::LogicalTimeInterval const & subtrahend) 00071 throw (rti1516e::IllegalTimeArithmetic, 00072 rti1516e::InvalidLogicalTimeInterval); 00073 00074 virtual bool operator> ( 00075 rti1516e::LogicalTimeInterval const & value) const 00076 throw (rti1516e::InvalidLogicalTimeInterval); 00077 00078 virtual bool operator< ( 00079 rti1516e::LogicalTimeInterval const & value) const 00080 throw (rti1516e::InvalidLogicalTimeInterval); 00081 00082 virtual bool operator== ( 00083 rti1516e::LogicalTimeInterval const & value) const 00084 throw (rti1516e::InvalidLogicalTimeInterval); 00085 00086 virtual bool operator>= ( 00087 rti1516e::LogicalTimeInterval const & value) const 00088 throw (rti1516e::InvalidLogicalTimeInterval); 00089 00090 virtual bool operator<= ( 00091 rti1516e::LogicalTimeInterval const & value) const 00092 throw (rti1516e::InvalidLogicalTimeInterval); 00093 00094 // Set self to the difference between two LogicalTimes 00095 virtual void setToDifference ( 00096 rti1516e::LogicalTime const & minuend, 00097 rti1516e::LogicalTime const& subtrahend) 00098 throw (rti1516e::IllegalTimeArithmetic, 00099 rti1516e::InvalidLogicalTime); 00100 00101 // Generates an encoded value that can be used to send 00102 // LogicalTimeIntervals to other federates in updates or interactions 00103 virtual rti1516e::VariableLengthData encode () const; 00104 00105 // Alternate encode for directly filling a buffer 00106 // Return the length of encoded data 00107 virtual size_t encode ( 00108 void* buffer, 00109 size_t bufferSize) const 00110 throw (rti1516e::CouldNotEncode); 00111 00112 // The length of the encoded data 00113 virtual size_t encodedLength () const; 00114 00115 // Decode encodedValue into self 00116 virtual void decode ( 00117 rti1516e::VariableLengthData const & encodedValue) 00118 throw (rti1516e::InternalError, 00119 rti1516e::CouldNotDecode); 00120 00121 // Decode encodedValue into self 00122 // Alternate decode that reads directly from a buffer 00123 virtual void decode ( 00124 void* buffer, 00125 size_t bufferSize) 00126 throw (rti1516e::InternalError, 00127 rti1516e::CouldNotDecode); 00128 00129 // Diagnostic string representation of time 00130 virtual std::wstring toString () const; 00131 00132 // Return the name of the Implementation, as needed by 00133 // createFederationExecution. 00134 virtual std::wstring implementationName () const; 00135 00136 public: 00137 00138 //----------------------------------------------------------------- 00139 // Implementation functions 00140 //----------------------------------------------------------------- 00141 00142 virtual Integer64 getInterval () const; 00143 00144 virtual void setInterval ( 00145 Integer64 value); 00146 00147 //----------------------------------------------------------------- 00148 // Implementation operators 00149 //----------------------------------------------------------------- 00150 virtual HLAinteger64Interval& operator= ( 00151 const HLAinteger64Interval& value) 00152 throw (rti1516e::InvalidLogicalTimeInterval); 00153 00154 operator Integer64 () const; 00155 00156 private: 00157 00158 //----------------------------------------------------------------- 00159 // Pointer to internal Implementation 00160 //----------------------------------------------------------------- 00161 HLAinteger64IntervalImpl* _impl; 00162 }; 00163 } 00164 00165 #endif // RTI_HLAinteger64Interval_H_ 00166