60 for (
size_t i = 0; i < n_Sens; ++i)
73 for (
size_t i = 0; i < n_SensInf; ++i)
93 void tgDataManager::addSensorsHelper(
tgSenseable* pSenseable)
100 std::vector<tgSensor*> newSensors =
105 for(
size_t i=0; i < newSensors.size(); i++ ){
107 if( newSensors[i] != NULL) {
130 std::vector<tgSenseable*> descendants =
133 for (
size_t k=0; k < descendants.size(); k++) {
134 addSensorsHelper(descendants[k]);
153 for (std::size_t i = 0; i <
m_sensors.size(); i++)
182 throw std::invalid_argument(
"dt is not positive");
207 if (pSensorInfo == NULL)
209 throw std::invalid_argument(
"pSensorInfo is NULL inside tgDataManager::addSensorInfo");
227 if (pSenseable == NULL)
229 throw std::invalid_argument(
"pSenseable is NULL inside tgDataManager::addSenseable");
248 std::ostringstream os;
249 os <<
"tgDataManager"
251 <<
" sensorInfos, and " <<
m_senseables.size() <<
" senseable objects."
258 bool tgDataManager::invariant()
const
Constains definition of abstract class tgSensor, which defines the methods that a sensor must impleme...
std::vector< tgSensor * > m_sensors
virtual void addSenseable(tgSenseable *pSenseable)
std::ostream & operator<<(std::ostream &os, const tgDataManager &obj)
std::vector< tgSensorInfo * > m_sensorInfos
Contains the definition of class tgDataManager.
virtual void step(double dt)
virtual void addSensorInfo(tgSensorInfo *pSensorInfo)
std::vector< tgSenseable * > m_senseables
virtual std::string toString() const
Definition of abstract class tgSensorInfo.
Constains the implementation of mixin class tgSenseable.