1 #ifndef ANNOTATION_COLOR_H
2 #define ANNOTATION_COLOR_H
7 #include <boost/shared_ptr.hpp>
10 #include "sequence.hpp"
12 struct DefaultColorMap;
13 struct DefaultColorMap
15 typedef std::map<std::string, DefaultColorMap> color_map_type;
16 typedef color_map_type::iterator iterator;
17 typedef color_map_type::const_iterator const_iterator;
19 //! initialize color map with a default color
20 DefaultColorMap(const Color &);
21 DefaultColorMap(const color_map_type&);
22 DefaultColorMap(const DefaultColorMap&);
29 class AnnotationColors;
30 typedef boost::shared_ptr<AnnotationColors> AnnotationColorsRef;
32 class AnnotationColors
36 AnnotationColors(const AnnotationColors &);
38 // clear all the contents of our mappers
41 void setColor(Color &);
42 //! retreive default color
45 //! add default color for a particular type
46 void appendTypeColor(const std::string &, const Color &);
47 //! get default color for a type
48 Color typeColor(const std::string &);
49 //! remove a type (and all of its instances)
50 void erase(const std::string &);
52 //! add default color for a particular type
53 void appendInstanceColor(const std::string &type,
54 const std::string &instance,
56 //! get color for a particular type
57 Color instanceColor(const std::string &type,
58 const std::string &instance);
59 //! remove an instance of particular type
60 void erase(const std::string &type, const std::string& instance);
62 //! lookup an annotation color
63 Color lookup(const std::string &, const std::string &) const;
65 // nested maps, with default?
66 DefaultColorMap root_map;