MAK RTIspy API Documentation for HLA Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
HLAfloat64Time.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/HLAfloat64Time.h
12 ***********************************************************************/
13 
14 #ifndef RTI_HLAfloat64Time_H_
15 #define RTI_HLAfloat64Time_H_
16 
17 #include <RTI/LogicalTime.h>
19 
20 namespace rti1516e
21 {
22  class HLAfloat64TimeImpl;
23 
25  {
26  public:
27  // Constructors
28  HLAfloat64Time ();
29 
31  double const & value);
32 
34  rti1516e::LogicalTime const & value);
35 
37  HLAfloat64Time const & value);
38 
39  // Destructor
40  virtual ~HLAfloat64Time ()
41  throw ();
42 
43  // Basic accessors/mutators
44  virtual void setInitial ();
45 
46  virtual bool isInitial () const;
47 
48  virtual void setFinal ();
49 
50  virtual bool isFinal () const;
51 
52  // Assignment
53  virtual rti1516e::LogicalTime& operator= (
54  rti1516e::LogicalTime const & value)
55  throw (rti1516e::InvalidLogicalTime);
56 
57  // Operators
58 
59  virtual rti1516e::LogicalTime& operator+= (
60  rti1516e::LogicalTimeInterval const & addend)
61  throw (rti1516e::IllegalTimeArithmetic,
62  rti1516e::InvalidLogicalTimeInterval);
63 
64  virtual rti1516e::LogicalTime& operator-= (
65  rti1516e::LogicalTimeInterval const & subtrahend)
66  throw (rti1516e::IllegalTimeArithmetic,
67  rti1516e::InvalidLogicalTimeInterval);
68 
69  virtual bool operator> (
70  rti1516e::LogicalTime const & value) const
71  throw (rti1516e::InvalidLogicalTime);
72 
73  virtual bool operator< (
74  rti1516e::LogicalTime const & value) const
75  throw (rti1516e::InvalidLogicalTime);
76 
77  virtual bool operator== (
78  rti1516e::LogicalTime const & value) const
79  throw (rti1516e::InvalidLogicalTime);
80 
81  virtual bool operator>= (
82  rti1516e::LogicalTime const & value) const
83  throw (rti1516e::InvalidLogicalTime);
84 
85  virtual bool operator<= (
86  rti1516e::LogicalTime const & value) const
87  throw (rti1516e::InvalidLogicalTime);
88 
89  // Generates an encoded value that can be used to send
90  // LogicalTimes to other federates in updates or interactions
91  virtual rti1516e::VariableLengthData encode() const;
92 
93  // Alternate encode for directly filling a buffer
94  virtual size_t encode (
95  void* buffer,
96  size_t bufferSize) const
97  throw (rti1516e::CouldNotEncode);
98 
99  // The length of the encoded data
100  virtual size_t encodedLength () const;
101 
102  // Decode VariableLengthData into self
103  virtual void decode (
105  throw (rti1516e::InternalError,
106  rti1516e::CouldNotDecode);
107 
108  // Alternate decode that reads directly from a buffer
109  virtual void decode (
110  void* buffer,
111  size_t bufferSize)
112  throw (rti1516e::InternalError,
113  rti1516e::CouldNotDecode);
114 
115  // Diagnostic string representation of time
116  virtual std::wstring toString () const;
117 
118  // Return the name of the Implementation, as needed by
119  // createFederationExecution.
120  virtual std::wstring implementationName() const;
121 
122  public:
123  //-----------------------------------------------------------------
124  // Implementation methods
125  //-----------------------------------------------------------------
126  virtual double getTime () const;
127 
128  virtual void setTime (
129  double value);
130 
131  //-----------------------------------------------------------------
132  // Implementation operators
133  //-----------------------------------------------------------------
134  virtual HLAfloat64Time& operator= (
135  const HLAfloat64Time&)
136  throw (rti1516e::InvalidLogicalTime);
137 
138  operator double() const;
139 
140  private:
141 
142  //-----------------------------------------------------------------
143  // Interval implementation must have access to time implementation
144  // in order to calculate difference
145  //-----------------------------------------------------------------
146  friend class HLAfloat64Interval;
147 
148  //-----------------------------------------------------------------
149  // Pointer to internal implementation
150  //-----------------------------------------------------------------
151  HLAfloat64TimeImpl* _impl;
152  };
153 }
154 
155 #endif // RTI_HLAfloat64Time_H_
156 

Document ID: Generated on Fri Sep 27 00:57:56 EDT 2019 from SVN revision 201708
Copyright © 2005-2018 VT MÄK Inc. All Rights Reserved (www.mak.com)