PrefrontalCortex configurator. More...
#include <Neuro/PrefrontalCortex.H>
Public Member Functions | |
PrefrontalCortexConfigurator (OptionManager &mgr, const std::string &descrName="PrefrontalCortex Configurator", const std::string &tagName="PrefrontalCortexConfigurator") | |
Constructor. | |
virtual | ~PrefrontalCortexConfigurator () |
destructor | |
nub::ref< PrefrontalCortex > | getPFC () const |
Get the chosen PrefrontalCortex. | |
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 PrefrontalCortex |
PrefrontalCortex configurator.
This will export the --PrefrontalCortex-type=XX command-line option and will instantiate a PrefrontalCortex 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 PrefrontalCortex may be retrieved using getPFC().
Definition at line 80 of file PrefrontalCortex.H.
PrefrontalCortexConfigurator::PrefrontalCortexConfigurator | ( | OptionManager & | mgr, | |
const std::string & | descrName = "PrefrontalCortex Configurator" , |
|||
const std::string & | tagName = "PrefrontalCortexConfigurator" | |||
) |
Constructor.
Definition at line 75 of file PrefrontalCortex.C.
References ModelComponent::addSubComponent().
PrefrontalCortexConfigurator::~PrefrontalCortexConfigurator | ( | ) | [virtual] |
destructor
Definition at line 86 of file PrefrontalCortex.C.
nub::ref< PrefrontalCortex > PrefrontalCortexConfigurator::getPFC | ( | ) | const |
Get the chosen PrefrontalCortex.
You should call this during start() of the ModelComponent that needs the PrefrontalCortex. This is guaranteed to be a non-null object (though it may be "stub" type, e.g. PrefrontalCortexStub).
Definition at line 90 of file PrefrontalCortex.C.
void PrefrontalCortexConfigurator::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 PrefrontalCortex of the proper type (and export its options)
Reimplemented from ModelComponent.
Definition at line 94 of file PrefrontalCortex.C.
References ModelComponent::addSubComponent(), ModelComponent::getManager(), OModelParam< T >::getVal(), itsType, MC_RECURSE, ModelComponent::removeSubComponent(), and nub::ref< T >::reset().
OModelParam<std::string> PrefrontalCortexConfigurator::itsType [protected] |
type of PrefrontalCortex
Definition at line 100 of file PrefrontalCortex.H.
Referenced by paramChanged().