MAK RTIspy API Documentation for HLA 4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
LogicalTimeFactory.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 namespace rti1516_2025
12 {
13  class LogicalTime;
14  class LogicalTimeInterval;
15  class VariableLengthData;
16 }
17 
18 #include <RTI/SpecificConfig.h>
19 #include <RTI/Exception.h>
20 #include <memory>
21 #include <string>
22 
23 // LogicalTimeFactory is used by the RTI to construct instances of classes
24 // derived from LogicalTime and LogicalTimeInterval. A federation is responsible
25 // for providing a fedtime library that includes one or more subclasses
26 // of LogicalTime and LogicalTimeInterval, one or more subclasses of LogicalTimeFactory
27 // (which is used to create instances of those LogicalTime and LogicalTimeInterval
28 // subclasses), and a single implementation of
29 // LogicalTimeFactoryFactory::makeLogicalTimeFactory. This static function should
30 // choose a LogicalTimeFactory based on the string identifier passed as an argument,
31 // and return an instance of that kind of factory. The RTI will call this function to
32 // obtain a LogicalTimeFactory for a federation, and then will use that factory to create
33 // any instances of LogicalTime or LogicalTimeInterval that it needs.
34 
35 // All RTIs shall implement a reference time library with time types named HLAinteger64Time
36 // and HLAfloat64Time. The interfaces for these types shall be found in the time subdirectory.
37 
38 namespace rti1516_2025
39 {
41  {
42  public:
43  virtual ~LogicalTimeFactory ()
44  noexcept = 0;
45 
46  // Return a LogicalTime with a value of "initial"
50  virtual std::unique_ptr< LogicalTime > makeInitial() = 0;
51 
52  // Return a LogicalTime with a value of "final"
56  virtual std::unique_ptr< LogicalTime > makeFinal() = 0;
57 
58  // Return a LogicalTimeInterval with a value of "zero"
62  virtual std::unique_ptr< LogicalTimeInterval > makeZero() = 0;
63 
64  // Return a LogicalTimeInterval with a value of "epsilon"
68  virtual std::unique_ptr< LogicalTimeInterval > makeEpsilon() = 0;
69 
70  // LogicalTime decode from an encoded LogicalTime
75  virtual std::unique_ptr< LogicalTime > decodeLogicalTime (
76  VariableLengthData const & encodedLogicalTime) = 0;
77 
78  // Alternate LogicalTime decode that reads directly from a buffer
83  virtual std::unique_ptr< LogicalTime > decodeLogicalTime (
84  const void* buffer,
85  size_t bufferSize) = 0;
86 
87  // LogicalTimeInterval decode from an encoded LogicalTimeInterval
92  virtual std::unique_ptr< LogicalTimeInterval > decodeLogicalTimeInterval (
93  VariableLengthData const & encodedValue) = 0;
94 
95  // Alternate LogicalTimeInterval decode that reads directly from a buffer
100  virtual std::unique_ptr< LogicalTimeInterval > decodeLogicalTimeInterval (
101  const void* buffer,
102  size_t bufferSize) = 0;
103 
104  // Return the name of the logical time implementation
105  virtual std::wstring getName () const = 0;
106  };
107 }
108 
#define RTI_EXPORT
Definition: SpecificConfig.h:45
Definition: LogicalTimeFactory.h:40
This file contains definitions that are used to isolate platform-specific elements of the API...
Definition: VariableLengthData.h:28

Document ID: Generated on Wed Jul 8 16:20:32 EDT 2026 from SVN revision 291616
Copyright © 2005-2025 MAK Technologies Inc. All Rights Reserved (www.mak.com)