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