Static Public Member Functions | Protected Member Functions | List of all members
TextDecoratorVt100 Class Reference
Inheritance diagram for TextDecoratorVt100:
Inheritance graph
[legend]
Collaboration diagram for TextDecoratorVt100:
Collaboration graph
[legend]

Static Public Member Functions

template<typename F >
static void appendCodes (const EnumFlagger< F > &styleFlags, std::list< int > &codes)
 Internal utility: convert given abstract style to numeric VT100 codes. More...
 

Protected Member Functions

virtual std::ostream & _begin (std::ostream &ostr) const
 Export style to VT100 numeric codes. More...
 
virtual std::ostream & _end (std::ostream &ostr) const
 
- Protected Member Functions inherited from TextDecorator
void set ()
 
void add ()
 
void addKey (const std::string &key)
 
void addKeys (const std::string &keys)
 

Additional Inherited Members

- Public Types inherited from TextDecorator
typedef drain::EnumFlagger< drain::SingleFlagger< TextStyle::Colour > > ColourFlag
 
typedef drain::EnumFlagger< drain::MultiFlagger< TextStyle::Style > > StyleFlags
 
typedef drain::EnumFlagger< drain::SingleFlagger< TextStyle::Line > > LineFlag
 
- Public Member Functions inherited from TextDecorator
 TextDecorator (const TextDecorator &deco)
 
std::ostream & begin (std::ostream &ostr) const
 
std::ostream & begin (std::ostream &ostr, const std::string &conf)
 
std::ostream & end (std::ostream &ostr) const
 
void setSeparator (const std::string &separator)
 
void reset ()
 
template<typename T , typename ... TT>
void set (T arg, const TT &... args)
 
template<typename ... TT>
void add (const std::string &keys, const TT &... args)
 Sets given keys. More...
 
template<typename ... TT>
void add (const char *keys, const TT &... args)
 Second case of strings...
 
template<typename ... TT>
void add (char *keys, const TT &... args)
 Third case of strings...
 
template<typename T , typename ... TT>
void add (T arg, const TT &... args)
 Adds several keys.
 
void add (TextStyle::Colour c)
 Change the current color setting.
 
void add (TextStyle::Line l)
 Change the current line setting.
 
void add (TextStyle::Style s)
 Change the current current style setting.
 
void debug (std::ostream &ostr) const
 
- Public Attributes inherited from TextDecorator
ColourFlag color
 Read input stream until any char in endChars is encountered. The end char will not be included, but passed in input stream.
 
StyleFlags style
 
LineFlag line
 
- Protected Attributes inherited from TextDecorator
std::string separator
 

Member Function Documentation

◆ _begin()

std::ostream & _begin ( std::ostream &  ostr) const
protectedvirtual

Export style to VT100 numeric codes.

First, extract style enums from the current flags (integer).

Template Parameters
TS-

Not: TextStyle::Style, TextStyle::Line

Reimplemented from TextDecorator.

◆ appendCodes()

void appendCodes ( const EnumFlagger< F > &  styleFlags,
std::list< int > &  codes 
)
static

Internal utility: convert given abstract style to numeric VT100 codes.

Template Parameters
-ColourFlag, StyleFlags, or LineFlag
Parameters
-styleFlags,
-codes

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