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) More...
 
const TagDatatagData (const std::string &name) const
 Return the tag data for the given tag, or 0 if not found. More...
 
std::set< std::string > tags () const
 Return the list of tags in this facet. More...
 
- Public Member Functions inherited from ept::debtags::voc::Data
std::string shortDescription () const
 Return the short description of the tag. More...
 
std::string longDescription () const
 Return the long description of the tag. More...
 

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

◆ FacetData()

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

Member Function Documentation

◆ hasTag()

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

◆ obtainTag()

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

References res.

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

◆ tagData()

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

◆ tags()

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

Return the list of tags in this facet.

References res.

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

Member Data Documentation

◆ m_tags

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

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