Lumiera  0.pre.03
»edityourfreedom«
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Fab< SIG, ID > Struct Template Reference

#include "lib/multifact.hpp"

Description

template<typename SIG, typename ID>
struct lib::factory::Fab< SIG, ID >

Table of registered production functions for MultiFact.

Each stored function can be accessed by ID and is able to fabricate a specific object, which is assignable to the nominal target type in the MultiFact definition.

Definition at line 177 of file multifact.hpp.

Public Types

typedef std::function< SIG > FactoryFunc
 

Public Member Functions

bool contains (ID id) const
 
void defineProduction (ID const &id, FactoryFunc fun)
 
bool empty () const
 
FactoryFuncselect (ID const &id)
 

Private Attributes

std::map< ID, FactoryFuncproducerTable_
 

Member Typedef Documentation

typedef std::function<SIG> FactoryFunc

Definition at line 179 of file multifact.hpp.

Member Function Documentation

FactoryFunc& select ( ID const &  id)
inline

Definition at line 183 of file multifact.hpp.

Referenced by MultiFact< SIG, ID, Wrapper >::selectProducer().

+ Here is the caller graph for this function:

void defineProduction ( ID const &  id,
FactoryFunc  fun 
)
inline

Definition at line 192 of file multifact.hpp.

Referenced by MultiFact< SIG, ID, Wrapper >::defineProduction().

+ Here is the caller graph for this function:

bool empty ( ) const
inline

Definition at line 200 of file multifact.hpp.

Referenced by MultiFact< SIG, ID, Wrapper >::empty().

+ Here is the caller graph for this function:

bool contains ( ID  id) const
inline

Definition at line 201 of file multifact.hpp.

Referenced by MultiFact< SIG, ID, Wrapper >::contains(), and Fab< SIG_Fab, ID >::select().

+ Here is the caller graph for this function:

Member Data Documentation

+ Inheritance diagram for Fab< SIG, ID >:
+ Collaboration diagram for Fab< SIG, ID >:

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