Classes | Public Types | Public Member Functions | Protected Member Functions
zorba::Thesaurus Class Reference

A Thesaurus is-a Resource for thesaurus implementations. More...

#include <zorba/thesaurus.h>

Inheritance diagram for zorba::Thesaurus:
Inheritance graph
[legend]
Collaboration diagram for zorba::Thesaurus:
Collaboration graph
[legend]

List of all members.

Classes

class  iterator
 An iterator is used to iterate over lookup results. More...

Public Types

typedef std::unique_ptr
< Thesaurus,
internal::ztd::destroy_delete
< Thesaurus > > 
ptr
typedef unsigned range_type
 The integral type for "at least" and "at most" values.

Public Member Functions

virtual void destroy () const =0
 Destroys this Thesaurus.
virtual iterator::ptr lookup (String const &phrase, String const &relationship, range_type at_least, range_type at_most) const =0
 Looks-up the given phrase.

Protected Member Functions

virtual ~Thesaurus ()

Detailed Description

A Thesaurus is-a Resource for thesaurus implementations.

Definition at line 51 of file thesaurus.h.


Member Typedef Documentation

Reimplemented from zorba::Resource.

Definition at line 54 of file thesaurus.h.

typedef unsigned zorba::Thesaurus::range_type

The integral type for "at least" and "at most" values.

Definition at line 59 of file thesaurus.h.


Constructor & Destructor Documentation

virtual zorba::Thesaurus::~Thesaurus ( ) [protected, virtual]

Member Function Documentation

virtual void zorba::Thesaurus::destroy ( ) const [pure virtual]

Destroys this Thesaurus.

This function is called by Zorba when the Thesaurus is no longer needed.

If your URLResolver dynamically allocates Thesaurus objects, then the implementation can simply be (and usually is) delete this.

If your URLResolver returns a pointer to a static Thesaurus object, then the implementation should do nothing.

Implements zorba::Resource.

virtual iterator::ptr zorba::Thesaurus::lookup ( String const &  phrase,
String const &  relationship,
range_type  at_least,
range_type  at_most 
) const [pure virtual]

Looks-up the given phrase.

Parameters:
phraseThe phrase to look up.
relationshipThe relationship the synonyms are to have to the given phrase.
at_leastThe minimum number of levels within the thesaurus to be traversed.
at_mostThe maximum number of levels within the thesaurus to be traversed.
Returns:
Returns a pointer to an iterator for the results or NULL if the phrase was not found.

The documentation for this class was generated from the following file:
blog comments powered by Disqus