Workspace 6.21.5
Public Member Functions | Static Public Member Functions | List of all members
DerivedToBaseAdaptorFactory< D, B > Class Template Reference

A TypeAdaptorFactory class for an adaptor converting a derived class to a base class.

#include <Workspace/DataExecution/DataObjects/derivedtobaseadaptor.h>

Inheritance diagram for DerivedToBaseAdaptorFactory< D, B >:
[legend]

Public Member Functions

CSIRO_EXPORTSPEC TypeAdaptorcreate () const
 
CSIRO_EXPORTSPEC TypeAdaptorcreate () const
 
CSIRO_DATAANALYSIS_API TypeAdaptorcreate () const
 
TypeAdaptorcreate () const override
 
CSIRO_DATAANALYSIS_API void destroy (TypeAdaptor *a) const
 
void destroy (TypeAdaptor *a) const override
 
CSIRO_EXPORTSPEC void destroy (TypeAdaptor *adaptor) const
 
CSIRO_EXPORTSPEC void destroy (TypeAdaptor *adaptor) const
 
const DataFactorygetDestTypeFactory () const override
 
CSIRO_EXPORTSPEC const DerivedToBaseAdaptorFactory< CSIRO::DataAnalysis::ArrayNdEmpty, CSIRO::DataAnalysis::ArrayNd > & getInstance ()
 
CSIRO_EXPORTSPEC const DerivedToBaseAdaptorFactory< CSIRO::DataAnalysis::DiscreteNamedDimensionRangeFilter, CSIRO::DataAnalysis::NamedDimensionRangeFilter > & getInstance ()
 
CSIRO_DATAANALYSIS_API const DerivedToBaseAdaptorFactory< CSIRO::DataAnalysis::DiscreteNamedDimensionRangeFilter, CSIRO::DataAnalysis::NamedDimensionRangeFilter > & getInstance ()
 
CSIRO_EXPORTSPEC const Application::WorkspacePlugingetPlugin () const
 
CSIRO_EXPORTSPEC const Application::WorkspacePlugingetPlugin () const
 
CSIRO_DATAANALYSIS_API const Application::WorkspacePlugingetPlugin () const
 
const Application::WorkspacePlugingetPlugin () const override
 
DataFactorygetSrcTypeFactory () const override
 
- Public Member Functions inherited from TypeAdaptorFactory
virtual ~TypeAdaptorFactory ()=default
 
virtual TypeAdaptorcreate () const =0
 
virtual void destroy (TypeAdaptor *adaptor) const =0
 
virtual const DataFactorygetDestTypeFactory () const =0
 
virtual const Application::WorkspacePlugingetPlugin () const =0
 
virtual DataFactorygetSrcTypeFactory () const =0
 

Static Public Member Functions

static const DerivedToBaseAdaptorFactorygetInstance ()
 

Member Function Documentation

◆ create() [1/4]

CSIRO_EXPORTSPEC TypeAdaptor * create ( ) const
virtual
Returns
A new TypeAdaptor. Ownership is given to the caller, but the caller must use the destroy function to delete the operation. A valid object must be returned.

Most subclasses will simply use the C++ new operator to implement this function.

Implements TypeAdaptorFactory.

◆ create() [2/4]

CSIRO_EXPORTSPEC TypeAdaptor * create ( ) const
virtual
Returns
A new TypeAdaptor. Ownership is given to the caller, but the caller must use the destroy function to delete the operation. A valid object must be returned.

Most subclasses will simply use the C++ new operator to implement this function.

Implements TypeAdaptorFactory.

◆ create() [3/4]

CSIRO_DATAANALYSIS_API TypeAdaptor * create ( ) const
virtual
Returns
A new TypeAdaptor. Ownership is given to the caller, but the caller must use the destroy function to delete the operation. A valid object must be returned.

Most subclasses will simply use the C++ new operator to implement this function.

Implements TypeAdaptorFactory.

◆ create() [4/4]

TypeAdaptor * create ( ) const
overridevirtual
Returns
A new TypeAdaptor. Ownership is given to the caller, but the caller must use the destroy function to delete the operation. A valid object must be returned.

Most subclasses will simply use the C++ new operator to implement this function.

Implements TypeAdaptorFactory.

◆ destroy() [1/4]

CSIRO_DATAANALYSIS_API void destroy ( TypeAdaptor adaptor) const
virtual
Parameters
adaptorThe adaptor to destroy. It must have been created by a call to create().

Calling this function essentially gives back ownership of the adapter to the factory, but the expectation is that the adapter will be deleted. Most subclasses will simply use the C++ delete operator to implement this function.

Implements TypeAdaptorFactory.

◆ destroy() [2/4]

void destroy ( TypeAdaptor adaptor) const
overridevirtual
Parameters
adaptorThe adaptor to destroy. It must have been created by a call to create().

Calling this function essentially gives back ownership of the adapter to the factory, but the expectation is that the adapter will be deleted. Most subclasses will simply use the C++ delete operator to implement this function.

Implements TypeAdaptorFactory.

◆ destroy() [3/4]

CSIRO_EXPORTSPEC void destroy ( TypeAdaptor adaptor) const
virtual
Parameters
adaptorThe adaptor to destroy. It must have been created by a call to create().

Calling this function essentially gives back ownership of the adapter to the factory, but the expectation is that the adapter will be deleted. Most subclasses will simply use the C++ delete operator to implement this function.

Implements TypeAdaptorFactory.

◆ destroy() [4/4]

CSIRO_EXPORTSPEC void destroy ( TypeAdaptor adaptor) const
virtual
Parameters
adaptorThe adaptor to destroy. It must have been created by a call to create().

Calling this function essentially gives back ownership of the adapter to the factory, but the expectation is that the adapter will be deleted. Most subclasses will simply use the C++ delete operator to implement this function.

Implements TypeAdaptorFactory.

◆ getDestTypeFactory()

const DataFactory & getDestTypeFactory ( ) const
inlineoverridevirtual
Returns
An instance of the destination DataObject's DataFactory. This is used to ensure that any adaptions will be valid and to organise the items in the manager.

Implements TypeAdaptorFactory.

◆ getInstance() [1/4]

◆ getInstance() [2/4]

◆ getInstance() [3/4]

◆ getInstance() [4/4]

static const DerivedToBaseAdaptorFactory & getInstance ( )
static

◆ getPlugin() [1/4]

CSIRO_EXPORTSPEC const Application::WorkspacePlugin & getPlugin ( ) const
virtual
Returns
The plugin which this TypeAdaptorFactory comes from.

Implements TypeAdaptorFactory.

◆ getPlugin() [2/4]

CSIRO_EXPORTSPEC const Application::WorkspacePlugin & getPlugin ( ) const
virtual
Returns
The plugin which this TypeAdaptorFactory comes from.

Implements TypeAdaptorFactory.

◆ getPlugin() [3/4]

CSIRO_DATAANALYSIS_API const Application::WorkspacePlugin & getPlugin ( ) const
virtual
Returns
The plugin which this TypeAdaptorFactory comes from.

Implements TypeAdaptorFactory.

◆ getPlugin() [4/4]

const Application::WorkspacePlugin & getPlugin ( ) const
overridevirtual
Returns
The plugin which this TypeAdaptorFactory comes from.

Implements TypeAdaptorFactory.

◆ getSrcTypeFactory()

DataFactory & getSrcTypeFactory ( ) const
inlineoverridevirtual
Returns
An instance of the source DataObject's DataFactory. Note that this is a non-const instance because some clients will need to use it to add the adaptor factory to the source DataFactory's list of adaptors.

Implements TypeAdaptorFactory.