GemaCoreLib
The GeMA Core library
Loading...
Searching...
No Matches
gmMonitorResultsRule.h
Go to the documentation of this file.
1/************************************************************************
2**
3** Copyright (C) 2014 by Carlos Augusto Teixera Mendes
4** All rights reserved.
5**
6** This file is part of the "GeMA" software. It's use should respect
7** the terms in the license agreement that can be found together
8** with this source code.
9** It is provided AS IS, with NO WARRANTY OF ANY KIND,
10** INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR
11** A PARTICULAR PURPOSE.
12**
13************************************************************************/
14
24#ifndef _GEMA_MONITOR_RESULTS_RULE_H_
25#define _GEMA_MONITOR_RESULTS_RULE_H_
26
27#include "gmResultsRule.h"
29
30#include <QObject>
31
34{
35public:
36 virtual ~GmMonitorResultsRule();
37
38 // See commets on the base class
40
41 virtual void print(const GmLogCategory& logger, GmLogLevel level) const;
42
43 virtual bool run(const GmLogCategory& logger);
44
45 static GmMonitorResultsRule* loadFromTable(GmResultsData* data, LuaTable& tab,
46 const GmLogCategory& parseLogger, const GmSimulationData* simData);
47
48protected:
49 GmMonitorResultsRule(GmResultsData* data, QString id, QString description,
50 const QVector<GmResultsDataSet*>& dataSets,
51 const QVector<GmResultsTimeSet*>& timeSets,
52 bool trackObj, const GmSimulationData* simData);
53
54private:
55 Q_DISABLE_COPY(GmMonitorResultsRule);
56
57 void evalMonitoredAttributeData(GmResultsDataSet* dset, const GmLogCategory& errLogger);
58 void evalMonitoredEvalSetData (GmResultsDataSet* dset, GmResultsDataSrcType type, const GmLogCategory& errLogger);
59
61};
62
63
64
67
70{
71 Q_OBJECT
72
73public:
75
76private slots:
77 void monitoredValueChanged(int trackId, const GmResultsTrackedData& value, bool waitForMore);
78
79 void monitoredValueChangedDone();
80
81 void monitoredIndexChanged(int dataSetId, const GmResultsTrackedIndexData& value);
82
83 void monitoredAttributeInfoChanged(int trackId, int dataSetId, QString name, QString description,
84 int type, QString unit, int nlin, int ncol, QString format);
85
86private:
88};
89
90
91
92#endif
Class representing a category with multiple logging levels.
Definition gmLog.h:58
A results rule used to send the associated data sets to the monitor server thread.
Definition gmMonitorResultsRule.h:34
GmResultsData * _resultsData
The results data object used to emit the monitor signals.
Definition gmMonitorResultsRule.h:60
virtual GmResultsRuleType type() const
Returns the result rule type.
Definition gmMonitorResultsRule.h:39
A helper class used to help testing monitor rules without the need for a connected external server.
Definition gmMonitorResultsRule.h:70
const GmLogCategory & _logger
The logger used for printing.
Definition gmMonitorResultsRule.h:87
Auxiliar class used to store the complete set of results data for a simulation.
Definition gmResultsData.h:58
A set storing what should be exported (saved / printed / monitored) by the result rule classes.
Definition gmResultsDataSet.h:58
A result rule represents an action that will be executed over one or more data sets at the moments (t...
Definition gmResultsRule.h:56
virtual void print(const GmLogCategory &logger, GmLogLevel level) const
Prints the rule description to the appointed logger / level.
Definition gmResultsRule.cpp:145
virtual bool run(const GmLogCategory &logger)=0
The virtual method responsible for executing this rule's actions.
Auxiliar class used to store the complete set of simulation data.
Definition gmSimulationData.h:55
#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
GmLogLevel
Available log levels list.
Definition gmLog.h:36
Declaration of the GmResultsDataSrcInfo interface.
GmResultsDataSrcType
The types of data sources stored by a rule.
Definition gmResultsDataSrcInfo.h:33
Declaration of the GmResultsRule class.
GmResultsRuleType
The current available types for a result rule.
Definition gmResultsRule.h:41
@ GM_RESULTS_MONITOR_RULE
A monitor rule.
Definition gmResultsRule.h:44
A tracked data value. Can be either a double vector or a string. Thanks to the implicitly shared natu...
Definition gmResultsTrackedData.h:39
The index data for a result rule, storing "evaluation point" data for node, cell or gauss based indic...
Definition gmResultsTrackedData.h:65