ParamClient Class Reference

An abstract interface class for clients of model params. More...

#include <Component/ParamClient.H>

Inheritance diagram for ParamClient:
Inheritance graph
[legend]

List of all members.

Public Types

enum  ChangeStatus { CHANGE_ACCEPTED, CHANGE_REJECTED }
 

Return type for paramChange() indicating whether a param change was allowed.

More...

Public Member Functions

 ParamClient ()
 Default constructor.
virtual ~ParamClient ()
 Virtual destructor for proper base class destruction.
virtual void registerParam (ModelParamBase *mp)=0
 Our parameters will register with us upon construction.
virtual void registerOptionedParam (OptionedModelParam *mp, const ParamFlag flags)=0
 Our parameters will register with us upon construction.
virtual void unregisterParam (const ModelParamBase *mp)=0
 Our parameters will un-register with us upon destruction.
virtual void paramChanged (ModelParamBase *param, const bool valueChanged, ChangeStatus *status)=0
 Our params call us back with this function whenever they change value.

Detailed Description

An abstract interface class for clients of model params.

Using this abstract interface class allows us to decouple the concrete model param classes (NModelParam and OModelParam) from the concrete client class (just ModelComponent, for now).

Definition at line 50 of file ParamClient.H.


Member Enumeration Documentation

Return type for paramChange() indicating whether a param change was allowed.

Definition at line 73 of file ParamClient.H.


Constructor & Destructor Documentation

ParamClient::ParamClient (  ) 

Default constructor.

Definition at line 43 of file ParamClient.C.

ParamClient::~ParamClient (  )  [virtual]

Virtual destructor for proper base class destruction.

Definition at line 46 of file ParamClient.C.


Member Function Documentation

virtual void ParamClient::paramChanged ( ModelParamBase param,
const bool  valueChanged,
ChangeStatus status 
) [pure virtual]

Our params call us back with this function whenever they change value.

Base classes should override this function if they need to take special action when param changes value.

Parameters:
param the address of the ModelParamBase that changed; subclasses can compare this with the addresses of their model param members to figure out which is the relevant param
valueChanged true if the value actually changed, false if the value was "set" but the new value is the same as the old value; some clients may want to avoid re-doing expensive operations if the value did not actually change
status the subclass that implements paramChanged() should set *status to CHANGE_REJECTED if it wishes to reject a particular parameter change; the caller of paramChanged() is expected to set *status to CHANGE_ACCEPTED prior to calling paramChanged(), so the implentation of paramChanged() does not need to set *status CHANGE_ACCEPTED if it wishes to allow the change since that will already be the default status

Implemented in Beowulf, ColorChannel, ContourChannel, DepthMotionChannel, EndPointChannel, FoeMSTChannel, IntegerMathEngine, IntegerMotionChannel, IntegerOrientationChannel, IntegerRawVisualCortex, IntensityBandChannel, LJunctionChannel, MotionChannel, MotionOpticalFlowChannel, MotionSpatioTemporalChannel, MultiColorBandChannel, MultiSpectralResidualChannel, OrientationChannel, RawVisualCortex, SingleChannel, SoxChannel, StereoChannel, TJunctionChannel, XJunctionChannel, ModelComponent, ModelManager, CudaSaliency, FrameGrabberConfigurator, QtDisplayStream, QtDisplayStream, EnvSimulationViewer, EnvSimulationViewer, MbariResultViewer, InputFrameSeries, OutputFrameSeries, AttentionGateConfigurator, AttentionGuidanceMapConfigurator, EnvInferoTemporal, EnvSaliencyMap, EnvSegmenterColorRegion, EnvSegmenterConfigurator, EnvVisualCortexBase, EyeHeadControllerConfigurator, GistEstimatorConfigurator, HandControllerConfigurator, InferoTemporalConfigurator, NeoBrain, NeoBrain, PrefrontalCortexConfigurator, RetinaConfigurator, SaccadeControllerEyeConfigurator, SaccadeControllerHeadConfigurator, SaliencyMapConfigurator, SimulationViewerCompress, SimulationViewerConfigurator, SpatialMetrics, TaskRelevanceMapConfigurator, VisualBufferConfigurator, VisualCortexConfigurator, VisualCortexSurprise, WinnerTakeAllConfigurator, EyeTrackerConfigurator, MovementController, SimEventQueueConfigurator, SaliencyMapFeatureExtractor, TigsJob, TigsInputFrameSeries, and RasterInputOptions.

Referenced by ModelParamAuxImpl::sendChangedMessage().

virtual void ParamClient::registerOptionedParam ( OptionedModelParam mp,
const ParamFlag  flags 
) [pure virtual]

Our parameters will register with us upon construction.

Parameters:
flags Pass USE_MY_VAL here if you want the current value of the model param to be taken as the new default value, otherwise pass 0 for flags.

Implemented in ModelComponent.

Referenced by ModelParamAuxImpl::ModelParamAuxImpl().

virtual void ParamClient::registerParam ( ModelParamBase mp  )  [pure virtual]

Our parameters will register with us upon construction.

Implemented in ModelComponent.

Referenced by ModelParamAuxImpl::ModelParamAuxImpl().

virtual void ParamClient::unregisterParam ( const ModelParamBase mp  )  [pure virtual]

Our parameters will un-register with us upon destruction.

Implemented in ModelComponent.

Referenced by ModelParamAuxImpl::~ModelParamAuxImpl().


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