YAMI4 C++ Library 2.0.0
Messaging Solution for Distributed Systems
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
yami::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...
 
std::string name () const
 Extracts the name of current entry. More...
 
bool get_boolean () const
 Extracts the bool value from the current entry. More...
 
int get_integer () const
 Extracts the int value from the current entry. More...
 
long long get_long_long () const
 Extracts the long long value from the current entry. More...
 
unsigned int get_word () const
 Extracts the unsigned int value from the current entry. More...
 
unsigned long long get_long_long_word () const
 Extracts the unsigned long long value from the current entry. More...
 
double long get_double_float () const
 Extracts the double float value from the current entry. More...
 
std::string get_string () const
 Extracts the string value from the current entry. More...
 
const char * get_string (std::size_t &length) const
 Extracts the string value from the current entry. More...
 
const void * get_binary (std::size_t &length) const
 Extracts the binary value from the current entry. More...
 
core::parameters * get_nested_parameters () const
 Extracts the nested parameters value from the current entry. More...
 
bool * get_boolean_array (std::size_t &array_length) const
 Extracts the array of bool values from the current entry. More...
 
int * get_integer_array (std::size_t &array_length) const
 Extracts the array of int values from the current entry. More...
 
long long * get_long_long_array (std::size_t &array_length) const
 Extracts the array of long long values from the current entry. More...
 
unsigned int * get_word_array (std::size_t &array_length) const
 Extracts the array of unsigned int values from the current entry. More...
 
unsigned long long * get_long_long_word_array (std::size_t &array_length) const
 Extracts the array of unsigned long long values from the current entry. More...
 
double * get_double_float_array (std::size_t &array_length) const
 Extracts the array of double values from the current entry. More...
 
std::size_t get_string_array_length () const
 Extracts the length of string array. More...
 
std::string get_string_in_array (std::size_t index) const
 Extracts string value from string array. More...
 
const char * get_string_in_array (std::size_t index, std::size_t &value_length) const
 Extracts string value from string array. More...
 
std::size_t get_binary_array_length () const
 Extracts the length of binary array. More...
 
const void * get_binary_in_array (std::size_t index, std::size_t &value_length) const
 Extracts binary value from binary array. More...
 

Public Attributes

core::parameter_entry entry_
 

Detailed Description

Read-only view on the parameters entry.

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

◆ get_binary()

const void * yami::parameter_entry::get_binary ( std::size_t &  length) const

Extracts the binary value from the current entry.

Extracts the binary value from the current entry by accessing the buffer directly.

Parameters
lengthLength of the internal buffer.
Returns
Pointer to the internal buffer if it has correct type.

◆ get_binary_array_length()

std::size_t yami::parameter_entry::get_binary_array_length ( ) const

Extracts the length of binary array.

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

Returns
Length of the array.

◆ get_binary_in_array()

const void * yami::parameter_entry::get_binary_in_array ( std::size_t  index,
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).
value_lengthLength of the internal value buffer.
Returns
Pointer to the internal value buffer.

◆ get_boolean()

bool yami::parameter_entry::get_boolean ( ) const

Extracts the bool value from the current entry.

Extracts the bool value from the current entry.

Returns
Value of the entry if it has correct type.

◆ get_boolean_array()

bool * yami::parameter_entry::get_boolean_array ( 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
array_lengthLength 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.

◆ get_double_float()

double long yami::parameter_entry::get_double_float ( ) const

Extracts the double float value from the current entry.

Extracts the double float value from the current entry.

Returns
Value of the entry if it has correct type.

◆ get_double_float_array()

double * yami::parameter_entry::get_double_float_array ( 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
array_lengthLength 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.

◆ get_integer()

int yami::parameter_entry::get_integer ( ) const

Extracts the int value from the current entry.

Extracts the int value from the current entry.

Returns
Value of the entry if it has correct type.

◆ get_integer_array()

int * yami::parameter_entry::get_integer_array ( 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
array_lengthLength 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.

◆ get_long_long()

long long yami::parameter_entry::get_long_long ( ) const

Extracts the long long value from the current entry.

Extracts the long long value from the current entry.

Returns
Value of the entry if it has correct type.

◆ get_long_long_array()

long long * yami::parameter_entry::get_long_long_array ( 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
array_lengthLength 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.

◆ get_long_long_word()

unsigned long long yami::parameter_entry::get_long_long_word ( ) const

Extracts the unsigned long long value from the current entry.

Extracts the unsigned long long value from the current entry.

Returns
Value of the entry if it has correct type.

◆ get_long_long_word_array()

unsigned long long * yami::parameter_entry::get_long_long_word_array ( 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
array_lengthLength 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.

◆ get_nested_parameters()

core::parameters * yami::parameter_entry::get_nested_parameters ( ) const

Extracts the nested parameters value from the current entry.

Extracts the nested parameters value from the current entry.

Returns
Value of the entry if it has correct type.

◆ get_string() [1/2]

std::string yami::parameter_entry::get_string ( ) const

Extracts the string value from the current entry.

Extracts the string value from the current entry.

Returns
Value of the entry if it has correct type.

◆ get_string() [2/2]

const char * yami::parameter_entry::get_string ( std::size_t &  length) const

Extracts the string value from the current entry.

Extracts the string value from the current entry by accessing the buffer directly.

Parameters
lengthLength of the internal buffer.
Returns
Pointer to the internal buffer if it has correct type.

◆ get_string_array_length()

std::size_t yami::parameter_entry::get_string_array_length ( ) const

Extracts the length of string array.

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

Returns
Length of the array.

◆ get_string_in_array() [1/2]

std::string yami::parameter_entry::get_string_in_array ( std::size_t  index) 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).
Returns
Value at the given index.

◆ get_string_in_array() [2/2]

const char * yami::parameter_entry::get_string_in_array ( std::size_t  index,
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).
value_lengthLength of the internal value buffer.
Returns
Pointer to the internal value buffer.

◆ get_word()

unsigned int yami::parameter_entry::get_word ( ) const

Extracts the unsigned int value from the current entry.

Extracts the unsigned int value from the current entry.

Returns
Value of the entry if it has correct type.

◆ get_word_array()

unsigned int * yami::parameter_entry::get_word_array ( 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
array_lengthLength 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.

◆ name()

std::string yami::parameter_entry::name ( ) const

Extracts the name of current entry.

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

Returns
Name of the entry.

◆ type()

parameter_type yami::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: