|
gfactory
|
Example dynamically-loadable Car implementation.
More...
#include <TeslaFactory.h>
Public Member Functions | |
| Tesla (const std::shared_ptr< GOptions > &gopts) | |
| Construct and initialize the Tesla plugin. | |
| void | go () |
| Example behavior for the Tesla 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 | autopilot [2][2] |
| Example Tesla-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 plugin demonstrates:
autopilot),CarFactory symbol. Definition at line 14 of file TeslaFactory.h.
| Tesla::Tesla | ( | const std::shared_ptr< GOptions > & | gopts | ) |
| gopts | Options/configuration shared with the application. |
Definition at line 21 of file TeslaFactory.cc.
|
inlineexplicit |
|
virtual |
Prints internal autopilot state and base-class state to demonstrate correctness.
Implements Car.
Definition at line 8 of file TeslaFactory.cc.
| double Tesla::autopilot[2][2] |
Filled by the constructor and printed in go().
Definition at line 39 of file TeslaFactory.h.