Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://www.atnf.csiro.au/computing/software/casacore/casacore-1.2.0/doc/html/classcasa_1_1EclecticFunctionFactory.html
Дата изменения: Unknown Дата индексирования: Mon Feb 14 23:47:35 2011 Кодировка: Поисковые слова: mars polar lander |
#include <EclecticFunctionFactory.h>
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. | |
EclecticFunctionFactory & | operator= (const EclecticFunctionFactory &factory) |
a shallow assignment operator | |
Private Attributes | |
OrderedMap< String, OrderedPair< FunctionFactory < T > *, Bool > > | lookup |
Public interface
This class is based on the Factory pattern, similar to the ApplicationObjectFactory
Definition at line 107 of file EclecticFunctionFactory.h.
casa::EclecticFunctionFactory< T >::EclecticFunctionFactory | ( | ) |
create an empty EclecticFunctionFactory
casa::EclecticFunctionFactory< T >::EclecticFunctionFactory | ( | const EclecticFunctionFactory< T > & | factory | ) |
create a shallow copy of another EclecticFunctionFactory
virtual casa::EclecticFunctionFactory< T >::~EclecticFunctionFactory | ( | ) | [virtual] |
delete this EclecticFunctionFactory.
Those specific factories added via addFactory() with own=True will be deleted.
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.
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 >.
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 139 of file EclecticFunctionFactory.h.
References casa::Map< key, value >::isDefined(), and casa::EclecticFunctionFactory< T >::lookup.
Int casa::EclecticFunctionFactory< T >::ndefined | ( | ) | [inline] |
return the number of factories that have been loaded thus far.
Definition at line 135 of file EclecticFunctionFactory.h.
References casa::EclecticFunctionFactory< T >::lookup, and casa::Map< key, value >::ndefined().
EclecticFunctionFactory& casa::EclecticFunctionFactory< T >::operator= | ( | const EclecticFunctionFactory< T > & | factory | ) |
a shallow assignment operator
OrderedMap<String, OrderedPair<FunctionFactory<T>*, Bool> > casa::EclecticFunctionFactory< T >::lookup [private] |
Definition at line 147 of file EclecticFunctionFactory.h.
Referenced by casa::EclecticFunctionFactory< T >::isDefined(), and casa::EclecticFunctionFactory< T >::ndefined().