|
Vince's CSV Parser
|
A standalone header file for writing delimiter-separated files. More...
#include <cmath>#include <fstream>#include <iostream>#include <memory>#include <ranges>#include <stdexcept>#include <string>#include <tuple>#include <type_traits>#include <vector>#include "basic_csv_parser_simd.hpp"#include "common.hpp"#include "csv_exceptions.hpp"Go to the source code of this file.
Classes | |
| struct | csv::internals::is_iterable< T, typename > |
| SFINAE trait: detects if a type is iterable (has std::begin/end). More... | |
| struct | csv::internals::is_iterable< T, typename std::enable_if< true >::type > |
| struct | csv::internals::is_tuple< T, typename > |
| SFINAE trait: detects if a type is a std::tuple. More... | |
| struct | csv::internals::is_tuple< T, typename std::enable_if< true >::type > |
| class | csv::DelimWriter< OutputStream, Delim, Quote > |
| Class for writing delimiter separated values files. More... | |
Namespaces | |
| namespace | csv |
| The all encompassing namespace. | |
Functions | |
| template<typename T > | |
| CSV_CONST CONSTEXPR_14 long double | csv::internals::pow10 (const T &n) noexcept |
| Compute 10 to the power of an integral exponent. | |
| template<> | |
| CSV_CONST CONSTEXPR_14 long double | csv::internals::pow10 (const unsigned &n) noexcept |
| 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 | |
CSV Writing | |
| template<class OutputStream > | |
| using | csv::CSVWriter = DelimWriter< OutputStream, ',', '"'> |
| An alias for csv::DelimWriter for writing standard CSV files. | |
| template<class OutputStream > | |
| using | csv::TSVWriter = DelimWriter< OutputStream, '\t', '"'> |
| Class for writing tab-separated values files. | |
| 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 > | |
| TSVWriter< OutputStream > | csv::make_tsv_writer (OutputStream &out, bool quote_minimal=true) |
| Return a csv::TSVWriter over the output stream. | |
A standalone header file for writing delimiter-separated files.
Definition in file csv_writer.hpp.
|
inline |
Definition at line 86 of file csv_writer.hpp.
|
inline |
Definition at line 81 of file csv_writer.hpp.
|
inline |
Definition at line 66 of file csv_writer.hpp.
|
inline |
Definition at line 91 of file csv_writer.hpp.
|
inline |
Definition at line 71 of file csv_writer.hpp.
|
inline |
Definition at line 76 of file csv_writer.hpp.
|
inline |
Calculate the absolute value of a number.
Definition at line 61 of file csv_writer.hpp.
| int csv::internals::num_digits | ( | T | x | ) |
Calculate the number of digits in a number.
Definition at line 102 of file csv_writer.hpp.
|
noexcept |
Compute 10 to the power of an integral exponent.
Definition at line 30 of file csv_writer.hpp.
|
noexcept |
Definition at line 46 of file csv_writer.hpp.
|
inline |
to_string() for unsigned integers
to_string() for floating point numbers
to_string() for signed integers
Definition at line 115 of file csv_writer.hpp.