dasmig-core 1.2.0
Shared random engine, distributions and data tiers for the dasmig generator libraries
Loading...
Searching...
No Matches
tsv.hpp File Reference

Tab-separated data files with typed access and located errors. More...

#include "rng.hpp"
#include "utf8.hpp"
#include <algorithm>
#include <array>
#include <cfloat>
#include <charconv>
#include <cmath>
#include <concepts>
#include <cstddef>
#include <cstdint>
#include <filesystem>
#include <fstream>
#include <functional>
#include <iterator>
#include <limits>
#include <locale>
#include <map>
#include <memory>
#include <optional>
#include <sstream>
#include <stdexcept>
#include <string>
#include <string_view>
#include <system_error>
#include <utility>
#include <vector>

Go to the source code of this file.

Classes

class  dasmig::core::tsv_error
 A data error with its location. More...
 
class  dasmig::core::tsv_row
 One row of a tsv_document. A light view: copy it freely while the document, or any copy of it, is alive. More...
 
class  dasmig::core::tsv_document
 A parsed tab-separated file. More...
 

Detailed Description

Tab-separated data files with typed access and located errors.

Author
Diego Dasso Migotto (diegomigotto at hotmail dot com)

The format every library's resources/ and every extension layer uses:

  • UTF-8, with or without a byte order mark; LF or CRLF line ends.
  • The first line names the columns, unless the columns are given to parse() (for headerless word lists).
  • Cells are separated by one tab and are not quoted. A row may have fewer cells than columns (the missing ones are empty), not more.
  • Empty lines and lines starting with # are skipped.

Numbers are parsed exactly (correctly rounded), so the same file gives the same doubles on every platform.

Definition in file tsv.hpp.