YAMI4 Core Library 2.0.0
Messaging Solution for Distributed Systems
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
yami::core::parameter_entry Class Reference

Read-only view on the parameters entry. More...

#include <parameter_entry.h>

Public Member Functions

parameter_type type () const
 Returns the type of underlying (current) entry. More...
 
void get_name (const char *&name, std::size_t &name_length) const
 Extracts the name of current entry. More...
 
result get_boolean (bool &value) const
 Extracts the bool value from the current entry. More...
 
result get_integer (int &value) const
 Extracts the int value from the current entry. More...
 
result get_long_long (long long &value) const
 Extracts the long long value from the current entry. More...
 
result get_word (unsigned int &value) const
 Extracts the unsigned int value from the current entry. More...
 
result get_long_long_word (unsigned long long &value) const
 Extracts the unsigned long long value from the current entry. More...
 
result get_double_float (double &value) const
 Extracts the double value from the current entry. More...
 
result get_string (const char *&value, std::size_t &value_length) const
 Extracts the string value from the current entry. More...
 
result get_binary (const void *&value, std::size_t &value_length) const
 Extracts the binary value from the current entry. More...
 
result get_nested_parameters (parameters *&params) const
 Extracts the nested parameters object from the current entry. More...
 
result get_boolean_array (bool *&values, std::size_t &array_length) const
 Extracts the array of bool values from the current entry. More...
 
result get_integer_array (int *&values, std::size_t &array_length) const
 Extracts the array of int values from the current entry. More...
 
result get_long_long_array (long long *&values, std::size_t &array_length) const
 Extracts the array of long long values from the current entry. More...
 
result get_word_array (unsigned int *&values, std::size_t &array_length) const
 Extracts the array of unsigned int values from the current entry. More...
 
result get_long_long_word_array (unsigned long long *&values, std::size_t &array_length) const
 Extracts the array of unsigned long long values from the current entry. More...
 
result get_double_float_array (double *&values, std::size_t &array_length) const
 Extracts the array of double values from the current entry. More...
 
result get_string_array_length (std::size_t &length) const
 Extracts the length of string array. More...
 
result get_string_in_array (std::size_t index, const char *&value, std::size_t &value_length) const
 Extracts string value from string array. More...
 
result get_binary_array_length (std::size_t &length) const
 Extracts the length of binary array. More...
 
result get_binary_in_array (std::size_t index, const void *&value, std::size_t &value_length) const
 Extracts binary value from binary array. More...
 

Friends

class parameters
 
class parameter_iterator
 

Detailed Description

Read-only view on the parameters entry.

Read-only view on the parameters entry.

See also
parameters

Member Function Documentation

◆ get_binary()

result yami::core::parameter_entry::get_binary ( const void *&  value,
std::size_t &  value_length 
) const

Extracts the binary value from the current entry.

Extracts the binary value from the current entry.

Parameters
valuePointer to the internal value buffer to be returned.
value_lengthLength of the internal value buffer.
Returns
  • ok if operation was successful
  • bad_type if the current entry does not contain the binary value

◆ get_binary_array_length()

result yami::core::parameter_entry::get_binary_array_length ( std::size_t &  length) const

Extracts the length of binary array.

Extracts the length of binary array that is located at the current entry.

Parameters
lengthLength of the array.
Returns
  • ok if operation was successful
  • bad_type if the current entry does not contain binary array

◆ get_binary_in_array()

result yami::core::parameter_entry::get_binary_in_array ( std::size_t  index,
const void *&  value,
std::size_t &  value_length 
) const

Extracts binary value from binary array.

Extracts the binary value from the given index of binary array that is located at the current entry.

Parameters
indexThe array index (array slot to be read, starting from 0).
valuePointer to the internal value buffer to be returned.
value_lengthLength of the internal value buffer.
Returns
  • ok if operation was successful
  • bad_type if the current entry does not contain binary array
  • no_such_index if the given index is out of range

◆ get_boolean()

result yami::core::parameter_entry::get_boolean ( bool &  value) const

Extracts the bool value from the current entry.

Extracts the bool value from the current entry.

Parameters
valueThe value to be returned.
Returns
  • ok if operation was successful
  • bad_type if the current entry does not contain the bool value

◆ get_boolean_array()

result yami::core::parameter_entry::get_boolean_array ( bool *&  values,
std::size_t &  array_length 
) const

Extracts the array of bool values from the current entry.

Extracts the array of bool values from the current entry.

Parameters
valuesPointer to the internal array buffer to be returned.
array_lengthLength of the internal array.
Returns
  • ok if operation was successful
  • bad_type if the current entry does not contain bool array

Note: this function gives read-write access to the underlying array, even if it was set as a shallow-copy.

◆ get_double_float()

result yami::core::parameter_entry::get_double_float ( double &  value) const

Extracts the double value from the current entry.

Extracts the double value from the current entry.

Parameters
valueThe value to be returned.
Returns
  • ok if operation was successful
  • bad_type if the current entry does not contain the double value

◆ get_double_float_array()

result yami::core::parameter_entry::get_double_float_array ( double *&  values,
std::size_t &  array_length 
) const

Extracts the array of double values from the current entry.

Extracts the array of double values from the current entry.

Parameters
valuesPointer to the internal array buffer to be returned.
array_lengthLength of the internal array.
Returns
  • ok if operation was successful
  • bad_type if the current entry does not contain double array

Note: this function gives read-write access to the underlying array, even if it was set as a shallow-copy.

◆ get_integer()

result yami::core::parameter_entry::get_integer ( int &  value) const

Extracts the int value from the current entry.

Extracts the int value from the current entry.

Parameters
valueThe value to be returned.
Returns
  • ok if operation was successful
  • bad_type if the current entry does not contain the int value

◆ get_integer_array()

result yami::core::parameter_entry::get_integer_array ( int *&  values,
std::size_t &  array_length 
) const

Extracts the array of int values from the current entry.

Extracts the array of int values from the current entry.

Parameters
valuesPointer to the internal array buffer to be returned.
array_lengthLength of the internal array.
Returns
  • ok if operation was successful
  • bad_type if the current entry does not contain int array

Note: this function gives read-write access to the underlying array, even if it was set as a shallow-copy.

◆ get_long_long()

result yami::core::parameter_entry::get_long_long ( long long &  value) const

Extracts the long long value from the current entry.

Extracts the long long value from the current entry.

Parameters
valueThe value to be returned.
Returns
  • ok if operation was successful
  • bad_type if the current entry does not contain the long long value

◆ get_long_long_array()

result yami::core::parameter_entry::get_long_long_array ( long long *&  values,
std::size_t &  array_length 
) const

Extracts the array of long long values from the current entry.

Extracts the array of long long values from the current entry.

Parameters
valuesPointer to the internal array buffer to be returned.
array_lengthLength of the internal array.
Returns
  • ok if operation was successful
  • bad_type if the current entry does not contain long long array

Note: this function gives read-write access to the underlying array, even if it was set as a shallow-copy.

◆ get_long_long_word()

result yami::core::parameter_entry::get_long_long_word ( unsigned long long &  value) const

Extracts the unsigned long long value from the current entry.

Extracts the unsigned long long value from the current entry.

Parameters
valueThe value to be returned.
Returns
  • ok if operation was successful
  • bad_type if the current entry does not contain the long long value

◆ get_long_long_word_array()

result yami::core::parameter_entry::get_long_long_word_array ( unsigned long long *&  values,
std::size_t &  array_length 
) const

Extracts the array of unsigned long long values from the current entry.

Extracts the array of unsigned long long values from the current entry.

Parameters
valuesPointer to the internal array buffer to be returned.
array_lengthLength of the internal array.
Returns
  • ok if operation was successful
  • bad_type if the current entry does not contain long long array

Note: this function gives read-write access to the underlying array, even if it was set as a shallow-copy.

◆ get_name()

void yami::core::parameter_entry::get_name ( const char *&  name,
std::size_t &  name_length 
) const

Extracts the name of current entry.

Extracts the name of the underlying entry in the associated parameters object.

Parameters
namePointer to the internal name buffer to be returned.
name_lengthLength of the internal name buffer.

◆ get_nested_parameters()

result yami::core::parameter_entry::get_nested_parameters ( parameters *&  params) const

Extracts the nested parameters object from the current entry.

Extracts nested parameters from the current entry.

Parameters
paramsPointer to the internally created parameters object.
Returns
  • ok if operation was successful
  • bad_type if the current entry does not contain nested parameters

◆ get_string()

result yami::core::parameter_entry::get_string ( const char *&  value,
std::size_t &  value_length 
) const

Extracts the string value from the current entry.

Extracts the string value from the current entry.

Parameters
valuePointer to the internal value buffer to be returned.
value_lengthLength of the internal value buffer.
Returns
  • ok if operation was successful
  • bad_type if the current entry does not contain the string value

◆ get_string_array_length()

result yami::core::parameter_entry::get_string_array_length ( std::size_t &  length) const

Extracts the length of string array.

Extracts the length of string array that is located at the current entry.

Parameters
lengthLength of the array.
Returns
  • ok if operation was successful
  • bad_type if the current entry does not contain string array

◆ get_string_in_array()

result yami::core::parameter_entry::get_string_in_array ( std::size_t  index,
const char *&  value,
std::size_t &  value_length 
) const

Extracts string value from string array.

Extracts the string value from the given index of string array that is located at the current entry.

Parameters
indexThe array index (array slot to be read, starting from 0).
valuePointer to the internal value buffer to be returned.
value_lengthLength of the internal value buffer.
Returns
  • ok if operation was successful
  • bad_type if the current entry does not contain string array
  • no_such_index if the given index is out of range

◆ get_word()

result yami::core::parameter_entry::get_word ( unsigned int &  value) const

Extracts the unsigned int value from the current entry.

Extracts the unsigned int value from the current entry.

Parameters
valueThe value to be returned.
Returns
  • ok if operation was successful
  • bad_type if the current entry does not contain the unsigned int value

◆ get_word_array()

result yami::core::parameter_entry::get_word_array ( unsigned int *&  values,
std::size_t &  array_length 
) const

Extracts the array of unsigned int values from the current entry.

Extracts the array of unsigned int values from the current entry.

Parameters
valuesPointer to the internal array buffer to be returned.
array_lengthLength of the internal array.
Returns
  • ok if operation was successful
  • bad_type if the current entry does not contain int array

Note: this function gives read-write access to the underlying array, even if it was set as a shallow-copy.

◆ type()

parameter_type yami::core::parameter_entry::type ( ) const

Returns the type of underlying (current) entry.

Returns the type of the underlying entry in the associated parameters object.

Returns
Type of the entry.

The documentation for this class was generated from the following file: