SimulationViewerConfigurator Class Reference

SimulationViewer configurator. More...

#include <Neuro/SimulationViewerConfigurator.H>

Inheritance diagram for SimulationViewerConfigurator:
Inheritance graph
[legend]
Collaboration diagram for SimulationViewerConfigurator:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 SimulationViewerConfigurator (OptionManager &mgr, const std::string &descrName="Simulation Viewer Configurator", const std::string &tagName="SimulationViewerConfigurator")
 Constructor.
virtual ~SimulationViewerConfigurator ()
 destructor
nub::ref< SimulationViewergetSV () 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::stringitsSVtype
 type of viewer

Detailed Description

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.


Constructor & Destructor Documentation

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.


Member Function Documentation

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().


Member Data Documentation

type of viewer

Definition at line 74 of file SimulationViewerConfigurator.H.

Referenced by paramChanged().


The documentation for this class was generated from the following files:
Generated on Sun May 8 08:43:49 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3