Lumiera  0.pre.03
»edityourfreedom«
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

◆ FactoryFunc

typedef std::function<SIG> FactoryFunc

Definition at line 179 of file multifact.hpp.

Member Function Documentation

◆ select()

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:

◆ defineProduction()

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:

◆ empty()

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:

◆ contains()

bool contains ( ID  id) const
inline

Definition at line 201 of file multifact.hpp.

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

+ Here is the caller graph for this function:

Member Data Documentation

◆ producerTable_

std::map<ID, FactoryFunc> producerTable_
private

Definition at line 204 of file multifact.hpp.

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

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