|
gfactory
|
Concrete factory that creates objects of type T.
More...
#include <gfactory.h>
Public Member Functions | |
| GFactory (const std::shared_ptr< GOptions > &gopts) | |
| Construct a factory bound to a specific configuration/options instance. | |
| void * | Create () override |
Allocate a new instance of T. | |
Public Member Functions inherited from GFactoryBase | |
| virtual | ~GFactoryBase ()=default |
| Virtual destructor for safe deletion through base pointer. | |
This factory assumes that T can be constructed from const std::shared_ptr<GOptions>&. The options object is captured at factory construction time and forwarded during instantiation.
| T | Concrete type to allocate with new T(...). |
Definition at line 65 of file gfactory.h.
|
inlineexplicit |
| gopts | Shared options/configuration object forwarded to each constructed instance. |
Definition at line 75 of file gfactory.h.
|
inlineoverridevirtual |
void* (caller owns it). Implements GFactoryBase.
Definition at line 85 of file gfactory.h.