--- parser3/src/include/pa_dictionary.h 2001/08/01 12:08:39 1.1 +++ parser3/src/include/pa_dictionary.h 2003/07/24 11:31:21 1.14 @@ -1,40 +1,35 @@ /** @file Parser: dictionary class decl. - Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) - - Author: Alexander Petrosyan (http://design.ru/paf) - - $Id: pa_dictionary.h,v 1.1 2001/08/01 12:08:39 parser Exp $ + Copyright (c) 2001-2003 ArtLebedev Group (http://www.artlebedev.com) + Author: Alexandr Petrosian (http://paf.design.ru) */ #ifndef PA_DICTIONARY_H #define PA_DICTIONARY_H -#include "pa_config_includes.h" +static const char* IDENT_DICTIONARY_H="$Date: 2003/07/24 11:31:21 $"; + #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); /// find first row that contains string in first column which starts @b src - void* first_that_starts(const char *src) const; - - /// where this table came from, may be NULL. proxy to Table - const String *origin_string() { return table.origin_string(); } - -public: - - bool first[0x100]; + Table::element_type first_that_begins(const char* str) const; private: Table& table; +private: + friend void pa_dictionary_add_first(Table::element_type row, Dictionary* self); + + int starting_line_of[0x100]; int constructor_line; }; #endif