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