#ifndef __TDictionary_hh__
#define __TDictionary_hh__
+#include <config.h>
+
#include <string>
#include <vector>
#include <hash_map>
+#include "dom.hh"
#include "TToken.hh"
class TDictionary
{
public:
- TDictionary(void) { };
+ TDictionary(class ALogger& l) : logger(l) { };
~TDictionary() { };
enum Form
Entry(void)
{
cls = UNDEFINED;
- infix = prefix = postfix = 0;
table = delimiter = limits = embellishment = leftOpen = rightOpen = 0;
};
unsigned previousParam(unsigned) const;
EntryClass cls;
- unsigned infix : 8;
- unsigned prefix : 8;
- unsigned postfix : 8;
unsigned delimiter : 1;
unsigned limits : 1;
unsigned embellishment : 1;
unsigned table : 1;
};
- void load(const char* uri);
+ void load(const std::string& uri);
+ void load(const DOM::Document& doc);
const Entry& find(const std::string&) const;
private:
{ bool operator()(const std::string&, const class String*) const; };
#endif
+ class ALogger& logger;
+#if defined(HAVE_EXT_HASH_MAP)
+ typedef __gnu_cxx::hash_map< std::string, Entry, StringHash > Dictionary;
+#elif defined(HAVE_HASH_MAP)
typedef std::hash_map< std::string, Entry, StringHash > Dictionary;
+#else
+#error "no hash_map could be found"
+#endif
Dictionary entries;
};