2 #ifndef __TDictionary_hh__
3 #define __TDictionary_hh__
17 TDictionary(class ALogger& l) : logger(l) { };
41 table = delimiter = limits = embellishment = leftOpen = rightOpen = 0;
44 std::vector<TToken> pattern;
47 bool defined(void) const { return cls != UNDEFINED; };
48 bool hasArguments(void) const { return !pattern.empty(); };
49 bool paramDelimited(unsigned) const;
50 bool lastDelimiter(unsigned) const;
51 unsigned previousParam(unsigned) const;
54 unsigned delimiter : 1;
56 unsigned embellishment : 1;
57 unsigned leftOpen : 1;
58 unsigned rightOpen : 1;
62 void load(const std::string& uri);
63 void load(const DOM::Document& doc);
64 const Entry& find(const std::string&) const;
67 struct StringHash : public std::unary_function< std::string, size_t >
68 { size_t operator()(const std::string& s) const { return hash<char*>()(s.c_str()); } };
71 struct StringEq : public std::binary_function< std::string, std::string, bool >
72 { bool operator()(const std::string&, const class String*) const; };
75 class ALogger& logger;
76 #if defined(HAVE_EXT_HASH_MAP)
77 typedef __gnu_cxx::hash_map< std::string, Entry, StringHash > Dictionary;
78 #elif defined(HAVE_HASH_MAP)
79 typedef std::hash_map< std::string, Entry, StringHash > Dictionary;
81 #error "no hash_map could be found"
86 #endif // __TDictionary_hh__