MT Core (C++)
Core library for replacing C++ standard in project usage
Loading...
Searching...
No Matches
mtcore::csv Namespace Reference

CSV namespace for CSV-related utilities. More...

Namespaces

namespace  common
 

Classes

struct  ColEnd
 Special output-only type for indicating the end of a colum. More...
 
struct  Options
 CSV options for defining the CSV format. More...
 
struct  Reader
 
struct  ReadError
 
struct  RowEnd
 Special output-only type for indicating the end of a row. More...
 
struct  SliceParser
 

Typedefs

using Column = std::variant<i64, u64, Slice<const char>, f64>
 Column type.
 
using WriteElem = std::variant<i64, u64, Slice<const char>, f64, Slice<const Column>, RowEnd, ColEnd>
 Elements that can be written to a CSV writer.
 

Enumerations

enum class  ReadErrorCode {
  INTERNAL_LIMIT_REACHED , UNEXPECTED_EOF , INVALID_LINE_ENDING , QUOTE_PREMATURELY_TERMINATED ,
  UNEXPECTED_QUOTE , END_OF_FILE , ALLOCATION_FAILED , SIZE_EXCEEDED
}
 

Functions

u64 bit_match_64 (char ch, Slice< const char > s)
 
template<WriterImpl WI>
io::Writer< csv::impl::Writer< WI > > writer (io::Writer< WI > &underlying, Options opts={})
 Creates a CSV writer which will encode the data before writing it out.
 

Variables

static constexpr u64 chunkSize = 64
 

Detailed Description

CSV namespace for CSV-related utilities.

Enumeration Type Documentation

◆ ReadErrorCode

enum class mtcore::csv::ReadErrorCode
strong
Enumerator
INTERNAL_LIMIT_REACHED 
UNEXPECTED_EOF 
INVALID_LINE_ENDING 
QUOTE_PREMATURELY_TERMINATED 
UNEXPECTED_QUOTE 
END_OF_FILE 
ALLOCATION_FAILED 
SIZE_EXCEEDED 

Definition at line 9 of file common.hpp.

Function Documentation

◆ bit_match_64()

u64 mtcore::csv::bit_match_64 ( char ch,
Slice< const char > s )
nodiscard

Variable Documentation

◆ chunkSize

u64 mtcore::csv::chunkSize = 64
staticconstexpr

Definition at line 7 of file common.hpp.