Mirror reflection library 0.5.13

mirror::factory< Manufacturer, Suppliers, Enumerator, SourceTraits, Product > Class Template Reference

Class template for generation of object factories. More...

#include <mirror/factory.hpp>

Inherits aux::base_factory< Manufacturer, Suppliers, Enumerator, SourceTraits, Product, constructors< meta_class< Product > >::type, mp::make_index_seq< mp::size< constructors< meta_class< Product > > >::type >::type, is_specialized_factory_src< Manufacturer< Product, SourceTraits > >::type >.

List of all members.

Public Member Functions

template<typename Param >
 factory (Param param)
template<typename Param , class ConstructionInfo >
 factory (Param param, ConstructionInfo)
template<typename Param , class... Items>
 factory (Param param, mp::range< Items...> context)

Detailed Description

template<template< class, class > class Manufacturer, template< class, class > class Suppliers, template< class, class > class Enumerator, class SourceTraits, typename Product>
class mirror::factory< Manufacturer, Suppliers, Enumerator, SourceTraits, Product >

Class template for generation of object factories.

This template can be used to create a custom factory class that uses the registered meta-data about constructors and two user-specified templates to select which of the constructors to use to create an instance and to supply the necessary parameters if necessary.

Template Parameters:
Manufacturera class template which knows how to construct the parametes for the constructors. this template can for example use this factory template recursivelly for elaborated types and specify how to construct and initialize instances of the native C++ types.
Suppliersa class template which knows how to get existing instances to be supplied as parameters to the constructors.
Enumeratora class template which knows how to get enumerated values from external representations, like their names or values.
SourceTraitsA parameter for the Manufacturer and Suppliers templates, which can be used for further configuration and fine-tuning of the generated factory.
Productthe type instances of which are produced by this factory
See also:
factory_maker
Examples:

mirror/example/factories/random_tetrahedron.cpp.


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

Copyright © 2006-2011 Matus Chochlik, University of Zilina, Zilina, Slovakia.
<matus.chochlik -at- fri.uniza.sk>
<chochlik -at -gmail.com>
Documentation generated on Fri Dec 16 2011 by Doxygen (version 1.7.3).
Important note: Although the 'boostified' version of Mirror uses the Boost C++ libraries Coding Guidelines and is implemented inside of the boost namespace, it IS NOT an officially reviewed and accepted Boost library. Mirror is being developed with the intention to be submitted for review for inclusion to the Boost C++ libraries.