gsystem
Loading...
Searching...
No Matches
GSystemDynamicFactory Class Referenceabstract

Optional plugin interface for dynamically-loaded system factories. More...

#include <systemDynamicFactory.h>

Public Member Functions

virtual void loadSystem (GSystem *s, int verbosity)=0
 Load a system with an explicit verbosity.
virtual ~GSystemDynamicFactory ()=default
Public Member Functions inherited from GBase< GSystemDynamicFactory >
 GBase (const std::shared_ptr< GOptions > &gopt, std::string logger_name="")
virtual ~GBase ()
GBaseoperator= (const GBase &)=default

Static Public Member Functions

static GSystemDynamicFactoryinstantiate (const dlhandle h, std::shared_ptr< GOptions > g)
 Instantiate a dynamic factory from a shared-library handle.

Additional Inherited Members

Protected Attributes inherited from GBase< GSystemDynamicFactory >
std::shared_ptr< GLoggerlog

Detailed Description

This interface is currently retained as a future extension point: it defines the minimal API contract that a dynamically-loaded factory would expose.

Plugin contract:

  • A shared library exports an extern "C" symbol named "GSystemDynamicFactory".
  • That symbol is a function returning a GSystemDynamicFactory* and taking std::shared_ptr<GOptions> as argument.

The helper instantiate() locates the symbol using dlsym and invokes it.

Note
This header intentionally uses for external dynamic-link concepts.

Definition at line 27 of file systemDynamicFactory.h.

Constructor & Destructor Documentation

◆ ~GSystemDynamicFactory()

virtual GSystemDynamicFactory::~GSystemDynamicFactory ( )
virtualdefault

Member Function Documentation

◆ instantiate()

GSystemDynamicFactory * GSystemDynamicFactory::instantiate ( const dlhandle h,
std::shared_ptr< GOptions > g )
inlinestatic
Parameters
hDynamic library handle (dlopen-style).
gShared options/configuration instance.
Returns
Factory instance pointer, or nullptr if the symbol is missing.

The symbol must be named exactly "GSystemDynamicFactory" and must match the expected signature.

Definition at line 50 of file systemDynamicFactory.h.

◆ loadSystem()

virtual void GSystemDynamicFactory::loadSystem ( GSystem * s,
int verbosity )
pure virtual
Parameters
sTarget system to populate.
verbosityVerbosity level (factory-specific interpretation).

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