31class OPENCC_EXPORT DictGroup :
public Dict {
33 DictGroup(
const std::list<DictPtr>& dicts);
35 static DictGroupPtr NewFromDict(
const Dict& dict);
51 const std::list<DictPtr> GetDicts()
const {
return dicts; }
54 const size_t keyMaxLength;
55 const std::list<DictPtr> dicts;
virtual size_t KeyMaxLength() const
Returns the length of the longest key in the dictionary.
Definition DictGroup.cpp:45
virtual LexiconPtr GetLexicon() const
Returns all entries in the dictionary.
Definition DictGroup.cpp:91
virtual Optional< const DictEntry * > MatchPrefix(const char *word, size_t len) const
Matches the longest matched prefix of a word.
Definition DictGroup.cpp:58
virtual Optional< const DictEntry * > Match(const char *word, size_t len) const
Matches a word exactly and returns the DictEntry or Optional::Null().
Definition DictGroup.cpp:47
virtual std::vector< const DictEntry * > MatchAllPrefixes(const char *word, size_t len) const
Returns all matched prefixes of a word, sorted by the length (desc).
Definition DictGroup.cpp:69
Abstract class of dictionary.
Definition Dict.hpp:29
A class that wraps type T into a nullable type.
Definition Optional.hpp:26