Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

BasicTagMatcher.h

Go to the documentation of this file.
00001 #ifndef TAGCOLL_BASIC_TAG_FILTER_H
00002 #define TAGCOLL_BASIC_TAG_FILTER_H
00003 
00004 #pragma interface
00005 
00006 #include <tagcoll/TagConsumer.h>
00007 #include <string>
00008 
00009 namespace Tagcoll
00010 {
00011 
00012 class Tag;
00013 class Facet;
00014 
00015 class BasicFacetMatcher : public FacetMatcher
00016 {
00017 protected:
00018     std::string name;
00019     std::string str;
00020 
00021 public:
00022     BasicFacetMatcher() throw () {}
00023     virtual ~BasicFacetMatcher() throw () {}
00024 
00025     void setName(const std::string _name) throw () { name = _name; }
00026     void setString(const std::string _str) throw () { str = _str; }
00027 
00028     bool hasName() const throw () { return !name.empty(); }
00029     bool hasString() const throw () { return !str.empty(); }
00030 
00031     bool matchName(const std::string& text) const throw ();
00032     bool matchString(const std::string& text) const throw ();
00033 
00034     bool match(const Facet& facet) const throw ();
00035 };
00036 
00037 class BasicTagMatcher : public TagMatcher
00038 {
00039 protected:
00040     std::string name;
00041     std::string str;
00042 
00043 public:
00044     BasicTagMatcher() throw () {}
00045     virtual ~BasicTagMatcher() throw () {}
00046 
00047     void setName(const std::string _name) throw () { name = _name; }
00048     void setString(const std::string _str) throw () { str = _str; }
00049 
00050     bool hasName() const throw () { return !name.empty(); }
00051     bool hasString() const throw () { return !str.empty(); }
00052 
00053     bool matchName(const std::string& text) const throw ();
00054     bool matchString(const std::string& text) const throw ();
00055 
00056     virtual bool match(const Tag& tag) const throw ();
00057 };
00058 
00059 };
00060 
00061 // vim:set ts=3 sw=3:
00062 #endif

Generated on Thu Jun 23 11:49:31 2005 for libtagcoll by  doxygen 1.4.3-20050530