|
forb
|
A template that can be used to declare a list of unique ordered items. More...
#include <ordered_unique_list.hpp>
Public Types | |
| using | set_t = std::map< std::string, int > |
| The type of the set of keys, used to access the list. | |
| using | list_t = std::vector< T > |
| The type of the list. | |
| using | const_T = typename std::add_const< T >::type |
| Alias of the const version of the template type T. | |
Public Member Functions | |
| virtual bool | insert (std::string key, const T &value) |
| Inserts a new value within the list if the corrisponding key is not present. More... | |
| const list_t & | list () const |
| Returns a const reference to the list of the elements. | |
| bool | contains (std::string key) const |
| Returns true if the given key is present within the set of keys. | |
| T & | operator[] (std::string key) |
| Returns a reference to an element from its key. More... | |
| const_T & | operator[] (std::string key) const |
| Same as operator[](std::string), but returns a const_T instead, when used on a const reference to the list object. More... | |
A template that can be used to declare a list of unique ordered items.
|
inlinevirtual |
Inserts a new value within the list if the corrisponding key is not present.
Returns true on successful insertion.
Reimplemented in forbcc::method, and forbcc::type_struct.
|
inline |
Returns a reference to an element from its key.
The key must be present, an exception may be thrown if that condition is not satisfied.
|
inline |
Same as operator[](std::string), but returns a const_T instead, when used on a const reference to the list object.
1.8.12