VR-Forces Development_Version Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
examples
exampleConnectionObjects
DtConnectionObjects.h
Go to the documentation of this file.
1
/*****************************************************************************
2
* Copyright (c) 2015 MAK Technologies, Inc.
3
* All rights reserved.
4
*****************************************************************************/
5
9
10
#pragma once
11
12
#include <
vrvCore/DtDataBank.h
>
13
#include <
vrvCore/DtUniqueID.h
>
14
#include <boost/unordered_map.hpp>
15
16
#include <string>
17
18
namespace
makVrv
19
{
20
class
DtDe;
21
class
DtSceneObject;
22
23
class
DtConnectionObjects
24
{
25
public
:
26
typedef
boost::unordered_map< std::string, DtElementID >
DisplayNameToElementIdMap
;
27
typedef
boost::unordered_map< DtElementID, std::string >
ElementIdToDisplayNameMap
;
28
typedef
boost::unordered_map< DtElementID, DtSceneObject* >
SceneObjectMap
;
29
30
DtConnectionObjects
(
DtDe
& de );
31
32
virtual
~DtConnectionObjects
();
33
34
// A useful utility
35
DtSceneObject
*
sceneObjectFromElementId
(
DtElementID
elementId,
int
modelSet );
36
37
// Iterating through this list, iterator::first will provide all the display names;
38
// iterator::second, all the elementIDs
39
const
DisplayNameToElementIdMap
&
displayNames
()
const
;
40
41
// Iterating through this list, iterator::first will provide all the scene objects;
42
// iterator::second, all the elementIDs
43
const
DtConnectionObjects::SceneObjectMap
&
sceneObjects
()
const
;
44
45
// Find the element id given a display name
46
DtElementID
findElementID
(
const
std::string& displayName )
const
;
47
48
// Get the display name from an element id
49
std::string
findDisplayName
(
DtElementID
elementID )
const
;
50
51
// Get the object id from an element id
52
std::string
findObjectId
(
DtElementID
elementID )
const
;
53
54
// Get the object type from an element id
55
std::string
findObjectType
(
DtElementID
elementID )
const
;
56
57
// Note that DtSceneObject has an elementID method; so given a DtSceneObject,
58
// you can also look up the display name (which, when using DIS or HLA/RPR is
59
// the marking text
60
DtSceneObject
*
findSceneObject
(
DtElementID
elementId )
const
;
61
62
boost::signal< void (DtElementID entity ) >
signal_entityAdded
;
63
boost::signal< void (DtElementID entity ) >
signal_entityRemoved
;
64
65
protected
:
66
67
void
slot_elementsReadyToProcess
(
const
DtElementData::ElementIdList
& elements);
68
void
slot_elementsRemoved
(
const
DtElementData::ElementIdList
& elements );
69
70
protected
:
71
DtDe
&
myDe
;
72
DisplayNameToElementIdMap
myDisplayNameToElementIdMap
;
73
ElementIdToDisplayNameMap
myElementIdToDisplayNameMap
;
74
SceneObjectMap
mySceneObjectMap
;
75
typedef
std::vector<DtElementEntry*>
EntityElementEntryList
;
76
};
77
}
78
Document ID: Generated on Tue Mar 8 22:13:38 EST 2016 from SVN revision 162938
Copyright © 2005-2015 VT MÄK. All Rights Reserved (
www.mak.com
)