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

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

#include <InputMerger.h>

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

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

List of all members.


Detailed Description

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

Simple Collection.

It can be used to merge input values: if an item is added multiple times, its various tagsets are merged in a single one.

It is also a full-featured collection, although not very optimized.

Definition at line 46 of file InputMerger.h.


Public Member Functions

virtual void applyChange (const PatchList< ITEM, TAG > &change)=0
void applyChange (const PatchList< ITEM, TAG > &change)
void clear ()
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.
OpSet< TAG > getAllTags () const
virtual int getCardinality (const TAG &tag) const
virtual OpSet< TAG > getCompanionTags (const OpSet< TAG > &tags) const
OpSet< TAG > getCompanionTags (const OpSet< TAG > &ts) 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
OpSet< ITEM > getRelatedItems (const OpSet< TAG > &ts, int maxdistance=1) const
virtual OpSet< ITEM > getTaggedItems () const
OpSet< TAG > getTags (const OpSet< ITEM > &items) const
OpSet< TAG > getTags (const ITEM &item) const
bool hasItem (const ITEM &item) const
virtual bool hasTag (const TAG &tag) const
unsigned int itemCount () const
virtual void output (Consumer< ITEM, TAG > &consumer) const =0
void output (Consumer< ITEM, TAG > &consumer) const
void outputHavingTags (const OpSet< TAG > &ts, Consumer< ITEM, TAG > &consumer) const
void outputReversed (Consumer< TAG, ITEM > &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 consumeItem (const ITEM &item, const OpSet< TAG > &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
virtual OpSet< ITEM > getItemsHavingTags (const OpSet< TAG > &tags) const
virtual OpSet< TAG > getTagsOfItem (const ITEM &item) const =0
virtual OpSet< TAG > getTagsOfItem (const ITEM &item) const
virtual OpSet< TAG > getTagsOfItems (const OpSet< ITEM > &items) const

Protected Attributes

std::map< ITEM, OpSet< TAG > > coll

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

Generated by  Doxygen 1.6.0   Back to index