Color Class Reference

#include <vypIO.h>

Collaboration diagram for Color:

Collaboration graph
[legend]

List of all members.


Detailed Description

Console output color manipulator.

Attention:
Global variable is used inside this class.

Definition at line 60 of file vypIO.h.


Public Member Functions

 Color (EColor color=C_NO_COLOR)
 Color (const Color &)
 ~Color ()

Static Public Member Functions

static void enable (bool)
 Enable/disable color ouput glaobally.
static bool isEnabled ()

Private Member Functions

Coloroperator= (const Color &)

Private Attributes

Privated

Static Private Attributes

static bool useColors = false

Friends

std::ostream & operator<< (std::ostream &, const Color &)
 This behaves as standard stream manipulators.

Classes

struct  Private

Constructor & Destructor Documentation

Color ( EColor  color = C_NO_COLOR  ) 

Parameters:
color Desired color of console output. If omitted, default color is assumed.

Definition at line 37 of file vypIO.cc.

References Color::Private::color, and Color::d.

Color ( const Color cObj  ) 

Definition at line 42 of file vypIO.cc.

References Color::Private::color, and Color::d.

~Color (  ) 

Definition at line 47 of file vypIO.cc.

References Color::d.


Member Function Documentation

void enable ( bool  b  )  [static]

Enable/disable color ouput glaobally.

Attention:
Global variable is used inside this class.

Definition at line 50 of file vypIO.cc.

References Color::useColors.

Referenced by main().

Here is the caller graph for this function:

bool isEnabled (  )  [static]

Returns:
Returns true if color output is gloablly enabled.

Definition at line 53 of file vypIO.cc.

References Color::useColors.

Color& operator= ( const Color  )  [private]


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  ,
const Color  
) [friend]

This behaves as standard stream manipulators.

Definition at line 56 of file vypIO.cc.


Member Data Documentation

bool useColors = false [static, private]

Definition at line 80 of file vypIO.h.

Referenced by Color::enable(), Color::isEnabled(), and StreamDecorator::operator<<().

Private* d [private]

Definition at line 81 of file vypIO.h.

Referenced by Color::Color(), StreamDecorator::operator<<(), and Color::~Color().


The documentation for this class was generated from the following files:
Generated on Sat Jul 4 18:33:22 2009 for vyp08 (compiler and interpreter of VYP08 language) by  doxygen 1.5.4