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

Document ID: Generated on Fri Mar 14 19:08:55 EDT 2014 from SVN revision 137085
Copyright © 2005-2014 VT MÄK Inc. All Rights Reserved (www.mak.com)