OpenViBE Documentation 3.6.0
|
Manager for all kind of configuration. More...
#include <ovIConfigurationManager.h>
Public Member Functions | |
virtual void | clear ()=0 |
Clears the content of this configuration manager. More... | |
virtual bool | addConfigurationFromFile (const CString &filenameWildCard)=0 |
Parses a configuration file and adds its content as token configuration. More... | |
virtual CIdentifier | createConfigurationToken (const CString &name, const CString &value)=0 |
Creates a new configuration token in this configuration manager. More... | |
virtual bool | releaseConfigurationToken (const CIdentifier &id)=0 |
Removes an existing configuration token. More... | |
virtual CIdentifier | getNextConfigurationTokenIdentifier (const CIdentifier &prevConfigTokenID) const =0 |
Iterates on the existing configuration tokens of this configuration manager. More... | |
virtual CString | getConfigurationTokenName (const CIdentifier &id) const =0 |
Gets a token's name from its id. More... | |
virtual CString | getConfigurationTokenValue (const CIdentifier &id) const =0 |
Gets a token's value from its id. More... | |
virtual bool | setConfigurationTokenName (const CIdentifier &id, const CString &name)=0 |
Changes the name of an exisiting token. More... | |
virtual bool | setConfigurationTokenValue (const CIdentifier &id, const CString &value)=0 |
Changes the value of an exisiting token. More... | |
virtual bool | addOrReplaceConfigurationToken (const CString &name, const CString &value)=0 |
Adds a token or replaces the value of a token. More... | |
virtual CIdentifier | lookUpConfigurationTokenIdentifier (const CString &name, bool recursive=false) const =0 |
Searches the identifier of a token with a given name. More... | |
virtual CString | lookUpConfigurationTokenValue (const CString &name) const =0 |
Searches the value of a token with a given name. More... | |
virtual bool | registerKeywordParser (const CString &keyword, const IConfigurationKeywordExpandCallback &callback)=0 |
Adds a new parser for special variables. More... | |
virtual bool | unregisterKeywordParser (const CString &keyword)=0 |
Removes the keyword parser for a given keyword. More... | |
virtual bool | unregisterKeywordParser (const IConfigurationKeywordExpandCallback &callback)=0 |
Removes the keyword parser for a given keyword. More... | |
virtual CString | expand (const CString &expression) const =0 |
Expands a string to an expanded string based on its use of configuration tokens. More... | |
_IsDerivedFromClass_ (IKernelObject, OV_ClassId_Kernel_Config_ConfigManager) virtual CString expandOnlyKeyword(const CString &keyword | |
virtual double | expandAsFloat (const CString &in, double fallbackValue=0) const =0 |
Expands a string to a floating point value based on its use of configuration tokens. More... | |
virtual int64_t | expandAsInteger (const CString &in, int64_t fallbackValue=0) const =0 |
Expands a string to an integer value based on its use of configuration tokens. More... | |
virtual uint64_t | expandAsUInteger (const CString &in, uint64_t fallbackValue=0) const =0 |
Expands a string to an unsigned integer value based on its use of configuration tokens. More... | |
virtual bool | expandAsBoolean (const CString &in, bool fallbackValue=true) const =0 |
Expands a string to a boolean value based on its use of configuration tokens. More... | |
virtual uint64_t | expandAsEnumerationEntryValue (const CString &in, const CIdentifier &enumerationTypeID, uint64_t fallbackValue=0) const =0 |
Expands a string to an enumeration entry value based on its use of configuration tokens. More... | |
Public Member Functions inherited from OpenViBE::IObject | |
virtual CIdentifier | getClassIdentifier () const =0 |
Returns the final class identifier of the concrete class. More... | |
virtual bool | isDerivedFromClass (const CIdentifier &classId) const |
Checks if this object is compatible with a class identifier. More... | |
virtual bool | acceptVisitor (IObjectVisitor &visitor) |
Requests this object to accept a visitor. More... | |
Public Attributes | |
const CString & | expression |
const CString bool | preserveBackslashes = false) const = 0 |
Additional Inherited Members | |
Protected Member Functions inherited from OpenViBE::IObject | |
virtual | ~IObject () |
Manager for all kind of configuration.
|
pure virtual |
Clears the content of this configuration manager.
Implemented in OpenViBE::Kernel::CConfigurationManager.
|
pure virtual |
Parses a configuration file and adds its content as token configuration.
filenameWildCard | [in] : a wildcard of the files to parse & add |
Implemented in OpenViBE::Kernel::CConfigurationManager.
|
pure virtual |
Creates a new configuration token in this configuration manager.
name | [in] : the name of the configuration token |
value | [in] the value of the configuration token |
CIdentifier::undefined()
in case of error Implemented in OpenViBE::Kernel::CConfigurationManager.
|
pure virtual |
Removes an existing configuration token.
id | [in] : the identifier of the token to remove |
Implemented in OpenViBE::Kernel::CConfigurationManager.
|
pure virtual |
Iterates on the existing configuration tokens of this configuration manager.
prevConfigTokenID | [in] : the identifier of the token to start the iteration from |
CIdentifier::undefined()
in case there is no more token to iterate onTypicall use of this function is :
Implemented in OpenViBE::Kernel::CConfigurationManager.
|
pure virtual |
Gets a token's name from its id.
id | [in] : the token id which name should be returned |
Implemented in OpenViBE::Kernel::CConfigurationManager.
|
pure virtual |
Gets a token's value from its id.
id | [in] : the token id which value should be returned |
Implemented in OpenViBE::Kernel::CConfigurationManager.
|
pure virtual |
Changes the name of an exisiting token.
id | [in] : the identifier of the token which name should be changed |
name | [in] : the new name of the configuration token |
Implemented in OpenViBE::Kernel::CConfigurationManager.
|
pure virtual |
Changes the value of an exisiting token.
id | [in] : the identifier of the token which value should be changed |
value | [in] : the new value of the configuration token |
Implemented in OpenViBE::Kernel::CConfigurationManager.
|
pure virtual |
Adds a token or replaces the value of a token.
name | [in] : the name of the token which value should be changed |
value | [in] : the new value of the configuration token |
Implemented in OpenViBE::Kernel::CConfigurationManager.
|
pure virtual |
Searches the identifier of a token with a given name.
name | [in] : the name of the token which identifier should be found |
recursive | [in] : when set to true, asks this configuration manager to propagate the request to parent configuration manager (if any). |
CIdentifier::undefined()
in case of error recursive
is set to true then the returned identifier should not be considered as the identifier of an existing token in this configuration manager as it may have been returned from a parent configuration manager. Instead, one must consider the returned identifier as a kind of boolean value : such token actually exists or such token does not exist. Implemented in OpenViBE::Kernel::CConfigurationManager.
|
pure virtual |
Searches the value of a token with a given name.
name | [in] : the name of the token which value should be found |
getConfigurationTokenName
in the sense that it recursively requests a token value to parent configuration managers until it finds one (if any). It also differs from the expand
function in the sense that it takes a token name as input but does not expand its value when it finds it. Implemented in OpenViBE::Kernel::CConfigurationManager.
|
pure virtual |
Adds a new parser for special variables.
keyword | [in] : keyword to overload |
callback | [in] : handler for the keyword |
Implemented in OpenViBE::Kernel::CConfigurationManager.
|
pure virtual |
Removes the keyword parser for a given keyword.
keyword | [in] : keyword of the parser to remove |
Implemented in OpenViBE::Kernel::CConfigurationManager.
|
pure virtual |
Removes the keyword parser for a given keyword.
callback | [in] : handler for the keyword |
Implemented in OpenViBE::Kernel::CConfigurationManager.
|
pure virtual |
Expands a string to an expanded string based on its use of configuration tokens.
expression | [in] : the string that you want to expan |
Typical use of this function is :
Implemented in OpenViBE::Kernel::CConfigurationManager.
|
pure virtual |
Expands a string to a floating point value based on its use of configuration tokens.
in | [in] : the string that you want to expand |
fallbackValue | [in] : a fall back value to return in case the expanded string can not be parsed as a floating point value |
Implemented in OpenViBE::Kernel::CConfigurationManager.
|
pure virtual |
Expands a string to an integer value based on its use of configuration tokens.
in | [in] : the string that you want to expand |
fallbackValue | [in] : a fall back value to return in case the expanded string can not be parsed as an integer value |
Implemented in OpenViBE::Kernel::CConfigurationManager.
|
pure virtual |
Expands a string to an unsigned integer value based on its use of configuration tokens.
in | [in] : the string that you want to expand |
fallbackValue | [in] : a fall back value to return in case the expanded string can not be parsed as an unsigned integer value |
Implemented in OpenViBE::Kernel::CConfigurationManager.
|
pure virtual |
Expands a string to a boolean value based on its use of configuration tokens.
in | [in] : the string that you want to expand |
fallbackValue | [in] : a fall back value to return in case the expanded string can not be parsed as a boolean value |
Implemented in OpenViBE::Kernel::CConfigurationManager.
|
pure virtual |
Expands a string to an enumeration entry value based on its use of configuration tokens.
in | [in] : the string that you want to expand |
enumerationTypeID | [in] : the enumeration type to use |
fallbackValue | [in] : a fall back value to return in case the expanded string can not be parsed as an enumeration entry value |
Implemented in OpenViBE::Kernel::CConfigurationManager.