00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00032 #ifndef _moot_TYPES_H
00033 #define _moot_TYPES_H
00034
00035 #include <string>
00036 #include <deque>
00037 #include <map>
00038 #include <set>
00039
00040 #include "mootToken.h"
00041
00042 #if defined(__GNUC__)
00043 # if __GNUC__ >= 3
00044 # if __GNUC_MINOR__ == 0
00045 # define moot_STL_NAMESPACE std
00046 # else
00047 # define moot_STL_NAMESPACE __gnu_cxx
00048 # endif
00049 # include <ext/hash_map>
00050 # include <ext/hash_set>
00051 # else
00052 # define moot_STL_NAMESPACE std
00053 # include <hash_map>
00054 # include <hash_set>
00055 # endif
00056
00057
00058 namespace moot_STL_NAMESPACE {
00059 template<> struct hash<std::string> {
00060 std::size_t operator()(const std::string &__s) const {
00061 return __stl_hash_string(__s.c_str());
00062 }
00063 };
00064 };
00065
00066 #else
00067 # include <hash_map>
00068 # include <hash_set>
00069 # define moot_STL_NAMESPACE std
00070 #endif
00071
00073 #ifndef MAXFLOAT
00074 #include <values.h>
00075 #endif
00076
00077
00078 #define moot_NAMESPACE moot
00079 #define moot_BEGIN_NAMESPACE namespace moot {
00080 #define moot_END_NAMESPACE };
00081
00082
00083
00084
00085 moot_BEGIN_NAMESPACE
00086
00087 using namespace std;
00088 using namespace moot_STL_NAMESPACE;
00089
00090
00091
00092
00093
00094
00095
00096 #ifdef MOOT_USE_DOUBLE
00097
00098 typedef double ProbT;
00099 #else
00100
00101 typedef float ProbT;
00102 #endif //-- MOOT_USE_DOUBLE
00103
00105 typedef ProbT CountT;
00106
00107
00108 moot_END_NAMESPACE
00109
00110 #endif