libept
|
Representation of a facet. More...
#include <vocabulary.h>
Public Member Functions | |
FacetData () | |
TagData & | obtainTag (const std::string &fullname) |
bool | hasTag (const std::string &name) const |
Return true if the facet has a tag with the given name (name, not fullname) | |
const TagData * | tagData (const std::string &name) const |
Return the tag data for the given tag, or 0 if not found. | |
std::set< std::string > | tags () const |
Return the list of tags in this facet. | |
![]() | |
std::string | shortDescription () const |
Return the short description of the tag. | |
std::string | longDescription () const |
Return the long description of the tag. |
Public Attributes | |
std::map< std::string, TagData > | m_tags |
![]() | |
std::string | name |
Additional Inherited Members | |
![]() | |
std::string | m_desc |
Representation of a facet.
ept::debtags::Facet represents a Facet with all its informations. It is guaranteed to have fast value-copy semantics, so it can be passed around freely and efficiently without worrying about memory management issues.
The class is normally instantiated using a Vocabulary:
Facets can contain an "invalid" value, in which case using any of their methods will likely produce segfault. The "invalid" facets are useful as "none" return values:
|
inline |
bool ept::debtags::voc::FacetData::hasTag | ( | const std::string & | name | ) | const |
Return true if the facet has a tag with the given name (name, not fullname)
Referenced by ept::debtags::Vocabulary::hasTag().
voc::TagData & ept::debtags::voc::FacetData::obtainTag | ( | const std::string & | fullname | ) |
References ept::debtags::voc::Data::name.
const TagData * ept::debtags::voc::FacetData::tagData | ( | const std::string & | name | ) | const |
Return the tag data for the given tag, or 0 if not found.
Referenced by ept::debtags::Vocabulary::tagData().
std::set< std::string > ept::debtags::voc::FacetData::tags | ( | ) | const |
Return the list of tags in this facet.
Referenced by TestVocabulary::_7(), and ept::debtags::Vocabulary::tags().
std::map<std::string, TagData> ept::debtags::voc::FacetData::m_tags |