Go to the documentation of this file.00001
00025 #ifndef _PM_COMMON_DEFS_H_
00026 #define _PM_COMMON_DEFS_H_
00027
00028 #include <set>
00029 #include <string>
00030 #include <boost/unordered_map.hpp>
00031 #include <boost/foreach.hpp>
00032 #define foreach BOOST_FOREACH
00033
00034 namespace predicate_manager
00035 {
00041 typedef std::pair<int, std::string> NameID;
00047 typedef std::pair<int, uint32_t> NrID;
00051 typedef std::set<NameID> NameIDSet;
00052
00055 struct cantor_pair_hash
00056 : std::unary_function<NrID, std::size_t>
00057 {
00058 std::size_t operator() ( const NrID& id ) const
00059 {
00060 return 0.5* ( id.first+id.second+1 ) * ( id.first+id.second ) +id.second;
00061 }
00062 };
00063
00065 typedef boost::unordered_map<NameID, const bool*> PredValueMap;
00066
00073 enum DEP_STATUS {OK, UNDECLARED, UNKNOWN_VALUE};
00074 }
00075
00076 #endif