Accelerated Computation Engine
Public Member Functions | Protected Member Functions | List of all members
EAbstractData Class Referenceabstract

#include <eabstractdata.h>

Inheritance diagram for EAbstractData:

Public Member Functions

virtual qint64 dataEnd () const =0
 
virtual void readData ()=0
 
virtual void writeNewData ()=0
 
virtual void finish ()
 
virtual QAbstractTableModel * model ()=0
 
template<class T >
const T * cast () const
 
template<class T >
T * cast ()
 

Protected Member Functions

const EMetadatasystemMeta () const
 
const EMetadatameta () const
 
void setMeta (const EMetadata &newMeta)
 
const EDataStreamstream () const
 
EDataStreamstream ()
 
void seek (qint64 index) const
 
void allocate (qint64 size)
 

Detailed Description

This represents a data object for the ACE system. Implementations of this class are responsible for managing a data type for a program using the ACE library. Implementations can also manipulate the user metadata of its data object. All functionality is provided through protected methods. If an already existing data object is opened only the read data interface is called. If it is a new data object then the write new data and finish interfaces are called in that order. Data object files are organized into three parts; the header, data, and user metadata in that order. An implementation of this class is responsible for the data section.

Member Function Documentation

◆ allocate()

void EAbstractData::allocate ( qint64  size)
protected

Allocates the given number of bytes after this data object's cursor position to the underlying file. This means if the given size to allocate is less then the current number of bytes after this data object's cursor position then the underlying file will be truncated to the smaller size.

Parameters
sizeThe number of bytes to allocate after this object's current cursor position.

◆ cast() [1/2]

template<class T >
const T * EAbstractData::cast ( ) const

Casts this abstract data object into another constant class type.

Template Parameters
TThe type this abstract block is being cast to. This should be this block's implementation type.
Returns
Cast constant pointer to this object.

◆ cast() [2/2]

template<class T >
T * EAbstractData::cast ( )

Casts this abstract data object into another class type.

Template Parameters
TThe type this abstract block is being cast to. This should be this block's implementation type.
Returns
Cast pointer to this object.

◆ dataEnd()

virtual qint64 EAbstractData::dataEnd ( ) const
pure virtual

This interface returns the index within this data object after the end of where the data is stored. This is used to determine where the user metadata is written since it comes after the data section of the data object.

Returns
Index of the first byte in the data object after the data section ends.

◆ finish()

void EAbstractData::finish ( )
virtual

This interface finalizes this data object's data after the analytic that created it has finished giving it new data. The default implementation does nothing.

◆ meta()

const EMetadata & EAbstractData::meta ( ) const
protected

Returns the root metadata object for this data object's user metadata.

Returns
Root metadata object for this data object's user metadata.

◆ model()

virtual QAbstractTableModel* EAbstractData::model ( )
pure virtual

This interface returns a qt table model that represents the data of this data object as a table.

Returns
Pointer to model that represents the data of this data object.

◆ readData()

virtual void EAbstractData::readData ( )
pure virtual

This interface reads in the data of an existing data object that was just opened.

◆ seek()

void EAbstractData::seek ( qint64  index) const
protected

Changes the cursor position of this data object to the given index. The cursor position does not include the header of this data object which is hidden so index 0 is one byte after the header section.

Parameters
indexThe index this data object's cursor position is set to.

◆ setMeta()

void EAbstractData::setMeta ( const EMetadata newMeta)
protected

Sets this data object's user metadata to the given metadata as its new root. The given metadata must be an object type or else an exception is thrown.

Parameters
newMetaNew root metadata object for this data object's user metadata.

◆ stream() [1/2]

const EDataStream & EAbstractData::stream ( ) const
protected

Returns a read only reference to the data stream of this data object.

Returns
Read only reference to this data object's data stream.

◆ stream() [2/2]

EDataStream & EAbstractData::stream ( )
protected

Returns a reference to the data stream of this data object.

Returns
Reference to this data object's data stream.

◆ systemMeta()

const EMetadata & EAbstractData::systemMeta ( ) const
protected

Returns the root metadata object for this data object's system metadata.

Returns
Root metadata object for this data object's system metadata.

◆ writeNewData()

virtual void EAbstractData::writeNewData ( )
pure virtual

This interface is called to initialize the data object's data to a null state.


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