2 #ifndef __TDictionary_hh__
3 #define __TDictionary_hh__
14 TDictionary(void) { };
38 infix = prefix = postfix = 0;
39 table = delimiter = limits = embellishment = leftOpen = rightOpen = 0;
42 std::vector<TToken> pattern;
45 bool defined(void) const { return cls != UNDEFINED; };
46 bool hasArguments(void) const { return !pattern.empty(); };
47 bool paramDelimited(unsigned) const;
48 bool lastDelimiter(unsigned) const;
49 unsigned previousParam(unsigned) const;
55 unsigned delimiter : 1;
57 unsigned embellishment : 1;
58 unsigned leftOpen : 1;
59 unsigned rightOpen : 1;
63 void load(const char* uri);
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 typedef std::hash_map< std::string, Entry, StringHash > Dictionary;
79 #endif // __TDictionary_hh__