00001
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef XAPIAN_INCLUDED_STEM_H
00023 #define XAPIAN_INCLUDED_STEM_H
00024
00025 #include <xapian/base.h>
00026 #include <xapian/visibility.h>
00027
00028 #include <string>
00029
00030 namespace Xapian {
00031
00033 struct XAPIAN_VISIBILITY_DEFAULT StemImplementation
00034 : public Xapian::Internal::RefCntBase
00035 {
00037 virtual ~StemImplementation();
00038
00040 virtual std::string operator()(const std::string & word) = 0;
00041
00043 virtual std::string get_description() const = 0;
00044 };
00045
00047 class XAPIAN_VISIBILITY_DEFAULT Stem {
00048 public:
00050 Xapian::Internal::RefCntPtr<StemImplementation> internal;
00051
00053 Stem(const Stem & o);
00054
00056 void operator=(const Stem & o);
00057
00062 Stem();
00063
00097 explicit Stem(const std::string &language);
00098
00110 explicit Stem(StemImplementation * p);
00111
00113 ~Stem();
00114
00120 std::string operator()(const std::string &word) const;
00121
00123 std::string get_description() const;
00124
00135 static std::string get_available_languages();
00136 };
00137
00138 }
00139
00140 #endif // XAPIAN_INCLUDED_STEM_H