46 template <
typename K_TYPE,
48 typename ALLOC = allocator<couple<const K_TYPE, V_TYPE>>>
49 class map :
public container<couple<const K_TYPE, V_TYPE>, ALLOC> {
126 template<
typename K_TYPE,
typename V_TYPE,
typename ALLOC>
130 template<
typename K_TYPE,
typename V_TYPE,
typename ALLOC>
Memory allocation interface and implementations.
Abstract base class for containers.
Definition container.h:26
Container for two heterogeneous elements.
Definition couple.h:55
Abstract base class for key-value mapping containers.
Definition map.h:49
virtual V_TYPE & operator[](const K_TYPE &k)=0
Non-const access to mapped values.
virtual V_TYPE get(const K_TYPE &k) const =0
Gets the value associated with a key.
~map() override
Virtual destructor.
map(ALLOC alloc=ALLOC{})
Constructs a map with the specified allocator.
Definition map.h:127
virtual bool containsKey(const K_TYPE &k) const =0
Checks if a key exists in the map.
virtual const V_TYPE & operator[](const K_TYPE &k) const =0
Const access to mapped values.
virtual bool remove(const K_TYPE &k)=0
Removes a key-value pair from the map.
virtual bool add(const K_TYPE &k, const V_TYPE &v)=0
Adds a new key-value pair to the map.
virtual bool update(const K_TYPE &key, const V_TYPE &value)=0
Updates the value for an existing key.
Unique ownership smart pointer with move semantics.
Definition ownerPtr.h:37
Abstract base class for container types.
Generic pair container implementation.
Main namespace for the project Original.
Definition algorithms.h:21
Standard namespace extensions for original::alternative.
Definition allocator.h:351