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

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

#include <Collection.h>

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

Tagcoll::Consumer< ITEM, TAG > Tagcoll::CardinalityStore< ITEM, TAG > Tagcoll::InputMerger< ITEM, TAG > Tagcoll::ItemGrouper< ITEM, TAG > Tagcoll::PatchCollection< ITEM, TAG > Tagcoll::TDBDiskIndex< ITEM, TAG > Tagcoll::TDBIndexer< ITEM, TAG > Tagcoll::TDBReadonlyDiskIndex< ITEM, TAG >

List of all members.


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.

Definition at line 40 of file Collection.h.


Public Member Functions

virtual void applyChange (const PatchList< ITEM, TAG > &change)=0
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 OpSet< TAG > getAllTags () const =0
virtual int getCardinality (const TAG &tag) const
virtual OpSet< TAG > getCompanionTags (const OpSet< TAG > &tags) const
OpSet< ITEM > getItems (const OpSet< TAG > &tags) const
OpSet< ITEM > getItems (const TAG &tag) const
virtual OpSet< ITEM > getRelatedItems (const OpSet< TAG > &tags, int maxdistance=1) const
virtual OpSet< ITEM > getTaggedItems () const =0
OpSet< TAG > getTags (const OpSet< ITEM > &items) const
OpSet< TAG > getTags (const ITEM &item) const
virtual bool hasTag (const TAG &tag) const
virtual void output (Consumer< ITEM, TAG > &consumer) const =0
virtual void outputHavingTags (const OpSet< TAG > &tags, Consumer< ITEM, TAG > &consumer) const

Protected Member Functions

virtual void consumeItem (const ITEM &item, const OpSet< TAG > &tags)=0
 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.
void consumeItemsUntagged (const OpSet< ITEM > &)
 Process a set of items, all with no tags.
void consumeItemUntagged (const ITEM &)
 Process an untagged item.
virtual OpSet< ITEM > getItemsHavingTag (const TAG &tag) const =0
virtual OpSet< ITEM > getItemsHavingTags (const OpSet< TAG > &tags) const
virtual OpSet< TAG > getTagsOfItem (const ITEM &item) const =0
virtual OpSet< TAG > getTagsOfItems (const OpSet< ITEM > &items) const

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

Generated by  Doxygen 1.6.0   Back to index