gramods
Classes | Static Public Member Functions | Friends | List of all members
gramods::gmCore::OFactory Class Reference

This is an object factory for classes with Object as base type, instantiating them by name and calling their registered setters based on configuration XML DOM data. More...

#include <OFactory.hh>

Classes

struct  ObjectCreator
 Actual object creator, templated for the type to instantiate. More...
 
struct  OFactoryInformation
 Registrator of information required by the object factory. More...
 
struct  ParamSetter
 General parameter setter, templated to determine the type to set value for. More...
 
struct  ParamSetter< Node, bool >
 Specialization parameter setter for bool type, to allow named states, such as "on" and "true". More...
 
struct  ParamSetter< Node, std::filesystem::path >
 Specialization parameter setter for std::filesystem::path type, to avoid tokenization of paths with white space. More...
 
struct  ParamSetter< Node, std::string >
 Specialization parameter setter for string type, to avoid tokenization of strings with white space. More...
 
struct  ParamSetterInsert
 Convenience class that registers a parameter setter upon instantiation. More...
 
struct  PointerSetter
 General pointer setter, templated to determine the type of the pointer. More...
 
struct  PointerSetterInsert
 Convenience class that registers a pointer setter upon instantiation. More...
 

Static Public Member Functions

static ObjectcreateObject (std::string name)
 Creates and returns an instance of the class associated with the provided name, or NULL if no such name exists in the database. More...
 

Friends

struct OFactoryInformation
 
class Configuration
 

Detailed Description

This is an object factory for classes with Object as base type, instantiating them by name and calling their registered setters based on configuration XML DOM data.

The following macros are useful for correctly setting up a class and its members for use with OFactory.

Member Function Documentation

◆ createObject()

Object * gramods::gmCore::OFactory::createObject ( std::string  name)
static

Creates and returns an instance of the class associated with the provided name, or NULL if no such name exists in the database.


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