VR-Forces 4.7 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
globalIdToElementIdMapper.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2014 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
8 
10 
11 #pragma once
12 
13 #include <vrfGuiCore/vrfGuiCore.h>
14 
16 #include <vrvCore/DtUniqueID.h>
17 #include <vrvCore/DtSimState.h>
18 #include <vrvCore/DtStateView.h>
19 #include <vrvCore/DtEntityState.h>
20 
21 #include <boost/unordered_map.hpp>
22 
23 namespace makVrv
24 {
25  class DtDe;
26  class DtBaseStateView;
27  class DtSimEntry;
28  class DtSimObjectEntry;
29 }
30 
31 namespace makVrf
32 {
35  {
36  protected:
37  typedef boost::unordered_map<makVrv::DtElementID, std::string> ElementIdToGlobalIdMap;
38  typedef boost::unordered_map<std::string, makVrv::DtElementID> GlobalIdToElementIdMap;
39 
40  public:
42  virtual ~DtGlobalIdToElementIdMapper();
43 
45  static DtGlobalIdToElementIdMapper& instance(makVrv::DtDe& de);
46 
47  static void registerInstance(makVrv::DtDe& de, DtGlobalIdToElementIdMapper*);
48 
49  boost::signal<void (std::string, makVrv::DtElementID)> signal_entityIdAdded;
50  boost::signal<void (std::string)> signal_entityIdAboutToBeRemoved;
51 
52  public:
53 
54  makVrv::DtElementID globalIdToElementId(const std::string&) const;
55  std::string elementIdToGlobalId(makVrv::DtElementID) const;
56 
57  makVrv::DtElementID entityIdToElementId(const std::string&) const;
58  std::string elementIdToEntityId(makVrv::DtElementID) const;
59 
60  std::string globalIdentifierToEntityIdentifier(const std::string&) const;
61 
62  protected:
63  virtual void slot_simStateAdded(makVrv::DtSimObjectEntry&);
64  virtual void slot_simStateAboutToBeRemoved(makVrv::DtSimObjectEntry&);
65  virtual void slot_stateViewUpdated(makVrv::DtStateView<makVrv::DtVrlinkSimulatedBaseState>* s);
66 
68 
69  protected:
70  virtual void initialize();
71 
72  protected:
75 
78 
80  };
81 }

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)