Nektar++
|
The TestData class is responsible for parsing a test XML file and storing the data. More...
#include <TestData.h>
Public Member Functions | |
TestData (const fs::path &pFilename, po::variables_map &pVm) | |
TestData constructor. More... | |
TestData (const TestData &pSrc) | |
const std::string & | GetDescription () const |
Returns the description of a test. More... | |
const Command & | GetCommand (unsigned int pId) const |
unsigned int | GetNumCommands () const |
std::string | GetMetricType (unsigned int pId) const |
Returns the type of metric to be collected for a given metric ID. More... | |
unsigned int | GetNumMetrics () const |
Returns the number of metrics to be collected for the test. More... | |
TiXmlElement * | GetMetric (unsigned int pId) |
Returns a pointer to the TiXmlElement object representing the metric for a given metric ID. More... | |
unsigned int | GetMetricId (unsigned int pId) |
Returns the ID of the metric for a given metric ID. More... | |
DependentFile | GetDependentFile (unsigned int pId) const |
unsigned int | GetNumDependentFiles () const |
Returns the number of dependent files required for the test. More... | |
unsigned int | GetNumRuns () const |
Returns the number of runs to be performed for the test. More... | |
void | SaveFile () |
Private Member Functions | |
void | Parse (TiXmlDocument *pDoc) |
Parse the test file and populate member variables for the test. More... | |
Command | ParseCommand (TiXmlElement *pElmt) const |
Private Attributes | |
po::variables_map | m_cmdoptions |
std::string | m_description |
std::vector< Command > | m_commands |
TiXmlDocument * | m_doc |
std::vector< TiXmlElement * > | m_metrics |
std::vector< DependentFile > | m_files |
unsigned int | m_runs |
The number of times to run the test. More... | |
The TestData class is responsible for parsing a test XML file and storing the data.
Definition at line 78 of file TestData.h.
Nektar::TestData::TestData | ( | const fs::path & | pFilename, |
po::variables_map & | pVm | ||
) |
TestData constructor.
The class is constructed with the path to the test XML file and a po::variables_map
object containing the command-line options passed to the program.
pFilename | |
pVm |
Definition at line 58 of file TestData.cpp.
Nektar::TestData::TestData | ( | const TestData & | pSrc | ) |
Definition at line 73 of file TestData.cpp.
const Command & Nektar::TestData::GetCommand | ( | unsigned int | pId | ) | const |
Definition at line 84 of file TestData.cpp.
References ASSERTL0, and m_commands.
Referenced by main().
DependentFile Nektar::TestData::GetDependentFile | ( | unsigned int | pId | ) | const |
Definition at line 131 of file TestData.cpp.
References ASSERTL0, and m_files.
Referenced by main().
const std::string & Nektar::TestData::GetDescription | ( | ) | const |
Returns the description of a test.
Definition at line 79 of file TestData.cpp.
References m_description.
TiXmlElement * Nektar::TestData::GetMetric | ( | unsigned int | pId | ) |
Returns a pointer to the TiXmlElement
object representing the metric for a given metric ID.
Definition at line 116 of file TestData.cpp.
References ASSERTL0, and m_metrics.
Referenced by main().
unsigned int Nektar::TestData::GetMetricId | ( | unsigned int | pId | ) |
Returns the ID of the metric for a given metric ID.
Definition at line 123 of file TestData.cpp.
References ASSERTL0, and m_metrics.
Referenced by main().
std::string Nektar::TestData::GetMetricType | ( | unsigned int | pId | ) | const |
Returns the type of metric to be collected for a given metric ID.
Definition at line 97 of file TestData.cpp.
References ASSERTL0, and m_metrics.
Referenced by main().
unsigned int Nektar::TestData::GetNumCommands | ( | ) | const |
unsigned int Nektar::TestData::GetNumDependentFiles | ( | ) | const |
Returns the number of dependent files required for the test.
Definition at line 138 of file TestData.cpp.
References m_files.
Referenced by main().
unsigned int Nektar::TestData::GetNumMetrics | ( | ) | const |
Returns the number of metrics to be collected for the test.
Definition at line 109 of file TestData.cpp.
References m_metrics.
Referenced by main().
unsigned int Nektar::TestData::GetNumRuns | ( | ) | const |
Returns the number of runs to be performed for the test.
Definition at line 144 of file TestData.cpp.
References m_runs.
Referenced by main().
|
private |
Parse the test file and populate member variables for the test.
Definition at line 216 of file TestData.cpp.
References ASSERTL0, m_cmdoptions, m_commands, Nektar::DependentFile::m_description, m_description, Nektar::DependentFile::m_filename, m_files, m_metrics, m_runs, and ParseCommand().
Referenced by TestData().
|
private |
Definition at line 149 of file TestData.cpp.
References ASSERTL0, Nektar::eNone, Nektar::eParallel, Nektar::eSequential, Nektar::Command::m_commandType, Nektar::Command::m_executable, Nektar::Command::m_parameters, Nektar::Command::m_processes, and Nektar::Command::m_pythonTest.
Referenced by Parse().
void Nektar::TestData::SaveFile | ( | ) |
|
private |
Definition at line 101 of file TestData.h.
Referenced by Parse().
|
private |
Definition at line 103 of file TestData.h.
Referenced by GetCommand(), GetNumCommands(), and Parse().
|
private |
Definition at line 102 of file TestData.h.
Referenced by GetDescription(), and Parse().
|
private |
Definition at line 104 of file TestData.h.
Referenced by SaveFile(), and TestData().
|
private |
Definition at line 106 of file TestData.h.
Referenced by GetDependentFile(), GetNumDependentFiles(), and Parse().
|
private |
Definition at line 105 of file TestData.h.
Referenced by GetMetric(), GetMetricId(), GetMetricType(), GetNumMetrics(), and Parse().
|
private |
The number of times to run the test.
Definition at line 108 of file TestData.h.
Referenced by GetNumRuns(), and Parse().