VR-Link API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
universalHlaObj.h
Go to the documentation of this file.
1 /*********************************************************************************
2 ** Copyright (c) 2014 MAK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************************/
5 
6 #pragma once
7 
8 #ifdef DtHLA
9 
10 #include "strategies/export.h"
15 
16 #include <string>
17 #include <map>
18 
21 #include <vl/objectPublisherHLA.h>
22 #include <vl/reflectedObjectHLA.h>
23 
24 class DtMessage;
25 class DtManagedInterface;
26 class DtExerciseConn;
27 
28 class DtUnversalHlaPublisher;
29 
30 class MANAGEDINTERFACE_MODULE_DLL DtUniversalHlaObjStrategy : public DtSubscribeStrategy
31 {
32 public:
33  virtual ~DtUniversalHlaObjStrategy();
34 
35  std::string name();
36  static std::string theName();
37 
38  virtual bool init();
39  virtual void tick();
40  virtual void shutdown();
41 
42  static DtLinkStrategy* create(DtManagedInterface* gl, const std::string& className);
43 
44 protected:
45  DtUniversalHlaObjStrategy(DtManagedInterface* link, const std::string& className);
46  static std::string theStrategyName;
47 
48  void handleCSharpHlaObjDiscovered(DtMessage* msg);
49  static void vrlHlaObjDiscovered(DtReflectedGenericObject* tx, void* usr);
50  void handleVrlHlaObjDiscovered(DtReflectedGenericObject* tx);
51 
52  void handleCSharpHlaObjRemoved(DtMessage* msg);
53  static void vrlHlaObjRemoved(DtReflectedGenericObject* tx, void* usr);
54  void handleVrlHlaObjRemoved(DtReflectedGenericObject* tx);
55 
56  void handleCSharpHlaObjState(DtMessage* msg);
57  static void vrlHlaObjState(DtReflectedGenericObject* obj, void* usr);
58  void handleVrlHlaObjState(DtReflectedGenericObject* obj);
59 
61  virtual void addVrlCallback(DtExerciseConn* exConn);
62  virtual void removeVrlCallback(DtExerciseConn* exConn);
63 
64  DtExerciseConn* myExconn;
65  std::string myClassName;
66 
67  RTI::ObjectClassHandle myClassHandle;
68  std::map<std::string, RTI::AttributeHandle> myHandleByName;
69  std::map<RTI::AttributeHandle, std::string> myNameByHandle;
70 
71  DtMessageDelegate* myHlaObjDiscoveredHandler;
72  DtMessageDelegate* myHlaObjRemovedHandler;
73  DtMessageDelegate* myHlaObjStateHandler;
74 
76  std::set<std::string> myReflectedObjs;
77  DtReflectedGenericObjectList* myRol;
78 };
79 
80 #endif
virtual void addVrlCallback(DtExerciseConn *exConn)=0
Add/Remove VR-Link C++ Interaction Callback.
Defines a single parameter delegate to make binding member function pointers easier.
Instances of DtExerciseConn are used to provide an application&#39;s interface or connection to the netwo...
Definition: exerciseConnDIS.h:62
#define MANAGEDINTERFACE_MODULE_DLL
Definition: export.h:34
This is the DtMessage class.
Definition: message.h:20
The DtManagedInterface Class is a singleton that is used to manage the message flow between C# and th...
Definition: managedInterface.h:49
Defines the DtPublisherList template. The parameter is the VR-Link Publisher object class type...
Definition: publisherList.h:18
This is the DtSubscribeStrategy class. It is the abstract base class for all derived interaction subs...
Definition: subscribeStrategy.h:27
std::string myClassName
Definition: subscribeStrategy.h:48
virtual void shutdown()
Shutdown the strategy.
Defines a template for maintaining a list of VR-Link Publisher objects.
virtual void removeVrlCallback(DtExerciseConn *exConn)=0
Delegate template for binding static or member functions for callback at later time The return type a...
Definition: delegate.h:69

Document ID: Generated on Thu Sep 19 02:12:35 EDT 2024 from SVN revision 269601
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)