VR-Forces 4.6 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties 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 );
37 
38  // Iterating through this list, iterator::first will provide all the display names;
39  // iterator::second, all the elementIDs
41 
42  // Iterating through this list, iterator::first will provide all the scene objects;
43  // iterator::second, all the elementIDs
45 
46  // Find the element id given a display name
47  DtElementID findElementID( const std::string& displayName ) const;
48 
49  // Get the display name from an element id
50  std::string findDisplayName( DtElementID elementID ) const;
51 
52  // Get the object id from an element id
53  std::string findObjectId( DtElementID elementID ) const;
54 
55  // Get the object type from an element id
56  std::string findObjectType( DtElementID elementID ) const;
57 
58  // Note that DtSceneObject has an elementID method; so given a DtSceneObject,
59  // you can also look up the display name (which, when using DIS or HLA/RPR is
60  // the marking text
61  DtSceneObject* findSceneObject(DtElementID elementId ) const;
62 
63  boost::signal< void (DtElementID entity ) > signal_entityAdded;
64  boost::signal< void (DtElementID entity ) > signal_entityRemoved;
65 
66  protected:
67 
69  void slot_elementsRemoved( const DtElementData::ElementIdList& elements );
70  void slot_sceneObjectToBeDeleted( const DtUniqueID& sceneObjId );
71 
72  protected:
77  typedef std::vector<DtElementEntry*> EntityElementEntryList;
78  };
79 }
80 

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)