template class Core::Map
Overview
Mutable map container class. More…
#include <coremap.h> template <typename TKey, typename TValue> class Map: public Core::ConstMap { public: // construction Map(int capacity = 0, int delta = 5); Map(const InitializerList<Entry>& list); // methods void setValue(const TKey& key, const TValue& value); bool remove(const TKey& key); void removeAll(); };
Inherited Members
public: // typedefs typedef KeyValue<TKey, TValue> Entry; typedef RangeIterator<TEntries, VectorIterator<Entry>, Entry&> Iterator; // methods int count() const; bool isEmpty() const; TValue& operator [] (const TKey& key) const; TValue& getValue(const TKey& key) const; bool getValue(TValue& result, const TKey& key) const; TKey& getKey(const TValue& value) const; bool getKey(TKey& result, const TValue& value) const; bool contains(const TKey& key) const; bool containsValue(const TValue& value) const; Iterator begin() const; Iterator end() const;
Detailed Documentation
Mutable map container class.
Construction
Map(int capacity = 0, int delta = 5)
Construct with initial capacity and delta.
Map(const InitializerList<Entry>& list)
Construct with initializer list.
Methods
void setValue(const TKey& key, const TValue& value)
Set value for key, replaces existing entry or appends a new one.
bool remove(const TKey& key)
Remove entry by key.
void removeAll()
Remove all entries.