MAK RTIspy API Documentation for HLA Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
HLAinteger64Time.h
Go to the documentation of this file.
1 /***********************************************************************
2  The IEEE hereby grants a general, royalty-free license to copy, distribute,
3  display and make derivative works from this material, for all purposes,
4  provided that any use of the material contains the following
5  attribution: "Reprinted with permission from IEEE 1516.1(TM)-2010".
6  Should you require additional information, contact the Manager, Standards
7  Intellectual Property, IEEE Standards Association (stds-ipr@ieee.org).
8 ***********************************************************************/
9 /***********************************************************************
10  IEEE 1516.1 High Level Architecture Interface Specification C++ API
11  File: RTI/time/HLAinteger64Time.h
12 ***********************************************************************/
13 
14 #ifndef RTI_HLAinteger64Time_H_
15 #define RTI_HLAinteger64Time_H_
16 
17 #include <RTI/LogicalTime.h>
19 
20 // Defines interface for HLAinteger64Time which presents an integer-based
21 // time representation in the range 0 - 2^63-1. The encoded representation
22 // is HLAinteger64BE (signed, 64-bit, big-endian).
23 
24 namespace rti1516e
25 {
26  class HLAinteger64TimeImpl;
27 
29  {
30  public:
31  // Constructors
34  Integer64 value);
36  rti1516e::LogicalTime const & value);
38  HLAinteger64Time const & value);
39 
40  // Destructor
41  virtual ~HLAinteger64Time ()
42  throw ();
43 
44  // Basic accessors/mutators
45  virtual void setInitial ();
46 
47  virtual bool isInitial () const;
48 
49  virtual void setFinal ();
50 
51  virtual bool isFinal () const;
52 
53  // Assignment
54  virtual rti1516e::LogicalTime& operator= (
55  rti1516e::LogicalTime const & value)
56  throw (rti1516e::InvalidLogicalTime);
57 
58  // Operators
59 
60  virtual rti1516e::LogicalTime& operator+= (
61  rti1516e::LogicalTimeInterval const & addend)
62  throw (rti1516e::IllegalTimeArithmetic,
63  rti1516e::InvalidLogicalTimeInterval);
64 
65  virtual rti1516e::LogicalTime& operator-= (
66  rti1516e::LogicalTimeInterval const & subtrahend)
67  throw (rti1516e::IllegalTimeArithmetic,
68  rti1516e::InvalidLogicalTimeInterval);
69 
70  virtual bool operator> (
71  rti1516e::LogicalTime const & value) const
72  throw (rti1516e::InvalidLogicalTime);
73 
74  virtual bool operator< (
75  rti1516e::LogicalTime const & value) const
76  throw (rti1516e::InvalidLogicalTime);
77 
78  virtual bool operator== (
79  rti1516e::LogicalTime const & value) const
80  throw (rti1516e::InvalidLogicalTime);
81 
82  virtual bool operator>= (
83  rti1516e::LogicalTime const & value) const
84  throw (rti1516e::InvalidLogicalTime);
85 
86  virtual bool operator<= (
87  rti1516e::LogicalTime const & value) const
88  throw (rti1516e::InvalidLogicalTime);
89 
90  // Generates an encoded value that can be used to send
91  // LogicalTimes to other federates in updates or interactions
92  virtual rti1516e::VariableLengthData encode () const;
93 
94  // Alternate encode for directly filling a buffer
95  // Return the length of the encoded data
96  virtual size_t encode (
97  void* buffer,
98  size_t bufferSize) const
99  throw (rti1516e::CouldNotEncode);
100 
101  // The length of the encoded data
102  virtual size_t encodedLength () const;
103 
104  // Decode VariableLengthData into self
105  virtual void decode (
107  throw (rti1516e::InternalError,
108  rti1516e::CouldNotDecode);
109 
110  // Alternate decode that reads directly from a buffer
111  virtual void decode (
112  void* buffer,
113  size_t bufferSize)
114  throw (rti1516e::InternalError,
115  rti1516e::CouldNotDecode);
116 
117  // Diagnostic string representation of time
118  virtual std::wstring toString () const;
119 
120  // Return the name of the implementation, as needed by
121  // createFederationExecution.
122  virtual std::wstring implementationName () const;
123 
124 
125  public:
126  //-----------------------------------------------------------------
127  // Implementation functions
128  //-----------------------------------------------------------------
129  virtual Integer64 getTime () const;
130 
131  virtual void setTime (
132  Integer64 value);
133 
134  //-----------------------------------------------------------------
135  // Implementation operators
136  //-----------------------------------------------------------------
137  virtual HLAinteger64Time& operator= (
138  const HLAinteger64Time&)
139  throw (rti1516e::InvalidLogicalTime);
140 
141  operator Integer64 () const;
142 
143  private:
144 
145  //-----------------------------------------------------------------
146  // Interval implementation must have access to time implementation
147  // in order to calculate difference
148  //-----------------------------------------------------------------
149  friend class HLAinteger64Interval;;
150 
151  //-----------------------------------------------------------------
152  // Pointer to internal implementation
153  //-----------------------------------------------------------------
154  HLAinteger64TimeImpl* _impl;
155  };
156 }
157 
158 
159 #endif // RTI_HLAinteger64Time_H_
160 
Definition: LogicalTimeInterval.h:35
Definition: HLAinteger64Interval.h:28
#define RTI_EXPORT
Definition: SpecificConfig.h:63
Definition: LogicalTime.h:35
std::string toString(const std::wstring &inString)
Definition: objParams13.h:16
Definition: HLAinteger64Time.h:28
Definition: VariableLengthData.h:34
long long Integer64
Definition: EncodingConfig.h:38

Document ID: Generated on Thu May 11 15:55:32 EDT 2023 from SVN revision 254743
Copyright © 2005-2020 MAK Technologies Inc. All Rights Reserved (www.mak.com)