This class handles a list of name/value pairs. It handles a (hidden) map associating string keys to string values.This class avoids the need to include stl's map header file in the C++ interface, thus preventing potential compile/link errors when dynamically loading modules. More...
Public Member Functions | |
OpenViBE::boolean | setValue (const OpenViBE::CString &rName, const OpenViBE::CString &rValue) |
Insert a name/value pair. More... | |
OpenViBE::boolean | setValue (const OpenViBE::CString &rName, const char *pValue) |
Insert a name/value pair. More... | |
OpenViBE::boolean | setValue (const OpenViBE::CString &rName, const OpenViBE::float64 &rValue) |
Insert a name/value pair where value is a float64. More... | |
OpenViBE::boolean | setValue (const OpenViBE::CString &rName, OpenViBE::boolean bValue) |
Insert a name/value pair where value is a boolean. More... | |
OpenViBE::boolean | getValue (const OpenViBE::CString &rName, OpenViBE::CString &rValue) const |
Retrieve a value from the list. More... | |
OpenViBE::boolean | getValue (const OpenViBE::CString &rName, OpenViBE::float64 &rValue) const |
Retrieve a float64 value from the list. More... | |
OpenViBE::boolean | getValue (const OpenViBE::CString &rName, OpenViBE::boolean &rValue) const |
Retrieve a boolean value from the list In the current implementation a value evaluates to true if its string equals "1" and to false if it equals "0". More... | |
Constructor / Destructor | |
CNameValuePairList (void) | |
Default constructor. More... | |
CNameValuePairList (const OpenViBE::CNameValuePairList &rNameValuePairList) | |
Copy constructor. More... | |
virtual | ~CNameValuePairList (void) |
Destructor. More... | |
Operators | |
OpenViBE::CNameValuePairList & | operator= (const OpenViBE::CNameValuePairList &rNameValuePairList) |
Affectation operator (copy) More... | |
Protected Attributes | |
OpenViBE::CNameValuePairListImpl * | m_pNameValuePairListImpl |
The list implementation. | |
Detailed Description
This class handles a list of name/value pairs. It handles a (hidden) map associating string keys to string values.
This class avoids the need to include stl's map header file in the C++ interface, thus preventing potential compile/link errors when dynamically loading modules.
- Date
- 2008-07
- Note
- Implementation based on std::map<std::string, std::string>
Constructor & Destructor Documentation
CNameValuePairList | ( | void | ) |
Default constructor.
Initializes the list.
CNameValuePairList | ( | const OpenViBE::CNameValuePairList & | rNameValuePairList | ) |
Copy constructor.
- Parameters
-
rNameValuePairList [in] : The list to copy
Copies the contents of rNameValuePairList
into the new list.
|
virtual |
Destructor.
The destructor releases the std::map implementation !
Member Function Documentation
OpenViBE::CNameValuePairList& operator= | ( | const OpenViBE::CNameValuePairList & | rNameValuePairList | ) |
Affectation operator (copy)
- Parameters
-
rNameValuePairList [in] : The list to copy
- Returns
- This list.
OpenViBE::boolean setValue | ( | const OpenViBE::CString & | rName, |
const OpenViBE::CString & | rValue | ||
) |
Insert a name/value pair.
- Parameters
-
[in] rName Name to add to the list [in] rValue Value to associate with the name
- Returns
- True if pair could be inserted, false otherwise
OpenViBE::boolean setValue | ( | const OpenViBE::CString & | rName, |
const char * | pValue | ||
) |
Insert a name/value pair.
- Parameters
-
[in] rName Name to add to the list [in] pValue Value to associate with the name
- Returns
- True if pair could be inserted, false otherwise
OpenViBE::boolean setValue | ( | const OpenViBE::CString & | rName, |
const OpenViBE::float64 & | rValue | ||
) |
Insert a name/value pair where value is a float64.
- Parameters
-
[in] rName Name to add to the list [in] rValue Float64 value to associate with the name
- Returns
- True if pair could be inserted, false otherwise
OpenViBE::boolean setValue | ( | const OpenViBE::CString & | rName, |
OpenViBE::boolean | bValue | ||
) |
Insert a name/value pair where value is a boolean.
- Parameters
-
[in] rName Name to add to the list [in] bValue Boolean value to associate with the name
- Returns
- True if pair could be inserted, false otherwise
OpenViBE::boolean getValue | ( | const OpenViBE::CString & | rName, |
OpenViBE::CString & | rValue | ||
) | const |
Retrieve a value from the list.
- Parameters
-
[in] rName Name whose value is to be retrieved [out] rValue Value to be retrieved from the list
- Returns
- True if value could be retrieved, false otherwise
OpenViBE::boolean getValue | ( | const OpenViBE::CString & | rName, |
OpenViBE::float64 & | rValue | ||
) | const |
Retrieve a float64 value from the list.
- Parameters
-
[in] rName Name whose value is to be retrieved [out] rValue Float64 value to be retrieved
- Returns
- True if a float64 value could be retrieved, false otherwise
OpenViBE::boolean getValue | ( | const OpenViBE::CString & | rName, |
OpenViBE::boolean & | rValue | ||
) | const |
Retrieve a boolean value from the list In the current implementation a value evaluates to true if its string equals "1" and to false if it equals "0".
- Parameters
-
rValue String to evaluate
- Returns
- True if string evaluates to a boolean, false otherwise
Generated on Tue Jun 26 2012 15:25:54 for Documentation by 1.7.4