Logo Search packages:      
Sourcecode: tagcoll version File versions  Download package

Tagcoll::FilterTagsByExpression< ITEM, TAG > Class Template Reference

#include <Expression.h>

Inheritance diagram for Tagcoll::FilterTagsByExpression< ITEM, TAG >:

Tagcoll::Filter< ITEM, TAG > Tagcoll::Consumer< ITEM, TAG >

List of all members.


Detailed Description

template<class ITEM, class TAG>
class Tagcoll::FilterTagsByExpression< ITEM, TAG >

Remove the tags that do not singularly match a tag expression.

This is a slight abuse of tag expressions, but it can prove useful to remove tags matching, for example, "special::not-yet-tagged*" or "!(use::gaming || game::*)".

Definition at line 291 of file Expression.h.


Public Types

enum  MatchType { PLAIN, INVERTED }

Public Member Functions

void consume (const OpSet< ITEM > &items, const OpSet< TAG > &tags)
 Process a set of items identically tagged, with their tags.
void consume (const OpSet< ITEM > &items)
 Process a set of items, all with no tags.
void consume (const ITEM &item, const OpSet< TAG > &tags)
 Process a tagged item, with its tags.
void consume (const ITEM &item)
 Process an untagged item.
int countMatched () const
 FilterTagsByExpression (Consumer< ITEM, TAG > &cons, const std::string &expression)
 FilterTagsByExpression (Consumer< ITEM, TAG > &cons, const Expression &expression)
 FilterTagsByExpression (const std::string &expression)
 FilterTagsByExpression (const Expression &expression)
virtual Consumer< ITEM, TAG > & getConsumer () const
 Access the filter's consumer.
bool isComplete ()
 Return true if the filter is not incomplete.
virtual void setConsumer (Consumer< ITEM, TAG > &consumer)
 Set or change the filter's consumer.
void setExpression (const std::string &expression)
void setExpression (const Expression &expression)
void setMatchType (MatchType type)

Protected Member Functions

virtual void consumeItem (const ITEM &item, const OpSet< TAG > &tags)
 Process a tagged item, with its tags.
virtual void consumeItems (const OpSet< ITEM > &items, const OpSet< TAG > &tags)
 Process a set of items identically tagged, with their tags.
virtual void consumeItemsUntagged (const OpSet< ITEM > &items)
 Process a set of items, all with no tags.
virtual void consumeItemUntagged (const ITEM &item)
 Process an untagged item.
bool match (const TAG &tag) const

Protected Attributes

Consumer< ITEM, TAG > * consumer
Expression expr
int matched
MatchType matchType

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index