v0.3.0
Add Factory
class for 👴 style factory things.
Changes
- adds
Factory
- updates docs
- updates tests
Usage
- Add
CppFactory.hpp
to your project (either an include directory, or directly in the project) - Include
CppFactory.hpp
- (optional, otherwise prefix classes) add
using namespace CppFactory
- Use
Object<Type>::Get()
to allocate objects - (optional) use
Object<Type>::RegisterAllocator()
to define a custom allocator for a type - (optional) use
GlobalObject<Type>::Get()
to re-use the same object over and over - (optional) use
[Global]Object<Type>::Get<int>()
to scope allocations by an arbitraryint
(zones)