GistEstimator configurator. More...
#include <Neuro/GistEstimatorConfigurator.H>
Public Member Functions | |
GistEstimatorConfigurator (OptionManager &mgr, const std::string &descrName="Gist Estimator Configurator", const std::string &tagName="GistEstimatorConfigurator") | |
Constructor. | |
virtual | ~GistEstimatorConfigurator () |
destructor | |
nub::ref< GistEstimator > | getGE () const |
Get the chosen GistEstimator. | |
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 > | itsGEtype |
type of Gist Estimator |
GistEstimator configurator.
This will export the --ge-type=XX command-line option and will instantiate a GistEstimator 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 Gist Estimator may be retrieved using getGE().
Definition at line 54 of file GistEstimatorConfigurator.H.
GistEstimatorConfigurator::GistEstimatorConfigurator | ( | OptionManager & | mgr, | |
const std::string & | descrName = "Gist Estimator Configurator" , |
|||
const std::string & | tagName = "GistEstimatorConfigurator" | |||
) |
Constructor.
Definition at line 53 of file GistEstimatorConfigurator.C.
References ModelComponent::addSubComponent().
GistEstimatorConfigurator::~GistEstimatorConfigurator | ( | ) | [virtual] |
destructor
Definition at line 64 of file GistEstimatorConfigurator.C.
nub::ref< GistEstimator > GistEstimatorConfigurator::getGE | ( | ) | const |
Get the chosen GistEstimator.
You should call this during start() of the ModelComponent that needs the GistEstimator. NOTE: the result will never be null (since it's a nub::ref rather than a nub::soft_ref), but the result might be a "stub" object (e.g. GistEstimatorStub) designed to gracefully do nothing.
Definition at line 68 of file GistEstimatorConfigurator.C.
void GistEstimatorConfigurator::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 controller of the proper type (and export its options)
Reimplemented from ModelComponent.
Definition at line 72 of file GistEstimatorConfigurator.C.
References ModelComponent::addSubComponent(), ModelComponent::getManager(), OModelParam< T >::getVal(), itsGEtype, MC_RECURSE, ModelComponent::removeSubComponent(), and nub::ref< T >::reset().
OModelParam<std::string> GistEstimatorConfigurator::itsGEtype [protected] |
type of Gist Estimator
Definition at line 76 of file GistEstimatorConfigurator.H.
Referenced by paramChanged().