Documentation for OpenFLUID 2.2.0
openfluid::tools::Console Class Reference

#include <tools/Console.hpp>

Public Types

enum class  Colors : char {
  BLACK , BLUE , GREEN , CYAN ,
  RED , MAGENTA , BROWN , GREY ,
  DARKGREY , LIGHTBLUE , LIGHTGREEN , LIGHTCYAN ,
  LIGHTRED , LIGHTMAGENTA , YELLOW , 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

◆ Colors

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

Member Function Documentation

◆ getANSIColorCode()

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

◆ resetAttributes()

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

Resets font attributes (color and weight)

◆ saveAttributes()

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

Saves font attributes (color and weight)

Returns
the color code (-1 on non-Windows systems)

◆ setColor()

static void openfluid::tools::Console::setColor ( Colors  Color)
inlinestatic

Sets the given color for console text

Parameters
[in]Colorthe given color

◆ setErrorColor()

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

Sets the predefined error color for console text

◆ setOKColor()

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

Sets the predefined OK color for console text

◆ setWarningColor()

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: