Text file parsing for Comma-Separated Value (CSV) formats, with user-defined delimiters beyond just commas, including spaces, tabs, or other symbols.
More...
|
| csv |
| csv stream manipulators
|
|
Text file parsing for Comma-Separated Value (CSV) formats, with user-defined delimiters beyond just commas, including spaces, tabs, or other symbols.
◆ csvData
◆ csvData() [1/4]
csvData::csvData |
( |
char * |
str | ) |
|
|
inline |
◆ csvData() [2/4]
csvData::csvData |
( |
const char * |
str | ) |
|
|
inline |
◆ csvData() [3/4]
csvData::csvData |
( |
std::string & |
str | ) |
|
|
inline |
◆ csvData() [4/4]
template<typename T >
csvData::csvData |
( |
T |
value | ) |
|
|
inline |
◆ operator const char *()
csvData::operator const char * |
( |
| ) |
const |
|
inline |
◆ operator const std::string &()
csvData::operator const std::string & |
( |
| ) |
const |
|
inline |
◆ operator double()
csvData::operator double |
( |
| ) |
const |
|
inline |
◆ operator float()
csvData::operator float |
( |
| ) |
const |
|
inline |
◆ operator int()
csvData::operator int |
( |
| ) |
const |
|
inline |
◆ operator std::string &()
csvData::operator std::string & |
( |
| ) |
|
|
inline |
◆ Parse() [1/2]
std::vector< csvData > csvData::Parse |
( |
const char * |
str, |
|
|
const char * |
delimiters = ",;\t " |
|
) |
| |
|
inlinestatic |
◆ Parse() [2/2]
bool csvData::Parse |
( |
std::vector< csvData > & |
data, |
|
|
const char * |
str, |
|
|
const char * |
delimiters = ",;\t " |
|
) |
| |
|
inlinestatic |
◆ set()
template<typename T >
void csvData::set |
( |
T |
value | ) |
|
|
inline |
◆ toDouble() [1/2]
double csvData::toDouble |
( |
bool * |
valid = NULL | ) |
const |
|
inline |
◆ toDouble() [2/2]
bool csvData::toDouble |
( |
double * |
value | ) |
const |
|
inline |
◆ toFloat() [1/2]
float csvData::toFloat |
( |
bool * |
valid = NULL | ) |
const |
|
inline |
◆ toFloat() [2/2]
bool csvData::toFloat |
( |
float * |
value | ) |
const |
|
inline |
◆ toInt() [1/2]
int csvData::toInt |
( |
bool * |
valid = NULL | ) |
const |
|
inline |
◆ toInt() [2/2]
bool csvData::toInt |
( |
int * |
value | ) |
const |
|
inline |
◆ operator<<
std::ostream& operator<< |
( |
std::ostream & |
out, |
|
|
const csvData & |
obj |
|
) |
| |
|
friend |
◆ operator>>
std::istream& operator>> |
( |
std::istream & |
in, |
|
|
csvData & |
obj |
|
) |
| |
|
friend |
◆ string
std::string csvData::string |
◆ csvReader
◆ csvReader()
csvReader::csvReader |
( |
const char * |
filename, |
|
|
const char * |
delimiters = ",;\t " |
|
) |
| |
◆ ~csvReader()
csvReader::~csvReader |
( |
| ) |
|
◆ Close()
void csvReader::Close |
( |
| ) |
|
|
inline |
◆ GetDelimiters()
const char * csvReader::GetDelimiters |
( |
| ) |
const |
|
inline |
◆ GetFilename()
const char * csvReader::GetFilename |
( |
| ) |
const |
|
inline |
◆ IsClosed()
bool csvReader::IsClosed |
( |
| ) |
const |
|
inline |
◆ IsOpen()
bool csvReader::IsOpen |
( |
| ) |
const |
|
inline |
◆ Open()
csvReader * csvReader::Open |
( |
const char * |
filename, |
|
|
const char * |
delimiters = ",;\t " |
|
) |
| |
|
inlinestatic |
◆ Read() [1/4]
std::vector< csvData > csvReader::Read |
( |
| ) |
|
|
inline |
◆ Read() [2/4]
std::vector< csvData > csvReader::Read |
( |
const char * |
delimiters | ) |
|
|
inline |
◆ Read() [3/4]
bool csvReader::Read |
( |
std::vector< csvData > & |
data | ) |
|
|
inline |
◆ Read() [4/4]
bool csvReader::Read |
( |
std::vector< csvData > & |
data, |
|
|
const char * |
delimiters |
|
) |
| |
|
inline |
◆ SetDelimiters()
void csvReader::SetDelimiters |
( |
const char * |
delimiters | ) |
|
|
inline |
◆ MaxLineLength
const size_t csvReader::MaxLineLength =2048 |
◆ csvWriter
◆ csvWriter()
csvWriter::csvWriter |
( |
const char * |
filename, |
|
|
const char * |
delimiter = ", " |
|
) |
| |
◆ ~csvWriter()
csvWriter::~csvWriter |
( |
| ) |
|
◆ Close()
void csvWriter::Close |
( |
| ) |
|
|
inline |
◆ EndLine()
void csvWriter::EndLine |
( |
| ) |
|
|
inline |
◆ Flush()
void csvWriter::Flush |
( |
| ) |
|
|
inline |
◆ GetDelimiter()
const char * csvWriter::GetDelimiter |
( |
| ) |
const |
|
inline |
◆ GetFilename()
const char * csvWriter::GetFilename |
( |
| ) |
const |
|
inline |
◆ IsClosed()
bool csvWriter::IsClosed |
( |
| ) |
const |
|
inline |
◆ IsOpen()
bool csvWriter::IsOpen |
( |
| ) |
const |
|
inline |
◆ Open()
csvWriter * csvWriter::Open |
( |
const char * |
filename, |
|
|
const char * |
delimiter = ", " |
|
) |
| |
|
inlinestatic |
◆ operator<<() [1/2]
template<typename T >
csvWriter & csvWriter::operator<< |
( |
const T & |
value | ) |
|
|
inline |
◆ operator<<() [2/2]
◆ SetDelimiter()
void csvWriter::SetDelimiter |
( |
const char * |
delimiters | ) |
|
|
inline |
◆ Write() [1/2]
template<typename T >
csvWriter & csvWriter::Write |
( |
const T & |
value | ) |
|
|
inline |
◆ Write() [2/2]
template<typename T , typename... Args>
csvWriter & csvWriter::Write |
( |
const T & |
value, |
|
|
const Args &... |
args |
|
) |
| |
|
inline |
◆ WriteLine()
template<typename T , typename... Args>
csvWriter & csvWriter::WriteLine |
( |
const T & |
value, |
|
|
const Args &... |
args |
|
) |
| |
|
inline |