#ifndef __cmt_selector_h__
#define __cmt_selector_h__

#include "cmt_parser.h"

class Tag;

class Selector
{
public:
  typedef cmt_vector<Selector> SelectorVector;

  static Selector* create (const cmt_string& name);
  static Selector* find (const cmt_string& name);
  static void unmark_all ();
  static void mark_all (Tag* tag);
  static void tag_all ();
  static void clear_all ();
  static SelectorVector& selectors ();

public:
  Selector ();
  ~Selector ();
  void unmark ();
  void mark (Tag* tag);
  void tag ();

  cmt_string name;
  int selected;   /* All selectors matching one of the tags are selected */
  int priority;
};

#endif
