A small, lightweight cpp library (still in process) which implements easy-to-use classes for the most common design patterns.
// Create factory
CFactory<
Factory<Anything, AnythingA, AnythingB>,
Something, SomethingA, SomethingB
> cFac;
// Create a factory pointer (for the client)
Factory<Anything, AnythingA, AnythingB>* cFacPtr = &cFac;
// Use the factory pointer
Anything* myA = cFacPtr->Make<Anything>();
AnythingA* myAa = cFacPtr->Make<AnythingA>();
AnythingB* myAb = cFacPtr->Make<AnythingB>();
You can find everything at one place at the demo files.
- Abstract Factory
Hopefully, a lot of common patterns (The development is just beginning). Issues and Pull requests are welcome!
You may take a look at the wikipedia article: https://en.wikipedia.org/wiki/Design_Patterns
This repository is licensed under the MIT license. Take a look at the LICENSE file for more information.