![]() |
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/HLAinteger64Time.h 00012 ***********************************************************************/ 00013 00014 #ifndef RTI_HLAinteger64Time_H_ 00015 #define RTI_HLAinteger64Time_H_ 00016 00017 #include <RTI/LogicalTime.h> 00018 #include <RTI/time/HLAinteger64Interval.h> 00019 00020 // Defines interface for HLAinteger64Time which presents an integer-based 00021 // time 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 HLAinteger64TimeImpl; 00027 00028 class RTI_EXPORT HLAinteger64Time : public rti1516e::LogicalTime 00029 { 00030 public: 00031 // Constructors 00032 HLAinteger64Time (); 00033 HLAinteger64Time ( 00034 Integer64 value); 00035 HLAinteger64Time ( 00036 rti1516e::LogicalTime const & value); 00037 HLAinteger64Time ( 00038 HLAinteger64Time const & value); 00039 00040 // Destructor 00041 virtual ~HLAinteger64Time () 00042 throw (); 00043 00044 // Basic accessors/mutators 00045 virtual void setInitial (); 00046 00047 virtual bool isInitial () const; 00048 00049 virtual void setFinal (); 00050 00051 virtual bool isFinal () const; 00052 00053 // Assignment 00054 virtual rti1516e::LogicalTime& operator= ( 00055 rti1516e::LogicalTime const & value) 00056 throw (rti1516e::InvalidLogicalTime); 00057 00058 // Operators 00059 00060 virtual rti1516e::LogicalTime& operator+= ( 00061 rti1516e::LogicalTimeInterval const & addend) 00062 throw (rti1516e::IllegalTimeArithmetic, 00063 rti1516e::InvalidLogicalTimeInterval); 00064 00065 virtual rti1516e::LogicalTime& operator-= ( 00066 rti1516e::LogicalTimeInterval const & subtrahend) 00067 throw (rti1516e::IllegalTimeArithmetic, 00068 rti1516e::InvalidLogicalTimeInterval); 00069 00070 virtual bool operator> ( 00071 rti1516e::LogicalTime const & value) const 00072 throw (rti1516e::InvalidLogicalTime); 00073 00074 virtual bool operator< ( 00075 rti1516e::LogicalTime const & value) const 00076 throw (rti1516e::InvalidLogicalTime); 00077 00078 virtual bool operator== ( 00079 rti1516e::LogicalTime const & value) const 00080 throw (rti1516e::InvalidLogicalTime); 00081 00082 virtual bool operator>= ( 00083 rti1516e::LogicalTime const & value) const 00084 throw (rti1516e::InvalidLogicalTime); 00085 00086 virtual bool operator<= ( 00087 rti1516e::LogicalTime const & value) const 00088 throw (rti1516e::InvalidLogicalTime); 00089 00090 // Generates an encoded value that can be used to send 00091 // LogicalTimes to other federates in updates or interactions 00092 virtual rti1516e::VariableLengthData encode () const; 00093 00094 // Alternate encode for directly filling a buffer 00095 // Return the length of the encoded data 00096 virtual size_t encode ( 00097 void* buffer, 00098 size_t bufferSize) const 00099 throw (rti1516e::CouldNotEncode); 00100 00101 // The length of the encoded data 00102 virtual size_t encodedLength () const; 00103 00104 // Decode VariableLengthData into self 00105 virtual void decode ( 00106 rti1516e::VariableLengthData const & VariableLengthData) 00107 throw (rti1516e::InternalError, 00108 rti1516e::CouldNotDecode); 00109 00110 // Alternate decode that reads directly from a buffer 00111 virtual void decode ( 00112 void* buffer, 00113 size_t bufferSize) 00114 throw (rti1516e::InternalError, 00115 rti1516e::CouldNotDecode); 00116 00117 // Diagnostic string representation of time 00118 virtual std::wstring toString () const; 00119 00120 // Return the name of the implementation, as needed by 00121 // createFederationExecution. 00122 virtual std::wstring implementationName () const; 00123 00124 00125 public: 00126 //----------------------------------------------------------------- 00127 // Implementation functions 00128 //----------------------------------------------------------------- 00129 virtual Integer64 getTime () const; 00130 00131 virtual void setTime ( 00132 Integer64 value); 00133 00134 //----------------------------------------------------------------- 00135 // Implementation operators 00136 //----------------------------------------------------------------- 00137 virtual HLAinteger64Time& operator= ( 00138 const HLAinteger64Time&) 00139 throw (rti1516e::InvalidLogicalTime); 00140 00141 operator Integer64 () const; 00142 00143 private: 00144 00145 //----------------------------------------------------------------- 00146 // Interval implementation must have access to time implementation 00147 // in order to calculate difference 00148 //----------------------------------------------------------------- 00149 friend class HLAinteger64Interval;; 00150 00151 //----------------------------------------------------------------- 00152 // Pointer to internal implementation 00153 //----------------------------------------------------------------- 00154 HLAinteger64TimeImpl* _impl; 00155 }; 00156 } 00157 00158 00159 #endif // RTI_HLAinteger64Time_H_ 00160