MAK RTIspy API Documentation for HLA 1516
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
LogicalTimeFactory.h
Go to the documentation of this file.
1 /***********************************************************************
2  IEEE 1516.1 High Level Architecture Interface Specification C++ API
3  File: RTI/LogicalTimeFactory.h
4 ***********************************************************************/
5 
6 #ifndef RTI_LogicalTimeFactory_h
7 #define RTI_LogicalTimeFactory_h
8 
9 namespace rti1516
10 {
11  class LogicalTime;
12  class LogicalTimeInterval;
13 }
14 
15 namespace std
16 {
17  template <class T> class auto_ptr;
18 }
19 
20 #include <RTI/SpecificConfig.h>
21 #include <RTI/Exception.h>
22 #include <string>
23 
24 // LogicalTimeFactory is used by the RTI to construct instances of classes
25 // derived from LogicalTime and LogicalTimeInterval. A federation is responsible
26 // for providing a fedtime library that includes one or more subclasses
27 // of LogicalTime and LogicalTimeInterval, one or more subclasses of LogicalTimeFactory
28 // (which is used to create instances of those LogicalTime and LogicalTimeInterval
29 // subclasses), and a single implementation of
30 // LogicalTimeFactoryFactory::createLogicalTimeFactory. This static function should
31 // choose a LogicalTimeFactory based on the string identifier passed as an argument,
32 // and return an instance of that kind of factory. The RTI will call this function to
33 // obtain a LogicalTimeFactory for a federation, and then will use that factory to create
34 // any instances of LogicalTime or LogicalTimeInterval that it needs.
35 
36 namespace rti1516
37 {
39  {
40  public:
41  virtual
43  throw () = 0;
44 
45  // Returns a LogicalTime with a value of "initial"
46  virtual
47  std::auto_ptr< LogicalTime >
48  makeLogicalTime()
49  throw (InternalError) = 0;
50 
51  // Returns a LogicalTimeInterval with a value of "zero"
52  virtual
53  std::auto_ptr< LogicalTimeInterval >
54  makeLogicalTimeInterval()
55  throw (InternalError) = 0;
56  };
57 }
58 
59 namespace rti1516
60 {
62  {
63  public:
64 
65  // The name is used to choose among several LogicalTimeFactories that might
66  // be present in the fedtime library. Each federation chooses its
67  // implementation by passing the appropriate name to createFederationExecution.
68  // If the supplied name is the empty string, a default LogicalTimeFactory is
69  // returned. If the supplied implementation name does not match any name
70  // supported by the library, then a NULL pointer is returned.
71  static std::auto_ptr< LogicalTimeFactory >
72  // static LogicalTimeFactory
73  makeLogicalTimeFactory(std::wstring const & implementationName);
74  };
75 }
76 
77 #endif // RTI_LogicalTimeFactory_h
#define RTI_EXPORT
Definition: SpecificConfig.h:55
Definition: LogicalTimeFactory.h:61
#define RTI_EXPORT_FEDTIME
Definition: SpecificConfig.h:56
Definition: LogicalTimeFactory.h:38
This file contains definitions that are used to isolate platform-specific elements of the API...

Document ID: Generated on Mon Sep 7 15:40:32 EDT 2020 from SVN revision 217499
Copyright © 2005-2020 MAK Technologies Inc. All Rights Reserved (www.mak.com)