bpp-core3  3.0.0
bpp::ColorManager< CodeType > Class Template Referenceabstract

Associate special colors to a code. More...

#include <Bpp/Graphics/ColorManager.h>

+ Inheritance diagram for bpp::ColorManager< CodeType >:

Public Member Functions

 ColorManager ()
 
virtual ~ColorManager ()
 
virtual CodeType getCode (const RGBColor &color)=0
 
virtual const RGBColorgetColor (CodeType &code) const =0
 
virtual const std::vector< CodeType > & getCodes () const =0
 
virtual const std::vector< RGBColor > & getColors () const =0
 
virtual size_t getNumberOfColors () const =0
 

Detailed Description

template<class CodeType>
class bpp::ColorManager< CodeType >

Associate special colors to a code.

Instances of this interface are used in some vector format.

Definition at line 24 of file ColorManager.h.

Constructor & Destructor Documentation

◆ ColorManager()

template<class CodeType>
bpp::ColorManager< CodeType >::ColorManager ( )
inline

Definition at line 27 of file ColorManager.h.

◆ ~ColorManager()

template<class CodeType>
virtual bpp::ColorManager< CodeType >::~ColorManager ( )
inlinevirtual

Definition at line 28 of file ColorManager.h.

Member Function Documentation

◆ getCode()

template<class CodeType>
virtual CodeType bpp::ColorManager< CodeType >::getCode ( const RGBColor color)
pure virtual
Parameters
colorThe color to look for.
Returns
The code associated to a given color.

Implemented in bpp::XFigColorManager.

Referenced by bpp::ColorManager< unsigned int >::~ColorManager().

◆ getCodes()

template<class CodeType>
virtual const std::vector<CodeType>& bpp::ColorManager< CodeType >::getCodes ( ) const
pure virtual
Returns
All valid codes.

Implemented in bpp::XFigColorManager.

Referenced by bpp::ColorManager< unsigned int >::~ColorManager().

◆ getColor()

template<class CodeType>
virtual const RGBColor& bpp::ColorManager< CodeType >::getColor ( CodeType &  code) const
pure virtual
Parameters
codeThe code to look for.
Returns
The color associated to a given code.
Exceptions
exceptionif the code is not valid.

Implemented in bpp::XFigColorManager.

Referenced by bpp::ColorManager< unsigned int >::~ColorManager().

◆ getColors()

template<class CodeType>
virtual const std::vector<RGBColor>& bpp::ColorManager< CodeType >::getColors ( ) const
pure virtual
Returns
All available colors.

Implemented in bpp::XFigColorManager.

Referenced by bpp::ColorManager< unsigned int >::~ColorManager().

◆ getNumberOfColors()

template<class CodeType>
virtual size_t bpp::ColorManager< CodeType >::getNumberOfColors ( ) const
pure virtual
Returns
The total number of colors available.

Implemented in bpp::XFigColorManager.

Referenced by bpp::ColorManager< unsigned int >::~ColorManager().


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