CppFactory
0.1.0
Modern c++ object factory implementation in <200 lines
|
Represents an Object that has a global lifetime, meaning it doesn't get destroyed when it leaves scope More...
#include <CppFactory.hpp>
Static Public Member Functions | |
template<int TZone = 0> | |
static std::shared_ptr< TObject > | Get () |
Gets (and allocates, if needed) a global object (optionally from a particular zone) for type TObject More... | |
template<int TZone> | |
static void | Reset () |
Resets the global object cache for all zones for type TObject More... | |
static void | Reset () |
Resets the global object cache for all zones for type TObject More... | |
Represents an Object that has a global lifetime, meaning it doesn't get destroyed when it leaves scope
TObject | The type of object |
|
inlinestatic |
Gets (and allocates, if needed) a global object (optionally from a particular zone) for type TObject
TZone | The zone to get from |
GlobalObject<TObject>::Get();
|
inlinestatic |
Resets the global object cache for all zones for type TObject
TZone | The zone to reset |
GlobalObject<TObject>::Reset<1>();
|
inlinestatic |
Resets the global object cache for all zones for type TObject
GlobalObject<TObject>::Reset();