GemaCoreLib
The GeMA Core library
Public Member Functions | Private Member Functions | Friends | List of all members
GmResultCellDataSrc Class Reference

A GmResultDataSrc class holding a cell value accessor. More...

#include <gmResultDataSrc.h>

Inheritance diagram for GmResultCellDataSrc:
Inheritance graph
[legend]
Collaboration diagram for GmResultCellDataSrc:
Collaboration graph
[legend]

Public Member Functions

 GmResultCellDataSrc (int trackId, GmCellAccessor *ac)
 Constructor.
 
virtual GmResultDataSrcType type () const
 See dimSplit() documentation on the base calss.
 
QVector< GmResultCellDataSrc * > dimensionSplit ()
 
- Public Member Functions inherited from GmResultAcDataSrc< GmCellAccessor >
 GmResultAcDataSrc (int trackId, GmCellAccessor *ac)
 Constructor.
 
virtual ~GmResultAcDataSrc ()
 Destructor.
 
virtual QString id () const
 
virtual QString description () const
 Returns the data src description, when available.
 
virtual Unit unit () const
 Returns the unit in which the data is expressed.
 
virtual bool isScalar () const
 Returns true if the accessor value is a scalar value or there is a dimensional filter.
 
virtual int dimSize () const
 Returns the accessor valueSize() adjusted by an optional dimension filter.
 
virtual int size () const
 Returns the dimension of the data src values, taking into account any applied transformations or dim filters. Equal to nlin() * ncol(). A size of zero means that this data src returns string values (valid only for attribute type). A value of -1 means that this object has not been fully initialised yet.
 
virtual int nlin () const
 The number of lines in the returned result, taking into account any applied transformations or dim filters. A size of zero means that this data src returns string values (valid only for attribute type). A value of -1 means that this object has not been fully initialised yet.
 
virtual int ncol () const
 The number of columns in the returned result, taking into account any applied transformations or dim filters. A size of zero means that this data src returns string values (valid only for attribute type). A value of -1 means that this object has not been fully initialised yet.
 
GmCellAccessorac () const
 Returns the associated accessor.
 
void setAc (GmCellAccessor *newAc)
 Updates the stored accessor, taking ownership of it. Used by GmFileIO for replacing an accessor by another one for the same data but different state.
 
- Public Member Functions inherited from GmResultAcDataSrcBase
 GmResultAcDataSrcBase (int trackId)
 Default constructor.
 
virtual ~GmResultAcDataSrcBase ()
 Destructor.
 
virtual int trackId () const
 Returns a numeric id for this data src (a value between 0 and the number of monitored data srcs in the model, or -1 if this data src is not monitored)
 
virtual QString alias () const
 Returns the data src "exported" id.
 
virtual QString formatStr () const
 How should dataSrc values be formated?
 
int history () const
 Returns the state accessed by this data src.
 
int dimFilter () const
 Returns the dimension filter value (-1 if there is no filter)
 
void setBasicData (int dim, const QString &alias, int history, GmInterpolatorType interpType, const QVariant &interpParam)
 Sets the values of the given basic object attributes.
 
void setFormatStr (const QString &formatStr)
 Sets the format string.
 
void setTransformationFunction (LuaFunction &tfunc, int nresLin, int nresCol)
 Sets the transformation function along with its result dimensions.
 
void setInterpolator (GmInterpolator *interp)
 Sets the configured interpolator for this data source. Takes ownership of the object.
 
- Public Member Functions inherited from GmResultDataSrcInfo
virtual ~GmResultDataSrcInfo ()
 Virtual destructor.
 

Private Member Functions

 GmResultCellDataSrc (const GmResultAcDataSrc< GmCellAccessor > *base)
 Special "copy" (gets a pointer and not a reference) constructor accessible by dimSplit() to duplicate the data src.
 

Friends

QVector< GmResultCellDataSrc * > GmResultAcDataSrc ()
 

Additional Inherited Members

- Public Types inherited from GmResultAcDataSrc< GmCellAccessor >
typedef GmCellAccessor AcType
 
- Protected Member Functions inherited from GmResultAcDataSrc< GmCellAccessor >
 GmResultAcDataSrc (const GmResultAcDataSrc< GmCellAccessor > *ptr)
 A private "copy" constructor geting a pointer instead of a reference that copies the contents of the given data src. The Ac is shared with the original pointer (that retains its ownership). Does NOT handle interpolators.
 
QVector< Result * > dimSplit ()
 Returns a vector with as many data srcs as dimensions. The first one will be the original data src with its dimension filter set to 0. The remaining will be copies, SHARING the SAME accessor (without ownership), and pointing to the other dimensions. Returns a vector with the current src unchanged if this data src already points to a scalar result. The template parameter defines the type of the (derived) copied data srcs. More...
 
- Protected Member Functions inherited from GmResultAcDataSrcBase
 Q_DISABLE_COPY (GmResultAcDataSrcBase)
 
 GmResultAcDataSrcBase (const GmResultAcDataSrcBase *ptr)
 A kind of "copy" constructor geting a pointer instead of a reference that copies the contents of the given data src. Does NOT handle interpolators. Needed to enable the GmResultAcDataSrc::dimSplit() implementation. More...
 
- Protected Attributes inherited from GmResultAcDataSrc< GmCellAccessor >
GmCellAccessor_ac
 The node data accessor.
 
bool _ownership
 Are we the owner of _ac? This can be false as a result of the dimSplit() operation.
 
- Protected Attributes inherited from GmResultAcDataSrcBase
int _trackId
 The numeric id for this data src (a value between 0 and the number of data srcs in the model)
 
QString _alias
 The name given to the "exported" data. Always filled (might be equal to id())
 
int _dim
 A "bound" dimension for returning a scalar when the data is multidimensional (-1 for returning all values)
 
QString _formatStr
 The format string for the data. Usually equal to the accessor format.
 
int _history
 The state accessed by this data src (0 = current state, 1 = previous, etc..)
 
GmInterpolatorType _interpType
 How do we interpolate data?
 
QVariant _interpParam
 Optional interpolation parameters.
 
LuaFunction _tFunc
 An optional transformation function applied over the data (filtered by _dim) before exporting.
 
int _nResLin
 The number of lines of the result returned by _tFunc.
 
int _nResCol
 The number of columns of the result returned by _tFunc.
 
GmInterpolator_interp
 The configured interpolator object. Can be NULL.
 

Detailed Description

A GmResultDataSrc class holding a cell value accessor.


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