|
ActiveLib
|
#include <Map.h>


Public Member Functions | |
| Map () | |
| Map (const Map &source) | |
| Map (Map &&source) | |
| virtual | ~Map ()=default |
| auto | operator= (const Map &source) |
| auto | operator= (Map &&source) |
| mapped_type & | operator[] (const Key &key) |
| auto | find (const Key &key) const |
| auto | insert (const raw_type &item) |
| auto | insert (const value_type &item) |
| auto | insert (value_type &&item) |
| auto | insert (node_type &&node) |
| auto | emplace (const Key &key, mapped_type &&item) |
| auto | emplace (const Key &key, T &&item) |
| auto | release (iterator &pos) |
| auto | release (const_iterator pos) |
A specialisation class for a map of objects wrapped in unique_ptr paired with a key
This allows map to store objects with polymorphic behaviour and object copying (object type must conform to Clonable). Keep in mind that the normal behaviour of the map is to take ownership of any objects stored in it (unless release is used)
NB: There is no requirement for container items to be non-null. It is entirely up the implementor if this rule should be adopted or enforced
|
inline |
Constructor
|
inline |
Copy constructor
| source | The object to copy |
|
inline |
Move constructor
| source | The object to move |
|
virtualdefault |
Destructor
|
inline |
Emplace a key/value pair into the map
| item | The key/value pair to insert (already wrapped in unique_ptr) |

|
inline |
Emplace a key/value pair into the map
| item | The item to push |
|
inline |
Find a value with a specified key
|
inline |
Insert a key/raw value pair into the map
| item | The item to push |

|
inline |
Insert a key/value pair into the map
| item | The item to push |

|
inline |
Insert a map node
| node | The node to insert |
|
inline |
Insert a key/object pair into the map
| item | The item to push |

|
inline |
Assignment operator
| source | The object to copy |
|
inline |
Assignment operator
| source | The object to move |
|
inline |
Subscript operator
| key | The subscript key |
|
inline |
Release the pointer held by the specified item and erase
| pos | An iterator pointing to the item to be removed |
|
inline |
Release the pointer held by the specified item and erase
| pos | An iterator pointing to the item to be removed |

