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. | |
| virtual OpenViBE::Kernel::EParameterType | getType (void) const |
| Gets the type of this parameter's content. | |
| virtual OpenViBE::CIdentifier | getSubTypeIdentifier (void) const |
| Gets the sub type of this parameter's content (e.g. for enumeration) | |
Reinitialization | |
| virtual OpenViBE::boolean | clearReferenceTarget (void) |
| Clears all reference targets for this paramter. | |
Reference target management | |
| virtual OpenViBE::boolean | getReferenceTarget (OpenViBE::Kernel::IParameter *&value) const |
| Gets the parameter reference target. | |
| virtual OpenViBE::boolean | setReferenceTarget (OpenViBE::Kernel::IParameter *value) |
| Sets the parameter reference target for this parameter. | |
| virtual OpenViBE::boolean | getReferenceTarget (void *value) const |
| Gets the value reference target. | |
| virtual OpenViBE::boolean | setReferenceTarget (const void *value) |
| Sets the value reference target for this parameter. | |
Value access | |
| virtual OpenViBE::boolean | getValue (void *value) const |
| Gets the value for this parameter. | |
| virtual OpenViBE::boolean | setValue (const void *value) |
| Sets the value for this parameter. | |
Detailed Description
Generic parameter handler for configurable objects.
- Date:
- 2007-11-21
- See also:
- IConfigurable
- EParameterType
- TParameterHandler
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 recommand the use of the TParameterHandler object which dramatically eases the use of the IParameter interface.
Member Function Documentation
| virtual OpenViBE::uint64 getParameterSize | ( | void | ) | const [inline, virtual] |
Gets the size of this parameter's content.
- Returns:
- the size of this parameter's content.
| virtual OpenViBE::Kernel::EParameterType getType | ( | void | ) | const [inline, virtual] |
Gets the type of this parameter's content.
- Returns:
- the type of this parameter's content.
| virtual OpenViBE::CIdentifier getSubTypeIdentifier | ( | void | ) | const [inline, virtual] |
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).
| virtual OpenViBE::boolean clearReferenceTarget | ( | void | ) | [inline, virtual] |
Clears all reference targets for this paramter.
- Returns:
- true in case of success.
- false in case of error.
- See also:
- getReferenceTarget
- setReferenceTarget
| virtual OpenViBE::boolean getReferenceTarget | ( | OpenViBE::Kernel::IParameter *& | value | ) | const [inline, virtual] |
Gets the parameter reference target.
- Parameters:
-
value [out] : a pointer to the reference target parameter if existing, NULLif not
- Returns:
- true in case of success.
- false in case of error.
| virtual OpenViBE::boolean setReferenceTarget | ( | OpenViBE::Kernel::IParameter * | value | ) | [inline, virtual] |
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
NULLsimply 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.
| virtual OpenViBE::boolean getReferenceTarget | ( | void * | value | ) | const [inline, virtual] |
Gets the value reference target.
- Parameters:
-
value [out] : a pointer to the value target parameter if existing, NULLif not
- Returns:
- true in case of success.
- false in case of error.
| virtual OpenViBE::boolean setReferenceTarget | ( | const void * | value | ) | [inline, virtual] |
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
NULLsimply 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.
| virtual OpenViBE::boolean getValue | ( | void * | value | ) | const [inline, virtual] |
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
valueto copy the value itself. -
if a parameter or value reference target has been created, then either this target's
getValueis automatically called, either the value target is directly copied
- See also:
- getParameterSize
| virtual OpenViBE::boolean setValue | ( | const void * | value | ) | [inline, virtual] |
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
Generated on Tue Jun 26 2012 15:25:54 for Documentation by
1.7.4
