VR-Vantage API Documentation
Home
Modules
Namespaces
Classes
Files
Libraries
Examples
Tutorials
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
include
vrvCore
DtDriver.h
Go to the documentation of this file.
1
/******************************************************************************
2
** Copyright (c) 2010 MAK Technologies, Inc.
3
** All rights reserved.
4
******************************************************************************/
5
/******************************************************************************
6
** $RCSfile: DtDriver.h,v $ $Revision: 1.43 $ $State: Exp $
7
******************************************************************************/
8
12
13
#pragma once
14
#include <
vrvCore/vrvCore.h
>
15
#include <
vrvUtil/DtVirtualBaseClass.h
>
16
#include <
vrvUtil/DtConfiguration.h
>
17
#include <
vrvCore/DtElementChanges.h
>
18
#include <
vrvCore/DtElementEntry.h
>
19
20
#include <string>
21
#include <list>
22
23
namespace
makVrv
24
{
25
class
DtAgentManager;
26
class
DtAgentManagerInterface;
27
class
DtDeRecord;
28
29
39
class
DT_DLL_VRVCORE
DtDriver
40
{
41
42
public
:
43
44
friend
class
DtDriverManager
;
45
47
DtDriver
(
DtAgentManager
& agentManager,
const
std::string
& instanceName);
48
50
virtual
~
DtDriver
();
51
53
virtual
void
realizeConfiguration(
const
DtConfiguration
& configuration);
54
56
virtual
DtConfiguration
createConfiguration()
const
;
57
61
DtAgentManager
& agentManager();
62
64
virtual
DtAgentManagerInterface
& sceneInterface();
65
67
inline
bool
started()
const
68
{
69
return
myStartedFlag;
70
}
71
73
virtual
const
std::string
& className()
const
= 0;
74
76
virtual
const
std::string
& instanceName()
const
;
77
80
virtual
bool
autoStart()
const
;
81
84
virtual
void
setAutoStart(
bool
autoStart);
85
89
virtual
bool
isWindowDependent()
const
;
90
94
virtual
void
setIsWindowDependent(
bool
dep);
95
98
virtual
void
setIsUserControllable(
bool
);
99
102
virtual
bool
isUserControllable()
const
;
103
106
virtual
void
setIsPersistent(
bool
per);
107
110
virtual
bool
isPersistent()
const
;
111
114
virtual
bool
isOnDriverSelectionList()
const
;
115
118
virtual
void
setOnDriverSelectionList(
bool
);
119
122
bool
objectFromAgentManager(
const
DtUniqueID
&
id
)
const
;
123
124
protected
:
125
129
void
applyChangesAndDelete(
DtElementChanges
* changes);
130
132
void
reportElementCreated(
DtElementID
id
,
DtElementID
parentId,
133
DtElementEntry::ElementType
type
);
134
137
void
reportElementAttribute(
DtElementID
id
,
DtElementAttribute
* attribute);
138
140
void
reportElementDestroyed(
DtElementID
id
);
141
144
void
start
();
145
148
void
stop();
149
153
bool
tick();
154
159
virtual
bool
onStart() = 0;
160
165
virtual
bool
onStop() = 0;
166
170
virtual
bool
onTick() = 0;
171
174
virtual
void
slot_displayEngineAdded(
const
DtDeRecord
& igRecord);
175
180
virtual
void
setInstanceName(
const
std::string
&
name
);
181
185
virtual
void
installAccessories();
186
190
virtual
void
uninstallAccessories();
191
192
protected
:
193
194
DtAgentManager
&
myAgentManager
;
195
bool
myStartedFlag
;
196
std::string
myName
;
197
DtConfiguration
myConfiguration
;
198
199
bool
myPersistentFlag
;
200
bool
myUserControllableFlag
;
201
bool
myRequestStateDiffPendingFlag
;
202
DtElementChanges
myChanges
;
203
204
};
205
206
209
class
DT_DLL_VRVCORE
DtDriverCreator
210
{
211
public
:
212
214
DtDriverCreator
();
215
217
virtual
~
DtDriverCreator
();
218
222
virtual
const
std::string
& extension()
const
= 0;
223
225
virtual
DtDriver
* create(
DtAgentManager
& agentManager,
226
const
std::string
& instanceName)
const
= 0;
227
};
228
229
}
Copyright © 2005-2013 VT MÄK. All Rights Reserved (
www.mak.com
)