1 #ifndef ANNOTATION_COLOR_H
2 #define ANNOTATION_COLOR_H
7 #include "alg/color.hpp"
8 #include "alg/sequence.hpp"
10 struct DefaultColorMap;
11 struct DefaultColorMap
13 typedef std::map<std::string, DefaultColorMap> color_map_type;
14 typedef color_map_type::iterator iterator;
16 //! initialize color map with a default color
17 DefaultColorMap(const Color &);
18 DefaultColorMap(const color_map_type&);
19 DefaultColorMap(const DefaultColorMap&);
26 class AnnotationColors
30 AnnotationColors(AnnotationColors &);
33 void setColor(Color &);
34 //! retreive default color
37 //! add default color for a particular type
38 void appendTypeColor(const std::string &, const Color &);
39 //! get default color for a type
40 Color typeColor(const std::string &);
41 //! remove a type (and all of its instances)
42 void erase(const std::string &);
44 //! add default color for a particular type
45 void appendInstanceColor(const std::string &type,
46 const std::string &instance,
48 //! get color for a particular type
49 Color instanceColor(const std::string &type,
50 const std::string &instance);
51 //! remove an instance of particular type
52 void erase(const std::string &type, const std::string& instance);
54 //! lookup an annotation color
55 Color lookup(const annot &);
56 Color lookup(const std::string &, const std::string &);
58 // nested maps, with default?
59 DefaultColorMap root_map;