VR-Forces 5.0.3 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
remoteExtendedPropertiesNetInterface.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2014 MaK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 #pragma once
12 
13 
19 #include <vl/reflectedObject.h>
20 
21 #ifdef DtHLA
23 #else
25 #endif
26 
29 namespace makVrf
30 {
31  template <typename BaseNetInterface, typename BaseStateRepository>
33  {
34  protected:
35 
38 
39  public:
40 
43  DtStateData * simObject, DtVrlinkNetworkInterface* mgr, bool publishObject = false)
44  : BaseNetInterface(simObject, mgr, publishObject)
45  , myIsUninitialized(true)
46  {
47  }
48 
51 
53  virtual bool initExtendedProperties()
54  {
55  bool result = true;
56 
57  BaseStateRepository* stateRep =
58  dynamic_cast<BaseStateRepository*>(this->myNetworkState);
59 
60  #if DtHLA
61  if (stateRep)
62  {
63  stateRep->setObjectClassHandle(this->objectClassHandle());
64  }
65  #endif
66 
67  initializeNetWithProperties();
68 
69  myIsUninitialized = false;
70 
71  return result;
72  }
73 
75  virtual void initializeNetWithProperties() = 0;
76 
81  {
82  if (myIsUninitialized)
83  {
84  initExtendedProperties();
85  }
86 
87  BaseNetInterface::updateFromReflectedObject();
88  }
89 
91  DtStateData * simObject, DtVrlinkNetworkInterface* mgr, bool publishObject)
92  {
93  return new
95  simObject, mgr, publishObject);
96  }
97 
99  std::map<DtString, DtReaderWriterRegistryData *> myStatePropertyMap;
100  std::map<DtString, DtReaderWriterRegistryData *> myParamPropertyMap;
101  };
102 }
static DtSimObjectNetInterface * creator(DtStateData *simObject, DtVrlinkNetworkInterface *mgr, bool publishObject)
Definition: remoteExtendedPropertiesNetInterface.h:90
DtRemoteExtendedPropertiesNetInterface()
default constructor
Definition: remoteExtendedPropertiesNetInterface.h:37
virtual void updateFromReflectedObject()
Calls the base class function to copy the network data to the local state repository, then does the same for the extended property attributes.
Definition: remoteExtendedPropertiesNetInterface.h:80
virtual bool initExtendedProperties()
Initializer.
Definition: remoteExtendedPropertiesNetInterface.h:53
Contains the DtSensorFieldOfViewPublisher class declaration.
DtRemoteExtendedPropertiesNetInterface(DtStateData *simObject, DtVrlinkNetworkInterface *mgr, bool publishObject=false)
read/writable constructor
Definition: remoteExtendedPropertiesNetInterface.h:42
bool myIsUninitialized
Definition: remoteExtendedPropertiesNetInterface.h:98
The overall structure of the DtStateData mechanism is: The DtStateData contains a list of double buff...
Definition: stateData.h:336
Class Description: DtSimObjectNetInterface.
Definition: simObjectNetInterface.h:48
Definition: remoteExtendedPropertiesNetInterface.h:32
std::map< DtString, DtReaderWriterRegistryData * > myParamPropertyMap
Definition: remoteExtendedPropertiesNetInterface.h:100
std::map< DtString, DtReaderWriterRegistryData * > myStatePropertyMap
Definition: remoteExtendedPropertiesNetInterface.h:99
virtual ~DtRemoteExtendedPropertiesNetInterface()
destructor
Definition: remoteExtendedPropertiesNetInterface.h:50

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)