Accelerated Computation Engine
Public Member Functions | Static Public Member Functions | List of all members
EAbstractDataFactory Class Referenceabstract

#include <eabstractdatafactory.h>

Public Member Functions

virtual quint16 size () const =0
 
virtual QString name (quint16 type) const =0
 
virtual QString fileExtension (quint16 type) const =0
 
virtual std::unique_ptr< EAbstractDatamake (quint16 type) const =0
 
virtual ~EAbstractDataFactory ()=default
 

Static Public Member Functions

static EAbstractDataFactoryinstance ()
 
static void setInstance (std::unique_ptr< EAbstractDataFactory > &&instance)
 

Detailed Description

This represents the factory for producing new abstract data objects. This also gives basic information that allows ACE to query and figure out all available data types the program that uses the ACE library provides. If a program wishes to be backwards compatible any previously defined data types must maintain the same unique integer that identifies them.

Constructor & Destructor Documentation

◆ ~EAbstractDataFactory()

virtual EAbstractDataFactory::~EAbstractDataFactory ( )
virtualdefault

This is so any implementation of this class will be deconstructed correctly.

Member Function Documentation

◆ fileExtension()

virtual QString EAbstractDataFactory::fileExtension ( quint16  type) const
pure virtual

This interface returns the file extension for the given data type as a string.

Parameters
typeThe data type whose file extension is returned.
Returns
File extension for the given data type.

◆ instance()

EAbstractDataFactory & EAbstractDataFactory::instance ( )
static

Returns a reference to the global instance of the class that implements this factory. If no instance has ever been set than an exception is thrown.

Returns
Reference to the global instance of this object's implementation.

◆ make()

virtual std::unique_ptr<EAbstractData> EAbstractDataFactory::make ( quint16  type) const
pure virtual

This interface makes and returns a new abstract data object of the given type.

Parameters
typeThe data type of the abstract data object that is made and returned.
Returns
Pointer to the new abstract data object of the given type.

◆ name()

virtual QString EAbstractDataFactory::name ( quint16  type) const
pure virtual

This interface returns the display name for the given data type.

Parameters
typeThe data type whose display name is returned.
Returns
Display name for the given data type.

◆ setInstance()

void EAbstractDataFactory::setInstance ( std::unique_ptr< EAbstractDataFactory > &&  instance)
static

Sets the global instance for this object's implementation. If a global instance already exists then it is deleted and replaced with the new one given.

Parameters
instancePointer to the new global instance for this factory.

◆ size()

virtual quint16 EAbstractDataFactory::size ( ) const
pure virtual

This interface returns the total number of data types a program that uses ACE implements. All integers from 0 to one less than the size returned must be defined as a unique data type.

Returns
Total number of data types this program implements.

The documentation for this class was generated from the following files: