--- parser3/src/include/pa_dictionary.h 2003/01/21 15:51:10 1.13 +++ parser3/src/include/pa_dictionary.h 2003/01/24 08:19:09 1.13.2.2 @@ -8,36 +8,35 @@ #ifndef PA_DICTIONARY_H #define PA_DICTIONARY_H -static const char* IDENT_DICTIONARY_H="$Date: 2003/01/21 15:51:10 $"; +static const char* IDENT_DICTIONARY_H="$Date: 2003/01/24 08:19:09 $"; #include "pa_table.h" /// simple dictionary, speding up lookups on contained two columned table -class Dictionary : public Pooled { +class Dictionary : public PA_Object { public: /// construct wrapper, grabbing first letters of first column into @b first - Dictionary(Table& atable, double amin_ratio=1); + Dictionary(TablePtr 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, size_t src_size=0) const; + Table::element_type first_that_starts(const char *src, size_t src_size=0) const; /// where this table came from, may be NULL. proxy to Table - const String *origin_string() { return table.origin_string(); } + ConstStringPtr origin_string() { return table->origin_string(); } private: - Table& table; + TablePtr table; double fmax_ratio; private: + friend void add_first(Table::element_type row, Dictionary* self); int starting_line_of[0x100]; int constructor_line; - - static void add_first(Array::Item *value, void *info); }; #endif