VR-Forces 4.2 Class Documentation
DtVrfSensorInfoManager.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2012 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
8 
10 
11 #pragma once
12 
13 #include <vrfGuiCore/vrfGuiCore.h>
14 
15 #include <vrvCore/DtUniqueID.h>
16 #include <vrvUtil/DtVirtualBaseClass.h>
17 #include <vlpi/entityType.h>
18 #include <boost/signal.hpp>
19 
20 namespace makVrv
21 {
22  class DtDe;
23  class DtSimObjectEntry;
24 }
25 
26 class DtSimMessage;
27 class DtIfSensorData;
28 
29 namespace makVrf
30 {
32  {
33  std::string myMarkingText;
34  DtEntityType myType;
35  int myForce;
36  int myCid;
38 
39  typedef struct _DtSensorInformation
40  {
41  std::string mySensorName;
43  std::vector<DtSensorContactInformation> mySensorContacts;
45 
46  class DT_DLL_VRFGUICORE DtVrfSensorInfoManager : public makVrv::DtVirtualBaseClass
47  {
48  public:
49  typedef std::map<std::string, DtSensorInformation> DtSensorInformationMap;
50 
51  public:
52  DtVrfSensorInfoManager(makVrv::DtDe&);
53  virtual ~DtVrfSensorInfoManager();
54 
56  static DtVrfSensorInfoManager& instance(makVrv::DtDe& de);
57 
58  public:
60  virtual DtSensorInformationMap startMonitoring(const std::string&);
61 
64  virtual bool stopMonitoring(const std::string&);
65 
67  bool monitoring(const std::string& n) const
68  {
69  return (myMonitoring.find(n) != myMonitoring.end());
70  }
71 
72  boost::signal<void (std::string, const DtSensorInformationMap&)> signal_contactInfoReceived;
73 
74  virtual std::string cidLevel(int level) const;
75 
76  virtual void addCidLevel(int l, const std::string& i);
77 
78  virtual DtSensorInformationMap sensorInfoFor(const std::string&) const;
79 
80  protected:
81  virtual void processSensorData(DtSimMessage*);
82 
83  virtual void slot_simObjectEntryAboutToBeRemoved(makVrv::DtSimObjectEntry& entry);
84 
85  protected:
86  makVrv::DtDe& myDe;
87 
88  typedef std::map<std::string, int> DtMonitoringMap;
90 
91  std::map<int, std::string> myCidLevels;
92 
93  typedef std::map<std::string, DtSensorInformationMap> DtEntitySensorMonitorMap;
95 
96  typedef std::map<makVrv::DtUniqueID, std::string> MonitoringById;
98  };
99 }

Document ID: Generated on Sun Nov 24 19:49:21 EST 2013 from SVN revision 133924
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)