Go to the documentation of this file.
125 unsigned count()
const
156 const V*
valueAt(
unsigned idx)
const
209 void set(
const K&
key, V* value)
228 return (index < 0) ? nullptr :
entries[index].value.get();
238 for(
unsigned i = 0; i <
entries.count(); i++) {
301 std::unique_ptr<V> value;
303 entries[index].value.swap(value);
306 return value.release();
323 std::unique_ptr<V>
value;
327 this->value.reset(
value);
Value
Definition: Components/IFS/src/include/IFS/Error.h:82
K key
Definition: ObjectMap.h:332
bool remove()
Remove this value from the map.
Definition: ObjectMap.h:111
V * getValue() const
Definition: ObjectMap.h:86
V * find(const K &key) const
Find the value for a given key, if it exists.
Definition: ObjectMap.h:235
V * extractAt(unsigned index)
Get the value at a given index and remove it from the map, without destroying it.
Definition: ObjectMap.h:309
const V * valueAt(unsigned idx) const
Definition: ObjectMap.h:166
Value get(const K &key)
Get map entry value.
Definition: ObjectMap.h:210
const K & getKey() const
Definition: ObjectMap.h:81
Entry(const K &key, V *value)
Definition: ObjectMap.h:335
Vector< Entry > entries
Definition: ObjectMap.h:341
V * extract()
Get the value for a given key and remove it from the map, without destroying it.
Definition: ObjectMap.h:121
unsigned count() const
Get the number of entries in this map.
Definition: ObjectMap.h:135
ObjectMap()
Definition: ObjectMap.h:61
void clear()
Clear the map of all entries.
Definition: ObjectMap.h:322
Value(ObjectMap< K, V > &map, const K &key)
Definition: ObjectMap.h:77
const V * operator[](const K &key) const
Get value for given key, if it exists.
Definition: ObjectMap.h:188
V * extract(const K &key)
Get the value for a given key and remove it from the map, without destroying it.
Definition: ObjectMap.h:297
long map(long, long, long, long, long)
V * operator->() const
Definition: ObjectMap.h:102
void set(const K &key, V *value)
Set a key value.
Definition: ObjectMap.h:219
bool contains(const K &key) const
Check if a key is contained within this map.
Definition: ObjectMap.h:261
Value & operator=(V *newValue)
Definition: ObjectMap.h:91
void size_t const void * key
Definition: blake2s.h:33
const K & keyAt(unsigned idx) const
Definition: ObjectMap.h:145
void removeAt(unsigned index)
Remove entry at given index.
Definition: ObjectMap.h:270
int indexOf(const K &key) const
Get the index of a key.
Definition: ObjectMap.h:246
~ObjectMap()
Definition: ObjectMap.h:65
std::unique_ptr< V > value
Definition: ObjectMap.h:333
Implementation of a HashMap for owned objects, i.e. anything created with new().
Definition: ObjectMap.h:48
bool remove(const K &key)
Remove a key from this map.
Definition: ObjectMap.h:280
Vector class template.
Definition: WVector.h:31
Class to provide safe access to mapped value.
Definition: ObjectMap.h:74