--- parser3/src/include/pa_dictionary.h 2001/08/01 12:08:39 1.1 +++ parser3/src/include/pa_dictionary.h 2001/08/28 09:27:42 1.2 @@ -5,7 +5,7 @@ Author: Alexander Petrosyan (http://design.ru/paf) - $Id: pa_dictionary.h,v 1.1 2001/08/01 12:08:39 parser Exp $ + $Id: pa_dictionary.h,v 1.2 2001/08/28 09:27:42 parser Exp $ */ #ifndef PA_DICTIONARY_H @@ -16,10 +16,14 @@ /// simple dictionary, speding up lookups on contained two columned table class Dictionary : public Pooled { + friend static void add_first(Array::Item *value, void *info); public: /// construct wrapper, grabbing first letters of first column into @b first - Dictionary(Table& atable); + Dictionary(Table& atable, double amin_ratio=1); + + /// get max ratio + double max_ratio() { return fmax_ratio; } /// find first row that contains string in first column which starts @b src void* first_that_starts(const char *src) const; @@ -27,13 +31,14 @@ public: /// where this table came from, may be NULL. proxy to Table const String *origin_string() { return table.origin_string(); } -public: +private: - bool first[0x100]; + Table& table; + double fmax_ratio; private: - Table& table; + int starting_line_of[0x100]; int constructor_line; };