gfactory
Loading...
Searching...
No Matches
Ford Class Reference

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 ()
 
GBaseoperator= (const GBase &)=default
 
GBaseoperator= (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 Carinstantiate (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< GLoggerlog
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ Ford()

Ford::Ford ( const std::shared_ptr< GOptions > & gopts)
Parameters
goptsOptions/configuration shared with the application.

Definition at line 12 of file FordFactory.cc.

Member Function Documentation

◆ Car()

Car::Car ( const std::shared_ptr< GOptions > & g)
inlineexplicit

Definition at line 32 of file Car.h.

◆ go()

void Ford::go ( )
virtual

The example prints out internal state to demonstrate the call path.

Implements Car.

Definition at line 8 of file FordFactory.cc.

Field Documentation

◆ fordVar

double Ford::fordVar[2] {}

Initialized by the constructor and printed by go().

Definition at line 37 of file FordFactory.h.


The documentation for this class was generated from the following files: