00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef HASHVAL_H
00020 #define HASHVAL_H
00021
00022 #include <pandabase.h>
00023 #include "typedef.h"
00024 #include <notify.h>
00025
00026
00027
00028
00029
00030 class EXPCL_PANDAEXPRESS HashVal {
00031 PUBLISHED:
00032 INLINE HashVal();
00033 INLINE HashVal(const HashVal ©);
00034
00035 INLINE bool operator == (const HashVal &other) const;
00036 INLINE bool operator != (const HashVal &other) const;
00037 INLINE uint get_value(int val) const;
00038 INLINE void set_value(int val, uint hash);
00039 INLINE void output(ostream &out) const;
00040 string as_string() const;
00041
00042 public:
00043 uint hv[4];
00044 };
00045
00046 INLINE ostream &operator << (ostream &out, const HashVal &hv) {
00047 out << "[";
00048 hv.output(out);
00049 out << "]";
00050 return out;
00051 }
00052
00053 #include "hashVal.I"
00054
00055 #endif