VR-Forces 4.5 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 
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 
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
40 
41  // Iterating through this list, iterator::first will provide all the scene objects;
42  // iterator::second, all the elementIDs
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 
68  void slot_elementsRemoved( const DtElementData::ElementIdList& elements );
69 
70  protected:
75  typedef std::vector<DtElementEntry*> EntityElementEntryList;
76  };
77 }
78 

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)