37 format(
const std::string& f);
bool delimit() const
Whether we should delimit: (1, 2) instead of 1, 2.
format delimit(bool d) const
Set whether we should delimit: (1, 2) instead of 1, 2.
bool operator<(self_t that) const
Print as rich UTF-8 text, escaped.
std::ostream & operator<<(std::ostream &os, direction d)
Pretty-printing.
bool label_
Whether printed as a label (e.g., a|x), or as a weight (e.g., (1, 1/2)).
std::ostringstream os
The output stream: the corresponding C++ snippet to compile.
By default, print for text.
std::string to_string(direction d)
Conversion to string.
Print as is. For instance, don't try to escape labels.
An input/output format for valuesets.
bool operator==(self_t that) const
format for_labels() const
A copy of this format, but to print labels.
bool operator!=(self_t that) const
Print as plain (ASCII) text, escaped.
bool delimit_
Whether we should delimit. E.g., 1, 2 or (1, 2).
std::istringstream is
The input stream: the specification to translate.
Print as a parsable type string.
bool is_for_weights() const
Whether to use the syntax for weights (e.g., "(1, 1/2)").
bool is_for_labels() const
Whether to use the syntax for labels (e.g., "a|x").
std::istream & operator>>(std::istream &is, direction &d)
Parsing.
format for_weights() const
A copy of this format, but to print weights.