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;
15 typedef color_map_type::const_iterator const_iterator;
17 //! initialize color map with a default color
18 DefaultColorMap(const Color &);
19 DefaultColorMap(const color_map_type&);
20 DefaultColorMap(const DefaultColorMap&);
27 class AnnotationColors
31 AnnotationColors(const AnnotationColors &);
33 // clear all the contents of our mappers
36 void setColor(Color &);
37 //! retreive default color
40 //! add default color for a particular type
41 void appendTypeColor(const std::string &, const Color &);
42 //! get default color for a type
43 Color typeColor(const std::string &);
44 //! remove a type (and all of its instances)
45 void erase(const std::string &);
47 //! add default color for a particular type
48 void appendInstanceColor(const std::string &type,
49 const std::string &instance,
51 //! get color for a particular type
52 Color instanceColor(const std::string &type,
53 const std::string &instance);
54 //! remove an instance of particular type
55 void erase(const std::string &type, const std::string& instance);
57 //! lookup an annotation color
58 Color lookup(const annot &) const;
59 Color lookup(const std::string &, const std::string &) const;
61 // nested maps, with default?
62 DefaultColorMap root_map;