VR-Link API Documentation for DIS
Home
Namespaces
Classes
Files
Examples
Libraries
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
include
vl
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
16
enum
DtOwnershipAction
17
{
18
OWNERSHIP_CALLBACK
,
19
OWNERSHIP_ACCEPT_ALL
,
20
OWNERSHIP_DENY_ALL
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
29
struct
DtAcquireOwnershipCbInfo
30
{
31
DtAcquireOwnershipCb
cbFunction
;
32
void
*
userData
;
33
};
34
35
struct
DtDivestOwnershipCbInfo
36
{
37
DtDivestOwnershipCb
cbFunction
;
38
void
*
userData
;
39
};
40
41
struct
DtAcquireOwnershipRequestCbInfo
42
{
43
DtAcquireOwnershipRequestCb
cbFunction
;
44
void
*
userData
;
45
};
46
47
struct
DtDivestOwnershipRequestCbInfo
48
{
49
DtDivestOwnershipRequestCb
cbFunction
;
50
void
*
userData
;
51
};
52
58
class
DT_DLL_VL
DtDefaultOwnershipHandler
:
public
DtOwnershipHandler
59
{
60
public
:
62
DtDefaultOwnershipHandler
();
63
65
virtual
~
DtDefaultOwnershipHandler
();
66
68
virtual
DtOwnershipHandler
*
clone
()
const
;
69
71
DtDefaultOwnershipHandler
(
const
DtDefaultOwnershipHandler
& other);
72
74
DtDefaultOwnershipHandler
&
operator=
(
const
DtDefaultOwnershipHandler
& other);
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
)