libept
Public Member Functions | Public Attributes | List of all members
ept::debtags::voc::FacetData Class Reference

Representation of a facet. More...

#include <vocabulary.h>

Inheritance diagram for ept::debtags::voc::FacetData:
ept::debtags::voc::Data

Public Member Functions

 FacetData ()
TagDataobtainTag (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 TagDatatagData (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.
- Public Member Functions inherited from ept::debtags::voc::Data
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, TagDatam_tags
- Public Attributes inherited from ept::debtags::voc::Data
std::string name

Additional Inherited Members

- Protected Attributes inherited from ept::debtags::voc::Data
std::string m_desc

Detailed Description

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:

Facet facet = vocabulary.faceByName("made-of");

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:

Facet facet = vocabulary.facetByName("made-of");
if (!facet)
throw SomeException("facet \"made-of\" has not been defined");

Constructor & Destructor Documentation

ept::debtags::voc::FacetData::FacetData ( )
inline

Member Function Documentation

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)
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().

Member Data Documentation

std::map<std::string, TagData> ept::debtags::voc::FacetData::m_tags

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