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

Interface for all collections of tagged items. More...

#include <Collection.h>

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

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual ~Collection ()
virtual void applyChange (const PatchList< ITEM, TAG > &change)=0
 Apply a patch to the collection.

Protected Member Functions

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

Detailed Description

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

Interface for all collections of tagged items.

Note:
The point of a collection is to track the tags attached to items, and not to store the items themselves. This means that collections are not required to keep track of items with no tags.


Constructor & Destructor Documentation

template<typename ITEM, typename TAG>
virtual Tagcoll::Collection< ITEM, TAG >::~Collection (  )  [inline, virtual]


Member Function Documentation

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

Process an untagged item.

Implements Tagcoll::Consumer< ITEM, TAG >.

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

Process a set of items, all with no tags.

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

template<typename ITEM, typename TAG>
virtual void Tagcoll::Collection< ITEM, TAG >::applyChange ( const PatchList< ITEM, TAG > &  change  )  [pure virtual]

Apply a patch to the collection.

Example:

 void perform(const PatchList<ITEM, TAG>& change)
 {
    collection.applyChange(change);
    undo.push_back(change.getReverse());
 }

Implemented in Tagcoll::CardinalityStore< ITEM, TAG >, Tagcoll::ItemGrouper< ITEM, TAG >, Tagcoll::PatchCollection< ITEM, TAG >, Tagcoll::TDBDiskIndex< ITEM, TAG >, Tagcoll::TDBIndexer< ITEM, TAG >, and Tagcoll::InputMerger< std::string, std::string >.


The documentation for this class was generated from the following file:
Generated on Sat Jan 17 03:27:50 2009 for libtagcoll by  doxygen 1.5.1