NTRT Simulator  Version: Master
 All Classes Namespaces Files Functions Variables Typedefs Friends Pages
tgRodSensorInfo Class Reference

#include <tgRodSensorInfo.h>

Inheritance diagram for tgRodSensorInfo:
Collaboration diagram for tgRodSensorInfo:

Public Member Functions

 tgRodSensorInfo ()
 ~tgRodSensorInfo ()
virtual bool isThisMySenseable (tgSenseable *pSenseable)
virtual std::vector< tgSensor * > createSensorsIfAppropriate (tgSenseable *pSenseable)

Detailed Description

tgRodSensorInfo is a sensor info class that creates tgRodSensors for tgRods.

Definition at line 47 of file tgRodSensorInfo.h.

Constructor & Destructor Documentation

tgRodSensorInfo::tgRodSensorInfo ( )

tgSensorInfo has an empty constructor. It does not contain any data.

Nothing to do in this constructor. A sensor info doesn't have any data.

Definition at line 39 of file tgRodSensorInfo.cpp.

tgRodSensorInfo::~tgRodSensorInfo ( )

Similarly, its destructor should be empty.

Similarly, empty destructor.

Definition at line 46 of file tgRodSensorInfo.cpp.

Member Function Documentation

std::vector< tgSensor * > tgRodSensorInfo::createSensorsIfAppropriate ( tgSenseable pSenseable)

Similarly, create a sensor if appropriate. See tgSensorInfo for more... info.

[in]pSenseablepointer to a senseable object. Sensor will be created for this pSenseable.
a list of pointers to tgRodSensors. Note that this should ALWAYS have size 1. Don't create sensors for elements that just have rods as descendants, only create sensors for an actual tgRod. (This eliminates redundant sensor creation.)
invalid_argumentif pSenseable is not a tgRod. This enforces the caller to check isThisMySenseable before creating sensors. Play nice!

Create a rod sensor for a tgRod. Returns a list of size 1.

Implements tgSensorInfo.

Definition at line 67 of file tgRodSensorInfo.cpp.

Here is the call graph for this function:

bool tgRodSensorInfo::isThisMySenseable ( tgSenseable pSenseable)

From tgSensorInfo, need to implement a check to see if a particular tgSenseable is a tgRod.

[in]pSenseablea pointer to a tgSenseable object, that this sensor info may or may not be able to create a sensor for.
true if pSenseable is able to be sensed by the type of sensor that this sensor info creates.

To check if a tgSenseable is a tgRod, we can use tgCast.

Implements tgSensorInfo.

Definition at line 53 of file tgRodSensorInfo.cpp.

Here is the caller graph for this function:

The documentation for this class was generated from the following files: