Public Member Functions | Public Attributes

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

List of all members.

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 Attributes

std::map< std::string, TagDatam_tags

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

References m_tags.

Referenced by ept::debtags::Vocabulary::hasTag().

voc::TagData & ept::debtags::voc::FacetData::obtainTag ( const std::string &  fullname  ) 

References m_tags.

Referenced by ept::debtags::Vocabulary::obtainTag().

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.

References m_tags.

Referenced by ept::debtags::Vocabulary::tagData().

std::set< std::string > ept::debtags::voc::FacetData::tags (  )  const

Return the list of tags in this facet.

References m_tags.

Referenced by TestVocabulary::_7(), and ept::debtags::Vocabulary::tags().


Member Data Documentation

Referenced by hasTag(), obtainTag(), tagData(), and tags().


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