Read-only view on the parameters entry.
More...
#include <parameter_entry.h>
List of all members.
Public Member Functions |
parameter_type | type () const |
| Returns the type of underlying (current) entry.
|
std::string | name () const |
| Extracts the name of current entry.
|
bool | get_boolean () const |
| Extracts the bool value from the current entry.
|
int | get_integer () const |
| Extracts the int value from the current entry.
|
long long | get_long_long () const |
| Extracts the long long value from the current entry.
|
double long | get_double_float () const |
| Extracts the double float value from the current entry.
|
std::string | get_string () const |
| Extracts the string value from the current entry.
|
const char * | get_string (std::size_t &length) const |
| Extracts the string value from the current entry.
|
const void * | get_binary (std::size_t &length) const |
| Extracts the binary value from the current entry.
|
core::parameters * | get_nested_parameters () const |
| Extracts the nested parameters value from the current entry.
|
bool * | get_boolean_array (std::size_t &array_length) const |
| Extracts the array of bool values from the current entry.
|
int * | get_integer_array (std::size_t &array_length) const |
| Extracts the array of int values from the current entry.
|
long long * | get_long_long_array (std::size_t &array_length) const |
| Extracts the array of long long values from the current entry.
|
double * | get_double_float_array (std::size_t &array_length) const |
| Extracts the array of double values from the current entry.
|
std::size_t | get_string_array_length () const |
| Extracts the length of string array.
|
std::string | get_string_in_array (std::size_t index) const |
| Extracts string value from string array.
|
const char * | get_string_in_array (std::size_t index, std::size_t &value_length) const |
| Extracts string value from string array.
|
std::size_t | get_binary_array_length () const |
| Extracts the length of binary array.
|
const void * | get_binary_in_array (std::size_t index, std::size_t &value_length) const |
| Extracts binary value from binary array.
|
Detailed Description
Read-only view on the parameters entry.
- See also:
- parameters
This view is a lightweight proxy that itself is copyable, but the copying of this class does not create new copies of the underlying entry.
Member Function Documentation
Returns the type of the underlying entry in the associated parameters object.
- Returns:
- Type of the entry.
std::string parameter_entry::name |
( |
| ) |
const |
Extracts the name of the underlying entry in the associated parameters object.
- Returns:
- Name of the entry.
bool parameter_entry::get_boolean |
( |
| ) |
const |
Extracts the bool value from the current entry.
- Returns:
- Value of the entry if it has correct type.
int parameter_entry::get_integer |
( |
| ) |
const |
Extracts the int value from the current entry.
- Returns:
- Value of the entry if it has correct type.
long long parameter_entry::get_long_long |
( |
| ) |
const |
Extracts the long long value from the current entry.
- Returns:
- Value of the entry if it has correct type.
double long parameter_entry::get_double_float |
( |
| ) |
const |
Extracts the double float value from the current entry.
- Returns:
- Value of the entry if it has correct type.
std::string parameter_entry::get_string |
( |
| ) |
const |
Extracts the string value from the current entry.
- Returns:
- Value of the entry if it has correct type.
const char * parameter_entry::get_string |
( |
std::size_t & |
length | ) |
const |
Extracts the string value from the current entry by accessing the buffer directly.
- Parameters:
-
length | Length of the internal buffer. |
- Returns:
- Pointer to the internal buffer if it has correct type.
const void * parameter_entry::get_binary |
( |
std::size_t & |
length | ) |
const |
Extracts the binary value from the current entry by accessing the buffer directly.
- Parameters:
-
length | Length of the internal buffer. |
- Returns:
- Pointer to the internal buffer if it has correct type.
core::parameters * parameter_entry::get_nested_parameters |
( |
| ) |
const |
Extracts the nested parameters value from the current entry.
- Returns:
- Value of the entry if it has correct type.
bool * parameter_entry::get_boolean_array |
( |
std::size_t & |
array_length | ) |
const |
Extracts the array of bool values from the current entry.
- Parameters:
-
array_length | Length of the internal array. |
- Returns:
- Pointer to the internal array buffer.
Note: this function gives read-write access to the underlying array, even if it was set as a shallow-copy.
int * parameter_entry::get_integer_array |
( |
std::size_t & |
array_length | ) |
const |
Extracts the array of int values from the current entry.
- Parameters:
-
array_length | Length of the internal array. |
- Returns:
- Pointer to the internal array buffer.
Note: this function gives read-write access to the underlying array, even if it was set as a shallow-copy.
long long * parameter_entry::get_long_long_array |
( |
std::size_t & |
array_length | ) |
const |
Extracts the array of long long values from the current entry.
- Parameters:
-
array_length | Length of the internal array. |
- Returns:
- Pointer to the internal array buffer.
Note: this function gives read-write access to the underlying array, even if it was set as a shallow-copy.
double * parameter_entry::get_double_float_array |
( |
std::size_t & |
array_length | ) |
const |
Extracts the array of double values from the current entry.
- Parameters:
-
array_length | Length of the internal array. |
- Returns:
- Pointer to the internal array buffer.
Note: this function gives read-write access to the underlying array, even if it was set as a shallow-copy.
std::size_t parameter_entry::get_string_array_length |
( |
| ) |
const |
Extracts the length of string array that is located at the current entry.
- Returns:
- Length of the array.
std::string parameter_entry::get_string_in_array |
( |
std::size_t |
index | ) |
const |
Extracts the string value from the given index of string array that is located at the current entry.
- Parameters:
-
index | The array index (array slot to be read, starting from 0). |
- Returns:
- Value at the given index.
const char * parameter_entry::get_string_in_array |
( |
std::size_t |
index, |
|
|
std::size_t & |
value_length |
|
) |
| const |
Extracts the string value from the given index of string array that is located at the current entry.
- Parameters:
-
index | The array index (array slot to be read, starting from 0). |
value_length | Length of the internal value buffer. |
- Returns:
- Pointer to the internal value buffer.
std::size_t parameter_entry::get_binary_array_length |
( |
| ) |
const |
Extracts the length of binary array that is located at the current entry.
- Returns:
- Length of the array.
const void * parameter_entry::get_binary_in_array |
( |
std::size_t |
index, |
|
|
std::size_t & |
value_length |
|
) |
| const |
Extracts the binary value from the given index of binary array that is located at the current entry.
- Parameters:
-
index | The array index (array slot to be read, starting from 0). |
value_length | Length of the internal value buffer. |
- Returns:
- Pointer to the internal value buffer.