Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

Debtags::Facet Class Reference

Representation of a facet. More...

#include <Tag.h>

Collaboration diagram for Debtags::Facet:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Facet () throw ()
 Facet (const Facet &f) throw ()
 ~Facet () throw ()
Facetoperator= (const Facet &f) throw ()
bool operator== (const Facet &f) const throw ()
bool operator< (const Facet &f) const throw ()
 operator bool () const throw ()
 Return true if the facet is valid.
std::string name () const throw ()
 Return the name of the facet.
std::string sdesc () const throw ()
 Return the short description of the facet.
std::string ldesc () const throw ()
 Return the long description of the facet.
std::string fulldata () const throw ()
 Return the full data record about the facet.
std::string field (const std::string &name) const throw ()
 Return the content of an arbitrary field.
bool hasTag (const std::string &name) const throw ()
 Return true if the facet has a tag with the given name (name, not fullname).
Tagcoll::OpSet< Tagtags () const throw ()
 Return the list of tags in this facet.

Protected Member Functions

 Facet (FacetImpl *impl) throw ()

Protected Attributes

FacetImplimpl

Friends

class Tag
class Vocabulary

Detailed Description

Representation of a facet.

Tagcoll::Facet represents a Facet with all its informations. It is implemented via a reference-counted smart pointer, 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.getFacet("made-of");

Facets can contain a "false" value, in which case using any of their methonds produce a null-pointer dereference segfault. The "null" facets are useful as "none" return values:

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


Constructor & Destructor Documentation

Facet::Facet FacetImpl impl  )  throw () [protected]
 

Facet::Facet  )  throw ()
 

Facet::Facet const Facet f  )  throw ()
 

Facet::~Facet  )  throw ()
 


Member Function Documentation

std::string Facet::field const std::string &  name  )  const throw ()
 

Return the content of an arbitrary field.

std::string Facet::fulldata  )  const throw ()
 

Return the full data record about the facet.

bool Facet::hasTag const std::string &  name  )  const throw ()
 

Return true if the facet has a tag with the given name (name, not fullname).

std::string Facet::ldesc  )  const throw ()
 

Return the long description of the facet.

std::string Facet::name  )  const throw ()
 

Return the name of the facet.

Facet::operator bool  )  const throw ()
 

Return true if the facet is valid.

bool Facet::operator< const Facet f  )  const throw ()
 

Facet & Facet::operator= const Facet f  )  throw ()
 

bool Facet::operator== const Facet f  )  const throw ()
 

std::string Facet::sdesc  )  const throw ()
 

Return the short description of the facet.

Tagcoll::OpSet< Tag > Facet::tags  )  const throw ()
 

Return the list of tags in this facet.


Friends And Related Function Documentation

friend class Tag [friend]
 

friend class Vocabulary [friend]
 


Member Data Documentation

FacetImpl* Debtags::Facet::impl [protected]
 


The documentation for this class was generated from the following files:
Generated on Sat Sep 10 03:44:56 2005 for libdebtags by  doxygen 1.4.4