YAMI4 Core Library 2.0.0
Messaging Solution for Distributed Systems
|
Collection of message parameters. More...
#include <parameters.h>
Public Member Functions | |
parameters () | |
Constructor. More... | |
parameters (allocator &alloc) | |
Constructor. More... | |
~parameters () | |
Destructor. More... | |
result | set_boolean (const char *name, std::size_t name_length, bool value) |
Inserts new entry of type bool. More... | |
result | set_boolean (const char *name, bool value) |
Inserts new entry of type bool. More... | |
result | get_boolean (const char *name, std::size_t name_length, bool &value) const |
Extracts the bool value from the given entry. More... | |
result | get_boolean (const char *name, bool &value) const |
Extracts the bool value from the given entry. More... | |
result | set_integer (const char *name, std::size_t name_length, int value) |
Inserts new entry of type int. More... | |
result | set_integer (const char *name, int value) |
Inserts new entry of type int. More... | |
result | get_integer (const char *name, std::size_t name_length, int &value) const |
Extracts the int value from the given entry. More... | |
result | get_integer (const char *name, int &value) const |
Extracts the int value from the given entry. More... | |
result | set_long_long (const char *name, std::size_t name_length, long long value) |
Inserts new entry of type long long. More... | |
result | set_long_long (const char *name, long long value) |
Inserts new entry of type long long. More... | |
result | get_long_long (const char *name, std::size_t name_length, long long &value) const |
Extracts the long long value from the given entry. More... | |
result | get_long_long (const char *name, long long &value) const |
Extracts the long long value from the given entry. More... | |
result | set_word (const char *name, std::size_t name_length, unsigned int value) |
Inserts new entry of type unsigned int. More... | |
result | set_word (const char *name, unsigned int value) |
Inserts new entry of type unsigned int. More... | |
result | get_word (const char *name, std::size_t name_length, unsigned int &value) const |
Extracts the unsigned int value from the given entry. More... | |
result | get_word (const char *name, unsigned int &value) const |
Extracts the unsigned int value from the given entry. More... | |
result | set_long_long_word (const char *name, std::size_t name_length, unsigned long long value) |
Inserts new entry of type unsigned long long. More... | |
result | set_long_long_word (const char *name, unsigned long long value) |
Inserts new entry of type unsigned long long. More... | |
result | get_long_long_word (const char *name, std::size_t name_length, unsigned long long &value) const |
Extracts the unsigned long long value from the given entry. More... | |
result | get_long_long_word (const char *name, unsigned long long &value) const |
Extracts the unsigned long long value from the given entry. More... | |
result | set_double_float (const char *name, std::size_t name_length, double value) |
Inserts new entry of type double. More... | |
result | set_double_float (const char *name, double value) |
Inserts new entry of type double. More... | |
result | get_double_float (const char *name, std::size_t name_length, double &value) const |
Extracts the double value from the given entry. More... | |
result | get_double_float (const char *name, double &value) const |
Extracts the double value from the given entry. More... | |
result | set_string (const char *name, std::size_t name_length, const char *value, std::size_t value_length) |
Inserts new entry of type string. More... | |
result | set_string (const char *name, const char *value) |
Inserts new entry of type string. More... | |
result | set_string_shallow (const char *name, std::size_t name_length, const char *value, std::size_t value_length) |
Inserts new entry of type string. More... | |
result | set_string_shallow (const char *name, const char *value) |
Inserts new entry of type string. More... | |
result | get_string (const char *name, std::size_t name_length, const char *&value, std::size_t &value_length) const |
Extracts the string value from the given entry. More... | |
result | get_string (const char *name, const char *&value, std::size_t &value_length) const |
Extracts the string value from the given entry. More... | |
result | set_binary (const char *name, std::size_t name_length, const void *value, std::size_t value_length) |
Inserts new entry of type binary. More... | |
result | set_binary (const char *name, const void *value, std::size_t value_length) |
Inserts new entry of type binary. More... | |
result | set_binary_shallow (const char *name, std::size_t name_length, const void *value, std::size_t value_length) |
Inserts new entry of type binary. More... | |
result | set_binary_shallow (const char *name, const void *value, std::size_t value_length) |
Inserts new entry of type binary. More... | |
result | get_binary (const char *name, std::size_t name_length, const void *&value, std::size_t &value_length) const |
Extracts the binary value from the given entry. More... | |
result | get_binary (const char *name, const void *&value, std::size_t &value_length) const |
Extracts the binary value from the given entry. More... | |
result | set_boolean_array (const char *name, std::size_t name_length, const bool *values, std::size_t array_length) |
Inserts new entry of type bool array. More... | |
result | set_boolean_array (const char *name, const bool *values, std::size_t array_length) |
Inserts new entry of type bool array. More... | |
result | set_boolean_array_shallow (const char *name, std::size_t name_length, const bool *values, std::size_t array_length) |
Inserts new entry of type bool array. More... | |
result | set_boolean_array_shallow (const char *name, const bool *values, std::size_t array_length) |
Inserts new entry of type bool array. More... | |
result | create_boolean_array (const char *name, std::size_t name_length, std::size_t array_length, bool *&array) |
Creates new uninitialized entry of type bool array. More... | |
result | create_boolean_array (const char *name, std::size_t array_length, bool *&array) |
Creates new uninitialized entry of type bool array. More... | |
result | get_boolean_array (const char *name, std::size_t name_length, bool *&values, std::size_t &array_length) const |
Extracts the array of bool values from the given entry. More... | |
result | get_boolean_array (const char *name, bool *&values, std::size_t &array_length) const |
Extracts the array of bool values from the given entry. More... | |
result | set_integer_array (const char *name, std::size_t name_length, const int *values, std::size_t array_length) |
Inserts new entry of type int array. More... | |
result | set_integer_array (const char *name, const int *values, std::size_t array_length) |
Inserts new entry of type int array. More... | |
result | set_integer_array_shallow (const char *name, std::size_t name_length, const int *values, std::size_t array_length) |
Inserts new entry of type int array. More... | |
result | set_integer_array_shallow (const char *name, const int *values, std::size_t array_length) |
Inserts new entry of type int array. More... | |
result | create_integer_array (const char *name, std::size_t name_length, std::size_t array_length, int *&array) |
Creates new uninitialized entry of type int array. More... | |
result | create_integer_array (const char *name, std::size_t array_length, int *&array) |
Creates new uninitialized entry of type int array. More... | |
result | get_integer_array (const char *name, std::size_t name_length, int *&values, std::size_t &array_length) const |
Extracts the array of int values from the given entry. More... | |
result | get_integer_array (const char *name, int *&values, std::size_t &array_length) const |
Extracts the array of int values from the given entry. More... | |
result | set_long_long_array (const char *name, std::size_t name_length, const long long *values, std::size_t array_length) |
Inserts new entry of type long long array. More... | |
result | set_long_long_array (const char *name, const long long *values, std::size_t array_length) |
Inserts new entry of type long long array. More... | |
result | set_long_long_array_shallow (const char *name, std::size_t name_length, const long long *values, std::size_t array_length) |
Inserts new entry of type long long array. More... | |
result | set_long_long_array_shallow (const char *name, const long long *values, std::size_t array_length) |
Inserts new entry of type long long array. More... | |
result | create_long_long_array (const char *name, std::size_t name_length, std::size_t array_length, long long *&array) |
Creates new uninitialized entry of type long long array. More... | |
result | create_long_long_array (const char *name, std::size_t array_length, long long *&array) |
Creates new uninitialized entry of type long long array. More... | |
result | get_long_long_array (const char *name, std::size_t name_length, long long *&values, std::size_t &array_length) const |
Extracts the array of long long values from the given entry. More... | |
result | get_long_long_array (const char *name, long long *&values, std::size_t &array_length) const |
Extracts the array of long long values from the given entry. More... | |
result | set_word_array (const char *name, std::size_t name_length, const unsigned int *values, std::size_t array_length) |
Inserts new entry of type unsigned int array. More... | |
result | set_word_array (const char *name, const unsigned int *values, std::size_t array_length) |
Inserts new entry of type unsigned int array. More... | |
result | set_word_array_shallow (const char *name, std::size_t name_length, const unsigned int *values, std::size_t array_length) |
Inserts new entry of type unsigned int array. More... | |
result | set_word_array_shallow (const char *name, const unsigned int *values, std::size_t array_length) |
Inserts new entry of type unsigned int array. More... | |
result | create_word_array (const char *name, std::size_t name_length, std::size_t array_length, unsigned int *&array) |
Creates new uninitialized entry of type unsigned int array. More... | |
result | create_word_array (const char *name, std::size_t array_length, unsigned int *&array) |
Creates new uninitialized entry of type unsigned int array. More... | |
result | get_word_array (const char *name, std::size_t name_length, unsigned int *&values, std::size_t &array_length) const |
Extracts the array of unsigned int values from the given entry. More... | |
result | get_word_array (const char *name, unsigned int *&values, std::size_t &array_length) const |
Extracts the array of unsigned int values from the given entry. More... | |
result | set_long_long_word_array (const char *name, std::size_t name_length, const unsigned long long *values, std::size_t array_length) |
Inserts new entry of type unsigned long long array. More... | |
result | set_long_long_word_array (const char *name, const unsigned long long *values, std::size_t array_length) |
Inserts new entry of type unsigned long long array. More... | |
result | set_long_long_word_array_shallow (const char *name, std::size_t name_length, const unsigned long long *values, std::size_t array_length) |
Inserts new entry of type unsigned long long array. More... | |
result | set_long_long_word_array_shallow (const char *name, const unsigned long long *values, std::size_t array_length) |
Inserts new entry of type unsigned long long array. More... | |
result | create_long_long_word_array (const char *name, std::size_t name_length, std::size_t array_length, unsigned long long *&array) |
Creates new uninitialized entry of type unsigned long long array. More... | |
result | create_long_long_word_array (const char *name, std::size_t array_length, unsigned long long *&array) |
Creates new uninitialized entry of type unsigned long long array. More... | |
result | get_long_long_word_array (const char *name, std::size_t name_length, unsigned long long *&values, std::size_t &array_length) const |
Extracts the array of unsigned long long values from the given entry. More... | |
result | get_long_long_word_array (const char *name, unsigned long long *&values, std::size_t &array_length) const |
Extracts the array of unsigned long long values from the given entry. More... | |
result | set_double_float_array (const char *name, std::size_t name_length, const double *values, std::size_t array_length) |
Inserts new entry of type double array. More... | |
result | set_double_float_array (const char *name, const double *values, std::size_t array_length) |
Inserts new entry of type double array. More... | |
result | set_double_float_array_shallow (const char *name, std::size_t name_length, const double *values, std::size_t array_length) |
Inserts new entry of type double array. More... | |
result | set_double_float_array_shallow (const char *name, const double *values, std::size_t array_length) |
Inserts new entry of type double array. More... | |
result | create_double_float_array (const char *name, std::size_t name_length, std::size_t array_length, double *&array) |
Creates new uninitialized entry of type double float array. More... | |
result | create_double_float_array (const char *name, std::size_t array_length, double *&array) |
Creates new uninitialized entry of type double float array. More... | |
result | get_double_float_array (const char *name, std::size_t name_length, double *&values, std::size_t &array_length) const |
Extracts the array of double values from the given entry. More... | |
result | get_double_float_array (const char *name, double *&values, std::size_t &array_length) const |
Extracts the array of double values from the given entry. More... | |
result | create_string_array (const char *name, std::size_t name_length, std::size_t array_length) |
Creates new empty entry of type string array. More... | |
result | create_string_array (const char *name, std::size_t array_length) |
Creates new empty entry of type string array. More... | |
result | set_string_in_array (const char *name, std::size_t name_length, std::size_t index, const char *value, std::size_t value_length) |
Inserts new string value to string array. More... | |
result | set_string_in_array (const char *name, std::size_t index, const char *value) |
Inserts new string value to string array. More... | |
result | get_string_array_length (const char *name, std::size_t name_length, std::size_t &array_length) const |
Extracts the length of string array. More... | |
result | get_string_array_length (const char *name, std::size_t &array_length) const |
Extracts the length of string array. More... | |
result | get_string_in_array (const char *name, std::size_t name_length, std::size_t index, const char *&value, std::size_t &value_length) const |
Extracts string value from string array. More... | |
result | get_string_in_array (const char *name, std::size_t index, const char *&value, std::size_t &value_length) const |
Extracts string value from string array. More... | |
result | create_binary_array (const char *name, std::size_t name_length, std::size_t array_length) |
Creates new empty entry of type binary array. More... | |
result | create_binary_array (const char *name, std::size_t array_length) |
Creates new empty entry of type binary array. More... | |
result | set_binary_in_array (const char *name, std::size_t name_length, std::size_t index, const void *value, std::size_t value_length) |
Inserts new binary value to binary array. More... | |
result | set_binary_in_array (const char *name, std::size_t index, const void *value, std::size_t value_length) |
Inserts new binary value to binary array. More... | |
result | get_binary_array_length (const char *name, std::size_t name_length, std::size_t &array_length) const |
Extracts the length of binary array. More... | |
result | get_binary_array_length (const char *name, std::size_t &array_length) const |
Extracts the length of binary array. More... | |
result | get_binary_in_array (const char *name, std::size_t name_length, std::size_t index, const void *&value, std::size_t &value_length) const |
Extracts binary value from binary array. More... | |
result | get_binary_in_array (const char *name, std::size_t index, const void *&value, std::size_t &value_length) const |
Extracts binary value from binary array. More... | |
result | create_nested_parameters (const char *name, std::size_t name_length, parameters *¶ms) |
Creates nested parameters entry. More... | |
result | create_nested_parameters (const char *name, parameters *¶ms) |
Creates nested parameters entry. More... | |
result | get_nested_parameters (const char *name, std::size_t name_length, parameters *¶ms) const |
Extracts the nested parameters object from the given entry. More... | |
result | get_nested_parameters (const char *name, parameters *¶ms) const |
Extracts the nested parameters object from the given entry. More... | |
result | create_nested_array (const char *name, std::size_t name_length, std::size_t array_length) |
Creates new empty entry of type nested parameters array. More... | |
result | create_nested_array (const char *name, std::size_t array_length) |
Creates new empty entry of type nested parameters array. More... | |
result | get_nested_array_length (const char *name, std::size_t name_length, std::size_t &array_length) const |
Extracts the length of nested parameters array. More... | |
result | get_nested_array_length (const char *name, std::size_t &array_length) const |
Extracts the length of nested parameters array. More... | |
result | get_nested_in_array (const char *name, std::size_t name_length, std::size_t index, parameters *&nested) const |
Extracts nested parameters value from nested array. More... | |
result | get_nested_in_array (const char *name, std::size_t index, parameters *&nested) const |
Extracts nested parameters value from nested array. More... | |
result | remove (const char *name, std::size_t name_length) |
Removes the given entry. More... | |
result | remove (const char *name) |
Removes the given entry. More... | |
std::size_t | size () const |
Returns the size of the collection. More... | |
result | get_type (const char *name, std::size_t name_length, parameter_type &t) const |
Extracts the type of the given entry. More... | |
result | get_type (const char *name, parameter_type &t) const |
Extracts the type of the given entry. More... | |
result | get_iterator (parameter_iterator &it) const |
Extracts the iterator to all entries. More... | |
result | find (const char *name, std::size_t name_length, parameter_entry &entry) const |
Finds the given entry. More... | |
result | find (const char *name, parameter_entry &entry) const |
Finds the given entry. More... | |
result | merge_from (const parameters &other) |
Merges entries from the given parameters object. More... | |
void | clear () |
Clears the collection of entries. More... | |
virtual result | get_serialize_buffer_size (std::size_t &size) const |
Finds the total size of serialization buffer. More... | |
virtual result | serialize (char **buffers, const std::size_t *buffer_sizes, std::size_t num_of_buffers) const |
Serializes current content into given buffer(s). More... | |
result | deserialize (const char **buffers, const std::size_t *buffer_sizes, std::size_t num_of_buffers) |
Deserializes from the given buffer(s). More... | |
void | dump (details::dump_sink &sink, std::size_t indent_length=0) const |
virtual result | get_serialize_buffer_size (std::size_t &size) const =0 |
Finds the total size of serialization buffer. More... | |
virtual result | serialize (char **buffers, const std::size_t *buffer_sizes, std::size_t num_of_buffers) const =0 |
Serializes current content into given buffer(s). More... | |
Public Attributes | |
allocator & | allocator_ |
details::entry * | data_ |
std::size_t | num_of_entries_ |
Collection of message parameters.
The collection of message parameters, which are typed {name, value} pairs.
Each entry in this collection has a unique name and can have one of the following types:
Each entry has a name that can be either null-terminated or contain embedded zeros and appropriate member functions are provided for both cases. The names are searched for using case-sensitive comparisons. The name of entry is always kept by copy.
This class is not copyable and not thread-safe, although distinct instances of this class can be used by different threads without synchronization.
Note: The entries are ordered - the order in which they are created influences the final serialized form of the message payload.
Newly created entries are appended to the end of the collection unless there is an existing empty slot that can be reused - the appropriate slot is searched for from the beginning to the end of the collection and if no free slot is found the collection is extended at the end.
The above guarantee concerns the user code that relies on predictable serialization.
|
explicit |
Constructor.
Creates an empty parameters object that uses a standard allocator.
|
explicit |
Constructor.
Creates an empty parameters object that uses a custom allocator.
alloc | Provides a custom allocator to use. |
yami::core::parameters::~parameters | ( | ) |
Destructor.
The destructor cleans all dependent resources only if each of them was separately allocated on the global store. If the parameters object was created with externally provided working area (that is, when working_area != NULL
when the object was constructed) then no cleanup is performed.
void yami::core::parameters::clear | ( | ) |
Clears the collection of entries.
Clears the collection of entries and deallocates dependent structures. After executing the state of this object is as it was immediately after construction.
result yami::core::parameters::create_binary_array | ( | const char * | name, |
std::size_t | array_length | ||
) |
Creates new empty entry of type binary array.
Creates a new empty entry of type binary array with null-terminated name. See the other overloaded function for details.
result yami::core::parameters::create_binary_array | ( | const char * | name, |
std::size_t | name_length, | ||
std::size_t | array_length | ||
) |
Creates new empty entry of type binary array.
Creates a new empty entry of type binary array. If the entry with the given name already exists it is replaced without changing the order of entries.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
array_length | Length of the newly created array. |
ok
if operation was successfulno_memory
if the new entry cannot be allocatedNote: After creation the array contains empty binaries (that is, binaries which length is 0).
result yami::core::parameters::create_boolean_array | ( | const char * | name, |
std::size_t | array_length, | ||
bool *& | array | ||
) |
Creates new uninitialized entry of type bool array.
Creates a new entry of type bool array with null-terminated name and given length. See the other overloaded function for details.
result yami::core::parameters::create_boolean_array | ( | const char * | name, |
std::size_t | name_length, | ||
std::size_t | array_length, | ||
bool *& | array | ||
) |
Creates new uninitialized entry of type bool array.
Creates a new entry of type bool array in the first available slot. If the entry with the given name already exists it is replaced without changing the order of entries.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
array_length | Length of the new array. |
array | Returned pointer to the array. |
ok
if operation was successfulno_memory
if the new entry cannot be allocated result yami::core::parameters::create_double_float_array | ( | const char * | name, |
std::size_t | array_length, | ||
double *& | array | ||
) |
Creates new uninitialized entry of type double float array.
Creates a new entry of type double float array with null-terminated name and given array_length. See the other overloaded function for details.
result yami::core::parameters::create_double_float_array | ( | const char * | name, |
std::size_t | name_length, | ||
std::size_t | array_length, | ||
double *& | array | ||
) |
Creates new uninitialized entry of type double float array.
Creates a new entry of type double float array in the first available slot. If the entry with the given name already exists it is replaced without changing the order of entries.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
array_length | Length of the new array. |
array | Returned pointer to the array. |
ok
if operation was successfulno_memory
if the new entry cannot be allocated result yami::core::parameters::create_integer_array | ( | const char * | name, |
std::size_t | array_length, | ||
int *& | array | ||
) |
Creates new uninitialized entry of type int array.
Creates a new entry of type int array with null-terminated name and given length. See the other overloaded function for details.
result yami::core::parameters::create_integer_array | ( | const char * | name, |
std::size_t | name_length, | ||
std::size_t | array_length, | ||
int *& | array | ||
) |
Creates new uninitialized entry of type int array.
Creates a new entry of type int array in the first available slot. If the entry with the given name already exists it is replaced without changing the order of entries.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
array_length | Length of the new array. |
array | Returned pointer to the array. |
ok
if operation was successfulno_memory
if the new entry cannot be allocated result yami::core::parameters::create_long_long_array | ( | const char * | name, |
std::size_t | array_length, | ||
long long *& | array | ||
) |
Creates new uninitialized entry of type long long array.
Creates a new entry of type long long array with null-terminated name and given length. See the other overloaded function for details.
result yami::core::parameters::create_long_long_array | ( | const char * | name, |
std::size_t | name_length, | ||
std::size_t | array_length, | ||
long long *& | array | ||
) |
Creates new uninitialized entry of type long long array.
Creates a new entry of type long long array in the first available slot. If the entry with the given name already exists it is replaced without changing the order of entries.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
array_length | Length of the new array. |
array | Returned pointer to the array. |
ok
if operation was successfulno_memory
if the new entry cannot be allocated result yami::core::parameters::create_long_long_word_array | ( | const char * | name, |
std::size_t | array_length, | ||
unsigned long long *& | array | ||
) |
Creates new uninitialized entry of type unsigned long long array.
Creates a new entry of type unsigned long long array with null-terminated name and given length. See the other overloaded function for details.
result yami::core::parameters::create_long_long_word_array | ( | const char * | name, |
std::size_t | name_length, | ||
std::size_t | array_length, | ||
unsigned long long *& | array | ||
) |
Creates new uninitialized entry of type unsigned long long array.
Creates a new entry of type unsigned long long array in the first available slot. If the entry with the given name already exists it is replaced without changing the order of entries.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
array_length | Length of the new array. |
array | Returned pointer to the array. |
ok
if operation was successfulno_memory
if the new entry cannot be allocated result yami::core::parameters::create_nested_array | ( | const char * | name, |
std::size_t | array_length | ||
) |
Creates new empty entry of type nested parameters array.
Creates a new empty entry of type nested parameters array with null-terminated name. See the other overloaded function for details.
result yami::core::parameters::create_nested_array | ( | const char * | name, |
std::size_t | name_length, | ||
std::size_t | array_length | ||
) |
Creates new empty entry of type nested parameters array.
Creates a new empty entry of type nested parameters array. If the entry with the given name already exists it is replaced without changing the order of entries.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
array_length | Length of the newly created array. |
ok
if operation was successfulno_memory
if the new entry cannot be allocatedNote: After creation the array contains empty nested objects (that is, parameters objects which do not have any entries).
result yami::core::parameters::create_nested_parameters | ( | const char * | name, |
parameters *& | params | ||
) |
Creates nested parameters entry.
Creates a new nested parameters entry with null-terminated name. See the other overloaded function for details.
result yami::core::parameters::create_nested_parameters | ( | const char * | name, |
std::size_t | name_length, | ||
parameters *& | params | ||
) |
Creates nested parameters entry.
Creates a new nested parameters entry in the first available slot. If the entry with the given name already exists it is replaced without changing the order of entries.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
params | Pointer to the internally created parameters object. |
ok
if operation was successfulno_memory
if the new entry cannot be allocated result yami::core::parameters::create_string_array | ( | const char * | name, |
std::size_t | array_length | ||
) |
Creates new empty entry of type string array.
Creates a new empty entry of type string array with null-terminated name. See the other overloaded function for details.
result yami::core::parameters::create_string_array | ( | const char * | name, |
std::size_t | name_length, | ||
std::size_t | array_length | ||
) |
Creates new empty entry of type string array.
Creates a new empty entry of type string array. If the entry with the given name already exists it is replaced without changing the order of entries.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
array_length | Length of the newly created array. |
ok
if operation was successfulno_memory
if the new entry cannot be allocatedNote: After creation the array contains empty strings (that is, strings which length is 0).
result yami::core::parameters::create_word_array | ( | const char * | name, |
std::size_t | array_length, | ||
unsigned int *& | array | ||
) |
Creates new uninitialized entry of type unsigned int array.
Creates a new entry of type unsigned int array with null-terminated name and given length. See the other overloaded function for details.
result yami::core::parameters::create_word_array | ( | const char * | name, |
std::size_t | name_length, | ||
std::size_t | array_length, | ||
unsigned int *& | array | ||
) |
Creates new uninitialized entry of type unsigned int array.
Creates a new entry of type unsigned int array in the first available slot. If the entry with the given name already exists it is replaced without changing the order of entries.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
array_length | Length of the new array. |
array | Returned pointer to the array. |
ok
if operation was successfulno_memory
if the new entry cannot be allocated result yami::core::parameters::deserialize | ( | const char ** | buffers, |
const std::size_t * | buffer_sizes, | ||
std::size_t | num_of_buffers | ||
) |
Deserializes from the given buffer(s).
Deserializes content from the given buffer(s). The data buffer does not have to be contiguous and any number of buffer segments is allowed, provided that the size of each buffer segment is a multiple of 4 (32 bits).
The function gathers the serialized data from subsequent buffers as they are consumed.
The buffers are provided as array of buffer pointers and their sizes.
buffers | Pointer to the array of buffer pointers (each of type const char * ). |
buffer_sizes | Pointer to the array of buffer sizes. |
num_of_buffers | Number of buffers described by the array. |
ok
if operation was successfulnesting_too_deep
if the level of nesting in the data stream is deeper than the limitnot_enough_space
if the buffers do not contain all expected dataunexpected_value
if the data stream contains a value that cannot be properly interpretedNote: The current content of this object is not cleared before attempting deserialization and each retrieved data element is merged into the current content as if done by individual calls to appropriate set_XYZ
functions.
In most cases deserialization will be performed to the empty parameters object (to reconstruct it to the form that was used for serialization), but deserialization onto non-empty object might be occasionally useful as a way of merging two collections.
result yami::core::parameters::find | ( | const char * | name, |
parameter_entry & | entry | ||
) | const |
Finds the given entry.
Extracts the on the entry specified by its null-terminated name. See the other overloaded function for details.
result yami::core::parameters::find | ( | const char * | name, |
std::size_t | name_length, | ||
parameter_entry & | entry | ||
) | const |
Finds the given entry.
Extracts the view on the entry specified by its name.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
entry | The entry view to be returned. |
ok
if operation was successfulno_such_name
if the given name cannot be found result yami::core::parameters::get_binary | ( | const char * | name, |
const void *& | value, | ||
std::size_t & | value_length | ||
) | const |
Extracts the binary value from the given entry.
Extracts the binary value from the entry given by null-terminated name. See the other overloaded function for details.
result yami::core::parameters::get_binary | ( | const char * | name, |
std::size_t | name_length, | ||
const void *& | value, | ||
std::size_t & | value_length | ||
) | const |
Extracts the binary value from the given entry.
Extracts the binary value from the entry given by its name.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
value | Pointer to the internal value buffer to be returned. |
value_length | Length of the internal value buffer. |
ok
if operation was successfulbad_type
if the given entry does not contain binaryno_such_name
if the given name cannot be found result yami::core::parameters::get_binary_array_length | ( | const char * | name, |
std::size_t & | array_length | ||
) | const |
Extracts the length of binary array.
Extracts the length of binary array identified by null-terminated name. See the other overloaded function for details.
result yami::core::parameters::get_binary_array_length | ( | const char * | name, |
std::size_t | name_length, | ||
std::size_t & | array_length | ||
) | const |
Extracts the length of binary array.
Extracts the length of binary array that is located at the given entry.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
array_length | Length of the array. |
ok
if operation was successfulbad_type
if the current entry does not contain binary array result yami::core::parameters::get_binary_in_array | ( | const char * | name, |
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 identified by null-terminated name. See the other overloaded function for details.
result yami::core::parameters::get_binary_in_array | ( | const char * | name, |
std::size_t | name_length, | ||
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.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
index | The array index (array slot to be read, starting from 0). |
value | Pointer to the internal value buffer to be returned. |
value_length | Length of the internal value buffer. |
ok
if operation was successfulbad_type
if the given entry does not contain binary arrayno_such_index
if the given index is out of range result yami::core::parameters::get_boolean | ( | const char * | name, |
bool & | value | ||
) | const |
Extracts the bool value from the given entry.
Extracts the bool value from the entry given by null-terminated name. See the other overloaded function for details.
result yami::core::parameters::get_boolean | ( | const char * | name, |
std::size_t | name_length, | ||
bool & | value | ||
) | const |
Extracts the bool value from the given entry.
Extracts the bool value from the entry given by its name.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
value | Value to be returned. |
ok
if operation was successfulbad_type
if the given entry does not contain boolno_such_name
if the given name cannot be found result yami::core::parameters::get_boolean_array | ( | const char * | name, |
bool *& | values, | ||
std::size_t & | array_length | ||
) | const |
Extracts the array of bool values from the given entry.
Extracts the array of bool values from the entry given by null-terminated name. See the other overloaded function for details.
result yami::core::parameters::get_boolean_array | ( | const char * | name, |
std::size_t | name_length, | ||
bool *& | values, | ||
std::size_t & | array_length | ||
) | const |
Extracts the array of bool values from the given entry.
Extracts the array of bool values from the entry given by its name.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
values | Pointer to the internal array buffer to be returned. |
array_length | Length of the internal array. |
ok
if operation was successfulbad_type
if the given entry does not contain bool arrayno_such_name
if the given name cannot be foundNote: this function gives read-write access to the underlying array, even if it was set as a shallow-copy.
result yami::core::parameters::get_double_float | ( | const char * | name, |
double & | value | ||
) | const |
Extracts the double value from the given entry.
Extracts the double value from the entry given by null-terminated name. See the other overloaded function for details.
result yami::core::parameters::get_double_float | ( | const char * | name, |
std::size_t | name_length, | ||
double & | value | ||
) | const |
Extracts the double value from the given entry.
Extracts the double value from the entry given by its name.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
value | Value to be returned. |
ok
if operation was successfulbad_type
if the given entry does not contain doubleno_such_name
if the given name cannot be found result yami::core::parameters::get_double_float_array | ( | const char * | name, |
double *& | values, | ||
std::size_t & | array_length | ||
) | const |
Extracts the array of double values from the given entry.
Extracts the array of double values from the entry given by null-terminated name. See the other overloaded function for details.
result yami::core::parameters::get_double_float_array | ( | const char * | name, |
std::size_t | name_length, | ||
double *& | values, | ||
std::size_t & | array_length | ||
) | const |
Extracts the array of double values from the given entry.
Extracts the array of double values from the entry given by its name.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
values | Pointer to the internal array buffer to be returned. |
array_length | Length of the internal array. |
ok
if operation was successfulbad_type
if the given entry does not contain double arrayno_such_name
if the given name cannot be foundNote: this function gives read-write access to the underlying array, even if it was set as a shallow-copy.
result yami::core::parameters::get_integer | ( | const char * | name, |
int & | value | ||
) | const |
Extracts the int value from the given entry.
Extracts the int value from the entry given by null-terminated name. See the other overloaded function for details.
result yami::core::parameters::get_integer | ( | const char * | name, |
std::size_t | name_length, | ||
int & | value | ||
) | const |
Extracts the int value from the given entry.
Extracts the int value from the entry given by its name.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
value | Value to be returned. |
ok
if operation was successfulbad_type
if the given entry does not contain intno_such_name
if the given name cannot be found result yami::core::parameters::get_integer_array | ( | const char * | name, |
int *& | values, | ||
std::size_t & | array_length | ||
) | const |
Extracts the array of int values from the given entry.
Extracts the array of int values from the entry given by null-terminated name. See the other overloaded function for details.
result yami::core::parameters::get_integer_array | ( | const char * | name, |
std::size_t | name_length, | ||
int *& | values, | ||
std::size_t & | array_length | ||
) | const |
Extracts the array of int values from the given entry.
Extracts the array of int values from the entry given by its name.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
values | Pointer to the internal array buffer to be returned. |
array_length | Length of the internal array. |
ok
if operation was successfulbad_type
if the given entry does not contain int arrayno_such_name
if the given name cannot be foundNote: this function gives read-write access to the underlying array, even if it was set as a shallow-copy.
result yami::core::parameters::get_iterator | ( | parameter_iterator & | it | ) | const |
Extracts the iterator to all entries.
Extracts the iterator pointing to the beginning of the collection, which means the first used slot.
ok
if operation was successfulno_entries
if this object contains no entries result yami::core::parameters::get_long_long | ( | const char * | name, |
long long & | value | ||
) | const |
Extracts the long long value from the given entry.
Extracts the long long value from the entry given by null-terminated name. See the other overloaded function for details.
result yami::core::parameters::get_long_long | ( | const char * | name, |
std::size_t | name_length, | ||
long long & | value | ||
) | const |
Extracts the long long value from the given entry.
Extracts the long long value from the entry given by its name.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
value | Value to be returned. |
ok
if operation was successfulbad_type
if the given entry does not contain long longno_such_name
if the given name cannot be found result yami::core::parameters::get_long_long_array | ( | const char * | name, |
long long *& | values, | ||
std::size_t & | array_length | ||
) | const |
Extracts the array of long long values from the given entry.
Extracts the array of long long values from the entry given by null-terminated name. See the other overloaded function for details.
result yami::core::parameters::get_long_long_array | ( | const char * | name, |
std::size_t | name_length, | ||
long long *& | values, | ||
std::size_t & | array_length | ||
) | const |
Extracts the array of long long values from the given entry.
Extracts the array of long long values from the entry given by its name.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
values | Pointer to the internal array buffer to be returned. |
array_length | Length of the internal array. |
ok
if operation was successfulbad_type
if the given entry does not contain long long arrayno_such_name
if the given name cannot be foundNote: this function gives read-write access to the underlying array, even if it was set as a shallow-copy.
result yami::core::parameters::get_long_long_word | ( | const char * | name, |
std::size_t | name_length, | ||
unsigned long long & | value | ||
) | const |
Extracts the unsigned long long value from the given entry.
Extracts the unsigned long long value from the entry given by its name.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
value | Value to be returned. |
ok
if operation was successfulbad_type
if the given entry does not contain unsigned long longno_such_name
if the given name cannot be found result yami::core::parameters::get_long_long_word | ( | const char * | name, |
unsigned long long & | value | ||
) | const |
Extracts the unsigned long long value from the given entry.
Extracts the unsigned long long value from the entry given by null-terminated name. See the other overloaded function for details.
result yami::core::parameters::get_long_long_word_array | ( | const char * | name, |
std::size_t | name_length, | ||
unsigned long long *& | values, | ||
std::size_t & | array_length | ||
) | const |
Extracts the array of unsigned long long values from the given entry.
Extracts the array of unsigned long long values from the entry given by its name.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
values | Pointer to the internal array buffer to be returned. |
array_length | Length of the internal array. |
ok
if operation was successfulbad_type
if the given entry does not contain unsigned long long arrayno_such_name
if the given name cannot be foundNote: this function gives read-write access to the underlying array, even if it was set as a shallow-copy.
result yami::core::parameters::get_long_long_word_array | ( | const char * | name, |
unsigned long long *& | values, | ||
std::size_t & | array_length | ||
) | const |
Extracts the array of unsigned long long values from the given entry.
Extracts the array of unsigned long long values from the entry given by null-terminated name. See the other overloaded function for details.
result yami::core::parameters::get_nested_array_length | ( | const char * | name, |
std::size_t & | array_length | ||
) | const |
Extracts the length of nested parameters array.
Extracts the length of nested parameters array identified by null-terminated name. See the other overloaded function for details.
result yami::core::parameters::get_nested_array_length | ( | const char * | name, |
std::size_t | name_length, | ||
std::size_t & | array_length | ||
) | const |
Extracts the length of nested parameters array.
Extracts the length of nested parameters array that is located at the given entry.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
array_length | Length of the array. |
ok
if operation was successfulbad_type
if the current entry does not contain nested parameters array result yami::core::parameters::get_nested_in_array | ( | const char * | name, |
std::size_t | index, | ||
parameters *& | nested | ||
) | const |
Extracts nested parameters value from nested array.
Extracts the nested parameters value from the given index of nested array identified by null-terminated name. See the other overloaded function for details.
result yami::core::parameters::get_nested_in_array | ( | const char * | name, |
std::size_t | name_length, | ||
std::size_t | index, | ||
parameters *& | nested | ||
) | const |
Extracts nested parameters value from nested array.
Extracts the nested parameters value from the given index of nested array.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
index | The array index (array slot to be read, starting from 0). |
nested | Pointer to the internally stored parameters object. |
ok
if operation was successfulbad_type
if the given entry does not contain nested parameters arrayno_such_index
if the given index is out of range result yami::core::parameters::get_nested_parameters | ( | const char * | name, |
parameters *& | params | ||
) | const |
Extracts the nested parameters object from the given entry.
Extracts nested parameters from the entry given by its null-terminated name. See the other overloaded function for details.
result yami::core::parameters::get_nested_parameters | ( | const char * | name, |
std::size_t | name_length, | ||
parameters *& | params | ||
) | const |
Extracts the nested parameters object from the given entry.
Extracts nested parameters from the entry given by its name.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
params | Pointer to the internally stored parameters object. |
ok
if operation was successfulbad_type
if the given entry does not contain nested parametersno_such_name
if the given name cannot be found
|
virtual |
Finds the total size of serialization buffer.
Computes the total size of serialization buffer(s) for the current content of this object.
size | The computed size of buffer. |
ok
if operation was successfulnesting_too_deep
if the level of nesting in this object is deeper than the limit Implements yami::core::serializable.
result yami::core::parameters::get_string | ( | const char * | name, |
const char *& | value, | ||
std::size_t & | value_length | ||
) | const |
Extracts the string value from the given entry.
Extracts the string value from the entry given by null-terminated name. See the other overloaded function for details.
result yami::core::parameters::get_string | ( | const char * | name, |
std::size_t | name_length, | ||
const char *& | value, | ||
std::size_t & | value_length | ||
) | const |
Extracts the string value from the given entry.
Extracts the string value from the entry given by its name.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
value | Pointer to the internal value buffer to be returned. |
value_length | Length of the internal value buffer. |
ok
if operation was successfulbad_type
if the given entry does not contain stringno_such_name
if the given name cannot be found result yami::core::parameters::get_string_array_length | ( | const char * | name, |
std::size_t & | array_length | ||
) | const |
Extracts the length of string array.
Extracts the length of string array identified by null-terminated name. See the other overloaded function for details.
result yami::core::parameters::get_string_array_length | ( | const char * | name, |
std::size_t | name_length, | ||
std::size_t & | array_length | ||
) | const |
Extracts the length of string array.
Extracts the length of string array that is located at the given entry.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
array_length | Length of the array. |
ok
if operation was successfulbad_type
if the current entry does not contain string array result yami::core::parameters::get_string_in_array | ( | const char * | name, |
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 identified by null-terminated name. See the other overloaded function for details.
result yami::core::parameters::get_string_in_array | ( | const char * | name, |
std::size_t | name_length, | ||
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.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
index | The array index (array slot to be read, starting from 0). |
value | Pointer to the internal value buffer to be returned. |
value_length | Length of the internal value buffer. |
ok
if operation was successfulbad_type
if the given entry does not contain string arrayno_such_index
if the given index is out of range result yami::core::parameters::get_type | ( | const char * | name, |
parameter_type & | t | ||
) | const |
Extracts the type of the given entry.
Extracts the type of the entry given by its null-terminated name. See the other overloaded function for details.
result yami::core::parameters::get_type | ( | const char * | name, |
std::size_t | name_length, | ||
parameter_type & | t | ||
) | const |
Extracts the type of the given entry.
Extracts the type of the entry given by its name.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
t | The type of the given entry. |
ok
if operation was successfulno_such_name
if the given name cannot be found result yami::core::parameters::get_word | ( | const char * | name, |
std::size_t | name_length, | ||
unsigned int & | value | ||
) | const |
Extracts the unsigned int value from the given entry.
Extracts the unsigned int value from the entry given by its name.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
value | Value to be returned. |
ok
if operation was successfulbad_type
if the given entry does not contain unsigned intno_such_name
if the given name cannot be found result yami::core::parameters::get_word | ( | const char * | name, |
unsigned int & | value | ||
) | const |
Extracts the unsigned int value from the given entry.
Extracts the unsigned int value from the entry given by null-terminated name. See the other overloaded function for details.
result yami::core::parameters::get_word_array | ( | const char * | name, |
std::size_t | name_length, | ||
unsigned int *& | values, | ||
std::size_t & | array_length | ||
) | const |
Extracts the array of unsigned int values from the given entry.
Extracts the array of unsigned int values from the entry given by its name.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
values | Pointer to the internal array buffer to be returned. |
array_length | Length of the internal array. |
ok
if operation was successfulbad_type
if the given entry does not contain unsigned int arrayno_such_name
if the given name cannot be foundNote: this function gives read-write access to the underlying array, even if it was set as a shallow-copy.
result yami::core::parameters::get_word_array | ( | const char * | name, |
unsigned int *& | values, | ||
std::size_t & | array_length | ||
) | const |
Extracts the array of unsigned int values from the given entry.
Extracts the array of unsigned int values from the entry given by null-terminated name. See the other overloaded function for details.
result yami::core::parameters::merge_from | ( | const parameters & | other | ) |
Merges entries from the given parameters object.
Merges the entries from another parameters object. The merged entries can have the same names, in which case the new entries replace existing ones. The merging is deep in the sense that no data is shared between this and other object after the merge - this applies also to those entries that were shallow references in the other object.
other | The object to be merged into this object. |
result yami::core::parameters::remove | ( | const char * | name | ) |
Removes the given entry.
Removes the entry given by its null-terminated name. See the other overloaded function for details.
result yami::core::parameters::remove | ( | const char * | name, |
std::size_t | name_length | ||
) |
Removes the given entry.
Removes the entry given by its name.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
ok
if operation was successfulno_such_name
if the given name cannot be foundNote: The removed entry leaves a hole (empty slot) in the collection that can be reused by newly added entries.
|
virtual |
Serializes current content into given buffer(s).
Serializes the current content of this object into the given buffer(s). The serialization buffer does not have to be contiguous and any number of buffer segments is allowed, provided that the size of each buffer segment is a multiple of 4 (32 bits).
The function scatters the serialized data into subsequent buffers as they become filled.
The buffers are provided as array of buffer pointers and their sizes.
buffers | Pointer to the array of buffer pointers (each of type char * ). |
buffer_sizes | Pointer to the array of buffer sizes. |
num_of_buffers | Number of buffers described by the array. |
ok
if operation was successfulnesting_too_deep
if the level of nesting in this object is deeper than the limitnot_enough_space
if the buffers are not big enough for all the data Implements yami::core::serializable.
result yami::core::parameters::set_binary | ( | const char * | name, |
const void * | value, | ||
std::size_t | value_length | ||
) |
Inserts new entry of type binary.
Inserts a new entry of type binary with null-terminated name. See the other overloaded function for details.
result yami::core::parameters::set_binary | ( | const char * | name, |
std::size_t | name_length, | ||
const void * | value, | ||
std::size_t | value_length | ||
) |
Inserts new entry of type binary.
Inserts a new entry of type binary to the first available slot. If the entry with the given name already exists it is replaced without changing the order of entries.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
value | Pointer to the value buffer to be set. |
value_length | Length of the value buffer. |
ok
if operation was successfulno_memory
if the new entry cannot be allocatedNote: The value is copied to the internal buffer.
result yami::core::parameters::set_binary_in_array | ( | const char * | name, |
std::size_t | index, | ||
const void * | value, | ||
std::size_t | value_length | ||
) |
Inserts new binary value to binary array.
Inserts a new binary value to already existing binary array (given by null-terminated name) at the given index. See the other overloaded function for details.
result yami::core::parameters::set_binary_in_array | ( | const char * | name, |
std::size_t | name_length, | ||
std::size_t | index, | ||
const void * | value, | ||
std::size_t | value_length | ||
) |
Inserts new binary value to binary array.
Inserts a new binary value (possibly replacing the old one) to already existing binary array at the given index.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
index | The array index (array slot, starting from 0). |
value | Pointer to the value buffer to be set. |
value_length | Length of the value buffer. |
ok
if operation was successfulbad_type
if the given entry does not contain binary arrayno_such_index
if the given index is out of rangeno_memory
if the new entry cannot be allocatedno_such_name
if the given name cannot be foundNote: The value is copied to the internal buffer.
result yami::core::parameters::set_binary_shallow | ( | const char * | name, |
const void * | value, | ||
std::size_t | value_length | ||
) |
Inserts new entry of type binary.
Inserts (without copy) a new entry of type binary with null-terminated name. See the other overloaded function for details.
result yami::core::parameters::set_binary_shallow | ( | const char * | name, |
std::size_t | name_length, | ||
const void * | value, | ||
std::size_t | value_length | ||
) |
Inserts new entry of type binary.
Inserts a new entry of type binary to the first available slot. If the entry with the given name already exists it is replaced without changing the order of entries.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
value | Pointer to the value buffer to be set. |
value_length | Length of the value buffer. |
ok
if operation was successfulno_memory
if the new entry cannot be allocatedNote: The value is not copied to the internal buffer and the user has to ensure that the given buffer is valid as long as this object refers to it.
result yami::core::parameters::set_boolean | ( | const char * | name, |
bool | value | ||
) |
Inserts new entry of type bool.
Inserts a new entry of type bool with null-terminated name. See the other overloaded function for details.
result yami::core::parameters::set_boolean | ( | const char * | name, |
std::size_t | name_length, | ||
bool | value | ||
) |
Inserts new entry of type bool.
Inserts a new entry of type bool to the first available slot. If the entry with the given name already exists it is replaced without changing the order of entries.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
value | Value to be set. |
ok
if operation was successfulno_memory
if the new entry cannot be allocated result yami::core::parameters::set_boolean_array | ( | const char * | name, |
const bool * | values, | ||
std::size_t | array_length | ||
) |
Inserts new entry of type bool array.
Inserts a new entry of type bool array with null-terminated name. See the other overloaded function for details.
result yami::core::parameters::set_boolean_array | ( | const char * | name, |
std::size_t | name_length, | ||
const bool * | values, | ||
std::size_t | array_length | ||
) |
Inserts new entry of type bool array.
Inserts a new entry of type bool array to the first available slot. If the entry with the given name already exists it is replaced without changing the order of entries.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
values | Pointer to the array of values to be set. |
array_length | Length of the array of values. |
ok
if operation was successfulno_memory
if the new entry cannot be allocatedNote: The array of values is copied to the internal buffer.
result yami::core::parameters::set_boolean_array_shallow | ( | const char * | name, |
const bool * | values, | ||
std::size_t | array_length | ||
) |
Inserts new entry of type bool array.
Inserts (without copy) a new entry of type bool array with null-terminated name and value. See the other overloaded function for details.
result yami::core::parameters::set_boolean_array_shallow | ( | const char * | name, |
std::size_t | name_length, | ||
const bool * | values, | ||
std::size_t | array_length | ||
) |
Inserts new entry of type bool array.
Inserts a new entry of type bool array to the first available slot. If the entry with the given name already exists it is replaced without changing the order of entries.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
values | Pointer to the array of values to be set. |
array_length | Length of the array of values. |
ok
if operation was successfulno_memory
if the new entry cannot be allocatedNote: The array of values is not copied to the internal buffer and the user has to ensure that the given buffer is valid as long as this object refers to it.
result yami::core::parameters::set_double_float | ( | const char * | name, |
double | value | ||
) |
Inserts new entry of type double.
Inserts a new entry of type double with null-terminated name. See the other overloaded function for details.
result yami::core::parameters::set_double_float | ( | const char * | name, |
std::size_t | name_length, | ||
double | value | ||
) |
Inserts new entry of type double.
Inserts a new entry of type double to the first available slot. If the entry with the given name already exists it is replaced without changing the order of entries.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
value | Value to be set. |
ok
if operation was successfulno_memory
if the new entry cannot be allocated result yami::core::parameters::set_double_float_array | ( | const char * | name, |
const double * | values, | ||
std::size_t | array_length | ||
) |
Inserts new entry of type double array.
Inserts a new entry of type double array with null-terminated name. See the other overloaded function for details.
result yami::core::parameters::set_double_float_array | ( | const char * | name, |
std::size_t | name_length, | ||
const double * | values, | ||
std::size_t | array_length | ||
) |
Inserts new entry of type double array.
Inserts a new entry of type double array to the first available slot. If the entry with the given name already exists it is replaced without changing the order of entries.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
values | Pointer to the array of values to be set. |
array_length | Length of the array of values. |
ok
if operation was successfulno_memory
if the new entry cannot be allocatedNote: The array of values is copied to the internal buffer.
result yami::core::parameters::set_double_float_array_shallow | ( | const char * | name, |
const double * | values, | ||
std::size_t | array_length | ||
) |
Inserts new entry of type double array.
Inserts (without copy) a new entry of type double array with null-terminated name and value. See the other overloaded function for details.
result yami::core::parameters::set_double_float_array_shallow | ( | const char * | name, |
std::size_t | name_length, | ||
const double * | values, | ||
std::size_t | array_length | ||
) |
Inserts new entry of type double array.
Inserts a new entry of type double array to the first available slot. If the entry with the given name already exists it is replaced without changing the order of entries.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
values | Pointer to the array of values to be set. |
array_length | Length of the array of values. |
ok
if operation was successfulno_memory
if the new entry cannot be allocatedNote: The array of values is not copied to the internal buffer and the user has to ensure that the given buffer is valid as long as this object refers to it.
result yami::core::parameters::set_integer | ( | const char * | name, |
int | value | ||
) |
Inserts new entry of type int.
Inserts a new entry of type int with null-terminated name. See the other overloaded function for details.
result yami::core::parameters::set_integer | ( | const char * | name, |
std::size_t | name_length, | ||
int | value | ||
) |
Inserts new entry of type int.
Inserts a new entry of type int to the first available slot. If the entry with the given name already exists it is replaced without changing the order of entries.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
value | Value to be set. |
ok
if operation was successfulno_memory
if the new entry cannot be allocated result yami::core::parameters::set_integer_array | ( | const char * | name, |
const int * | values, | ||
std::size_t | array_length | ||
) |
Inserts new entry of type int array.
Inserts a new entry of type int array with null-terminated name. See the other overloaded function for details.
result yami::core::parameters::set_integer_array | ( | const char * | name, |
std::size_t | name_length, | ||
const int * | values, | ||
std::size_t | array_length | ||
) |
Inserts new entry of type int array.
Inserts a new entry of type int array to the first available slot. If the entry with the given name already exists it is replaced without changing the order of entries.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
values | Pointer to the array of values to be set. |
array_length | Length of the array of values. |
ok
if operation was successfulno_memory
if the new entry cannot be allocatedNote: The array of values is copied to the internal buffer.
result yami::core::parameters::set_integer_array_shallow | ( | const char * | name, |
const int * | values, | ||
std::size_t | array_length | ||
) |
Inserts new entry of type int array.
Inserts (without copy) a new entry of type int array with null-terminated name and value. See the other overloaded function for details.
result yami::core::parameters::set_integer_array_shallow | ( | const char * | name, |
std::size_t | name_length, | ||
const int * | values, | ||
std::size_t | array_length | ||
) |
Inserts new entry of type int array.
Inserts a new entry of type int array to the first available slot. If the entry with the given name already exists it is replaced without changing the order of entries.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
values | Pointer to the array of values to be set. |
array_length | Length of the array of values. |
ok
if operation was successfulno_memory
if the new entry cannot be allocatedNote: The array of values is not copied to the internal buffer and the user has to ensure that the given buffer is valid as long as this object refers to it.
result yami::core::parameters::set_long_long | ( | const char * | name, |
long long | value | ||
) |
Inserts new entry of type long long.
Inserts a new entry of type long long with null-terminated name. See the other overloaded function for details.
result yami::core::parameters::set_long_long | ( | const char * | name, |
std::size_t | name_length, | ||
long long | value | ||
) |
Inserts new entry of type long long.
Inserts a new entry of type long long to the first available slot. If the entry with the given name already exists it is replaced without changing the order of entries.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
value | Value to be set. |
ok
if operation was successfulno_memory
if the new entry cannot be allocated result yami::core::parameters::set_long_long_array | ( | const char * | name, |
const long long * | values, | ||
std::size_t | array_length | ||
) |
Inserts new entry of type long long array.
Inserts a new entry of type long long array with null-terminated name. See the other overloaded function for details.
result yami::core::parameters::set_long_long_array | ( | const char * | name, |
std::size_t | name_length, | ||
const long long * | values, | ||
std::size_t | array_length | ||
) |
Inserts new entry of type long long array.
Inserts a new entry of type long long array to the first available slot. If the entry with the given name already exists it is replaced without changing the order of entries.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
values | Pointer to the array of values to be set. |
array_length | Length of the array of values. |
ok
if operation was successfulno_memory
if the new entry cannot be allocatedNote: The array of values is copied to the internal buffer.
result yami::core::parameters::set_long_long_array_shallow | ( | const char * | name, |
const long long * | values, | ||
std::size_t | array_length | ||
) |
Inserts new entry of type long long array.
Inserts (without copy) a new entry of type long long array with null-terminated name and value. See the other overloaded function for details.
result yami::core::parameters::set_long_long_array_shallow | ( | const char * | name, |
std::size_t | name_length, | ||
const long long * | values, | ||
std::size_t | array_length | ||
) |
Inserts new entry of type long long array.
Inserts a new entry of type long long array to the first available slot. If the entry with the given name already exists it is replaced without changing the order of entries.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
values | Pointer to the array of values to be set. |
array_length | Length of the array of values. |
ok
if operation was successfulno_memory
if the new entry cannot be allocatedNote: The array of values is not copied to the internal buffer and the user has to ensure that the given buffer is valid as long as this object refers to it.
result yami::core::parameters::set_long_long_word | ( | const char * | name, |
std::size_t | name_length, | ||
unsigned long long | value | ||
) |
Inserts new entry of type unsigned long long.
Inserts a new entry of type unsigned long long to the first available slot. If the entry with the given name already exists it is replaced without changing the order of entries.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
value | Value to be set. |
ok
if operation was successfulno_memory
if the new entry cannot be allocated result yami::core::parameters::set_long_long_word | ( | const char * | name, |
unsigned long long | value | ||
) |
Inserts new entry of type unsigned long long.
Inserts a new entry of type unsigned long long with null-terminated name. See the other overloaded function for details.
result yami::core::parameters::set_long_long_word_array | ( | const char * | name, |
const unsigned long long * | values, | ||
std::size_t | array_length | ||
) |
Inserts new entry of type unsigned long long array.
Inserts a new entry of type unsigned long long array with null-terminated name. See the other overloaded function for details.
result yami::core::parameters::set_long_long_word_array | ( | const char * | name, |
std::size_t | name_length, | ||
const unsigned long long * | values, | ||
std::size_t | array_length | ||
) |
Inserts new entry of type unsigned long long array.
Inserts a new entry of type unsigned long long array to the first available slot. If the entry with the given name already exists it is replaced without changing the order of entries.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
values | Pointer to the array of values to be set. |
array_length | Length of the array of values. |
ok
if operation was successfulno_memory
if the new entry cannot be allocatedNote: The array of values is copied to the internal buffer.
result yami::core::parameters::set_long_long_word_array_shallow | ( | const char * | name, |
const unsigned long long * | values, | ||
std::size_t | array_length | ||
) |
Inserts new entry of type unsigned long long array.
Inserts (without copy) a new entry of type unsigned long long array with null-terminated name and value. See the other overloaded function for details.
result yami::core::parameters::set_long_long_word_array_shallow | ( | const char * | name, |
std::size_t | name_length, | ||
const unsigned long long * | values, | ||
std::size_t | array_length | ||
) |
Inserts new entry of type unsigned long long array.
Inserts a new entry of type unsigned long long array to the first available slot. If the entry with the given name already exists it is replaced without changing the order of entries.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
values | Pointer to the array of values to be set. |
array_length | Length of the array of values. |
ok
if operation was successfulno_memory
if the new entry cannot be allocatedNote: The array of values is not copied to the internal buffer and the user has to ensure that the given buffer is valid as long as this object refers to it.
result yami::core::parameters::set_string | ( | const char * | name, |
const char * | value | ||
) |
Inserts new entry of type string.
Inserts a new entry of type string with null-terminated name and value. See the other overloaded function for details.
result yami::core::parameters::set_string | ( | const char * | name, |
std::size_t | name_length, | ||
const char * | value, | ||
std::size_t | value_length | ||
) |
Inserts new entry of type string.
Inserts a new entry of type string to the first available slot. If the entry with the given name already exists it is replaced without changing the order of entries.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
value | Pointer to the value buffer to be set. The buffer can contain zeros. |
value_length | Length of the value buffer. |
ok
if operation was successfulno_memory
if the new entry cannot be allocatedNote: The value is copied to the internal buffer.
result yami::core::parameters::set_string_in_array | ( | const char * | name, |
std::size_t | index, | ||
const char * | value | ||
) |
Inserts new string value to string array.
Inserts a new null-terminated string value to already existing string array (given by null-terminated name) at the given index. See the other overloaded function for details.
result yami::core::parameters::set_string_in_array | ( | const char * | name, |
std::size_t | name_length, | ||
std::size_t | index, | ||
const char * | value, | ||
std::size_t | value_length | ||
) |
Inserts new string value to string array.
Inserts a new string value (possibly replacing the old one) to already existing string array at the given index.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
index | The array index (array slot, starting from 0). |
value | Pointer to the value buffer to be set. The buffer can contain zeros. |
value_length | Length of the value buffer. |
ok
if operation was successfulbad_type
if the given entry does not contain string arrayno_such_index
if the given index is out of rangeno_memory
if the new entry cannot be allocatedno_such_name
if the given name cannot be foundNote: The value is copied to the internal buffer.
result yami::core::parameters::set_string_shallow | ( | const char * | name, |
const char * | value | ||
) |
Inserts new entry of type string.
Inserts (without copy) a new entry of type string with null-terminated name and value. See the other overloaded function for details.
result yami::core::parameters::set_string_shallow | ( | const char * | name, |
std::size_t | name_length, | ||
const char * | value, | ||
std::size_t | value_length | ||
) |
Inserts new entry of type string.
Inserts a new entry of type string to the first available slot. If the entry with the given name already exists it is replaced without changing the order of entries.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
value | Pointer to the value buffer to be set. The buffer can contain zeros. |
value_length | Length of the value buffer. |
ok
if operation was successfulno_memory
if the new entry cannot be allocatedNote: The value is not copied to the internal buffer and the user has to ensure that the given buffer is valid as long as this object refers to it.
result yami::core::parameters::set_word | ( | const char * | name, |
std::size_t | name_length, | ||
unsigned int | value | ||
) |
Inserts new entry of type unsigned int.
Inserts a new entry of type unsigned int to the first available slot. If the entry with the given name already exists it is replaced without changing the order of entries.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
value | Value to be set. |
ok
if operation was successfulno_memory
if the new entry cannot be allocated result yami::core::parameters::set_word | ( | const char * | name, |
unsigned int | value | ||
) |
Inserts new entry of type unsigned int.
Inserts a new entry of type unsigned int with null-terminated name. See the other overloaded function for details.
result yami::core::parameters::set_word_array | ( | const char * | name, |
const unsigned int * | values, | ||
std::size_t | array_length | ||
) |
Inserts new entry of type unsigned int array.
Inserts a new entry of type unsigned int array with null-terminated name. See the other overloaded function for details.
result yami::core::parameters::set_word_array | ( | const char * | name, |
std::size_t | name_length, | ||
const unsigned int * | values, | ||
std::size_t | array_length | ||
) |
Inserts new entry of type unsigned int array.
Inserts a new entry of type unsigned int array to the first available slot. If the entry with the given name already exists it is replaced without changing the order of entries.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
values | Pointer to the array of values to be set. |
array_length | Length of the array of values. |
ok
if operation was successfulno_memory
if the new entry cannot be allocatedNote: The array of values is copied to the internal buffer.
result yami::core::parameters::set_word_array_shallow | ( | const char * | name, |
const unsigned int * | values, | ||
std::size_t | array_length | ||
) |
Inserts new entry of type unsigned int array.
Inserts (without copy) a new entry of type int array with null-terminated name and value. See the other overloaded function for details.
result yami::core::parameters::set_word_array_shallow | ( | const char * | name, |
std::size_t | name_length, | ||
const unsigned int * | values, | ||
std::size_t | array_length | ||
) |
Inserts new entry of type unsigned int array.
Inserts a new entry of type unsigned int array to the first available slot. If the entry with the given name already exists it is replaced without changing the order of entries.
name | Pointer to the name buffer. The buffer can contain zeros. |
name_length | Length of the name buffer. |
values | Pointer to the array of values to be set. |
array_length | Length of the array of values. |
ok
if operation was successfulno_memory
if the new entry cannot be allocatedNote: The array of values is not copied to the internal buffer and the user has to ensure that the given buffer is valid as long as this object refers to it.
std::size_t yami::core::parameters::size | ( | ) | const |
Returns the size of the collection.
Returns the size of the collection - that is, the number of all non-empty slots.