Type-erased key-value archive that stores UniqueAnyPtr values.
More...
#include <aeongames/Archive.hpp>
|
| const UniqueAnyPtr & | Store (const K &k, UniqueAnyPtr &&pointer) |
| | Store a type-erased pointer under the given key.
|
| UniqueAnyPtr | Dispose (const K &k) |
| | Remove and return the pointer associated with the given key.
|
| const UniqueAnyPtr & | Get (const K &k) const |
| | Retrieve a stored pointer by key (const).
|
| const UniqueAnyPtr & | Get (const K &k) |
| | Retrieve a stored pointer by key (mutable).
|
| const K & | GetKey (const void *t) const |
| | Find the key associated with a stored raw pointer.
|
template<class K>
class AeonGames::ArchiveAny< K >
Type-erased key-value archive that stores UniqueAnyPtr values.
- Template Parameters
-
| K | Key type (must be hashable). |
Definition at line 125 of file Archive.hpp.
◆ Dispose()
Remove and return the pointer associated with the given key.
- Parameters
-
| k | Key of the entry to dispose. |
- Returns
- The removed UniqueAnyPtr, or a null pointer if not found.
Definition at line 145 of file Archive.hpp.
◆ Get() [1/2]
Retrieve a stored pointer by key (mutable).
- Parameters
-
- Returns
- Reference to the stored UniqueAnyPtr, or a null pointer if not found.
Definition at line 178 of file Archive.hpp.
◆ Get() [2/2]
Retrieve a stored pointer by key (const).
- Parameters
-
- Returns
- Const reference to the stored UniqueAnyPtr, or a null pointer if not found.
Definition at line 162 of file Archive.hpp.
◆ GetKey()
Find the key associated with a stored raw pointer.
- Parameters
-
- Returns
- Const reference to the key.
- Exceptions
-
| std::runtime_error | if the pointer is not found. |
Definition at line 189 of file Archive.hpp.
◆ Store()
Store a type-erased pointer under the given key.
- Parameters
-
| k | Key to associate with the pointer. |
| pointer | UniqueAnyPtr to store (moved). |
- Returns
- Const reference to the stored pointer.
Definition at line 134 of file Archive.hpp.
The documentation for this class was generated from the following file: