MT Core (C++)
Core library for replacing C++ standard in project usage
|
CSV Utilities. More...
Classes | |
struct | mtcore::csv::Options |
CSV options for defining the CSV format. More... | |
struct | mtcore::csv::RowEnd |
Special output-only type for indicating the end of a row. More... | |
struct | mtcore::csv::ColEnd |
Special output-only type for indicating the end of a colum. More... | |
Typedefs | |
using | mtcore::csv::Column = std::variant<i64, u64, Slice<const char>, f64> |
Column type. | |
using | mtcore::csv::WriteElem = std::variant<i64, u64, Slice<const char>, f64, Slice<const Column>, RowEnd, ColEnd> |
Elements that can be written to a CSV writer. | |
Functions | |
template<WriterImpl WI> | |
io::Writer< csv::impl::Writer< WI > > | mtcore::csv::writer (io::Writer< WI > &underlying, Options opts={}) |
Creates a CSV writer which will encode the data before writing it out. | |
CSV Utilities.
using mtcore::csv::Column = std::variant<i64, u64, Slice<const char>, f64> |
Column type.
Does not output separators if one of these types is printed on its own (needs to be in a slice of columns for separators to be printed).
Definition at line 32 of file csv/writer.hpp.
using mtcore::csv::WriteElem = std::variant<i64, u64, Slice<const char>, f64, Slice<const Column>, RowEnd, ColEnd> |
Elements that can be written to a CSV writer.
A Slice of column will automatically add column separators between slice elements and a row separator at the end. Generally, you will want to use a slice of columns. However, if you need more control, you can print each element manually and use ColEnd{} and RowEnd{} to indicate where separators should go.
Definition at line 40 of file csv/writer.hpp.
io::Writer< csv::impl::Writer< WI > > mtcore::csv::writer | ( | io::Writer< WI > & | underlying, |
Options | opts = {} ) |
Creates a CSV writer which will encode the data before writing it out.
Uses another writer as the destination, which allows developers to easily switch where the output goes to.
WI | Underlying writer to write to |
underlying | Writer to write to |
opts | CSV Options |
Definition at line 164 of file csv/writer.hpp.