MAK RTIspy API Documentation for HLA 1516
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
logicalTimeImplFloat.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2005 MaK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 /*******************************************************************************
6 ** $RCSfile: logicalTimeImplFloat.h,v $ $Revision: 1.1 $ $State: Exp $
7 *******************************************************************************/
8 
9 #ifndef RTI_LogicalTimeImplFloat_H_
10 #define RTI_LogicalTimeImplFloat_H_
11 
12 #include <RTI/LogicalTime.h>
14 
15 const std::wstring LogicalTimeImplFloatName(L"double");
16 
18 {
19 public:
20  static std::wstring theImplementationName;
21 
22 public:
23  // Constructors
25  LogicalTimeImplFloat(double const & value);
28 
29  // Destructor
30  virtual ~LogicalTimeImplFloat()
31  throw ();
32 
33  // Basic accessors/mutators
34  virtual void setInitial();
35  virtual bool isInitial() const;
36 
37  virtual void setFinal();
38  virtual bool isFinal() const;
39 
40  // Assignment
41  virtual rti1516::LogicalTime& operator= (rti1516::LogicalTime const & value)
42  throw (
43  rti1516::InvalidLogicalTime);
44 
45  virtual
46  rti1516::LogicalTime&
47  operator+= (rti1516::LogicalTimeInterval const & addend)
48  throw (
49  rti1516::IllegalTimeArithmetic,
50  rti1516::InvalidLogicalTimeInterval);
51 
52  virtual
53  rti1516::LogicalTime&
54  operator-= (rti1516::LogicalTimeInterval const & subtrahend)
55  throw (
56  rti1516::IllegalTimeArithmetic,
57  rti1516::InvalidLogicalTimeInterval);
58 
59  virtual
60  bool
61  operator> (rti1516::LogicalTime const & value) const
62  throw (
63  rti1516::InvalidLogicalTime);
64 
65  virtual
66  bool
67  operator< (rti1516::LogicalTime const & value) const
68  throw (
69  rti1516::InvalidLogicalTime);
70 
71  virtual
72  bool
73  operator== (rti1516::LogicalTime const & value) const
74  throw (
75  rti1516::InvalidLogicalTime);
76 
77  virtual
78  bool
79  operator>= (rti1516::LogicalTime const & value) const
80  throw (
81  rti1516::InvalidLogicalTime);
82 
83  virtual
84  bool
85  operator<= (rti1516::LogicalTime const & value) const
86  throw (
87  rti1516::InvalidLogicalTime);
88 
89  // Generates an encoded value that can be used to send
90  // LogicalTimes to other federates in updates or interactions
91  virtual rti1516::VariableLengthData encode() const;
92 
93  // Alternate encode for directly filling a buffer
94  virtual unsigned long encodedLength() const;
95  virtual unsigned long encode(void* buffer, unsigned long bufferSize) const
96  throw (rti1516::CouldNotEncode);
97 
98  // Decode VariableLengthData into self
99  virtual void decode(rti1516::VariableLengthData const & VariableLengthData)
100  throw (
101  rti1516::InternalError,
102  rti1516::CouldNotDecode);
103 
104  // Alternate decode that reads directly from a buffer
105  virtual void decode(void* buffer, unsigned long bufferSize)
106  throw (
107  rti1516::InternalError,
108  rti1516::CouldNotDecode);
109 
110  virtual std::wstring toString() const;
111 
112  // Returns the name of the Implementation, as needed by
113  // createFederationExecution.
114  virtual std::wstring implementationName() const;
115 
116 public:
117  //-----------------------------------------------------------------
118  // Implementation functions
119  //-----------------------------------------------------------------
120  virtual double getTime() const;
121 
122  //-----------------------------------------------------------------
123  // Implementation operators
124  //-----------------------------------------------------------------
125  virtual LogicalTimeImplFloat& operator= (const LogicalTimeImplFloat&)
126  throw (rti1516::InvalidLogicalTime);
127 
128  virtual rti1516::LogicalTime& operator= (double const & value)
129  throw (rti1516::InvalidLogicalTime);
130 
131  virtual rti1516::LogicalTime& operator+= (double const & value)
132  throw (rti1516::InvalidLogicalTime);
133 
134  virtual rti1516::LogicalTime& operator-= (double const & value)
135  throw (rti1516::InvalidLogicalTime);
136 
137  virtual bool operator== (double const & value) const
138  throw (rti1516::InvalidLogicalTime);
139 
140  virtual bool operator!= (double const & value) const
141  throw (rti1516::InvalidLogicalTime);
142 
143  virtual bool operator!= (rti1516::LogicalTime const & value) const
144  throw (rti1516::InvalidLogicalTime);
145 
146  virtual bool operator> (double const & value) const
147  throw (rti1516::InvalidLogicalTime);
148 
149  virtual bool operator< (double const & value) const
150  throw (rti1516::InvalidLogicalTime);
151 
152  virtual bool operator>= (double const & value) const
153  throw (rti1516::InvalidLogicalTime);
154 
155  virtual bool operator<= (double const & value) const
156  throw (rti1516::InvalidLogicalTime);
157 
158  private:
159 
161 
162  //-----------------------------------------------------------------
163  // Implementation member variables
164  //-----------------------------------------------------------------
165  double myLogicalTime;
166  double myZero;
167  double myEpsilon;
168  double myPositiveInfinity;
169 };
170 
171 #endif // RTI_LogicalTimeImplFloat_H_
172 
Definition: logicalTimeImplFloat.h:17
std::string toString(const std::wstring &inString)
Definition: objParams13.h:16
#define RTI_EXPORT_FEDTIME
Definition: SpecificConfig.h:56
Definition: logicalTimeIntervalImplFloat.h:31
static std::wstring theImplementationName
Definition: logicalTimeImplFloat.h:20
Definition: LogicalTime.h:27
const std::wstring LogicalTimeImplFloatName(L"double")

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)