BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Public Member Functions | |
CSVFile (std::string path_to_file) | |
CSVFile (std::string path_to_file, char sep) | |
CSVFile (std::string path_to_file, char sep, unsigned headRow) | |
std::vector< std::vector< std::string > > | asArray () |
void | EqualizeRowLengths () |
CSVRow | get_headers () |
CSVRow | get_row (unsigned i) |
char | get_separator () |
void | Init () |
unsigned long | NumberOfColumns () const |
unsigned long | NumberOfRows () const |
std::vector< std::string > const | operator[] (unsigned index_i) const |
void | Read () |
void | set_separator (char sep) |
Private Attributes | |
std::string | filepath |
unsigned | headersRow = 0 |
std::vector< std::vector< std::string > > | m_data |
unsigned | numberOfColumns = 0 |
std::vector< CSVRow > | rows |
char | separator = '-' |
Definition at line 93 of file CsvReader.h.
|
inline |
Definition at line 95 of file CsvReader.h.
References Init().
|
inline |
Definition at line 96 of file CsvReader.h.
References Init().
|
inline |
Definition at line 97 of file CsvReader.h.
References Init().
|
inline |
void CSVFile::EqualizeRowLengths | ( | ) |
Definition at line 84 of file CsvReader.cpp.
References m_data, NumberOfColumns(), NumberOfRows(), and rows.
Referenced by Init().
CSVRow CSVFile::get_headers | ( | ) |
Definition at line 122 of file CsvReader.cpp.
References CSVRow::addCell(), headersRow, NumberOfColumns(), rows, and CSVRow::size().
CSVRow CSVFile::get_row | ( | unsigned | i | ) |
Definition at line 134 of file CsvReader.cpp.
References rows.
char CSVFile::get_separator | ( | ) |
Definition at line 117 of file CsvReader.cpp.
References separator.
void CSVFile::Init | ( | ) |
Definition at line 65 of file CsvReader.cpp.
References EqualizeRowLengths(), and Read().
Referenced by CSVFile().
unsigned long CSVFile::NumberOfColumns | ( | ) | const |
Definition at line 106 of file CsvReader.cpp.
References numberOfColumns.
Referenced by EqualizeRowLengths(), and get_headers().
unsigned long CSVFile::NumberOfRows | ( | ) | const |
std::vector< std::string > const CSVFile::operator[] | ( | unsigned | index_i | ) | const |
Definition at line 96 of file CsvReader.cpp.
References m_data.
void CSVFile::Read | ( | ) |
Definition at line 71 of file CsvReader.cpp.
References filepath, numberOfColumns, rows, and separator.
Referenced by Init().
void CSVFile::set_separator | ( | char | sep | ) |
Definition at line 111 of file CsvReader.cpp.
References separator.
|
private |
Definition at line 116 of file CsvReader.h.
Referenced by Read().
|
private |
Definition at line 118 of file CsvReader.h.
Referenced by get_headers().
|
private |
Definition at line 121 of file CsvReader.h.
Referenced by asArray(), EqualizeRowLengths(), and operator[]().
|
private |
Definition at line 119 of file CsvReader.h.
Referenced by NumberOfColumns(), and Read().
|
private |
Definition at line 120 of file CsvReader.h.
Referenced by EqualizeRowLengths(), get_headers(), get_row(), NumberOfRows(), and Read().
|
private |
Definition at line 117 of file CsvReader.h.
Referenced by get_separator(), Read(), and set_separator().