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

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

#include <Filters.h>

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

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

List of all members.


Detailed Description

template<typename ITEM, typename TAG>
class Tagcoll::Substitute< ITEM, TAG >

Filter replacing tags according to a list of Substitutions

Example:

   Substitute<Item, Tag> filter(consumer);

   // Parse substitutions from a file into the filter
   TextFormat<Item, Tag>::parse(itemconv, tagconv, input, filter.substitutions());

   // Filter the collection
   coll.output(filter);

Definition at line 95 of file Filters.h.


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.
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.
 Substitute (Consumer< ITEM, TAG > &cons, const Substitutions< TAG > &changes)
 Substitute (const Substitutions< TAG > &changes)
 Substitute (Consumer< ITEM, TAG > &cons)
const Substitutions< TAG > & substitutions () const
Substitutions< TAG > & substitutions ()

Protected Member Functions

virtual void consumeItem (const OpSet< ITEM > &items, const OpSet< TAG > &tags)
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.

Protected Attributes

Substitutions< TAG > changes
Consumer< ITEM, TAG > * consumer

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

Generated by  Doxygen 1.6.0   Back to index