Rihen Rihen NkentseuDocumentation

NkEnvUMap

classgeneric (template)

Unordered associative container (linear search)

Include
#include "NKPlatform/NkEnv.h"
Namespace
nkentseu::env
Link (Jenga)
nkentseudependson(["NKPlatform"])
C++
template <typename K, typename V> class NkEnvUMap

Hierarchy

Base classes : none. Derived classes : none.

Hierarchy : NkEnvUMapNkEnvUMap

Members · 13

NkEnvUMapDefault constructor
NkEnvUMapCopy constructor
NkEnvUMapMove constructor
~NkEnvUMapDestructor
operator=Copy assignment operator
operator=Move assignment operator
SetSets or updates a key/value pair (copy)
SetSets or updates a key/value pair (move)
FindLooks up a value by key
RemoveRemoves a pair by key
ClearEmpties the map completely
SizeGets the number of stored pairs
DataGets direct, read-only access to the internal data

Member details

NkEnvUMap

#
constructor
NkEnvUMap() noexcept = default

Default constructor

NkEnvUMap

#
constructor
NkEnvUMap(const NkEnvUMap &other) = default

Copy constructor

Parameters

NameTypeRoleDefault
otherconst NkEnvUMap<K, V> &

NkEnvUMap

#
constructor
NkEnvUMap(NkEnvUMap &&other) noexcept = default

Move constructor

Parameters

NameTypeRoleDefault
otherNkEnvUMap<K, V> &&

~NkEnvUMap

#
destructor
~NkEnvUMap() = default

Destructor

operator=

#
method
NkEnvUMap &operator=(const NkEnvUMap &other) = default

Copy assignment operator

Parameters

NameTypeRoleDefault
otherconst NkEnvUMap<K, V> &

operator=

#
method
NkEnvUMap &operator=(NkEnvUMap &&other) noexcept = default

Move assignment operator

Parameters

NameTypeRoleDefault
otherNkEnvUMap<K, V> &&

Set

#
method
void Set(const K &key, const V &value)

Sets or updates a key/value pair (copy)

Parameters

NameTypeRoleDefault
keyconst K &
valueconst V &

Set

#
method
void Set(K &&key, V &&value)

Sets or updates a key/value pair (move)

Parameters

NameTypeRoleDefault
keyK &&
valueV &&

Find

#
method
const V *Find(const K &key) const noexcept

Looks up a value by key

Parameters

NameTypeRoleDefault
keyconst K &

Remove

#
method
bool Remove(const K &key) noexcept

Removes a pair by key

Parameters

NameTypeRoleDefault
keyconst K &

Clear

#
method
void Clear() noexcept

Empties the map completely

Size

#
method
NkSize Size() const noexcept

Gets the number of stored pairs

Data

#
method
const NkEnvPair<K, V> *Data() const noexcept

Gets direct, read-only access to the internal data