Mirror reflection library 0.5.13

mirror::Manufacturer< void, SourceTraits > Struct Template Reference

Manager is reponsible for the selection of the constructor to be used. More...

#include <mirror/doc/concepts_fact_gen.hpp>

List of all members.

Public Member Functions

 Suppliers (UnspecifiedType parent_data, ConstructionInfo construction_info)
 Constructor.
void finish (UnspecifiedType parent_data)
 Post construction finishing of the Manager.
UnspecifiedType add_constructor (UnspecifiedType parent_data, ConstructorInfo constructor_info)
 This gets called once per every manager constructor of Product.
int index (void)
 Returns the index of the constructor to be used.

Detailed Description

template<typename SourceTraits>
struct mirror::Manufacturer< void, SourceTraits >

Manager is reponsible for the selection of the constructor to be used.

This overload of the Manufacturer template is also call the Manager since its role is to keep track of the available constructors and to pick one of them based on the input data or on user preference. Manager has therfore a different interface than a regular Manufacturer.


Member Function Documentation

template<typename SourceTraits >
UnspecifiedType mirror::Manufacturer< void, SourceTraits >::add_constructor ( UnspecifiedType  parent_data,
ConstructorInfo  constructor_info 
)

This gets called once per every manager constructor of Product.

The factory calls this member function once per every constructor of the Product type. The manager is responsible for storing necessary meta-data about the constructor in order to be able to pick one later when the index() member function is called.

The return value is data of factory-plugin-specific type that will be passed as an argument to nested Manufacturer or Suppliers.

The constructors can be enumerated either forward or backward the enum_info argument can provide hints about the direction of the traversal or enumeration.

template<typename SourceTraits >
void mirror::Manufacturer< void, SourceTraits >::finish ( UnspecifiedType  parent_data)

Post construction finishing of the Manager.

Some factories may need additional post-construction finishing when the sources for all parameters and the Manager is created. Such post-construction finishing can be done here.


The documentation for this struct 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.