code::Factory< X > Class Template Reference

List of all members.

Detailed Description

template<class X>
class code::Factory< X >

This class "introduces" new subclasses that have been created to the parent class.

This is necessary for clients of your class to obtain your class by invoking getReader, getFormatter, etc.

A subclass will have to be introduced to the rest of the system before it can interoperate with existing applications because all the existing applications use only getReader, getFormatter, etc. and can usually be extended by adding a std::string to their configuration.

Note that all the std::strings that get passed into Introducer are case-insensitive. "VIL" is the same as "vil" or "viL".

Author:
Lakshmanan
Version:
Id
code_Factory.h,v 1.19 2009/06/02 20:17:39 lakshman Exp


Static Public Member Functions

static void introduce (const std::string &name, SmartPtr< X > instance)
 Introduce new X to the rest of the system.
static bool exists (const std::string &name)
 Is this type known to the factory?
static SmartPtr< X > get (const std::string &name)
 This is meant to be used only by the class X, which normally will be a base-class type.


Member Function Documentation

template<class X>
static bool code::Factory< X >::exists ( const std::string &  name  )  [inline, static]

Is this type known to the factory?

template<class X>
static SmartPtr< X > code::Factory< X >::get ( const std::string &  name  )  [inline, static]

This is meant to be used only by the class X, which normally will be a base-class type.

template<class X>
static void code::Factory< X >::introduce ( const std::string &  name,
SmartPtr< X >  instance 
) [inline, static]

Introduce new X to the rest of the system.


Generated on Fri May 4 13:40:13 2012 for WDSS-IIw2 by  doxygen 1.4.7