libept
|
In-memory collection with both item->tags and tag->items mappings. More...
#include <fast.h>
Public Types | |
typedef std::map< std::string, std::set< std::string > >::const_iterator | const_iterator |
typedef std::map< std::string, std::set< std::string > >::iterator | iterator |
typedef std::map< std::string, std::set< std::string > >::value_type | value_type |
typedef std::map< std::string, std::set< std::string > >::const_iterator | const_tag_iterator |
typedef std::map< std::string, std::set< std::string > >::iterator | tag_iterator |
Public Member Functions | |
const_iterator | begin () const |
const_iterator | end () const |
iterator | begin () |
iterator | end () |
const_tag_iterator | tagBegin () const |
const_tag_iterator | tagEnd () const |
tag_iterator | tagBegin () |
tag_iterator | tagEnd () |
void | insert (const std::string &item, const std::set< std::string > &tags) |
void | insert (const std::set< std::string > &items, const std::string &tag) |
void | insert (const std::set< std::string > &items, const std::set< std::string > &tags) |
void | clear () |
std::set< std::string > | getTagsOfItem (const std::string &item) const |
std::set< std::string > | getItemsHavingTag (const std::string &tag) const |
std::set< std::string > | getItemsHavingTags (const std::set< std::string > &tags) const |
Get the items which are tagged with at least the tags `tags'. More... | |
bool | empty () const |
bool | hasItem (const std::string &item) const |
bool | hasTag (const std::string &tag) const |
std::set< std::string > | getTaggedItems () const |
std::set< std::string > | getAllTags () const |
std::vector< std::string > | getAllTagsAsVector () const |
unsigned int | itemCount () const |
unsigned int | tagCount () const |
std::set< std::string > | getTagsImplying (const std::string &tag) const |
std::set< std::string > | getItemsExactMatch (const std::set< std::string > &tags) const |
std::string | findTagWithMaxCardinality (size_t &card) const |
Fast | getChildCollection (const std::string &tag) const |
Return the collection with only those items that have this tag, but with the given tag removed. More... | |
void | removeTag (const std::string &tag) |
void | removeTagsWithCardinalityLessThan (size_t card) |
Protected Attributes | |
std::map< std::string, std::set< std::string > > | items |
std::map< std::string, std::set< std::string > > | tags |
In-memory collection with both item->tags and tag->items mappings.
typedef std::map<std::string, std::set<std::string> >::const_iterator ept::debtags::coll::Fast::const_iterator |
typedef std::map<std::string, std::set<std::string> >::const_iterator ept::debtags::coll::Fast::const_tag_iterator |
typedef std::map<std::string, std::set<std::string> >::iterator ept::debtags::coll::Fast::iterator |
typedef std::map<std::string, std::set<std::string> >::iterator ept::debtags::coll::Fast::tag_iterator |
typedef std::map<std::string, std::set<std::string> >::value_type ept::debtags::coll::Fast::value_type |
|
inline |
|
inline |
|
inline |
References getItemsHavingTag(), getItemsHavingTags(), and getTagsOfItem().
|
inline |
|
inline |
|
inline |
std::string ept::debtags::coll::Fast::findTagWithMaxCardinality | ( | size_t & | card | ) | const |
References res.
Referenced by tagCount().
std::set< std::string > ept::debtags::coll::Fast::getAllTags | ( | ) | const |
std::vector< std::string > ept::debtags::coll::Fast::getAllTagsAsVector | ( | ) | const |
Fast ept::debtags::coll::Fast::getChildCollection | ( | const std::string & | tag | ) | const |
Return the collection with only those items that have this tag, but with the given tag removed.
References insert(), removeTag(), and res.
Referenced by tagCount().
std::set< std::string > ept::debtags::coll::Fast::getItemsExactMatch | ( | const std::set< std::string > & | tags | ) | const |
References res.
Referenced by tagCount().
std::set< std::string > ept::debtags::coll::Fast::getItemsHavingTag | ( | const std::string & | tag | ) | const |
Referenced by clear().
std::set< std::string > ept::debtags::coll::Fast::getItemsHavingTags | ( | const std::set< std::string > & | tags | ) | const |
std::set< std::string > ept::debtags::coll::Fast::getTaggedItems | ( | ) | const |
std::set< std::string > ept::debtags::coll::Fast::getTagsImplying | ( | const std::string & | tag | ) | const |
References res, and ept::debtags::coll::utils::set_contains().
Referenced by tagCount().
std::set< std::string > ept::debtags::coll::Fast::getTagsOfItem | ( | const std::string & | item | ) | const |
Referenced by clear().
|
inline |
|
inline |
References getAllTags(), getAllTagsAsVector(), and getTaggedItems().
void ept::debtags::coll::Fast::insert | ( | const std::string & | item, |
const std::set< std::string > & | tags | ||
) |
Referenced by getChildCollection(), ept::debtags::coll::textformat::parse(), and tagEnd().
void ept::debtags::coll::Fast::insert | ( | const std::set< std::string > & | items, |
const std::string & | tag | ||
) |
void ept::debtags::coll::Fast::insert | ( | const std::set< std::string > & | items, |
const std::set< std::string > & | tags | ||
) |
|
inline |
void ept::debtags::coll::Fast::removeTag | ( | const std::string & | tag | ) |
Referenced by getChildCollection(), and tagCount().
void ept::debtags::coll::Fast::removeTagsWithCardinalityLessThan | ( | size_t | card | ) |
Referenced by tagCount().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
References insert().
|
protected |
|
protected |