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 
Contains the DtEntityIdentifier class declaration.
virtual void loseOwnership(const RTI::AttributeHandleSet &set)
Called whenever the local federate has lost ownership of a set of attributes.
void * userData
Definition: defaultOwnershipHandlerHLA.h:43
void * userData
Definition: defaultOwnershipHandlerHLA.h:31
Definition: defaultOwnershipHandlerHLA.h:28
#define DT_DLL_VL
Definition: vlMachineTypes.h:108
DtOwnershipHandler & operator=(const DtOwnershipHandler &other)
Assignment operator.
void(* DtDivestOwnershipCb)(DtHlaObject *hlaObject, void *usr)
Definition: defaultOwnershipHandlerHLA.h:23
void * userData
Definition: defaultOwnershipHandlerHLA.h:49
Definition: defaultOwnershipHandlerHLA.h:40
virtual void gainOwnership(const RTI::AttributeHandleSet &set)
Called whenever the local federate has gained ownership of a set of attributes.
DtAcquireOwnershipCb cbFunction
Definition: defaultOwnershipHandlerHLA.h:30
void * userData
Definition: defaultOwnershipHandlerHLA.h:37
virtual DtOwnershipHandler * clone() const
Clone copy.
bool(* DtAcquireOwnershipRequestCb)(DtHlaObject *hlaObject, void *usr)
Definition: defaultOwnershipHandlerHLA.h:25
DtDivestOwnershipCb cbFunction
Definition: defaultOwnershipHandlerHLA.h:36
DtOwnershipAction
Definition: defaultOwnershipHandlerHLA.h:15
DtDivestOwnershipRequestCb cbFunction
Definition: defaultOwnershipHandlerHLA.h:48
Definition: defaultOwnershipHandlerHLA.h:19
Definition: defaultOwnershipHandlerHLA.h:34
Instances of DtEntityIdentifier are used as a unique ID for entities in DIS.
Definition: entityIdentifier.h:31
void(* DtAcquireOwnershipCb)(DtHlaObject *hlaObject, void *usr)
Definition: defaultOwnershipHandlerHLA.h:22
Definition: defaultOwnershipHandlerHLA.h:46
Definition: defaultOwnershipHandlerHLA.h:17
This is a base class meant to encapsulate user callbacks on ownership management services.
Definition: ownershipHandlerHLA.h:27
bool(* DtDivestOwnershipRequestCb)(DtHlaObject *hlaObject, void *usr)
Definition: defaultOwnershipHandlerHLA.h:26
This file declares DtOwnershipHandler.
This class meant to encapsulate user callbacks on ownership management services.
Definition: defaultOwnershipHandlerHLA.h:57
DtAcquireOwnershipRequestCb cbFunction
Definition: defaultOwnershipHandlerHLA.h:42
Definition: defaultOwnershipHandlerHLA.h:18
This file provides protocol independence for DtEntityPublisher.

Document ID: Generated on Mon Apr 25 03:39:01 EDT 2022 from SVN revision 242502
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)