EyeTracker configurator. More...
#include <Psycho/EyeTrackerConfigurator.H>
Public Member Functions | |
EyeTrackerConfigurator (OptionManager &mgr, const std::string &descrName="Eye Tracker Configurator", const std::string &tagName="EyeTrackerConfigurator") | |
Constructor. | |
virtual | ~EyeTrackerConfigurator () |
destructor | |
virtual void | paramChanged (ModelParamBase *const param, const bool valueChanged, ParamClient::ChangeStatus *status) |
Intercept people changing our ModelParam. | |
nub::ref< EyeTracker > | getET () const |
Get the chosen EyeTracker. | |
Protected Attributes | |
OModelParam< std::string > | itsETtype |
type of eye tracker |
EyeTracker configurator.
This will export the --et-type=XX command-line option and will instantiate an EyeTracker of the desired type as the option gets assigned a value. As this happens, new options may become available in the command-line. To see them, use --help AFTER you have chosen the type to use. The current EyeTracker may be retrieved using getET().
Definition at line 53 of file EyeTrackerConfigurator.H.
EyeTrackerConfigurator::EyeTrackerConfigurator | ( | OptionManager & | mgr, | |
const std::string & | descrName = "Eye Tracker Configurator" , |
|||
const std::string & | tagName = "EyeTrackerConfigurator" | |||
) |
Constructor.
Definition at line 54 of file EyeTrackerConfigurator.C.
References ModelComponent::addSubComponent().
EyeTrackerConfigurator::~EyeTrackerConfigurator | ( | ) | [virtual] |
destructor
Definition at line 65 of file EyeTrackerConfigurator.C.
nub::ref< EyeTracker > EyeTrackerConfigurator::getET | ( | ) | const |
Get the chosen EyeTracker.
You should call this during start() of the ModelComponent that needs the EyeTracker. CAUTION: this may be a rutz::shared_ptr(NULL) if no tracker has been chosen.
Definition at line 69 of file EyeTrackerConfigurator.C.
void EyeTrackerConfigurator::paramChanged | ( | ModelParamBase *const | param, | |
const bool | valueChanged, | |||
ParamClient::ChangeStatus * | status | |||
) | [virtual] |
Intercept people changing our ModelParam.
See ModelComponent.H; as parsing the command-line or reading a config file sets our name, we'll also here instantiate a tracker of the proper type (and export its options)
Reimplemented from ModelComponent.
Definition at line 73 of file EyeTrackerConfigurator.C.
References ModelComponent::addSubComponent(), ModelComponent::getManager(), OModelParam< T >::getVal(), itsETtype, MC_RECURSE, ModelComponent::removeSubComponent(), and nub::ref< T >::reset().
OModelParam<std::string> EyeTrackerConfigurator::itsETtype [protected] |
type of eye tracker
Definition at line 81 of file EyeTrackerConfigurator.H.
Referenced by paramChanged().