obby::colour Class Reference

#include <colour.hpp>

List of all members.

Public Member Functions

 colour ()
 colour (unsigned int red, unsigned int green, unsigned int blue)
unsigned int get_red () const
unsigned int get_green () const
unsigned int get_blue () const
bool similar_colour (const colour &colour) const

Protected Attributes

unsigned int m_red
unsigned int m_green
unsigned int m_blue


Detailed Description

Simple class to store a colour composed by red, green and blue components ranging from 0 to 255.

Definition at line 30 of file colour.hpp.


Constructor & Destructor Documentation

obby::colour::colour (  ) 

Default constructor, leaves an uninitialised colour.

Definition at line 23 of file colour.cpp.

Referenced by similar_colour().

obby::colour::colour ( unsigned int  red,
unsigned int  green,
unsigned int  blue 
)

Composes a new colour.

Definition at line 27 of file colour.cpp.


Member Function Documentation

unsigned int obby::colour::get_red (  )  const

Returns the red colour component.

Definition at line 32 of file colour.cpp.

References m_red.

Referenced by serialise::default_context_to< obby::colour >::to_string().

unsigned int obby::colour::get_green (  )  const

Returns the green colour component.

Definition at line 37 of file colour.cpp.

References m_green.

Referenced by serialise::default_context_to< obby::colour >::to_string().

unsigned int obby::colour::get_blue (  )  const

Returns the blue colour component.

Definition at line 42 of file colour.cpp.

References m_blue.

Referenced by serialise::default_context_to< obby::colour >::to_string().

bool obby::colour::similar_colour ( const colour colour  )  const

Returns TRUE if colour is similar to this colour.

Definition at line 47 of file colour.cpp.

References colour(), m_blue, m_green, and m_red.

Referenced by obby::basic_buffer< Document, Selector >::check_colour().


Member Data Documentation

unsigned int obby::colour::m_red [protected]

Definition at line 57 of file colour.hpp.

Referenced by get_red(), and similar_colour().

unsigned int obby::colour::m_green [protected]

Definition at line 58 of file colour.hpp.

Referenced by get_green(), and similar_colour().

unsigned int obby::colour::m_blue [protected]

Definition at line 59 of file colour.hpp.

Referenced by get_blue(), and similar_colour().


The documentation for this class was generated from the following files:
Generated on Fri Jan 11 10:01:32 2008 for obby by  doxygen 1.5.1