|
gfactory
|
Example dynamically-loadable Car implementation.
More...
#include <FordFactory.h>
Public Member Functions | |
| Ford (const std::shared_ptr< GOptions > &gopts) | |
| Construct and initialize example state. | |
| void | go () |
| Example behavior for the Ford plugin. | |
| Car (const std::shared_ptr< GOptions > &g) | |
| Inherit the base (const std::shared_ptr<GOptions>&) constructor. | |
Public Member Functions inherited from Car | |
| ~Car () override=default | |
| Virtual destructor for polymorphic deletion. | |
| Car (const std::shared_ptr< GOptions > &g) | |
| Construct the base with a shared options/configuration instance. | |
| void | set_loggers (const std::shared_ptr< GOptions > &g) |
| Wire loggers into the object. | |
Public Member Functions inherited from GBase< Car > | |
| GBase (const std::shared_ptr< GOptions > &gopt, std::string logger_name="") | |
| GBase (const std::shared_ptr< GLogger > &logger) | |
| GBase (const GBase &)=default | |
| GBase (GBase &&) noexcept=default | |
| virtual | ~GBase () |
| GBase & | operator= (const GBase &)=default |
| GBase & | operator= (GBase &&) noexcept=default |
Data Fields | |
| double | fordVar [2] {} |
| Example plugin-specific state. | |
Data Fields inherited from Car | |
| double | generalCarVar = 44 |
| Example data member shared by all derived cars. | |
Additional Inherited Members | |
Static Public Member Functions inherited from Car | |
| static Car * | instantiate (const dlhandle h, std::shared_ptr< GOptions > g) |
Resolve the plugin factory symbol and instantiate a derived Car. | |
Protected Attributes inherited from GBase< Car > | |
| std::shared_ptr< GLogger > | log |
This class lives in a plugin library and is instantiated through the exported extern "C" symbol CarFactory.
Definition at line 12 of file FordFactory.h.
| Ford::Ford | ( | const std::shared_ptr< GOptions > & | gopts | ) |
| gopts | Options/configuration shared with the application. |
Definition at line 12 of file FordFactory.cc.
|
inlineexplicit |
|
virtual |
The example prints out internal state to demonstrate the call path.
Implements Car.
Definition at line 8 of file FordFactory.cc.
| double Ford::fordVar[2] {} |
Initialized by the constructor and printed by go().
Definition at line 37 of file FordFactory.h.