#include <PatchCollection.h>
Inheritance diagram for Tagcoll::PatchCollection< ITEM, TAG >:


Public Member Functions | |
| PatchCollection (const ReadonlyCollection< ITEM, TAG > &coll) | |
| virtual | ~PatchCollection () |
| const PatchList< ITEM, TAG > & | getChanges () const |
| Get the changes that have been applied to this collection. | |
| void | resetChanges () |
| Throw away all changes previously applied to this collection. | |
| void | setChanges (const PatchList< ITEM, TAG > &changes) |
| Set the changes list to a specific patch list. | |
| void | addChanges (const PatchList< ITEM, TAG > &changes) |
| Add a specific patch list to the changes list. | |
| virtual bool | hasTag (const TAG &tag) const |
| Check if the collection contains a tag. | |
| virtual OpSet< ITEM > | getTaggedItems () const |
| Get the set of all the items that have tags according to this collection. | |
| virtual OpSet< TAG > | getAllTags () const |
| Get the set of all the tags in this collection. | |
| virtual int | getCardinality (const TAG &tag) const |
| Get the cardinality of tag `tag' (that is, the number of items who have it). | |
| virtual void | applyChange (const PatchList< ITEM, TAG > &change) |
| Apply a patch to the collection. | |
| virtual void | output (Consumer< ITEM, TAG > &consumer) const |
| Output all the contents of the collection to a Consumer. | |
Protected Member Functions | |
| virtual void | consumeItem (const ITEM &item, const OpSet< TAG > &tags) |
| Process a tagged item, with its tags. | |
| virtual OpSet< ITEM > | getItemsHavingTag (const TAG &tag) const |
| Get the items which are tagged with at least the tag `tag'. | |
| virtual OpSet< TAG > | getTagsOfItem (const ITEM &item) const |
| Get the tags attached to an item. | |
Protected Attributes | |
| const ReadonlyCollection< ITEM, TAG > & | coll |
| PatchList< ITEM, TAG > | changes |
| Tagcoll::PatchCollection< ITEM, TAG >::PatchCollection | ( | const ReadonlyCollection< ITEM, TAG > & | coll | ) | [inline] |
| virtual Tagcoll::PatchCollection< ITEM, TAG >::~PatchCollection | ( | ) | [inline, virtual] |
| void Tagcoll::PatchCollection< ITEM, TAG >::consumeItem | ( | const ITEM & | item, | |
| const OpSet< TAG > & | tags | |||
| ) | [protected, virtual] |
| OpSet< ITEM > Tagcoll::PatchCollection< ITEM, TAG >::getItemsHavingTag | ( | const TAG & | tag | ) | const [protected, virtual] |
Get the items which are tagged with at least the tag `tag'.
Implements Tagcoll::ReadonlyCollection< ITEM, TAG >.
| OpSet< TAG > Tagcoll::PatchCollection< ITEM, TAG >::getTagsOfItem | ( | const ITEM & | item | ) | const [protected, virtual] |
Get the tags attached to an item.
| item | The item to query |
Implements Tagcoll::ReadonlyCollection< ITEM, TAG >.
| const PatchList<ITEM, TAG>& Tagcoll::PatchCollection< ITEM, TAG >::getChanges | ( | ) | const [inline] |
Get the changes that have been applied to this collection.
| void Tagcoll::PatchCollection< ITEM, TAG >::resetChanges | ( | ) | [inline] |
Throw away all changes previously applied to this collection.
| void Tagcoll::PatchCollection< ITEM, TAG >::setChanges | ( | const PatchList< ITEM, TAG > & | changes | ) |
Set the changes list to a specific patch list.
| void Tagcoll::PatchCollection< ITEM, TAG >::addChanges | ( | const PatchList< ITEM, TAG > & | changes | ) |
Add a specific patch list to the changes list.
| bool Tagcoll::PatchCollection< ITEM, TAG >::hasTag | ( | const TAG & | tag | ) | const [virtual] |
Check if the collection contains a tag.
| tag | The tag to look for |
Reimplemented from Tagcoll::ReadonlyCollection< ITEM, TAG >.
| OpSet< ITEM > Tagcoll::PatchCollection< ITEM, TAG >::getTaggedItems | ( | ) | const [virtual] |
Get the set of all the items that have tags according to this collection.
Implements Tagcoll::ReadonlyCollection< ITEM, TAG >.
| OpSet< TAG > Tagcoll::PatchCollection< ITEM, TAG >::getAllTags | ( | ) | const [virtual] |
Get the set of all the tags in this collection.
Implements Tagcoll::ReadonlyCollection< ITEM, TAG >.
| int Tagcoll::PatchCollection< ITEM, TAG >::getCardinality | ( | const TAG & | tag | ) | const [virtual] |
Get the cardinality of tag `tag' (that is, the number of items who have it).
Reimplemented from Tagcoll::ReadonlyCollection< ITEM, TAG >.
| void Tagcoll::PatchCollection< ITEM, TAG >::applyChange | ( | const PatchList< ITEM, TAG > & | change | ) | [virtual] |
Apply a patch to the collection.
Example:
void perform(const PatchList<ITEM, TAG>& change) { collection.applyChange(change); undo.push_back(change.getReverse()); }
Implements Tagcoll::Collection< ITEM, TAG >.
| void Tagcoll::PatchCollection< ITEM, TAG >::output | ( | Consumer< ITEM, TAG > & | consumer | ) | const [virtual] |
Output all the contents of the collection to a Consumer.
Implements Tagcoll::ReadonlyCollection< ITEM, TAG >.
const ReadonlyCollection<ITEM, TAG>& Tagcoll::PatchCollection< ITEM, TAG >::coll [protected] |
PatchList<ITEM, TAG> Tagcoll::PatchCollection< ITEM, TAG >::changes [protected] |
1.5.1