gfactory
Loading...
Searching...
No Matches
gfactory.h File Reference

Generic factory/manager for GEMC plugin objects. More...

#include <memory>
#include <string>
#include <string_view>
#include <unordered_map>
#include "gdl.h"
#include "gbase.h"
#include "gfactory_options.h"
Include dependency graph for gfactory.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

class  GFactoryBase
 Type-erased factory interface used by GManager. More...
 
class  GFactory< T >
 Concrete factory that creates objects of type T. More...
 
class  GManager
 Factory registry and dynamic-library manager for run-time creation of plugin objects. More...
 

Detailed Description

This header provides a small, type-erased factory system that supports:

  • Static factories: register a C++ type and instantiate it by name.
  • Dynamic factories: load a shared library and instantiate an object via a well-known symbol.

The core entry point is GManager.

Definition in file gfactory.h.