VR-Forces 4.6 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
include
vrvCore
DtBaseConnection.h
Go to the documentation of this file.
1
/******************************************************************************
2
** Copyright (c) 2009 MAK Technologies, Inc.
3
** All rights reserved.
4
******************************************************************************/
5
/******************************************************************************
6
** $RCSfile: DtBaseConnection.h,v $ $Revision: 1.43 $ $State: Exp $
7
******************************************************************************/
8
12
13
#pragma once
14
#include <
vrvCore/vrvCore.h
>
15
#include <
vrvCore/DtUniqueID.h
>
16
#include <
vrvUtil/DtRandomNumberGenerator.h
>
17
#include <
vrvUtil/DtVirtualBaseClass.h
>
18
#include <
vrvUtil/templateUtil.h
>
19
#include <
vrvUtil/DtUnicode.h
>
20
21
#include <boost/unordered_map.hpp>
22
23
#include <string>
24
#include <map>
25
26
namespace
makVrv
27
{
28
class
DtSharedSettingsManager;
29
class
DtAgentManagerInterface;
30
class
DtElementChanges;
31
class
DtElementAttribute;
32
class
DtBlinkingObjectManager;
33
class
DtTemporaryAgentManager;
34
37
class
DT_DLL_VRVCORE
DtBaseConnection
38
{
39
40
public
:
42
DtBaseConnection
(
DtSharedSettingsManager
&,
DtAgentManagerInterface
&);
43
46
virtual
~
DtBaseConnection
();
47
50
virtual
void
clearInstances();
51
53
DtSharedSettingsManager
& settingsManager();
54
56
virtual
DtAgentManagerInterface
& sceneInterface();
57
59
const
DtSharedSettingsManager
& settingsManager()
const
;
60
62
void
reportElementCreated(
DtElementID
id
,
DtElementID
parentId,
unsigned
int
type);
63
64
//The attribute passed in should not be used again.
65
void
reportElementAttribute(
DtElementID
id
,
DtElementAttribute
* attribute);
66
68
void
reportElementDestroyed(
DtElementID
id
);
69
71
const
DtElementChanges
& currentElementChanges()
const
;
72
74
DtElementChanges
* takeElementChanges();
75
77
DtTemporaryAgentManager
& temporaryEffects();
78
80
DtBlinkingObjectManager
& blinkManager();
81
83
DtRandomNumberGenerator
& randomNumberGenerator();
84
86
virtual
const
std::string& tag()
87
{
88
const
static
std::string tagStr =
""
;
89
return
tagStr;
90
}
91
93
const
DtUnicode
& emptyString()
const
;
94
100
virtual
DtVirtualBaseClass
* findInstance(
const
std::string& instanceName);
101
115
inline
bool
destroyingInstances()
const
116
{
117
return
myDestroyingInstanceFlag;
118
}
119
122
virtual
void
registerInstance(
const
std::string& instanceName,
123
DtVirtualBaseClass
* instance);
124
125
126
protected
:
127
128
//Hold on to the shared simulation manager.
129
DtSharedSettingsManager
&
mySettingsManagerCache
;
130
131
//The random number generator for the local simulation.
132
DtRandomNumberGenerator
myRandomNumberGenerator
;
133
134
//Thread specific Variables. This variables are used by the second thread.
135
//They should not be used in any functions in the main thread while the
136
//secondary thread is running.
137
DtAgentManagerInterface
&
mySceneInterface
;
138
139
//Internal working element changes
140
DtElementChanges
*
myWorkingElementChanges
;
141
142
//Manager for temporary global effects.
143
DtTemporaryAgentManager
*
myTemporaryEffects
;
144
146
DtBlinkingObjectManager
*
myBlinkManager
;
147
148
DtUnicode
myEmptyString
;
149
150
typedef
boost::unordered_map<std::string,DtVirtualBaseClass*>
InstanceMap
;
151
152
//Stores a pointer to simulation specific instances.
153
InstanceMap
myInstances
;
154
155
//Flag to store if the connection is destroying the instances in it's
156
//DTOR
157
bool
myDestroyingInstanceFlag
;
158
};
159
}
Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (
www.mak.com
)