EclecticFunctionFactory.h

Classes

EclecticFunctionFactory --

(full description)


class EclecticFunctionFactory : public FunctionFactory<T>

Interface

Public Members
EclecticFunctionFactory()
EclecticFunctionFactory(const EclecticFunctionFactory& factory)
virtual ~EclecticFunctionFactory()
virtual Function<T> *create(const Record&) const throw(FunctionFactoryError)
void addFactory(const String& type, FunctionFactory<T> *factory, Bool own=True)
Int ndefined()
Bool isDefined(const String& type)
EclecticFunctionFactory& operator=(const EclecticFunctionFactory& factory)

Description

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

Member Description

EclecticFunctionFactory()

create an empty EclecticFunctionFactory

EclecticFunctionFactory(const EclecticFunctionFactory& factory)

create a shallow copy of another EclecticFunctionFactory

virtual ~EclecticFunctionFactory()

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

virtual Function<T> *create(const Record&) const throw(FunctionFactoryError)

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().

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