Class to store headers with data corresponding to current program run and evaluation.
More...
#include <RunData.h>
|
void | AddDataWHeader (const std::string &header, const std::string &data) |
| Add string data with header describing added data. More...
|
|
void | AddDataWHeader (const std::string &header, const char *data) |
| Add const char* data with header describing added data. More...
|
|
void | AddDataWHeader (const std::string &header, double data) |
| Add double data with header describing added data. More...
|
|
void | AddDataWHeader (const std::string &header, bool data) |
| Add boolean data with header describing added data. More...
|
|
void | AddDataWHeader (const std::string &header, unsigned int data) |
| Add unsigned int data with header describing added data. More...
|
|
const std::vector< std::string > & | HeadersInOrder () const |
| Return data headers in order. More...
|
|
bool | IsData (const std::string_view header) const |
| Return whether or not there is data corresponding to a specific header. More...
|
|
std::string | GetDataAsStr (const std::string_view header) const |
| Get data corresponding to header as a string Returns data as string regardless of underlying data type. More...
|
|
std::optional< double > | GetDataAsDouble (const std::string_view header) const |
| Get data corresponding to header as double Return null if data corresponds to a different data type. More...
|
|
std::optional< unsigned int > | GetDataAsUInt (const std::string_view header) const |
| Get data corresponding to header as unsigned int Return null if data corresponds to a different data type. More...
|
|
std::optional< bool > | GetDataAsBool (const std::string_view header) const |
| Get data corresponding to header as boolean Return null if data corresponds to a different data type. More...
|
|
void | AppendData (const RunData &rundata) |
| Append current RunData with input RunData. More...
|
|
|
std::ostream & | operator<< (std::ostream &os, const RunData &run_data) |
| Overloaded << operator for output to stream. More...
|
|
Class to store headers with data corresponding to current program run and evaluation.
Definition at line 42 of file RunData.h.
◆ AddDataWHeader() [1/5]
void RunData::AddDataWHeader |
( |
const std::string & |
header, |
|
|
bool |
data |
|
) |
| |
Add boolean data with header describing added data.
- Parameters
-
Definition at line 79 of file RunData.cpp.
◆ AddDataWHeader() [2/5]
void RunData::AddDataWHeader |
( |
const std::string & |
header, |
|
|
const char * |
data |
|
) |
| |
Add const char* data with header describing added data.
- Parameters
-
Definition at line 59 of file RunData.cpp.
◆ AddDataWHeader() [3/5]
void RunData::AddDataWHeader |
( |
const std::string & |
header, |
|
|
const std::string & |
data |
|
) |
| |
Add string data with header describing added data.
- Parameters
-
Definition at line 49 of file RunData.cpp.
◆ AddDataWHeader() [4/5]
void RunData::AddDataWHeader |
( |
const std::string & |
header, |
|
|
double |
data |
|
) |
| |
Add double data with header describing added data.
- Parameters
-
Definition at line 69 of file RunData.cpp.
◆ AddDataWHeader() [5/5]
void RunData::AddDataWHeader |
( |
const std::string & |
header, |
|
|
unsigned int |
data |
|
) |
| |
Add unsigned int data with header describing added data.
- Parameters
-
Definition at line 89 of file RunData.cpp.
◆ AppendData()
void RunData::AppendData |
( |
const RunData & |
rundata | ) |
|
◆ GetDataAsBool()
std::optional< bool > RunData::GetDataAsBool |
( |
const std::string_view |
header | ) |
const |
Get data corresponding to header as boolean Return null if data corresponds to a different data type.
- Parameters
-
- Returns
- Data corresponding to header as bool if data is bool, null if not
Definition at line 167 of file RunData.cpp.
◆ GetDataAsDouble()
std::optional< double > RunData::GetDataAsDouble |
( |
const std::string_view |
header | ) |
const |
Get data corresponding to header as double Return null if data corresponds to a different data type.
- Parameters
-
- Returns
- Data corresponding to header as double if data is double, null if not
Definition at line 142 of file RunData.cpp.
◆ GetDataAsStr()
std::string RunData::GetDataAsStr |
( |
const std::string_view |
header | ) |
const |
Get data corresponding to header as a string Returns data as string regardless of underlying data type.
- Parameters
-
- Returns
- Data corresponding to header as a string
Definition at line 118 of file RunData.cpp.
◆ GetDataAsUInt()
std::optional< unsigned int > RunData::GetDataAsUInt |
( |
const std::string_view |
header | ) |
const |
Get data corresponding to header as unsigned int Return null if data corresponds to a different data type.
- Parameters
-
- Returns
- Data corresponding to header as unsigned int if data is unsigned int, null if not
Definition at line 155 of file RunData.cpp.
◆ HeadersInOrder()
const std::vector<std::string>& RunData::HeadersInOrder |
( |
| ) |
const |
|
inline |
Return data headers in order.
- Returns
- Data headers in order
Definition at line 89 of file RunData.h.
◆ IsData()
bool RunData::IsData |
( |
const std::string_view |
header | ) |
const |
|
inline |
Return whether or not there is data corresponding to a specific header.
- Parameters
-
- Returns
- true if there is run data corresponding to header, false if not
Definition at line 97 of file RunData.h.
◆ operator<<
std::ostream& operator<< |
( |
std::ostream & |
os, |
|
|
const RunData & |
run_data |
|
) |
| |
|
friend |
Overloaded << operator for output to stream.
- Parameters
-
- Returns
- Output stream with run data added
Definition at line 178 of file RunData.h.
The documentation for this class was generated from the following files: