load and display a motif list
[mussa.git] / alg / annotation_colors.hpp
index 96efa250453543047471c32c57dc651863407da8..2fdb4f1ad3391326c19dc3d324a3651b0bcb103e 100644 (file)
@@ -12,6 +12,7 @@ struct DefaultColorMap
 {
   typedef std::map<std::string, DefaultColorMap> color_map_type;
   typedef color_map_type::iterator iterator;
+  typedef color_map_type::const_iterator const_iterator;
   DefaultColorMap();
   //! initialize color map with a default color
   DefaultColorMap(const Color &);
@@ -27,8 +28,10 @@ class AnnotationColors
 {
 public:
   AnnotationColors();
-  AnnotationColors(AnnotationColors &);
+  AnnotationColors(const AnnotationColors &);
 
+  // clear all the contents of our mappers
+  void clear();
   //! set default color
   void setColor(Color &);
   //! retreive default color
@@ -52,8 +55,8 @@ public:
   void erase(const std::string &type, const std::string& instance);
 
   //! lookup an annotation color
-  Color lookup(const annot &);
-  Color lookup(const std::string &, const std::string &);
+  Color lookup(const annot &) const;
+  Color lookup(const std::string &, const std::string &) const;
 private:
   // nested maps, with default?
   DefaultColorMap root_map;