|
Nektar++
|
#include <MetricFile.h>
Public Member Functions | |
| virtual | ~MetricFile () |
Public Member Functions inherited from Nektar::Metric | |
| Metric (TiXmlElement *metric, bool generate) | |
| Constructor. More... | |
| virtual | ~Metric ()=default |
| bool | Test (std::istream &pStdout, std::istream &pStderr) |
Calls a metric's v_Test function (or v_Generate if m_generate). More... | |
| void | Generate (std::istream &pStdout, std::istream &pStderr) |
| std::string | GetType () |
| Return metric type. More... | |
| int | GetID () |
| Return metric ID. More... | |
| bool | SupportsAverage () const |
| Return whether this metric supports averaging results from multiple runs. More... | |
Static Public Member Functions | |
| static MetricSharedPtr | create (TiXmlElement *metric, bool generate) |
Static Public Attributes | |
| static std::string | type |
Protected Member Functions | |
| MetricFile (TiXmlElement *metric, bool generate) | |
| std::string | CalculateHash (std::string filename) |
| virtual bool | v_Test (std::istream &pStdout, std::istream &pStderr) |
| Virtual function to test the metric. Should be redefined in derived classes. More... | |
| virtual void | v_Generate (std::istream &pStdout, std::istream &pStderr) |
| Virtual function to generate the metric. Should be redefined in derived classes. More... | |
| virtual bool | v_Test (std::istream &pStdout, std::istream &pStderr)=0 |
| Virtual function to test the metric. Should be redefined in derived classes. More... | |
| virtual void | v_Generate (std::istream &pStdout, std::istream &pSrderr)=0 |
| Virtual function to generate the metric. Should be redefined in derived classes. More... | |
Protected Attributes | |
| std::map< std::string, std::string > | m_filehash |
| Stores filenames to perform hash on. More... | |
Protected Attributes inherited from Nektar::Metric | |
| int | m_id |
| Stores the ID of this metric. More... | |
| std::string | m_type |
| Stores the type of this metric (uppercase). More... | |
| bool | m_generate |
| Determines whether to generate this metric or not. More... | |
| bool | m_average = false |
| Indicates whether a metric supports averaging results from multiple runs. More... | |
| TiXmlElement * | m_metric |
| Pointer to XML structure containing metric definition. More... | |
Definition at line 43 of file MetricFile.h.
|
inlinevirtual |
Definition at line 46 of file MetricFile.h.
|
protected |
Definition at line 50 of file MetricFile.cpp.
References ASSERTL0, m_filehash, and Nektar::Metric::m_generate.
Referenced by create().
|
protected |
Definition at line 83 of file MetricFile.cpp.
References ASSERTL0, sha1::calc(), CellMLToNektar.pycml::copy(), Nektar::LibUtilities::PortablePath(), and sha1::toHexString().
Referenced by v_Generate(), and v_Test().
|
inlinestatic |
Definition at line 50 of file MetricFile.h.
References MetricFile().
|
protectedvirtual |
Virtual function to generate the metric. Should be redefined in derived classes.
| pStdout | Reference to test output stream. |
| pSrderr | Reference to test error stream. |
Implements Nektar::Metric.
Definition at line 185 of file MetricFile.cpp.
References ASSERTL0, CalculateHash(), m_filehash, and Nektar::Metric::m_metric.
|
protectedvirtual |
Virtual function to test the metric. Should be redefined in derived classes.
| pStdout | Reference to test output stream. |
| pStderr | Reference to test error stream. |
true if the test passes, false otherwise. Implements Nektar::Metric.
Definition at line 163 of file MetricFile.cpp.
References CalculateHash(), and m_filehash.
|
protected |
Stores filenames to perform hash on.
Definition at line 66 of file MetricFile.h.
Referenced by MetricFile(), v_Generate(), and v_Test().
|
static |
Definition at line 55 of file MetricFile.h.