html::color Class Reference
[Html Document preparation]

Text color attribute class. More...

#include <color.hh>

Inheritance diagram for html::color:

html::attrib

List of all members.

Public Member Functions

 color (void)
 Default constructor.
 color (int red, int green, int blue)
 RGB color constructor.
 color (const std::string &clr)
 Name color constructor.
 ~color (void)
 Destructor.
colorclone (void) const
 Clone alignment.
bool isDefault (void) const
void putAttr (writer &w) const
 Write the color attribure.
void setDefault (void)
 Set default color.
void setRGB (int red, int green, int blue)
 Set the color with RGB.
void setColorName (const std::string &name)
 Set the color by name.
bool operator== (const color &x) const
 Compare operator.


Detailed Description

Text color attribute class.

Text color attribute class.

Author:
John Zweizig
Version:
1.1; Last modified March 4, 2008

Constructor & Destructor Documentation

html::color::color ( void   ) 

Default constructor.

Construct a color attribute object that specifies a default color.

html::color::color ( int  red,
int  green,
int  blue 
)

RGB color constructor.

Construct a color attribute object and initialize it with red, green and blue intensities.

Parameters:
red Red color intensity.
green Green color intensity.
blue Blue color intensity.

html::color::color ( const std::string &  clr  ) 

Name color constructor.

Construct a color attribute object and initialize it with named color value.

Parameters:
clr Color name.

html::color::~color ( void   ) 

Destructor.

Destroy a color object.


Member Function Documentation

color* html::color::clone ( void   )  const [virtual]

Clone alignment.

Make an identical copy of the color object.

Returns:
Pointer to the cloned color object.

Implements html::attrib.

bool html::color::isDefault ( void   )  const [virtual]

Test whether the color is the default value.

Returns:
true if default color.

Reimplemented from html::attrib.

void html::color::putAttr ( writer w  )  const [virtual]

Write the color attribure.

Write the color attribute to the specified html writer.

Parameters:
w Html writer reference.

Reimplemented from html::attrib.

void html::color::setDefault ( void   ) 

Set default color.

Set the color to the default.

void html::color::setRGB ( int  red,
int  green,
int  blue 
)

Set the color with RGB.

Set the color by specifying the red, green and blue intensities.

Parameters:
red Red color intensity.
green Green color intensity.
blue Blue color intensity.

void html::color::setColorName ( const std::string &  name  ) 

Set the color by name.

Set the color by specifying a known color name.

Parameters:
name Color name.

bool html::color::operator== ( const color x  )  const

Compare operator.

Test whether this color is equal to the specified.

Parameters:
x color object to be compared
Returns:
True if this color is equal to the argument.


The documentation for this class was generated from the following file:
Generated on Sun Mar 8 19:21:26 2009 for dmt by  doxygen 1.5.4