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&);
63 void load(const std::string&, const std::string&);
64 void load(const DOM::Document&, const std::string& = "");
65 const Entry& find(const std::string&) const;
68 struct StringHash : public std::unary_function< std::string, size_t >
69 { size_t operator()(const std::string& s) const { return hash<char*>()(s.c_str()); } };
72 struct StringEq : public std::binary_function< std::string, std::string, bool >
73 { bool operator()(const std::string&, const class String*) const; };
76 class ALogger& logger;
77 #if defined(HAVE_EXT_HASH_MAP)
78 typedef __gnu_cxx::hash_map< std::string, Entry, StringHash > Dictionary;
79 #elif defined(HAVE_HASH_MAP)
80 typedef std::hash_map< std::string, Entry, StringHash > Dictionary;
82 #error "no hash_map could be found"
87 #endif // __TDictionary_hh__