MAK RTIspy API Documentation for HLA Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
HLAinteger64Interval.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/HLAinteger64Interval.h
12 ***********************************************************************/
13 
14 #ifndef RTI_HLAinteger64Interval_H_
15 #define RTI_HLAinteger64Interval_H_
16 
19 
20 // Defines interface for HLAinteger64Time which presents an integer-based
21 // interval representation in the range 0 - 2^63-1. The encoded representation
22 // is HLAinteger64BE (signed, 64-bit, big-endian).
23 
24 namespace rti1516e
25 {
26  class HLAinteger64IntervalImpl;
27 
29  {
30  public:
31 
32  // Constructors
34 
36  HLAinteger64Interval const & rhs);
37 
39  rti1516e::LogicalTimeInterval const & rhs);
40 
42  Integer64);
43 
44  // Destructor
45  virtual ~HLAinteger64Interval()
46  throw ();
47 
48  // Basic accessors/mutators
49 
50  virtual void setZero ();
51 
52  virtual bool isZero () const;
53 
54  virtual void setEpsilon ();
55 
56  virtual bool isEpsilon () const;
57 
58  // Operators
59 
60  virtual rti1516e::LogicalTimeInterval& operator= (
61  rti1516e::LogicalTimeInterval const & value)
62  throw (rti1516e::InvalidLogicalTimeInterval);
63 
64  virtual rti1516e::LogicalTimeInterval& operator+= (
65  rti1516e::LogicalTimeInterval const & addend)
66  throw (rti1516e::IllegalTimeArithmetic,
67  rti1516e::InvalidLogicalTimeInterval);
68 
69  virtual rti1516e::LogicalTimeInterval& operator-= (
70  rti1516e::LogicalTimeInterval const & subtrahend)
71  throw (rti1516e::IllegalTimeArithmetic,
72  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  virtual bool operator<= (
91  rti1516e::LogicalTimeInterval const & value) const
92  throw (rti1516e::InvalidLogicalTimeInterval);
93 
94  // Set self to the difference between two LogicalTimes
95  virtual void setToDifference (
96  rti1516e::LogicalTime const & minuend,
97  rti1516e::LogicalTime const& subtrahend)
98  throw (rti1516e::IllegalTimeArithmetic,
99  rti1516e::InvalidLogicalTime);
100 
101  // Generates an encoded value that can be used to send
102  // LogicalTimeIntervals to other federates in updates or interactions
103  virtual rti1516e::VariableLengthData encode () const;
104 
105  // Alternate encode for directly filling a buffer
106  // Return the length of encoded data
107  virtual size_t encode (
108  void* buffer,
109  size_t bufferSize) const
110  throw (rti1516e::CouldNotEncode);
111 
112  // The length of the encoded data
113  virtual size_t encodedLength () const;
114 
115  // Decode encodedValue into self
116  virtual void decode (
117  rti1516e::VariableLengthData const & encodedValue)
118  throw (rti1516e::InternalError,
119  rti1516e::CouldNotDecode);
120 
121  // Decode encodedValue into self
122  // Alternate decode that reads directly from a buffer
123  virtual void decode (
124  void* buffer,
125  size_t bufferSize)
126  throw (rti1516e::InternalError,
127  rti1516e::CouldNotDecode);
128 
129  // Diagnostic string representation of time
130  virtual std::wstring toString () const;
131 
132  // Return the name of the Implementation, as needed by
133  // createFederationExecution.
134  virtual std::wstring implementationName () const;
135 
136  public:
137 
138  //-----------------------------------------------------------------
139  // Implementation functions
140  //-----------------------------------------------------------------
141 
142  virtual Integer64 getInterval () const;
143 
144  virtual void setInterval (
145  Integer64 value);
146 
147  //-----------------------------------------------------------------
148  // Implementation operators
149  //-----------------------------------------------------------------
150  virtual HLAinteger64Interval& operator= (
151  const HLAinteger64Interval& value)
152  throw (rti1516e::InvalidLogicalTimeInterval);
153 
154  operator Integer64 () const;
155 
156  private:
157 
158  //-----------------------------------------------------------------
159  // Pointer to internal Implementation
160  //-----------------------------------------------------------------
161  HLAinteger64IntervalImpl* _impl;
162  };
163 }
164 
165 #endif // RTI_HLAinteger64Interval_H_
166 

Document ID: Generated on Mon Mar 21 09:41:37 EDT 2016 from SVN revision 163228
Copyright © 2005-2015 VT MÄK Inc. All Rights Reserved (www.mak.com)