Generic parameter handler for configurable objects. More...
Public Member Functions | |
information | |
virtual OpenViBE::uint64 | getParameterSize (void) const |
Gets the size of this parameter's content. More... | |
virtual OpenViBE::Kernel::EParameterType | getType (void) const |
Gets the type of this parameter's content. More... | |
virtual OpenViBE::CIdentifier | getSubTypeIdentifier (void) const |
Gets the sub type of this parameter's content (e.g. for enumeration) More... | |
Reinitialization | |
virtual OpenViBE::boolean | clearReferenceTarget (void) |
Clears all reference targets for this paramter. More... | |
Reference target management | |
virtual OpenViBE::boolean | getReferenceTarget (OpenViBE::Kernel::IParameter *&value) const |
Gets the parameter reference target. More... | |
virtual OpenViBE::boolean | setReferenceTarget (OpenViBE::Kernel::IParameter *value) |
Sets the parameter reference target for this parameter. More... | |
virtual OpenViBE::boolean | getReferenceTarget (void *value) const |
Gets the value reference target. More... | |
virtual OpenViBE::boolean | setReferenceTarget (const void *value) |
Sets the value reference target for this parameter. More... | |
Value access | |
virtual OpenViBE::boolean | getValue (void *value) const |
Gets the value for this parameter. More... | |
virtual OpenViBE::boolean | setValue (const void *value) |
Sets the value for this parameter. More... | |
Public Member Functions inherited from IObject | |
virtual OpenViBE::CIdentifier | getClassIdentifier (void) const =0 |
Returns the final class identifier of the concrete class. More... | |
virtual OpenViBE::boolean | isDerivedFromClass (const OpenViBE::CIdentifier &rClassIdentifier) const |
Checks if this object is compatible with a class identifier. More... | |
virtual OpenViBE::boolean | acceptVisitor (OpenViBE::IObjectVisitor &rObjectVisitor) |
Requests this object to accept a visitor. More... | |
Detailed Description
Generic parameter handler for configurable objects.
- Date
- 2007-11-21
Instances of this interface encapsulate a specific type of object as a so called "parameter". The idea behind this parameter interface is to allow to override the parameter content directly pointing to another parameter or another value. In order to be as generic as possible, this interface uses void*
pointers in conjunction with data size values. It can be hard/tricky to understand for unexperienced developers. Thus I recommend the use of the TParameterHandler object which dramatically eases the use of the IParameter interface.
Member Function Documentation
|
inlinevirtual |
Gets the size of this parameter's content.
- Returns
- the size of this parameter's content.
|
inlinevirtual |
Gets the type of this parameter's content.
- Returns
- the type of this parameter's content.
References OpenViBE::Kernel::ParameterType_None.
|
inlinevirtual |
Gets the sub type of this parameter's content (e.g. for enumeration)
- Returns
- the sub type of this parameter's content (e.g. for enumeration).
|
inlinevirtual |
Clears all reference targets for this paramter.
- Returns
- true in case of success.
- false in case of error.
- See also
- getReferenceTarget
- setReferenceTarget
Referenced by TParameterHandler< OpenViBE::IStimulationSet * >::clearReferenceTarget().
|
inlinevirtual |
Gets the parameter reference target.
- Parameters
-
value [out] : a pointer to the reference target parameter if existing, NULL
if not
- Returns
- true in case of success.
- false in case of error.
|
inlinevirtual |
Sets the parameter reference target for this parameter.
- Parameters
-
value [in] : the new reference target to use
- Returns
- true in case of success.
- false in case of error.
- Note
- Setting
NULL
simply removes the parameter reference target
- Warning
- calling this function overrives previous value reference target !
After this function has been called, any call to getValue
or setValue
will be directly redirected to the specified reference target parameter. The internal value handled by this parameter won't be affected anymore until the reference target is cleared.
Referenced by TParameterHandler< OpenViBE::IStimulationSet * >::setReferenceTarget().
|
inlinevirtual |
Gets the value reference target.
- Parameters
-
value [out] : a pointer to the value target parameter if existing, NULL
if not
- Returns
- true in case of success.
- false in case of error.
|
inlinevirtual |
Sets the value reference target for this parameter.
- Parameters
-
value [in] : the new reference target to use
- Returns
- true in case of success.
- false in case of error.
- Note
- Setting
NULL
simply removes the value reference target
- Warning
- calling this function overrives previous parameter reference target !
After this function has been called, any call to getValue
or setValue
will be directly redirected to the specified value reference target. The internal value handled by this parameter won't be affected anymore until the reference target is cleared.
|
inlinevirtual |
Gets the value for this parameter.
- Parameters
-
value [out] : a pointer to where the value should be copied
- Returns
- true in case of success.
- false in case of error.
- Note
- the function assumes enough memory has been allocated in
value
to copy the value itself. -
if a parameter or value reference target has been created, then either this target's
getValue
is automatically called, either the value target is directly copied
- See also
- getParameterSize
Referenced by TParameterHandler< T >::operator T(), and TParameterHandler< OpenViBE::IStimulationSet * >::operator->().
|
inlinevirtual |
Sets the value for this parameter.
- Parameters
-
value [in] : a pointer from where the value should be copied
- Returns
- true in case of success.
- false in case of error.
- See also
- getParameterSize
Referenced by TParameterHandler< OpenViBE::IStimulationSet * >::operator=().
Generated on Tue Jun 26 2012 15:25:54 for Documentation by 1.7.4