VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
extendedAttributesObjectPublisherHLA.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2017 VT MAK
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #pragma once
11 
14 #include <vl/objectPublisher.h>
15 
16 #if DtHLA
17 
18 namespace makVrfVrlinkExtToolkit
19 {
20 
25  {
26  public:
27 
29  typedef DtExtendedAttributesObjectStateRepository* (*DtStateRepCreator)();
30 
31  public:
32 
37  DtExerciseConn* conn,
38  const char* name = 0,
39  const DtDDMRegionSet* regionSetToUse = 0);
40 
43  RTI::ObjectClassHandle h,
44  DtExerciseConn* conn,
45  const char* name = 0,
46  const DtDDMRegionSet* regionSetToUse = 0);
47 
51  DtExerciseConn* conn,
52  const char* name = 0,
53  const DtDDMRegionSet* regionSetToUse = 0);
54 
60  DtExtendedAttributesObjectPublisher(DtHlaObjectWithStateRep* obj, DtExerciseConn* conn);
61 
63  virtual const char* classToUse() const;
64 
67 
72  template <class StateRepWithAttributesType>
73  void setAssociatedPublisher(DtObjectPublisher* assocPub);
74 
77  virtual DtExtendedAttributesObjectStateRepository* extendedAttributesObjectStateRep();
78 
81 
83  virtual void tick();
84 
87  static bool canPublish(DtExerciseConn* conn);
88 
91  static DtGlobalObjectDesignator globalIdFor(const DtGlobalObjectDesignator& globalId);
92 
93  protected:
94 
100  const char* name = 0,
101  const DtDDMRegionSet* regionSetToUse = 0);
102 
103  private:
106 
110 
111  public:
112 
114  static DtStateRepCreator setStateRepCreator(DtStateRepCreator creator);
115  static DtStateRepCreator stateRepCreator();
116 
117  protected:
118  static DtStateRepCreator theStateRepCreator;
119 
121 
123  const DtDDMRegionSet* myRegionSetToUse;
124  };
125 
127  {
128  return (DtExtendedAttributesObjectStateRepository*)myStateRep;
129  }
130 
132  {
133  return (DtExtendedAttributesObjectStateRepository*)myStateRep;
134  }
135 
136  template <class StateRepWithAttributesType>
138  {
139  myAssociatedPublisher = assocPub;
140 
142  {
143  StateRepWithAttributesType* assocSr =
144  static_cast<StateRepWithAttributesType*>(myAssociatedPublisher->stateRep());
145  easr()->associateWithObjectStateRep(assocSr, myAssociatedPublisher->globalId());
146  }
147  else
148  {
150  }
151  }
152 }
153 
154 #endif // DtHLA
Contains the DtExtendedAttributesObjectStateRepository class declaration.
#define DT_DLL_vrfExtObjects
Definition: dllExport.h:23

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)