VR-Link API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
defaultOwnershipHandlerDIS.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2016 VT MAK
3 ** All rights reserved.
4 *********************************************************************/
5 
6 #pragma once
7 
8 #if DtDIS
9 
10 #include <vl/ownershipHandler.h>
11 #include <vlpi/entityIdentifier.h>
12 #include <vl/entityPublisher.h>
13 
14 #include <list>
15 
17 {
21 };
22 
23 typedef void(*DtAcquireOwnershipCb)(const DtEntityIdentifier* disIdentifier, void* usr);
24 typedef void (*DtDivestOwnershipCb)(const DtEntityIdentifier* disIdentifier, void* usr);
25 
26 typedef bool (*DtAcquireOwnershipRequestCb)(const DtEntityIdentifier* disIdentifier, void* usr);
27 typedef bool (*DtDivestOwnershipRequestCb)(const DtEntityIdentifier* disIdentifier, void* usr);
28 
30 {
32  void* userData;
33 };
34 
36 {
38  void* userData;
39 };
40 
42 {
44  void* userData;
45 };
46 
48 {
50  void* userData;
51 };
52 
59 {
60 public:
63 
65  virtual ~DtDefaultOwnershipHandler();
66 
68  virtual DtOwnershipHandler* clone() const;
69 
72 
75 
79  virtual void setOwnershipAcquisitionAction(DtOwnershipAction);
80 
84  virtual void setOwnershipDivestitudeAction(DtOwnershipAction);
85 
88  virtual void gainOwnership();
89 
91  virtual void loseOwnership();
92 
97  //{@
98  virtual void addAcquireOwnershipCallback(DtAcquireOwnershipCb cb, void* usr);
99  virtual void removeAcquireOwnershipCallback(DtAcquireOwnershipCb cb, void* usr);
101 
104  //{@
105  virtual void addDivestOwnershipCallback(DtDivestOwnershipCb cb, void* usr);
106  virtual void removeDivestOwnershipCallback(DtDivestOwnershipCb cb, void* usr);
108 
112  //{@
113  virtual void addAcquireOwnershipRequestCallback(DtAcquireOwnershipRequestCb cb, void* usr);
114  virtual void removeAcquireOwnershipRequestCallback(DtAcquireOwnershipRequestCb cb, void* usr);
115 
116  virtual void addDivestOwnershipRequestCallback(DtDivestOwnershipRequestCb cb, void* usr);
117  virtual void removeDivestOwnershipRequestCallback(DtDivestOwnershipRequestCb cb, void* usr);
118 
119  virtual bool requestOwnershipRelease();
120  virtual bool requestOwnershipAssumption();
121 
122 protected:
123  DtOwnershipAction myAcquisitionAction;
124  DtOwnershipAction myDivestAction;
125 
126  std::list<DtAcquireOwnershipCbInfo> myDefaultAcquireOwnershipCb;
127  std::list<DtDivestOwnershipCbInfo> myDefaultDivestOwnershipCb;
128  std::list<DtAcquireOwnershipRequestCbInfo> myAcquireOwnershipRequestCbList;
129  std::list<DtDivestOwnershipRequestCbInfo> myDivestOwnershipRequestCbList;
130 };
131 
132 
133 #endif //DtDIS
134 

Document ID: Generated on Mon Jun 22 21:18:40 EDT 2020 from SVN revision 213785
Copyright © 2005-2018 MAK Technologies. All Rights Reserved (www.mak.com)