Vince's CSV Parser
|
A standalone header file for writing delimiter-separated files. More...
#include <fstream>
#include <iostream>
#include <string>
#include <tuple>
#include <type_traits>
#include <vector>
#include "common.hpp"
#include "data_type.hpp"
Go to the source code of this file.
Classes | |
class | csv::DelimWriter< OutputStream, Delim, Quote, Flush > |
Class for writing delimiter separated values files. More... | |
Namespaces | |
csv | |
The all encompassing namespace. | |
csv::internals | |
Stuff that is generally not of interest to end-users. | |
Functions | |
template<typename T = int> | |
T | csv::internals::csv_abs (T x) |
Calculate the absolute value of a number. | |
template<> | |
int | csv::internals::csv_abs (int x) |
template<> | |
long int | csv::internals::csv_abs (long int x) |
template<> | |
long long int | csv::internals::csv_abs (long long int x) |
template<> | |
float | csv::internals::csv_abs (float x) |
template<> | |
double | csv::internals::csv_abs (double x) |
template<> | |
long double | csv::internals::csv_abs (long double x) |
template<typename T , csv::enable_if_t< std::is_arithmetic< T >::value, int > = 0> | |
int | csv::internals::num_digits (T x) |
Calculate the number of digits in a number. | |
template<typename T , csv::enable_if_t< std::is_unsigned< T >::value, int > = 0> | |
std::string | csv::internals::to_string (T value) |
to_string() for unsigned integers More... | |
CSV Writing | |
template<class OutputStream , bool Flush = true> | |
using | csv::CSVWriter = DelimWriter< OutputStream, ',', '"', Flush> |
An alias for csv::DelimWriter for writing standard CSV files. More... | |
template<class OutputStream , bool Flush = true> | |
using | csv::TSVWriter = DelimWriter< OutputStream, '\t', '"', Flush> |
Class for writing tab-separated values files. More... | |
template<class OutputStream > | |
CSVWriter< OutputStream > | csv::make_csv_writer (OutputStream &out, bool quote_minimal=true) |
Return a csv::CSVWriter over the output stream. | |
template<class OutputStream > | |
CSVWriter< OutputStream, false > | csv::make_csv_writer_buffered (OutputStream &out, bool quote_minimal=true) |
Return a buffered csv::CSVWriter over the output stream (does not auto flush) | |
template<class OutputStream > | |
TSVWriter< OutputStream > | csv::make_tsv_writer (OutputStream &out, bool quote_minimal=true) |
Return a csv::TSVWriter over the output stream. | |
template<class OutputStream > | |
TSVWriter< OutputStream, false > | csv::make_tsv_writer_buffered (OutputStream &out, bool quote_minimal=true) |
Return a buffered csv::TSVWriter over the output stream (does not auto flush) | |
A standalone header file for writing delimiter-separated files.
Definition in file csv_writer.hpp.