zorba::ThesaurusProvider

#include <zorba/thesaurus.h>

Inherited from: zorba::Resource

A ThesaurusProvider is-a Resource for providing thesauri for a given language.

Public Functions

void

destroy() const =0

Destroy/clean up this Resource.

bool

getThesaurus(locale::iso639_1::type lang, Thesaurus::ptr *t=nullptr) const =0

Gets a Thesaurus for the given language.

Public Functions

destroy

void destroy() const =0

Destroy/clean up this Resource.

Zorba will call this method when it no longer needs the Resource. It is the responsibility of subclasses to clean up appropriate when this method is called, including calling "delete this" if the Resource was allocated with "new".

getThesaurus

bool getThesaurus(locale::iso639_1::type lang, Thesaurus::ptr *t=nullptr) const =0

Gets a Thesaurus for the given language.

Parameters

lang The desired language of the thesaurus.
t If not null, set to point to a Thesaurus for lang.

Returns

Returns true only if this provider can provide a thesaurus for lang.