Annotation of parser3/src/include/pa_dictionary.h, revision 1.3

1.1       parser      1: /** @file
                      2:        Parser: dictionary class decl.
                      3: 
                      4:        Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com)
                      5: 
                      6:        Author: Alexander Petrosyan <paf@design.ru> (http://design.ru/paf)
                      7: 
1.3     ! parser      8:        $Id: pa_dictionary.h,v 1.2 2001/08/28 09:27:42 parser Exp $
1.1       parser      9: */
                     10: 
                     11: #ifndef PA_DICTIONARY_H
                     12: #define PA_DICTIONARY_H
                     13: 
                     14: #include "pa_config_includes.h"
                     15: #include "pa_table.h"
                     16: 
                     17: /// simple dictionary, speding up lookups on contained two columned table
                     18: class Dictionary : public Pooled {
1.3     ! parser     19:        friend void add_first(Array::Item *value, void *info);
1.1       parser     20: public:
                     21: 
                     22:        /// construct wrapper, grabbing first letters of first column into @b first
1.2       parser     23:        Dictionary(Table& atable, double amin_ratio=1);
                     24: 
                     25:        /// get max ratio
                     26:        double max_ratio() { return fmax_ratio; }
1.1       parser     27: 
                     28:        /// find first row that contains string in first column which starts @b src
                     29:        void* first_that_starts(const char *src) const;
                     30: 
                     31:        /// where this table came from, may be NULL. proxy to Table
                     32:        const String *origin_string() { return table.origin_string(); }
                     33: 
1.2       parser     34: private:
1.1       parser     35: 
1.2       parser     36:        Table& table;
                     37:        double fmax_ratio;
1.1       parser     38: 
                     39: private:
                     40: 
1.2       parser     41:        int starting_line_of[0x100]; int constructor_line;
1.1       parser     42: 
                     43: };
                     44: 
                     45: #endif

E-mail: