
#include <Component/ModelParamBase.H>
Inheritance diagram for ModelParamBase:

Various model parameter types can be derived from this base, see the NModelParam and OModelParam template class definitions. ModelParamBase is persistent in the sense that it can be saved/loaded into a ParamMap, which itself provides disk save/load capabilities. ModelParamBase is intended to be used as a data member in a ModelComponent (or derived) object. ModelComponent provides an interface by which ModelParamBase derivatives may also be tuned via command-line options.
Definition at line 93 of file ModelParamBase.H.
Public Member Functions | |
Constructors and Destructors | |
| ModelParamBase (const ParamFlag flags) | |
| Constructor. | |
| virtual | ~ModelParamBase () |
| Destructor. | |
Basic access functions | |
| virtual std::string | getName () const =0 |
| get the parameter's name | |
| virtual std::string | getNameWithSpaces () const |
| get the parameter's name with spaces separating words | |
| virtual std::string | getValString () const =0 |
| Get current value as a string (must be implemented by derived classes). | |
| virtual bool | setValString (const std::string &textval)=0 |
| Set the parameter value from a textual representation, notify client of the change. | |
| virtual void | getValGeneric (RefHolder &ref) const =0 |
| Get the current value through a dynamically-typed RefHolder. | |
| virtual bool | setValGeneric (const RefHolder &ref)=0 |
| Set the current value through a dynamically-typed RefHolder, notify client of the change. | |
| bool | allowsOnlineChanges () const |
| Check whether this param is allowed to have its value changed while the model is active. | |
| void | setInactive (bool v) |
| Change the param's active/inactive setting. | |
| bool | getInactive () const |
| Check the param's active/inactive setting. | |
| void | setHidden (bool v) |
| Change the param's hidden/visible setting. | |
| bool | getHidden () const |
| Check the param's hidden/visible setting. | |
Input/Output functions | |
| virtual void | printout (std::ostream &s, const std::string &prefix="") const =0 |
| Print out our name and contents, mostly for debugging. | |
| virtual void | writeTo (ParamMap &pmap) const =0 |
| Write parameter value to ParamMap. | |
| virtual void | readFrom (const ParamMap &pmap, const bool noerr=true)=0 |
| Get parameter value from ParamMap, notify client of the value change. | |
|
|
Constructor.
Definition at line 96 of file ModelParamBase.C. |
|
|
Destructor.
Definition at line 101 of file ModelParamBase.C. |
|
|
Check whether this param is allowed to have its value changed while the model is active.
Definition at line 142 of file ModelParamBase.H. References ALLOW_ONLINE_CHANGES. Referenced by PrefsWindow::addPrefsForComponent(). |
|
|
Check the param's hidden/visible setting.
Definition at line 154 of file ModelParamBase.H. References MP_HIDDEN. |
|
|
Check the param's active/inactive setting.
Definition at line 148 of file ModelParamBase.H. References MP_INACTIVE. Referenced by PrefItemMPStr::isDisabled(). |
|
|
|
get the parameter's name with spaces separating words This function decodes the CamelCase string that is typically returned by getName() into space-separated words, using some heuristics to figure out where to place word boundaries. It is not guaranteed to be perfectly accurate in finding word boundaries; this result is only intended for user-interface display to the end user and should not be relied on for programmatic usage. Definition at line 104 of file ModelParamBase.C. References acronyms, acronyms_init(), acronyms_init_once, and camelCaseToSpaces(). |
|
|
|
||||||||||||
|
||||||||||||
|
|
Change the param's hidden/visible setting.
Definition at line 151 of file ModelParamBase.H. References MP_HIDDEN. |
|
|
Change the param's active/inactive setting.
Definition at line 145 of file ModelParamBase.H. References MP_INACTIVE. Referenced by NeoBrain::NeoBrain(), EnvSegmenterColorRegion::paramChanged(), and EnvSaliencyMap::paramChanged(). |
|
|
Set the current value through a dynamically-typed RefHolder, notify client of the change.
Implemented in NModelParam< T >, OModelParam< T >, NModelParam< PixRGB< byte > >, NModelParam< unsigned long >, NModelParam< double >, NModelParam< std::string >, NModelParam< VisualFeature >, NModelParam< float >, NModelParam< int >, NModelParam< unsigned int >, NModelParam< byte >, NModelParam< PyramidType >, NModelParam< bool >, NModelParam< SimTime >, NModelParam< uint >, OModelParam< ShapeEstimatorMode >, OModelParam< PixRGB< byte > >, OModelParam< ContourChannelDynamicsType >, OModelParam< FpuPrecision >, OModelParam< unsigned long >, OModelParam< ShapeEstimatorSmoothMethod >, OModelParam< double >, OModelParam< ByteCount >, OModelParam< Location >, OModelParam< ColorComputeType >, OModelParam< std::string >, OModelParam< BitObjectDrawMode >, OModelParam< in_addr >, OModelParam< float >, OModelParam< VisualObjectMatchAlgo >, OModelParam< FrameRange >, OModelParam< int >, OModelParam< Rectangle >, OModelParam< unsigned int >, OModelParam< ResizeSpec >, OModelParam< ContourChannelFilterStyle >, OModelParam< string >, OModelParam< FpuRoundingMode >, OModelParam< byte >, OModelParam< short int >, OModelParam< size_t >, OModelParam< VideoFormat >, OModelParam< LevelSpec >, OModelParam< IORtype >, OModelParam< RasterFileFormat >, OModelParam< ErrorStrategy >, OModelParam< MapCombineType >, OModelParam< MaxNormType >, OModelParam< bool >, OModelParam< SimTime >, OModelParam< Dims >, OModelParam< uint >, OModelParam< OrientComputeType >, OModelParam< ContourConnectionType >, and OModelParam< Point2D< int > >. |
|
|
Set the parameter value from a textual representation, notify client of the change.
Implemented in NModelParam< T >, OModelParam< T >, NModelParam< PixRGB< byte > >, NModelParam< unsigned long >, NModelParam< double >, NModelParam< std::string >, NModelParam< VisualFeature >, NModelParam< float >, NModelParam< int >, NModelParam< unsigned int >, NModelParam< byte >, NModelParam< PyramidType >, NModelParam< bool >, NModelParam< SimTime >, NModelParam< uint >, OModelParam< ShapeEstimatorMode >, OModelParam< PixRGB< byte > >, OModelParam< ContourChannelDynamicsType >, OModelParam< FpuPrecision >, OModelParam< unsigned long >, OModelParam< ShapeEstimatorSmoothMethod >, OModelParam< double >, OModelParam< ByteCount >, OModelParam< Location >, OModelParam< ColorComputeType >, OModelParam< std::string >, OModelParam< BitObjectDrawMode >, OModelParam< in_addr >, OModelParam< float >, OModelParam< VisualObjectMatchAlgo >, OModelParam< FrameRange >, OModelParam< int >, OModelParam< Rectangle >, OModelParam< unsigned int >, OModelParam< ResizeSpec >, OModelParam< ContourChannelFilterStyle >, OModelParam< string >, OModelParam< FpuRoundingMode >, OModelParam< byte >, OModelParam< short int >, OModelParam< size_t >, OModelParam< VideoFormat >, OModelParam< LevelSpec >, OModelParam< IORtype >, OModelParam< RasterFileFormat >, OModelParam< ErrorStrategy >, OModelParam< MapCombineType >, OModelParam< MaxNormType >, OModelParam< bool >, OModelParam< SimTime >, OModelParam< Dims >, OModelParam< uint >, OModelParam< OrientComputeType >, OModelParam< ContourConnectionType >, and OModelParam< Point2D< int > >. Referenced by PrefItemMPStr::fromString(), and ModelParamAuxImpl::readFrom(). |
|
|
Write parameter value to ParamMap.
Implemented in NModelParam< T >, OModelParam< T >, NModelParam< PixRGB< byte > >, NModelParam< unsigned long >, NModelParam< double >, NModelParam< std::string >, NModelParam< VisualFeature >, NModelParam< float >, NModelParam< int >, NModelParam< unsigned int >, NModelParam< byte >, NModelParam< PyramidType >, NModelParam< bool >, NModelParam< SimTime >, NModelParam< uint >, OModelParam< ShapeEstimatorMode >, OModelParam< PixRGB< byte > >, OModelParam< ContourChannelDynamicsType >, OModelParam< FpuPrecision >, OModelParam< unsigned long >, OModelParam< ShapeEstimatorSmoothMethod >, OModelParam< double >, OModelParam< ByteCount >, OModelParam< Location >, OModelParam< ColorComputeType >, OModelParam< std::string >, OModelParam< BitObjectDrawMode >, OModelParam< in_addr >, OModelParam< float >, OModelParam< VisualObjectMatchAlgo >, OModelParam< FrameRange >, OModelParam< int >, OModelParam< Rectangle >, OModelParam< unsigned int >, OModelParam< ResizeSpec >, OModelParam< ContourChannelFilterStyle >, OModelParam< string >, OModelParam< FpuRoundingMode >, OModelParam< byte >, OModelParam< short int >, OModelParam< size_t >, OModelParam< VideoFormat >, OModelParam< LevelSpec >, OModelParam< IORtype >, OModelParam< RasterFileFormat >, OModelParam< ErrorStrategy >, OModelParam< MapCombineType >, OModelParam< MaxNormType >, OModelParam< bool >, OModelParam< SimTime >, OModelParam< Dims >, OModelParam< uint >, OModelParam< OrientComputeType >, OModelParam< ContourConnectionType >, and OModelParam< Point2D< int > >. |
1.4.4