EyeHeadController configurator for eye. More...
#include <Neuro/EyeHeadControllerConfigurator.H>
Public Member Functions | |
EyeHeadControllerConfigurator (OptionManager &mgr, const std::string &descrName="Eye/Head Controller Configurator", const std::string &tagName="EyeHeadControllerConfigurator") | |
Constructor. | |
virtual | ~EyeHeadControllerConfigurator () |
destructor | |
nub::ref< EyeHeadController > | getEHC () const |
Get the chosen EyeHeadController. | |
virtual void | paramChanged (ModelParamBase *const param, const bool valueChanged, ParamClient::ChangeStatus *status) |
Intercept people changing our itsEHctrlName ModelParam. | |
Protected Attributes | |
OModelParam< std::string > | itsEHctrlType |
Type of the controller. |
EyeHeadController configurator for eye.
This will export the --ehc-type=XX command-line option and will instantiate a EyeHeadController 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 name of the controller to use. The current EyeHeadController may be retrieved using getEHC().
Definition at line 53 of file EyeHeadControllerConfigurator.H.
EyeHeadControllerConfigurator::EyeHeadControllerConfigurator | ( | OptionManager & | mgr, | |
const std::string & | descrName = "Eye/Head Controller Configurator" , |
|||
const std::string & | tagName = "EyeHeadControllerConfigurator" | |||
) |
Constructor.
Definition at line 46 of file EyeHeadControllerConfigurator.C.
References ModelComponent::addSubComponent().
EyeHeadControllerConfigurator::~EyeHeadControllerConfigurator | ( | ) | [virtual] |
destructor
Definition at line 57 of file EyeHeadControllerConfigurator.C.
nub::ref< EyeHeadController > EyeHeadControllerConfigurator::getEHC | ( | ) | const |
Get the chosen EyeHeadController.
You should call this during start() of the ModelComponent that needs the EyeHeadController. CAUTION: this may be a rutz::shared_ptr(NULL) if no controller has been chosen.
Definition at line 61 of file EyeHeadControllerConfigurator.C.
void EyeHeadControllerConfigurator::paramChanged | ( | ModelParamBase *const | param, | |
const bool | valueChanged, | |||
ParamClient::ChangeStatus * | status | |||
) | [virtual] |
Intercept people changing our itsEHctrlName ModelParam.
See ModelComponent.H; as parsing the command-line or reading a config file sets our name, we'll also here instantiate a controller of the proper type (and export its options)
Reimplemented from ModelComponent.
Definition at line 66 of file EyeHeadControllerConfigurator.C.
References ModelComponent::addSubComponent(), ModelComponent::getManager(), OModelParam< T >::getVal(), itsEHctrlType, MC_RECURSE, ModelComponent::removeSubComponent(), and nub::ref< T >::reset().
Type of the controller.
Definition at line 81 of file EyeHeadControllerConfigurator.H.
Referenced by paramChanged().