Structural deformable models
SensorColl.h
Go to the documentation of this file.
1 #ifndef _SENSORCOLL_H_
2 #define _SENSORCOLL_H_
3 
4 #include <iostream>
5 #include <map>
6 #include "ParseFile.h"
7 #include "Model.h"
8 
9 class Sensor;
10 
11 class SensorCollection : public std::map<std::string,sensor_ptr> {
12 public:
15 
16  sensor_ptr addSensor(const std::string& key, sensor_ptr s);
19  sensor_ptr getSensor(const std::string& id);
21  bool isPrinted( const std::string& id ) const;
22  void setPrinted( const std::string& id );
23  void clearPrintList(bool skipdefaults=true);
24  friend std::ostream& operator<<(std::ostream& os,
25  const SensorCollection& sc);
26  void refModel(Model* model) const;
27  void unrefModel(Model* model) const;
28  void updateModels() const;
29 
30  void selectSensor(const std::string& name)
31  { m_SelSensor = name; }
32  const std::string& getSelectedSensor() const
33  { return m_SelSensor; }
34 protected:
35  std::set<std::string> m_Printlist;
36  mutable std::set<Model*> m_Models;
37  std::string m_SelSensor;
38 };
39 
40 #endif
void clearPrintList(bool skipdefaults=true)
Definition: SensorColl.cpp:66
void updateModels() const
Definition: SensorColl.cpp:292
const std::string & getSelectedSensor() const
Definition: SensorColl.h:32
Definition: Sensor.h:21
friend std::ostream & operator<<(std::ostream &os, const SensorCollection &sc)
Definition: SensorColl.cpp:85
std::shared_ptr< Sensor > sensor_ptr
Definition: types_fwd.h:15
void refModel(Model *model) const
Definition: SensorColl.cpp:282
sensor_ptr getSensor(const std::string &id)
Definition: SensorColl.cpp:52
void setPrinted(const std::string &id)
Definition: SensorColl.cpp:80
std::set< Model * > m_Models
references to attached geometry
Definition: SensorColl.h:36
std::set< std::string > m_Printlist
Definition: SensorColl.h:35
std::string m_SelSensor
Definition: SensorColl.h:37
Definition: Model.h:33
void unrefModel(Model *model) const
Definition: SensorColl.cpp:287
bool isPrinted(const std::string &id) const
Definition: SensorColl.cpp:75
void selectSensor(const std::string &name)
Definition: SensorColl.h:30
SensorCollection & merge(SensorCollection &rhs)
Definition: SensorColl.cpp:256
sensor_ptr readSensor(ParseFile &is)
Definition: SensorColl.cpp:101
sensor_ptr addSensor(const std::string &key, sensor_ptr s)
Definition: SensorColl.cpp:24