rutz::factory_base Class Reference

Non-template helper class for rutz::factory. More...

#include <rutz/factory.h>

Collaboration diagram for rutz::factory_base:
Collaboration graph
[legend]

List of all members.

Public Types

typedef void( fallback_t )(const rutz::fstring &)

Public Member Functions

 factory_base () throw ()
 Default constructor sets the fallback to null.
virtual ~factory_base () throw ()
 Virtual no-throw destructor for proper inheritance.
void set_fallback (rutz::shared_ptr< factory_fallback > f)
 Change the fallback object.
void set_fallback (fallback_t *fptr)
 Change the fallback function.
void try_fallback (const rutz::fstring &key) const
 Try running the fallback function for the given key.

Detailed Description

Non-template helper class for rutz::factory.

Definition at line 115 of file factory.h.


Constructor & Destructor Documentation

rutz::factory_base::factory_base (  )  throw ()

Default constructor sets the fallback to null.

Definition at line 71 of file factory.cc.

rutz::factory_base::~factory_base (  )  throw () [virtual]

Virtual no-throw destructor for proper inheritance.

Definition at line 78 of file factory.cc.


Member Function Documentation

void rutz::factory_base::set_fallback ( fallback_t *  fptr  ) 

Change the fallback function.

Definition at line 90 of file factory.cc.

References rutz::make_shared().

void rutz::factory_base::set_fallback ( rutz::shared_ptr< factory_fallback f  ) 

Change the fallback object.

Definition at line 83 of file factory.cc.

Referenced by rutz::factory< nub::ref< P > >::set_fallback().

void rutz::factory_base::try_fallback ( const rutz::fstring key  )  const

Try running the fallback function for the given key.

Definition at line 96 of file factory.cc.

References rutz::shared_ptr< T >::get().

Referenced by rutz::factory< nub::ref< P > >::find_creator().


The documentation for this class was generated from the following files:
Generated on Sun May 8 08:44:43 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3