Stride Reference Manual
- generated for commit 9643b11
|
#include <CSVRow.h>
Public Member Functions | |
CSVRow (const CSV *parent, const std::vector< std::string > &values) | |
CSVRow initialized with values. Should no be called by user code. CSV has convenience functions. More... | |
CSVRow (const CSVRow &)=default | |
CSVRow & | operator= (const CSVRow &)=default |
template<typename T = std::string> | |
T | GetValue (size_t index) const |
Get value at index. When T is specified, StringUtils are used to try to convert the value to type T. More... | |
template<typename T = std::string> | |
T | GetValue (const std::string &label) const |
Get value based on label. Note this is slower than using the index. More... | |
bool | operator== (const CSVRow &other) const |
Compare operator. More... | |
template<> | |
std::string | GetValue (size_t index) const |
Declaration of specialization. More... | |
template<> | |
std::string | GetValue (const std::string &label) const |
Declaration of specialization. More... | |
Protected Attributes | |
const CSV * | m_parent |
std::vector< std::string > | m_values |
Friends | |
std::ostream & | operator<< (std::ostream &os, const CSVRow &row) |
Print to stream. More... | |
stride::util::CSVRow::CSVRow | ( | const CSV * | parent, |
const std::vector< std::string > & | values | ||
) |
CSVRow initialized with values. Should no be called by user code. CSV has convenience functions.
Definition at line 41 of file CSVRow.cpp.
References stride::util::CSV::GetColumnCount(), m_values, stride::util::ToString(), and stride::util::Trim().
|
default |
|
inline |
Get value at index. When T is specified, StringUtils are used to try to convert the value to type T.
Definition at line 105 of file CSVRow.h.
References stride::util::safe_cast().
Referenced by stride::util::CSVRow::GetValue< std::string >().
|
inline |
Get value based on label. Note this is slower than using the index.
Definition at line 112 of file CSVRow.h.
References stride::util::safe_cast().
bool stride::util::CSVRow::operator== | ( | const CSVRow & | other | ) | const |
std::string stride::util::CSVRow::GetValue | ( | size_t | index | ) | const |
Declaration of specialization.
std::string stride::util::CSVRow::GetValue | ( | const std::string & | label | ) | const |
Declaration of specialization.
|
friend |
Print to stream.
Definition at line 72 of file CSVRow.cpp.
|
protected |
Definition at line 61 of file CSVRow.h.
Referenced by stride::util::CSVRow::GetValue< std::string >().
|
protected |
Definition at line 62 of file CSVRow.h.
Referenced by CSVRow(), stride::util::CSVRow::GetValue< std::string >(), stride::util::operator<<(), and operator==().