casa
5.7.0-16
|
#include <EclecticFunctionFactory.h>
Public Member Functions | |
EclecticFunctionFactory () | |
create an empty EclecticFunctionFactory More... | |
EclecticFunctionFactory (const EclecticFunctionFactory &factory) | |
create a shallow copy of another EclecticFunctionFactory More... | |
virtual | ~EclecticFunctionFactory () |
delete this EclecticFunctionFactory. More... | |
virtual Function< T > * | create (const Record &) const throw (FunctionFactoryError) |
create the Function object described in the given Record. More... | |
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. More... | |
Int | ndefined () |
return the number of factories that have been loaded thus far. More... | |
Bool | isDefined (const String &type) |
return True if a factory with a given "functype" name has been loaded. More... | |
EclecticFunctionFactory & | operator= (const EclecticFunctionFactory &factory) |
a shallow assignment operator More... | |
Public Member Functions inherited from casacore::FunctionFactory< T > | |
FunctionFactory () | |
FunctionFactory (const FunctionFactory< T > &factory) | |
virtual | ~FunctionFactory () |
FunctionFactory< T > & | operator= (const FunctionFactory< T > &factory) |
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 109 of file EclecticFunctionFactory.h.
casacore::EclecticFunctionFactory< T >::EclecticFunctionFactory | ( | ) |
create an empty EclecticFunctionFactory
casacore::EclecticFunctionFactory< T >::EclecticFunctionFactory | ( | const EclecticFunctionFactory< T > & | factory | ) |
create a shallow copy of another EclecticFunctionFactory
|
virtual |
delete this EclecticFunctionFactory.
Those specific factories added via addFactory() with own=True will be deleted.
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.
|
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 >.
|
inline |
return True if a factory with a given "functype" name has been loaded.
Definition at line 141 of file EclecticFunctionFactory.h.
References casacore::EclecticFunctionFactory< T >::lookup.
|
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.
EclecticFunctionFactory& casacore::EclecticFunctionFactory< T >::operator= | ( | const EclecticFunctionFactory< T > & | factory | ) |
a shallow assignment operator
|
private |
Definition at line 149 of file EclecticFunctionFactory.h.
Referenced by casacore::EclecticFunctionFactory< T >::isDefined(), and casacore::EclecticFunctionFactory< T >::ndefined().