41 #ifndef BPP_GRAPHICS_COLORMANAGER_H
42 #define BPP_GRAPHICS_COLORMANAGER_H
45 #include "../Text/TextTools.h"
59 template<
class CodeType>
83 virtual const std::vector<CodeType>&
getCodes()
const = 0;
88 virtual const std::vector<RGBColor>&
getColors()
const = 0;
156 for (
unsigned int i = 0; i <
colors_.size(); i++)
170 for (
unsigned int i = 0; i <
codes_.size(); i++)
Associate special colors to a code.
virtual const std::vector< CodeType > & getCodes() const =0
virtual size_t getNumberOfColors() const =0
virtual const RGBColor & getColor(CodeType &code) const =0
virtual const std::vector< RGBColor > & getColors() const =0
virtual CodeType getCode(const RGBColor &color)=0
Exception base class. Overload exception constructor (to control the exceptions mechanism)....
Describe a color according to its red, green and blue componants.
Color manager for the XFig format.
const std::vector< unsigned int > & getCodes() const
const std::vector< RGBColor > & getColors() const
const RGBColor & getColor(unsigned int &code) const
std::vector< unsigned int > codes_
std::vector< RGBColor > colors_
virtual ~XFigColorManager()
unsigned int currentCode_
size_t getNumberOfColors() const
unsigned int getCode(const RGBColor &color)
std::string toString(T t)
General template method to convert to a string.