CVD 0.8
Public Member Functions | Public Attributes | Related Functions
CVD::Bgrx< T > Class Template Reference

A colour consisting of red, green, blue and dummy components, in the order bgr dummy in memory. More...

#include <bgrx.h>

List of all members.

Public Member Functions

 Bgrx ()
 Bgrx (T b, T g, T r)
template<typename T2 >
Bgrx< T > & operator= (const Bgrx< T2 > &c)
bool operator== (const Bgrx< T > &c) const
bool operator!= (const Bgrx< T > &c) const

Public Attributes

blue
green
red
dummy

Related Functions

(Note that these are not member functions.)

template<typename T >
std::ostream & operator<< (std::ostream &os, const Bgrx< T > &x)
std::ostream & operator<< (std::ostream &os, const Bgrx< unsigned char > &x)

Detailed Description

template<typename T>
class CVD::Bgrx< T >

A colour consisting of red, green, blue and dummy components, in the order bgr dummy in memory.

Parameters:
TThe datatype of each component

Definition at line 37 of file bgrx.h.


Constructor & Destructor Documentation

template<typename T>
CVD::Bgrx< T >::Bgrx ( b,
g,
r 
) [inline, explicit]

Constructs a colour as specified.

Parameters:
rThe red component
gThe green component
bThe blue component

Definition at line 47 of file bgrx.h.


Member Function Documentation

template<typename T>
template<typename T2 >
Bgrx<T>& CVD::Bgrx< T >::operator= ( const Bgrx< T2 > &  c) [inline]

Assignment operator between two different storage types, using the standard casts as necessary.

Parameters:
cThe colour to copy from

Definition at line 57 of file bgrx.h.

References CVD::Bgrx< T >::blue, CVD::Bgrx< T >::green, and CVD::Bgrx< T >::red.

template<typename T>
bool CVD::Bgrx< T >::operator== ( const Bgrx< T > &  c) const [inline]

Logical equals operator.

Returns true if each component is the same.

Parameters:
cBgrx to compare with

Definition at line 66 of file bgrx.h.

References CVD::Bgrx< T >::blue, CVD::Bgrx< T >::green, and CVD::Bgrx< T >::red.

template<typename T>
bool CVD::Bgrx< T >::operator!= ( const Bgrx< T > &  c) const [inline]

Logical not-equals operator.

Returns true unless each component is the same.

Parameters:
cBgrx to compare with

Definition at line 71 of file bgrx.h.

References CVD::Bgrx< T >::blue, CVD::Bgrx< T >::green, and CVD::Bgrx< T >::red.


Friends And Related Function Documentation

template<typename T >
std::ostream & operator<< ( std::ostream &  os,
const Bgrx< T > &  x 
) [related]

Write the colour to a stream in the format "(blue,green,red)".

Parameters:
osThe stream
xThe colour object

Definition at line 82 of file bgrx.h.

template<typename T>
std::ostream & operator<< ( std::ostream &  os,
const Bgrx< unsigned char > &  x 
) [related]

Write the colour to a stream in the format "(blue,green,red)".

Parameters:
osThe stream
xThe colour object

Definition at line 92 of file bgrx.h.


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