casacore::EclecticFunctionFactory< T > Class Template Reference

#include <EclecticFunctionFactory.h>

Inheritance diagram for casacore::EclecticFunctionFactory< T >:
casacore::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 casacore::EclecticFunctionFactory< T >

Intended use:

Public interface

Review Status

Date Reviewed:
yyyy/mm/dd

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 109 of file EclecticFunctionFactory.h.


Constructor & Destructor Documentation

create an empty EclecticFunctionFactory

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

create a shallow copy of another EclecticFunctionFactory

template<class T >
virtual casacore::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 casacore::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>* casacore::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 casacore::FunctionFactory< T >.

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

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

Definition at line 141 of file EclecticFunctionFactory.h.

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

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

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

Definition at line 137 of file EclecticFunctionFactory.h.

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

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

a shallow assignment operator

Reimplemented from casacore::FunctionFactory< T >.


Member Data Documentation


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1