Vcsn  2.1
Be Rational
vcsn::format Class Reference

An input/output format. More...

#include <format.hh>

Collaboration diagram for vcsn::format:

Public Types

enum  format_t { text, latex, raw, deflt = text }
 Type of format. More...
 
using self_t = format
 

Public Member Functions

 format (format_t f=deflt)
 
 format (const std::string &f)
 
format for_labels () const
 A copy of this format, but to print labels. More...
 
format for_weights () const
 A copy of this format, but to print weights. More...
 
bool is_for_labels () const
 Whether to use the syntax for labels (e.g., "a|x"). More...
 
bool is_for_weights () const
 Whether to use the syntax for weights (e.g., "(1, 1/2)"). More...
 
format_t kind () const
 
bool operator< (self_t that) const
 
bool operator== (self_t that) const
 
bool operator!= (self_t that) const
 

Private Attributes

format_t format_
 
bool label_ = false
 Whether printed as a label (e.g., "a|x"), or as a weight (e.g., "(1, 1/2)"). More...
 

Detailed Description

An input/output format.

For instance, whether text or latex, and other syntactic issues.

Definition at line 11 of file format.hh.

Member Typedef Documentation

Definition at line 14 of file format.hh.

Member Enumeration Documentation

Type of format.

Enumerator
text 
latex 
raw 

Print as is. For instance, don't try to escape labels.

deflt 

By default, print for text.

Definition at line 17 of file format.hh.

Constructor & Destructor Documentation

vcsn::format::format ( format_t  f = deflt)
inline

Definition at line 27 of file format.hh.

vcsn::format::format ( const std::string &  f)

Definition at line 13 of file format.cc.

References deflt, format_, vcsn::getargs(), latex, vcsn::map, raw, and text.

Here is the call graph for this function:

Member Function Documentation

format vcsn::format::for_labels ( ) const
inline

A copy of this format, but to print labels.

Definition at line 34 of file format.hh.

References label_.

Referenced by vcsn::detail::polynomialset_impl< Context, Kind >::print_with_classes_().

format vcsn::format::for_weights ( ) const
inline

A copy of this format, but to print weights.

Definition at line 42 of file format.hh.

References label_.

bool vcsn::format::is_for_labels ( ) const
inline

Whether to use the syntax for labels (e.g., "a|x").

Definition at line 50 of file format.hh.

References label_.

bool vcsn::format::is_for_weights ( ) const
inline

Whether to use the syntax for weights (e.g., "(1, 1/2)").

Definition at line 56 of file format.hh.

References label_.

format_t vcsn::format::kind ( ) const
inline

Definition at line 61 of file format.hh.

References format_.

Referenced by vcsn::to_string().

bool vcsn::format::operator!= ( self_t  that) const
inline

Definition at line 76 of file format.hh.

References operator==().

Here is the call graph for this function:

bool vcsn::format::operator< ( self_t  that) const
inline

Definition at line 66 of file format.hh.

References format_.

bool vcsn::format::operator== ( self_t  that) const
inline

Definition at line 71 of file format.hh.

References format_.

Referenced by operator!=().

Member Data Documentation

format_t vcsn::format::format_
private

Definition at line 82 of file format.hh.

Referenced by format(), kind(), operator<(), and operator==().

bool vcsn::format::label_ = false
private

Whether printed as a label (e.g., "a|x"), or as a weight (e.g., "(1, 1/2)").

Definition at line 85 of file format.hh.

Referenced by for_labels(), for_weights(), is_for_labels(), and is_for_weights().


The documentation for this class was generated from the following files: