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

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)