SimulationViewer configurator. More...
#include <Neuro/SimulationViewerConfigurator.H>
Public Member Functions | |
SimulationViewerConfigurator (OptionManager &mgr, const std::string &descrName="Simulation Viewer Configurator", const std::string &tagName="SimulationViewerConfigurator") | |
Constructor. | |
virtual | ~SimulationViewerConfigurator () |
destructor | |
nub::ref< SimulationViewer > | getSV () const |
Get the chosen SimulationViewer. | |
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 > | itsSVtype |
type of viewer |
SimulationViewer configurator.
This will export the --sv-type=XX command-line option and will instantiate a SimulationViewer 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 SimulationViewer may be retrieved using getSV().
Definition at line 53 of file SimulationViewerConfigurator.H.
SimulationViewerConfigurator::SimulationViewerConfigurator | ( | OptionManager & | mgr, | |
const std::string & | descrName = "Simulation Viewer Configurator" , |
|||
const std::string & | tagName = "SimulationViewerConfigurator" | |||
) |
Constructor.
Definition at line 61 of file SimulationViewerConfigurator.C.
References ModelComponent::addSubComponent().
SimulationViewerConfigurator::~SimulationViewerConfigurator | ( | ) | [virtual] |
destructor
Definition at line 72 of file SimulationViewerConfigurator.C.
nub::ref< SimulationViewer > SimulationViewerConfigurator::getSV | ( | ) | const |
Get the chosen SimulationViewer.
You should call this during start() of the ModelComponent that needs the SimulationViewer. The result will never be null (since it's a nub::ref, not a nub::soft_ref), but it may be a "stub" type (e.g. SimulationViewerStub).
Definition at line 76 of file SimulationViewerConfigurator.C.
void SimulationViewerConfigurator::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 viewer of the proper type (and export its options)
Reimplemented from ModelComponent.
Definition at line 81 of file SimulationViewerConfigurator.C.
References ModelComponent::addSubComponent(), ModelComponent::getManager(), OModelParam< T >::getVal(), itsSVtype, MC_RECURSE, ModelComponent::removeSubComponent(), and nub::ref< T >::reset().
type of viewer
Definition at line 74 of file SimulationViewerConfigurator.H.
Referenced by paramChanged().