MAK RTIspy API Documentation for HLA 4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
HLAinteger64Time.h
Go to the documentation of this file.
1 #pragma once
2 /***********************************************************************
3  The IEEE hereby grants a general, royalty-free license to copy, distribute,
4  display and make derivative works from this material, for all purposes,
5  provided that any use of the material contains the following
6  attribution: "Reprinted with permission from IEEE 1516.1(TM)-2025".
7  Should you require additional information, contact the Manager, Standards
8  Intellectual Property, IEEE Standards Association (stds-ipr@ieee.org).
9 ***********************************************************************/
10 
11 #include <RTI/time/LogicalTime.h>
13 
14 // Defines interface for HLAinteger64Time which presents an integer-based
15 // time representation in the range 0 - 2^63-1. The encoded representation
16 // is HLAinteger64BE (signed, 64-bit, big-endian).
17 
18 namespace rti1516_2025
19 {
20  class HLAinteger64TimeImpl;
21 
23  {
24  public:
25  // Constructors
28  Integer64 value);
30  rti1516_2025::LogicalTime const & value);
32  HLAinteger64Time const & value);
33 
34  // Destructor
36  noexcept override;
37 
38  // Basic accessors/mutators
39  void setInitial () override;
40 
41  bool isInitial () const override;
42 
43  void setFinal () override;
44 
45  bool isFinal () const override;
46 
47  // Assignment
50  rti1516_2025::LogicalTime const & value) override;
51 
52  // Operators
53 
55  rti1516_2025::LogicalTime& operator+= (
56  rti1516_2025::LogicalTimeInterval const & addend) override;
57 
59  rti1516_2025::LogicalTime& operator-= (
60  rti1516_2025::LogicalTimeInterval const & subtrahend) override;
61 
63  bool operator> (
64  rti1516_2025::LogicalTime const & value) const override;
65 
67  bool operator< (
68  rti1516_2025::LogicalTime const & value) const override;
69 
71  bool operator== (
72  rti1516_2025::LogicalTime const & value) const override;
73 
75  bool operator>= (
76  rti1516_2025::LogicalTime const & value) const override;
77 
79  bool operator<= (
80  rti1516_2025::LogicalTime const & value) const override;
81 
82  // Generates an encoded value that can be used to send
83  // LogicalTimes to other federates in updates or interactions
84  rti1516_2025::VariableLengthData encode () const override;
85 
86  // Alternate encode for directly filling a buffer
87  // Return the length of the encoded data
89  size_t encode (
90  void* buffer,
91  size_t bufferSize) const override;
92 
93  // The length of the encoded data
94  size_t encodedLength () const override;
95 
96  // Decode VariableLengthData into self
99  void decode (
101 
102  // Alternate decode that reads directly from a buffer
105  void decode (
106  const void* buffer,
107  size_t bufferSize) override;
108 
109  // Diagnostic string representation of time
110  std::wstring toString () const override;
111 
112  // Return the name of the implementation, as needed by
113  // createFederationExecution.
114  std::wstring implementationName () const override;
115 
116 
117  public:
118  //-----------------------------------------------------------------
119  // Implementation functions
120  //-----------------------------------------------------------------
121  virtual Integer64 getTime () const;
122 
123  virtual void setTime (
124  Integer64 value);
125 
126  //-----------------------------------------------------------------
127  // Implementation operators
128  //-----------------------------------------------------------------
129  virtual HLAinteger64Time& operator= (
130  const HLAinteger64Time&);
131 
132  operator Integer64 () const;
133 
134  private:
135 
136  //-----------------------------------------------------------------
137  // Interval implementation must have access to time implementation
138  // in order to calculate difference
139  //-----------------------------------------------------------------
140  friend class HLAinteger64Interval;;
141 
142  //-----------------------------------------------------------------
143  // Pointer to internal implementation
144  //-----------------------------------------------------------------
145  HLAinteger64TimeImpl* _impl;
146  };
147 }
148 
149 
150 
151 
Definition: LogicalTime.h:30
#define RTI_EXPORT
Definition: SpecificConfig.h:45
std::string toString(const std::wstring &inString)
Definition: objParams13.h:16
Definition: HLAinteger64Time.h:22
long long Integer64
Definition: EncodingConfig.h:41
Definition: VariableLengthData.h:28
Definition: LogicalTimeInterval.h:30
Definition: HLAinteger64Interval.h:22

Document ID: Generated on Sun Jul 20 16:15:30 EDT 2025 from SVN revision 277985
Copyright © 2005-2025 MAK Technologies Inc. All Rights Reserved (www.mak.com)