|
Aeon Engine c550894
AeonGames Open Source Game Engine
|
Flyweight pattern implementation that stores shared objects keyed by a unique identifier. More...
#include <aeongames/FlyWeight.hpp>

Classes | |
| class | Handle |
| Lightweight handle providing read-only access to a packed FlyWeight object. More... | |
Public Member Functions | |
| const Handle | Pack (const Key &aKey) |
| Register this object in the store with the given key. | |
| void | Unpack () |
| Remove this object from the store and reset its key. | |
| const Handle | GetHandle () const |
| Obtain a Handle to this packed object. | |
Flyweight pattern implementation that stores shared objects keyed by a unique identifier.
| Key | The type used as a unique identifier for stored objects. |
| Value | The derived type that inherits from FlyWeight. |
Definition at line 29 of file FlyWeight.hpp.
|
inline |
Obtain a Handle to this packed object.
| std::runtime_error | if the object is not packed. |
Definition at line 194 of file FlyWeight.hpp.
|
inline |
Register this object in the store with the given key.
| aKey | The unique key to associate with this object. |
| std::runtime_error | if aKey is null/empty or already in use. |
Definition at line 165 of file FlyWeight.hpp.
|
inline |
Remove this object from the store and reset its key.
Definition at line 183 of file FlyWeight.hpp.