Public Types | Static Public Member Functions | List of all members
openfluid::tools::Console Class Reference

#include <tools/Console.hpp>

Public Types

enum  Colors : char {
  Colors::BLACK, Colors::BLUE, Colors::GREEN, Colors::CYAN,
  Colors::RED, Colors::MAGENTA, Colors::BROWN, Colors::GREY,
  Colors::DARKGREY, Colors::LIGHTBLUE, Colors::LIGHTGREEN, Colors::LIGHTCYAN,
  Colors::LIGHTRED, Colors::LIGHTMAGENTA, Colors::YELLOW, Colors::WHITE
}
 

Static Public Member Functions

static std::string getANSIColorCode (const Colors &Color)
 
static int saveAttributes ()
 
static void resetAttributes ()
 
static void setColor (Colors Color)
 
static void setOKColor ()
 
static void setWarningColor ()
 
static void setErrorColor ()
 

Member Enumeration Documentation

Enumerator
BLACK 
BLUE 
GREEN 
CYAN 
RED 
MAGENTA 
BROWN 
GREY 
DARKGREY 
LIGHTBLUE 
LIGHTGREEN 
LIGHTCYAN 
LIGHTRED 
LIGHTMAGENTA 
YELLOW 
WHITE 

Member Function Documentation

static std::string openfluid::tools::Console::getANSIColorCode ( const Colors Color)
inlinestatic

Returns corresponding ANSI code for given color

Parameters
[in]Colorthe given color
Returns
the color code as string
static void openfluid::tools::Console::resetAttributes ( )
inlinestatic

Resets font attributes (color and weight)

static int openfluid::tools::Console::saveAttributes ( )
inlinestatic

Saves font attributes (color and weight)

Returns
the color code (-1 on non-Windows systems)
static void openfluid::tools::Console::setColor ( Colors  Color)
inlinestatic

Sets the given color for console text

Parameters
[in]Colorthe given color
static void openfluid::tools::Console::setErrorColor ( )
inlinestatic

Sets the predefined error color for console text

static void openfluid::tools::Console::setOKColor ( )
inlinestatic

Sets the predefined OK color for console text

static void openfluid::tools::Console::setWarningColor ( )
inlinestatic

Sets the predefined warning color for console text


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