Template for classes wrapping static key/value typically attribute lists. More...
#include <eagine/key_val_list.hpp>
Public Types | |
| using | key_type = typename Traits::key_type |
| Alias for the key type. | |
| using | value_type = typename Traits::value_type |
| Alias for the value type. | |
Public Member Functions | |
| key_value_list ()=default | |
| Default constructor. | |
| auto | data () const noexcept -> const value_type * |
| Returns a pointer to the internal element array. More... | |
| auto | copy () const noexcept -> std::vector< value_type > |
| Copies the internal element array into a vector. More... | |
| auto | get () const noexcept -> span< const value_type > |
| A const view of the internal element array. More... | |
| constexpr auto | append (const key_value_list_element< Traits > &key_val) const noexcept -> key_value_list< Traits, N+2 > |
| Appends a key/value pair and returns a new extended list. | |
Static Public Member Functions | |
| static constexpr auto | size () noexcept -> span_size_t |
| Returns the size of the element array (including the terminating zero). More... | |
Related Functions | |
(Note that these are not member functions.) | |
| template<typename Traits > | |
| static constexpr auto | operator+ (const key_value_list_element< Traits > &l, const key_value_list_element< Traits > &r) noexcept -> key_value_list< Traits, 4 > |
| Concatenates two individual key/value elements into a key/value list. More... | |
| template<typename Traits , std::size_t N> | |
| static constexpr auto | operator+ (const key_value_list< Traits, N > &l, const key_value_list_element< Traits > &r) noexcept -> key_value_list< Traits, N+2 > |
| Adds a key/value pair into a key/value list, returns a new list. More... | |
Template for classes wrapping static key/value typically attribute lists.
| Traits | policy class customizing the instantiation. |
| N | the number of elements in the list (not including the terminating zero). |
|
inlinenoexcept |
Copies the internal element array into a vector.
|
inlinenoexcept |
Returns a pointer to the internal element array.
|
inlinenoexcept |
A const view of the internal element array.
|
inlinestaticconstexprnoexcept |
Returns the size of the element array (including the terminating zero).