VR-Link API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
partialOwnershipHandler.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2014 VT MAK
3 ** All rights reserved.
4 *********************************************************************/
5 
6 #pragma once
7 
9 
10 #if DtHLA
11 
12 typedef void (*DtPartialAcquireOwnershipCb)(DtHlaObject* hlaObject, const RTI::AttributeHandleSet&, void* usr);
13 typedef void (*DtPartialDivestOwnershipCb)(DtHlaObject* hlaObject, const RTI::AttributeHandleSet&, void* usr);
14 
15 typedef bool (*DtPartialAcquireOwnershipRequestCb)(DtHlaObject* hlaObject, const RTI::AttributeHandleSet&, void* usr);
16 typedef bool (*DtPartialDivestOwnershipRequestCb)(DtHlaObject* hlaObject, const RTI::AttributeHandleSet&, void* usr);
17 
18 
20 {
22  void* userData;
23 };
24 
26 {
28  void* userData;
29 };
30 
32 {
34  void* userData;
35 };
36 
38 {
40  void* userData;
41 };
42 
49 {
50 public:
53 
55  virtual ~DtPartialOwnershipHandler();
56 
58  virtual DtOwnershipHandler* clone() const;
59 
62 
65 
69  virtual void gainOwnership(const RTI::AttributeHandleSet& set);
70 
75  virtual void loseOwnership(const RTI::AttributeHandleSet& set);
76 
80  //{@
81  virtual void addPartialAcquireOwnershipCallback(DtPartialAcquireOwnershipCb cb, void* usr,
82  const DtObjClassDesc* desc = 0);
83  virtual void removePartialAcquireOwnershipCallback(DtPartialAcquireOwnershipCb cb, void* usr,
84  const DtObjClassDesc* desc = 0);
86 
90  //{@
91  virtual void addPartialDivestOwnershipCallback(DtPartialDivestOwnershipCb cb, void* usr,
92  const DtObjClassDesc* desc = 0);
93  virtual void removePartialDivestOwnershipCallback(DtPartialDivestOwnershipCb cb, void* usr,
94  const DtObjClassDesc* desc = 0);
96 
102  //{@
103  virtual void addPartialAcquireOwnershipRequestCallback(DtPartialAcquireOwnershipRequestCb cb, void* usr);
104  virtual void removePartialAcquireOwnershipRequestCallback(DtPartialAcquireOwnershipRequestCb cb, void* usr);
106 
112  //{@
113  virtual void addPartialDivestOwnershipRequestCallback(DtPartialDivestOwnershipRequestCb cb, void* usr);
114  virtual void removePartialDivestOwnershipRequestCallback(DtPartialDivestOwnershipRequestCb cb, void* usr);
116 
117 
118 protected:
119 
120  std::map<RTI::ObjectClassHandle, std::list<DtPartialAcquireOwnershipCbInfo> > myPartialAcquireOwnershipCbList;
121  std::map<RTI::ObjectClassHandle, std::list<DtPartialDivestOwnershipCbInfo> > myPartialDivestOwnershipCbList;
122  std::list<DtPartialAcquireOwnershipCbInfo> myDefaultPartialAcquireOwnershipCb;
123  std::list<DtPartialDivestOwnershipCbInfo> myDefaultPartialDivestOwnershipCb;
124  std::list<DtPartialAcquireOwnershipRequestCbInfo> myPartialAcquireOwnershipRequestCbList;
125  std::list<DtPartialDivestOwnershipRequestCbInfo> myPartialDivestOwnershipRequestCbList;
126 };
127 
128 #endif //DtHLA
std::list< DtPartialAcquireOwnershipRequestCbInfo > myPartialAcquireOwnershipRequestCbList
Definition: partialOwnershipHandler.h:124
bool(* DtPartialAcquireOwnershipRequestCb)(DtHlaObject *hlaObject, const RTI::AttributeHandleSet &, void *usr)
Definition: partialOwnershipHandler.h:15
virtual DtOwnershipHandler * clone() const
Clone copy.
#define DT_DLL_VL
Definition: vlMachineTypes.h:108
DtDefaultOwnershipHandler & operator=(const DtDefaultOwnershipHandler &other)
Assignment operator.
std::list< DtPartialDivestOwnershipRequestCbInfo > myPartialDivestOwnershipRequestCbList
Definition: partialOwnershipHandler.h:125
std::list< DtPartialAcquireOwnershipCbInfo > myDefaultPartialAcquireOwnershipCb
Definition: partialOwnershipHandler.h:122
This class extends the default ownership handler and adds new callbacks to be activated whenever part...
Definition: partialOwnershipHandler.h:48
void(* DtPartialAcquireOwnershipCb)(DtHlaObject *hlaObject, const RTI::AttributeHandleSet &, void *usr)
Definition: partialOwnershipHandler.h:12
An instance of DtObjClassDesc is a &quot;class descriptor&quot; for an HLA Object class.
Definition: objClassDesc13.h:41
DtPartialAcquireOwnershipCb cbFunction
Definition: partialOwnershipHandler.h:21
Instances of DtHlaObject are used to represent HLA objects which are communicated across the network...
Definition: hlaObject.h:56
void * userData
Definition: partialOwnershipHandler.h:22
virtual void gainOwnership(const RTI::AttributeHandleSet &set)
Called whenever the local federate has acquired ownership of a set of attributes. ...
This file declares DtDefaultOwnershipHandler.
void * userData
Definition: partialOwnershipHandler.h:28
std::map< RTI::ObjectClassHandle, std::list< DtPartialDivestOwnershipCbInfo > > myPartialDivestOwnershipCbList
Definition: partialOwnershipHandler.h:121
DtPartialDivestOwnershipRequestCb cbFunction
Definition: partialOwnershipHandler.h:39
This is a base class meant to encapsulate user callbacks on ownership management services.
Definition: ownershipHandlerHLA.h:27
DtPartialAcquireOwnershipRequestCb cbFunction
Definition: partialOwnershipHandler.h:33
void * userData
Definition: partialOwnershipHandler.h:34
Definition: partialOwnershipHandler.h:31
void * userData
Definition: partialOwnershipHandler.h:40
DtPartialDivestOwnershipCb cbFunction
Definition: partialOwnershipHandler.h:27
Definition: partialOwnershipHandler.h:37
std::list< DtPartialDivestOwnershipCbInfo > myDefaultPartialDivestOwnershipCb
Definition: partialOwnershipHandler.h:123
void(* DtPartialDivestOwnershipCb)(DtHlaObject *hlaObject, const RTI::AttributeHandleSet &, void *usr)
Definition: partialOwnershipHandler.h:13
This class meant to encapsulate user callbacks on ownership management services.
Definition: defaultOwnershipHandlerHLA.h:57
Definition: partialOwnershipHandler.h:25
virtual void loseOwnership(const RTI::AttributeHandleSet &set)
Called whenever the local federate has lost ownership of a set of attributes.
Definition: partialOwnershipHandler.h:19
bool(* DtPartialDivestOwnershipRequestCb)(DtHlaObject *hlaObject, const RTI::AttributeHandleSet &, void *usr)
Definition: partialOwnershipHandler.h:16
std::map< RTI::ObjectClassHandle, std::list< DtPartialAcquireOwnershipCbInfo > > myPartialAcquireOwnershipCbList
Definition: partialOwnershipHandler.h:120

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)