casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Attributes
casa::EclecticFunctionFactory< T > Class Template Reference

#include <EclecticFunctionFactory.h>

Inheritance diagram for casa::EclecticFunctionFactory< T >:
casa::FunctionFactory< T >

List of all members.

Public Member Functions

 EclecticFunctionFactory ()
 create an empty EclecticFunctionFactory
 EclecticFunctionFactory (const EclecticFunctionFactory &factory)
 create a shallow copy of another EclecticFunctionFactory
virtual ~EclecticFunctionFactory ()
 delete this EclecticFunctionFactory.
virtual Function< T > * create (const Record &) const throw (FunctionFactoryError)
 create the Function object described in the given Record.
void addFactory (const String &type, FunctionFactory< T > *factory, Bool own=True)
 add a factory for creating a specific type of function, associating it with a given "functype" name.
Int ndefined ()
 return the number of factories that have been loaded thus far.
Bool isDefined (const String &type)
 return True if a factory with a given "functype" name has been loaded.
EclecticFunctionFactoryoperator= (const EclecticFunctionFactory &factory)
 a shallow assignment operator

Private Attributes

OrderedMap< String,
OrderedPair< FunctionFactory
< T > *, Bool > > 
lookup

Detailed Description

template<class T>
class casa::EclecticFunctionFactory< T >

Intended use:

Public interface

 <h3>Review Status</h3><dl><dt>Date Reviewed:<dd>yyyy/mm/dd</dl> 

Prerequisite

Etymology

This class is based on the Factory pattern, similar to the ApplicationObjectFactory

Synopsis

Example

Motivation

Template Type Argument Requirements (T)

Thrown Exceptions

To Do

Definition at line 108 of file EclecticFunctionFactory.h.


Constructor & Destructor Documentation

create an empty EclecticFunctionFactory

template<class T >
casa::EclecticFunctionFactory< T >::EclecticFunctionFactory ( const EclecticFunctionFactory< T > &  factory)

create a shallow copy of another EclecticFunctionFactory

template<class T >
virtual casa::EclecticFunctionFactory< T >::~EclecticFunctionFactory ( ) [virtual]

delete this EclecticFunctionFactory.

Those specific factories added via addFactory() with own=True will be deleted.


Member Function Documentation

template<class T >
void casa::EclecticFunctionFactory< T >::addFactory ( const String type,
FunctionFactory< T > *  factory,
Bool  own = True 
)

add a factory for creating a specific type of function, associating it with a given "functype" name.

template<class T >
virtual Function<T>* casa::EclecticFunctionFactory< T >::create ( const Record ) const throw (FunctionFactoryError) [virtual]

create the Function object described in the given Record.

This implementation will use the value of the "functype" field to lookup the specific factory to use to create the function. That is, the the "functype" value will be matched against the type names loaded via addFactory().

Implements casa::FunctionFactory< T >.

template<class T >
Bool casa::EclecticFunctionFactory< T >::isDefined ( const String type) [inline]

return True if a factory with a given "functype" name has been loaded.

Definition at line 140 of file EclecticFunctionFactory.h.

References casa::Map< key, value >::isDefined(), and casa::EclecticFunctionFactory< T >::lookup.

template<class T >
Int casa::EclecticFunctionFactory< T >::ndefined ( ) [inline]

return the number of factories that have been loaded thus far.

Definition at line 136 of file EclecticFunctionFactory.h.

References casa::EclecticFunctionFactory< T >::lookup, and casa::Map< key, value >::ndefined().

template<class T >
EclecticFunctionFactory& casa::EclecticFunctionFactory< T >::operator= ( const EclecticFunctionFactory< T > &  factory)

a shallow assignment operator


Member Data Documentation


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