24#ifndef _GEMA_RUN_PROGRESS_STATS_ITEM_H_
25#define _GEMA_RUN_PROGRESS_STATS_ITEM_H_
30#include <QElapsedTimer>
49 : _id(-1), _owner(owner), _name(name), _userData(NULL), _level(
GmRunProgressStats::defLevel()),
50 _track(options), _father(NULL), _maxAttrLength(0), _timeAttrId(-1), _memAttrId(-1),
51 _count(0), _firstNestedItem(-1), _report(NULL)
63 assert(!_attributeIds.contains(attrId));
64 _attributeIds.append(attrId);
65 if(name.
size() > _maxAttrLength)
66 _maxAttrLength = name.
size();
67 return _attributeIds.size() - 1;
71 void setTimeAttributeId(
int attrId) { assert(attrId >= 0 && attrId < _attributeIds.size()); _timeAttrId = attrId; }
74 void setMemoryAttributeId(
int attrId) { assert(attrId >= 0 && attrId < _attributeIds.size()); _memAttrId = attrId; }
A class used to create formatted reports based on ProgressStats item attribute values.
Definition gmRunProgressReport.h:40
A class used to store time, memory and additional values statistics related to the simulation loading...
Definition gmRunProgressStats.h:42
Level
Definition gmRunProgressStats.h:47
An item used to store time, memory and additional values statistics related to the simulation loading...
Definition gmRunProgressStatsItem.h:39
QVector< NestedItemData > _nestedAttributeControl
The vector with information about each nested tracked item.
Definition gmRunProgressStatsItem.h:112
void setFather(GmRunProgressStatsItem *father)
Sets the item father.
Definition gmRunProgressStatsItem.h:77
GmRunProgressReport * _report
The report that this item is tied to, if any. NULL otherwise.
Definition gmRunProgressStatsItem.h:99
void setMemoryAttributeId(int attrId)
Sets the LOCAL id of the execution memory attribute, if any. The attribute MUST already have been reg...
Definition gmRunProgressStatsItem.h:74
void * _userData
A user value that can be used by user code on reports to hav the needed context. Just stored.
Definition gmRunProgressStatsItem.h:85
int addAttribute(int attrId, QString name)
Adds a new Global(Result data) attribute to the set of item attributes. Returns the LOCAL attribute i...
Definition gmRunProgressStatsItem.h:61
void setTimeAttributeId(int attrId)
Sets the LOCAL id of the execution time attribute, if any. The attribute MUST already have been regis...
Definition gmRunProgressStatsItem.h:71
GmRunProgressStatsItem(const QObject *owner, QString name, int options)
Constructor.
Definition gmRunProgressStatsItem.h:48
GmRunProgressStats::Level _level
The requested collection level.
Definition gmRunProgressStatsItem.h:87
int _track
The requested track options + default attribute stats options.
Definition gmRunProgressStatsItem.h:88
int _firstNestedItem
The index in _attributeIds for the first nested attribute, if any. Stores -1 if there is none.
Definition gmRunProgressStatsItem.h:109
QVector< int > _attributeIds
The set of registered attribute ids (registered in GmResultsData)
Definition gmRunProgressStatsItem.h:93
QElapsedTimer _timer
Timer used to measure elapsed time when _timeAttrId is different from -1.
Definition gmRunProgressStatsItem.h:97
int _timeAttrId
The index in _attributeIds for the execution time attribute. -1 if there is none.
Definition gmRunProgressStatsItem.h:95
QVector< GmRunProgressStatsItem * > _children
A list with the item children.
Definition gmRunProgressStatsItem.h:91
QString _name
The full item name, including the parent name.
Definition gmRunProgressStatsItem.h:84
QVector< int > _nestedAttributes
Stores the index of the tracked attributes in the tracked item. If _nestedAttributeControl[i]....
Definition gmRunProgressStatsItem.h:119
int _maxAttrLength
The maximum length of an attribute name.
Definition gmRunProgressStatsItem.h:94
GmRunProgressStatsItem * _father
The item father or NULL if there is none.
Definition gmRunProgressStatsItem.h:90
void addChild(GmRunProgressStatsItem *child)
Adds a new child to the items list.
Definition gmRunProgressStatsItem.h:80
int _id
The item id.
Definition gmRunProgressStatsItem.h:82
int _memAttrId
The index in _attributeIds for the execution memory attribute. -1 if there is none.
Definition gmRunProgressStatsItem.h:96
quint64 _count
The number of times that this item was started.
Definition gmRunProgressStatsItem.h:98
QString reducedName() const
If the item has a father, returns name() without the father prefix. Otherwise, returns name()
Definition gmRunProgressStatsItem.h:55
const QObject * _owner
The object that owns this item. Might be NULL.
Definition gmRunProgressStatsItem.h:83
#define GMC_API_EXPORT
Macro for controlling if the class is being exported (GEMA_CORE_LIB defined) or imported (GEMA_CORE_L...
Definition gmCoreConfig.h:35
Declaration of the GmRunProgressStats class.
QString right(int n) const const
Definition gmRunProgressStatsItem.h:102
int _itemId
The id of the nested tracked item.
Definition gmRunProgressStatsItem.h:103
int _numAttr
The number of consecutive attributes in _attributeIds belonging to the nested item.
Definition gmRunProgressStatsItem.h:105
int _attrIndex
The index in _attributeIds for the first tracked attribute from the nested item.
Definition gmRunProgressStatsItem.h:104