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

A class implementing the GmResultDataSrcInfo interface, storing the metadata and id for a result data registered attribute. It also stores the requested unit and the converter when needed. It is built with the result rule definition only (name + unit) and later completed with the data src definition (info + id) More...

#include <gmResultDataSrc.h>

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

Public Member Functions

 GmAttributeResultDataSrc (int trackId, GmResultDataSrcType type, QString name, Unit unit)
 
bool setInfo (const GmAttributeResultDataSrcInfo *info, int id)
 Sets the associated info object + its id on GmResultsData. If the src data unit is incompatible with the requested unit, returns false.
 
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 GmResultDataSrcType type () const
 Returns the data src type.
 
virtual QString alias () const
 Returns the data src "exported" id.
 
virtual Unit unit () const
 Returns the unit in which the data is expressed.
 
virtual QString description () const
 Returns the data src description, when available.
 
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.
 
virtual QString formatStr () const
 How should dataSrc values be formated?
 
int resultId () const
 
UnitConverterunitConverter () const
 
- Public Member Functions inherited from GmResultDataSrcInfo
virtual ~GmResultDataSrcInfo ()
 Virtual destructor.
 

Private Member Functions

 Q_DISABLE_COPY (GmAttributeResultDataSrc)
 

Private Attributes

int _trackId
 The numeric id for this data src (a value between 0 and the number of data srcs in the model)
 
GmResultDataSrcType _type
 The data src type (needed while _info is NULL)
 
QString _alias
 The data src alias (needed while _info is NULL)
 
Unit _unit
 The exported unit. Might be different from _info->unit()
 
const GmAttributeResultDataSrcInfo_info
 The metadata info. Might be NULL for a while.
 
int _id
 The attribute id inside GmResultData when _info is not NULL. -1 when it is.
 
UnitConverter_conv
 The unit converter, if necessary, from _info->unit() to _unit.
 

Detailed Description

A class implementing the GmResultDataSrcInfo interface, storing the metadata and id for a result data registered attribute. It also stores the requested unit and the converter when needed. It is built with the result rule definition only (name + unit) and later completed with the data src definition (info + id)


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