ObjectFactoryRegistry< AbstractClass, instance > Class Template Reference

Object factory registry. More...

`#include <factory.h>`

## Classes

class | FactoryNotFound

## Public Member Functions

void | RegisterFactory (const std::string &name, ObjectFactory< AbstractClass > *factory)
const ObjectFactory< AbstractClass > * | GetFactory (const char *name) const
AbstractClass * | CreateObject (const char *name) const
std::vector< std::string > | GetFactoryNames () const

## Static Public Member Functions

static ObjectFactoryRegistry< AbstractClass, instance > & | Registry (...)

## Detailed Description

template<class AbstractClass, int instance = 0>
class ObjectFactoryRegistry< AbstractClass, instance >

Object factory registry.

Template Parameters

  AbstractClass | Base class interface of the object
  instance | unique identifier

Definition at line 42 of file factory.h.

## Constructor & Destructor Documentation

## ~ObjectFactoryRegistry()

template<class AbstractClass , int instance = 0>

ObjectFactoryRegistry< AbstractClass, instance >::~ObjectFactoryRegistry | ( |  | ) |

inline

Definition at line 51 of file factory.h.

## Member Function Documentation

## RegisterFactory()

template<class AbstractClass , int instance = 0>

void ObjectFactoryRegistry< AbstractClass, instance >::RegisterFactory | ( | const std::string & | name,
|  | ObjectFactory< AbstractClass > * | factory
| ) |  |

inline

Definition at line 60 of file factory.h.

## GetFactory()

template<class AbstractClass , int instance = 0>

const ObjectFactory< AbstractClass > * ObjectFactoryRegistry< AbstractClass, instance >::GetFactory | ( | const char * | name | ) | const

inline

Definition at line 65 of file factory.h.

## CreateObject()

template<class AbstractClass , int instance = 0>

AbstractClass * ObjectFactoryRegistry< AbstractClass, instance >::CreateObject | ( | const char * | name | ) | const

inline

Definition at line 71 of file factory.h.

## GetFactoryNames()

template<class AbstractClass , int instance = 0>

std::vector< std::string > ObjectFactoryRegistry< AbstractClass, instance >::GetFactoryNames | ( |  | ) | const

inline

Definition at line 81 of file factory.h.

## Registry()

template<class AbstractClass , int instance>

ObjectFactoryRegistry< AbstractClass, instance > & ObjectFactoryRegistry< AbstractClass, instance >::Registry | ( |  | ... | ) |

static

Definition at line 99 of file factory.h.

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

- factory.h