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

Debtags::Tag Class Reference

Representation of a tag. More...

#include <Tag.h>

Collaboration diagram for Debtags::Tag:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Tag () throw ()
 Tag (const Tag &f) throw ()
 ~Tag () throw ()
Tagoperator= (const Tag &f) throw ()
bool operator== (const Tag &f) const throw ()
bool operator< (const Tag &f) const throw ()
 operator bool () const throw ()
Facet facet () const throw ()
std::string name () const throw ()
 Return the name of the tag, without the facet:: prefix.
std::string fullname () const throw ()
 Return the name of the tag, with the facet:: prefix.
std::string sdesc () const throw ()
 Return the short description of the tag.
std::string ldesc () const throw ()
 Return the long description of the tag.
std::string fulldata () const throw ()
 Return the full data record about the tag.
std::string field (const std::string &name) const throw ()
 Return the content of an arbitrary field.

Protected Member Functions

 Tag (TagImpl *tag) throw ()

Protected Attributes

TagImplimpl

Friends

class Vocabulary

Detailed Description

Representation of a tag.

Tagcoll::Tag represents a Tag 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:

    Tag tag = vocabulary.getTag("made-of::lang:c++");

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

    Tag tag = vocabulary.getTag("made-of");
    if (!tag)
       throw ConsistencyCheckException("tag \"mytag\" has not been defined");


Constructor & Destructor Documentation

Tag::Tag TagImpl tag  )  throw () [protected]
 

Tag::Tag  )  throw ()
 

Tag::Tag const Tag f  )  throw ()
 

Tag::~Tag  )  throw ()
 


Member Function Documentation

Facet Tag::facet  )  const throw ()
 

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

Return the content of an arbitrary field.

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

Return the full data record about the tag.

std::string Tag::fullname  )  const throw ()
 

Return the name of the tag, with the facet:: prefix.

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

Return the long description of the tag.

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

Return the name of the tag, without the facet:: prefix.

Tag::operator bool  )  const throw ()
 

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

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

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

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

Return the short description of the tag.


Friends And Related Function Documentation

friend class Vocabulary [friend]
 


Member Data Documentation

TagImpl* Debtags::Tag::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