Lightweight handle providing read-only access to a packed FlyWeight object.
More...
#include <aeongames/FlyWeight.hpp>
|
| | Handle (const Key &aKey) |
| | Construct a Handle for the given key.
|
| const Value *const | Get () const |
| | Retrieve a pointer to the stored Value.
|
| const Handle | GetHandle () const |
| | Get a copy of this Handle.
|
| bool | IsValid () const |
| | Check whether the referenced FlyWeight object is currently packed.
|
| const Value *const | operator-> () const |
| | Arrow operator for accessing the stored Value.
|
| const Value & | operator* () const |
| | Dereference operator for accessing the stored Value.
|
| const Value *const | operator& () const |
| | Address-of operator for obtaining a pointer to the stored Value.
|
template<class Key, class Value>
class AeonGames::FlyWeight< Key, Value >::Handle
Lightweight handle providing read-only access to a packed FlyWeight object.
Definition at line 79 of file FlyWeight.hpp.
◆ Handle()
template<class Key, class Value>
Construct a Handle for the given key.
- Parameters
-
| aKey | The key identifying the FlyWeight object. Must not be the null/empty key. |
- Exceptions
-
| std::runtime_error | if aKey is the null/empty key. |
Definition at line 87 of file FlyWeight.hpp.
◆ Get()
template<class Key, class Value>
Retrieve a pointer to the stored Value.
- Returns
- Pointer to the Value if found, nullptr otherwise.
Definition at line 97 of file FlyWeight.hpp.
◆ GetHandle()
template<class Key, class Value>
◆ IsValid()
template<class Key, class Value>
Check whether the referenced FlyWeight object is currently packed.
- Returns
- true if the object exists in the store, false otherwise.
Definition at line 116 of file FlyWeight.hpp.
◆ operator&()
template<class Key, class Value>
Address-of operator for obtaining a pointer to the stored Value.
- Returns
- Pointer to the Value.
- Exceptions
-
| std::runtime_error | if the object is not packed. |
Definition at line 150 of file FlyWeight.hpp.
◆ operator*()
template<class Key, class Value>
Dereference operator for accessing the stored Value.
- Returns
- Reference to the Value.
- Exceptions
-
| std::runtime_error | if the object is not packed. |
Definition at line 137 of file FlyWeight.hpp.
◆ operator->()
template<class Key, class Value>
Arrow operator for accessing the stored Value.
- Returns
- Pointer to the Value.
- Exceptions
-
| std::runtime_error | if the object is not packed. |
Definition at line 124 of file FlyWeight.hpp.
The documentation for this class was generated from the following file: