![]() |
MAK RTIspy API Documentation for HLA Evolved
|
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/HLAfloat64Interval.h 00012 ***********************************************************************/ 00013 00014 #ifndef RTI_HLAfloat64Interval_H_ 00015 #define RTI_HLAfloat64Interval_H_ 00016 00017 #include <RTI/LogicalTimeInterval.h> 00018 00019 00020 namespace rti1516e 00021 { 00022 class HLAfloat64IntervalImpl; 00023 00024 class RTI_EXPORT HLAfloat64Interval : public rti1516e::LogicalTimeInterval 00025 { 00026 public: 00027 00028 // Constructors 00029 HLAfloat64Interval (); 00030 00031 HLAfloat64Interval ( 00032 double); 00033 00034 HLAfloat64Interval ( 00035 rti1516e::LogicalTimeInterval const &); 00036 00037 HLAfloat64Interval ( 00038 const HLAfloat64Interval&); 00039 00040 // Destructor 00041 virtual ~HLAfloat64Interval () 00042 throw (); 00043 00044 // Basic accessors/mutators 00045 00046 virtual void setZero (); 00047 00048 virtual bool isZero () const; 00049 00050 virtual void setEpsilon (); 00051 00052 virtual bool isEpsilon () const; 00053 00054 // Operators 00055 00056 virtual rti1516e::LogicalTimeInterval& operator= ( 00057 rti1516e::LogicalTimeInterval const & value) 00058 throw (rti1516e::InvalidLogicalTimeInterval); 00059 00060 virtual rti1516e::LogicalTimeInterval& operator+= ( 00061 rti1516e::LogicalTimeInterval const & addend) 00062 throw (rti1516e::IllegalTimeArithmetic, 00063 rti1516e::InvalidLogicalTimeInterval); 00064 00065 virtual rti1516e::LogicalTimeInterval& operator-= ( 00066 rti1516e::LogicalTimeInterval const & subtrahend) 00067 throw (rti1516e::IllegalTimeArithmetic, 00068 rti1516e::InvalidLogicalTimeInterval); 00069 00070 virtual bool operator> ( 00071 rti1516e::LogicalTimeInterval const & value) const 00072 throw (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 // Set self to the difference between two LogicalTimes 00091 virtual void setToDifference ( 00092 rti1516e::LogicalTime const & minuend, 00093 rti1516e::LogicalTime const& subtrahend) 00094 throw (rti1516e::IllegalTimeArithmetic, 00095 rti1516e::InvalidLogicalTime); 00096 00097 // Generates an encoded value that can be used to send 00098 // LogicalTimeIntervals to other federates in updates or interactions 00099 virtual rti1516e::VariableLengthData encode () const; 00100 00101 // Alternate encode for directly filling a buffer 00102 virtual size_t encode ( 00103 void* buffer, 00104 size_t bufferSize) const 00105 throw (rti1516e::CouldNotEncode); 00106 00107 // The length of the encoded data 00108 virtual size_t encodedLength () const; 00109 00110 // Decode encodedValue into self 00111 virtual void decode ( 00112 rti1516e::VariableLengthData const & encodedValue) 00113 throw (rti1516e::InternalError, 00114 rti1516e::CouldNotDecode); 00115 00116 // Alternate decode that reads directly from a buffer 00117 virtual void decode ( 00118 void* buffer, 00119 size_t bufferSize) 00120 throw (rti1516e::InternalError, 00121 rti1516e::CouldNotDecode); 00122 00123 // Diagnostic string representation of time 00124 virtual std::wstring toString () const; 00125 00126 // Return the name of the Implementation, as needed by 00127 // createFederationExecution. 00128 virtual std::wstring implementationName() const; 00129 00130 public: 00131 //----------------------------------------------------------------- 00132 // Implementation functions 00133 //----------------------------------------------------------------- 00134 00135 virtual double getInterval () const; 00136 00137 virtual void setInterval ( 00138 double value); 00139 00140 //----------------------------------------------------------------- 00141 // Implementation operators 00142 //----------------------------------------------------------------- 00143 virtual HLAfloat64Interval& operator= ( 00144 const HLAfloat64Interval& value) 00145 throw (rti1516e::InvalidLogicalTimeInterval); 00146 00147 operator double () const; 00148 00149 00150 private: 00151 00152 //----------------------------------------------------------------- 00153 // Pointer to internal implementation 00154 //----------------------------------------------------------------- 00155 HLAfloat64IntervalImpl* _impl; 00156 }; 00157 } 00158 00159 #endif // RTI_HLAfloat64Interval_H_ 00160