#include <Neuro/Retina.H>
Public Member Functions | |
RetinaConfigurator (OptionManager &mgr, const std::string &descrName="Retina Configurator", const std::string &tagName="RetinaConfigurator") | |
Constructor. | |
virtual | ~RetinaConfigurator () |
destructor | |
nub::ref< Retina > | getRET () const |
Get the chosen Retina. | |
Protected Member Functions | |
virtual void | paramChanged (ModelParamBase *const param, const bool valueChanged, ParamClient::ChangeStatus *status) |
Intercept people changing our ModelParam. | |
Protected Attributes | |
OModelParam< std::string > | itsType |
type of retina |
Retina configurator.
This will export the --retina-type=XX command-line option and will instantiate a Retina 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 Retina may be retrieved using getRET().
Definition at line 214 of file Retina.H.
RetinaConfigurator::RetinaConfigurator | ( | OptionManager & | mgr, | |
const std::string & | descrName = "Retina Configurator" , |
|||
const std::string & | tagName = "RetinaConfigurator" | |||
) |
RetinaConfigurator::~RetinaConfigurator | ( | ) | [virtual] |
Get the chosen Retina.
You should call this during start() of the ModelComponent that needs the Retina. This is guaranteed to be a non-null object (though it may be "stub" type, e.g. RetinaStub).
void RetinaConfigurator::paramChanged | ( | ModelParamBase *const | param, | |
const bool | valueChanged, | |||
ParamClient::ChangeStatus * | status | |||
) | [protected, 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 retina of the proper type (and export its options)
Reimplemented from ModelComponent.
Definition at line 402 of file Retina.C.
References ModelComponent::addSubComponent(), ModelComponent::getManager(), OModelParam< T >::getVal(), itsType, MC_RECURSE, ModelComponent::removeSubComponent(), and nub::ref< T >::reset().
OModelParam<std::string> RetinaConfigurator::itsType [protected] |