- Main Page
- Namespaces
- Classes
- Files
- Related Pages

- Namespace List
- Namespace Members

# Mers::Utils::Lang::FactoryOps Namespace Reference

## Functions
template<class t_Object, typename t_NameMap>
const std::type_info * | supportName (const char *className, t_NameMap &typeNames)
template<typename t_NameMap>
void | unsupportNames (const std::type_info *objectType, t_NameMap &typeNames)
template<class t_Object, typename t_NameMap, typename t_Map, typename t_Constructor>
void | supportHelper (const char *className, t_NameMap &typeNames, t_Map &constructors)
template<typename t_NameMap, typename t_Map>
void | unsupportHelper (const std::type_info *objectType, t_NameMap &typeNames, t_Map &constructors)

## Function Documentation

template<class t_Object, typename t_NameMap, typename t_Map, typename t_Constructor>

void Mers::Utils::Lang::FactoryOps::supportHelper | ( | const char * | className,
|  | t_NameMap & | typeNames,
|  | t_Map & | constructors |
| ) |  |  |

This helper function standardizes the code to add constructor support. Adds the ability to construct this object type to this factory. The object will be constructed either by type or by name. Since rtti names are not standard, the name provided allows the user to standardize the name of the class.

Parameters:

  | className | the name under which the t_Object class should be registered.

Definition at line 96 of file Factory.h.

template<class t_Object, typename t_NameMap>

const std::type_info* Mers::Utils::Lang::FactoryOps::supportName | ( | const char * | className,
|  | t_NameMap & | typeNames |
| ) |  |  |

Adds the ability to find an object type_id by name to this factory.

Parameters:

  | className | the name under which the t_Object class should be registered.

Definition at line 43 of file Factory.h.

template<typename t_NameMap, typename t_Map>

void Mers::Utils::Lang::FactoryOps::unsupportHelper | ( | const std::type_info * | objectType,
|  | t_NameMap & | typeNames,
|  | t_Map & | constructors |
| ) |  |  |

This helper function standardizes the code to remove constructor support. Removes support for constructing the specified object type under any name.

Parameters:

  | objectType | The type of object for which support is removed.

Definition at line 117 of file Factory.h.

References unsupportNames().

Here is the call graph for this function:

template<typename t_NameMap>

void Mers::Utils::Lang::FactoryOps::unsupportNames | ( | const std::type_info * | objectType,
|  | t_NameMap & | typeNames |
| ) |  |  |

Removes support for looking up the specified object type under any name.

Parameters:

  | objectType | The type of object for which support is removed.

Definition at line 64 of file Factory.h.

Referenced by unsupportHelper().