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

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

Filter replacing tags according to a list of Substitutions. More...

#include <Filters.h>

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

Inheritance graph
[legend]
Collaboration diagram for Tagcoll::Substitute< ITEM, TAG >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Substitute ()
 Substitute (Consumer< ITEM, TAG > &cons)
 Substitute (const Substitutions< TAG > &changes)
 Substitute (Consumer< ITEM, TAG > &cons, const Substitutions< TAG > &changes)
Substitutions< TAG > & substitutions ()
 Access the internal Substitution list.
const Substitutions< TAG > & substitutions () const
 Access the internal Substitution list (const version).

Protected Member Functions

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

Protected Attributes

Substitutions< TAG > changes

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);


Constructor & Destructor Documentation

template<typename ITEM, typename TAG>
Tagcoll::Substitute< ITEM, TAG >::Substitute  )  [inline]
 

template<typename ITEM, typename TAG>
Tagcoll::Substitute< ITEM, TAG >::Substitute Consumer< ITEM, TAG > &  cons  )  [inline]
 

template<typename ITEM, typename TAG>
Tagcoll::Substitute< ITEM, TAG >::Substitute const Substitutions< TAG > &  changes  )  [inline]
 

template<typename ITEM, typename TAG>
Tagcoll::Substitute< ITEM, TAG >::Substitute Consumer< ITEM, TAG > &  cons,
const Substitutions< TAG > &  changes
[inline]
 


Member Function Documentation

template<typename ITEM, typename TAG>
virtual void Tagcoll::Substitute< ITEM, TAG >::consumeItem const OpSet< ITEM > &  items,
const OpSet< TAG > &  tags
[inline, protected, virtual]
 

template<typename ITEM, typename TAG>
virtual void Tagcoll::Substitute< ITEM, TAG >::consumeItem const ITEM &  item,
const OpSet< TAG > &  tags
[inline, protected, virtual]
 

Process a tagged item, with its tags.

Reimplemented from Tagcoll::Filter< ITEM, TAG >.

template<typename ITEM, typename TAG>
virtual void Tagcoll::Substitute< ITEM, TAG >::consumeItemsUntagged const OpSet< ITEM > &  items  )  [inline, protected, virtual]
 

Process a set of items, all with no tags.

Reimplemented from Tagcoll::Filter< ITEM, TAG >.

template<typename ITEM, typename TAG>
virtual void Tagcoll::Substitute< ITEM, TAG >::consumeItemUntagged const ITEM &  item  )  [inline, protected, virtual]
 

Process an untagged item.

Reimplemented from Tagcoll::Filter< ITEM, TAG >.

template<typename ITEM, typename TAG>
const Substitutions<TAG>& Tagcoll::Substitute< ITEM, TAG >::substitutions  )  const [inline]
 

Access the internal Substitution list (const version).

template<typename ITEM, typename TAG>
Substitutions<TAG>& Tagcoll::Substitute< ITEM, TAG >::substitutions  )  [inline]
 

Access the internal Substitution list.


Member Data Documentation

template<typename ITEM, typename TAG>
Substitutions<TAG> Tagcoll::Substitute< ITEM, TAG >::changes [protected]
 


The documentation for this class was generated from the following file:
Generated on Fri Sep 9 22:19:29 2005 for libtagcoll by  doxygen 1.4.4