MAK RTIspy API Documentation for HLA 1516
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
LogicalTimeInterval.h
Go to the documentation of this file.
1 /***********************************************************************
2  IEEE 1516.1 High Level Architecture Interface Specification C++ API
3  File: RTI/LogicalTimeInterval.h
4 ***********************************************************************/
5 
6 #ifndef RTI_LogicalTimeInterval_h
7 #define RTI_LogicalTimeInterval_h
8 
9 // The classes associated with logical time allow a federation to provide
10 // their own representation for logical time and logical time interval. The
11 // federation is responsible to inherit from the abstract classes declared
12 // below. The encoded time classes are used to hold the arbitrary bit
13 // representation of the logical time and logical time intervals.
14 
15 namespace rti1516
16 {
17  class LogicalTime;
18 }
19 
20 #include <RTI/SpecificConfig.h>
21 #include <RTI/Exception.h>
22 #include <string>
23 #include <RTI/VariableLengthData.h>
24 
25 namespace rti1516
26 {
28  {
29  public:
30  virtual
32  throw () = 0;
33 
34  virtual
35  void
36  setZero() = 0;
37 
38  virtual
39  bool
40  isZero() const = 0;
41 
42  virtual
43  void
44  setEpsilon() = 0;
45 
46  virtual
47  bool
48  isEpsilon() const = 0;
49 
50  virtual
52  operator=(LogicalTimeInterval const & value)
53  throw (InvalidLogicalTimeInterval) = 0;
54 
55  // Set self to the difference between two LogicalTimes
56  virtual
57  void
58  setToDifference(LogicalTime const & minuend,
59  LogicalTime const& subtrahend)
60  throw (InvalidLogicalTime) = 0;
61 
62  virtual
64  operator+=(LogicalTimeInterval const & addend)
65  throw (InvalidLogicalTimeInterval) = 0;
66 
67  virtual
69  operator-=(LogicalTimeInterval const & subtrahend)
70  throw (InvalidLogicalTimeInterval) = 0;
71 
72  virtual
73  bool
74  operator>(LogicalTimeInterval const & value) const
75  throw (InvalidLogicalTimeInterval) = 0;
76 
77  virtual
78  bool
79  operator<(LogicalTimeInterval const & value) const
80  throw (InvalidLogicalTimeInterval) = 0;
81 
82  virtual
83  bool
84  operator==(LogicalTimeInterval const & value) const
85  throw (InvalidLogicalTimeInterval) = 0;
86 
87  virtual
88  bool
89  operator>=(LogicalTimeInterval const & value) const
90  throw (InvalidLogicalTimeInterval) = 0;
91 
92  virtual
93  bool
94  operator<=(LogicalTimeInterval const & value) const
95  throw (InvalidLogicalTimeInterval) = 0;
96 
97  // Generates an encoded value that can be used to send
98  // LogicalTimeIntervals to other federates in updates or interactions
99  virtual VariableLengthData encode() const = 0;
100 
101  // Alternate encode for directly filling a buffer
102  virtual unsigned long encodedLength() const = 0;
103  virtual unsigned long encode(void* buffer, unsigned long bufferSize) const
104  throw (CouldNotEncode) = 0;
105 
106  // Decode encodedValue into self
107  virtual void decode(VariableLengthData const & encodedValue)
108  throw (InternalError,
109  CouldNotDecode) = 0;
110 
111  // Alternate decode that reads directly from a buffer
112  virtual void decode(void* buffer, unsigned long bufferSize)
113  throw (InternalError,
114  CouldNotDecode) = 0;
115 
116  virtual std::wstring toString() const = 0;
117 
118  // Returns the name of the implementation, as needed by
119  // createFederationExecution.
120  virtual std::wstring implementationName() const = 0;
121  };
122 
123  // Output operator for LogicalTimeInterval
124  std::wostream RTI_EXPORT &
125  operator << (std::wostream &, LogicalTimeInterval const &);
126 }
127 #endif // RTI_LogicalTimeInterval_h
#define RTI_EXPORT
Definition: SpecificConfig.h:55
std::string toString(const std::wstring &inString)
Definition: objParams13.h:16
Definition: LogicalTimeInterval.h:27
his file contains a class to hold an arbitrary array of bytes for encoded values, attribute values...
This file contains definitions that are used to isolate platform-specific elements of the API...
Definition: VariableLengthData.h:22
Definition: LogicalTime.h:27
std::wostream RTI_EXPORT & operator<<(std::wostream &, Exception const &)

Document ID: Generated on Sun Jul 20 16:15:30 EDT 2025 from SVN revision 277985
Copyright © 2005-2025 MAK Technologies Inc. All Rights Reserved (www.mak.com)