Update of /cvsroot/csp/APPLICATIONS/SimData/Include/SimData
In directory sc8-pr-cvs1:/tmp/cvs-serv18665/Include/SimData
Modified Files:
Tag: simdata
DataArchive.h Enum.h HashUtility.h hash_map.h
Log Message:
wide range of small fixes
Index: DataArchive.h
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/SimData/Include/SimData/Attic/DataArchive.h,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C2 -d -r1.1.2.2 -r1.1.2.3
*** DataArchive.h 20 Jan 2003 04:29:38 -0000 1.1.2.2
--- DataArchive.h 20 Jan 2003 04:56:49 -0000 1.1.2.3
***************
*** 70,75 ****
hasht pathhash;
hasht classhash;
! int32 offset;
! int32 length;
};
--- 70,75 ----
hasht pathhash;
hasht classhash;
! gint32 offset;
! gint32 length;
};
Index: Enum.h
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/SimData/Include/SimData/Attic/Enum.h,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C2 -d -r1.1.2.2 -r1.1.2.3
*** Enum.h 20 Jan 2003 04:29:38 -0000 1.1.2.2
--- Enum.h 20 Jan 2003 04:56:49 -0000 1.1.2.3
***************
*** 30,33 ****
--- 30,35 ----
#include <string>
#include <vector>
+ #include <cstdio>
+ #include <iostream>
#include <SimData/hash_map.h>
#include <SimData/BaseType.h>
***************
*** 66,75 ****
struct hashstring {
! static hash<const char*> h;
int operator()(const std::string &s) const {
return h(s.c_str());
}
};
! hash<const char*> hashstring::h;
} // namespace
--- 68,78 ----
struct hashstring {
! static std::hash<const char*> h;
int operator()(const std::string &s) const {
return h(s.c_str());
}
};
!
! std::hash<const char*> hashstring::h;
} // namespace
***************
*** 88,92 ****
EnumError(const std::string s=""): _msg(s), _armed(1) {}
void disarm() { _armed = 0; }
! ~EnumError() { if (_armed) cerr << _msg << endl; }
const std::string& getError() { return _msg; }
};
--- 91,95 ----
EnumError(const std::string s=""): _msg(s), _armed(1) {}
void disarm() { _armed = 0; }
! ~EnumError() { if (_armed) std::cerr << _msg << std::endl; }
const std::string& getError() { return _msg; }
};
Index: HashUtility.h
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/SimData/Include/SimData/Attic/HashUtility.h,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C2 -d -r1.1.2.2 -r1.1.2.3
*** HashUtility.h 20 Jan 2003 04:14:42 -0000 1.1.2.2
--- HashUtility.h 20 Jan 2003 04:56:49 -0000 1.1.2.3
***************
*** 33,44 ****
#include <SimData/ns-simdata.h>
! typedef int int32;
! typedef char* cstring;
//typedef hash<const char*> hashstr;
- typedef guint32 u4; /* unsigned 4-byte type */
- typedef guint8 u1; /* unsigned 1-byte type */
- typedef guint64 u8; /* unsigned 8-byte type */
#define hashstr4 newhash4_cstring
--- 33,41 ----
#include <SimData/ns-simdata.h>
! //typedef int int32;
! //typedef char* cstring;
//typedef hash<const char*> hashstr;
#define hashstr4 newhash4_cstring
***************
*** 52,65 ****
#define hasht_eq equ8
! typedef u8 hasht;
NAMESPACE_SIMDATA
! typedef u8 hasht;
extern u4 newhash4_cstring(const char*);
extern u8 newhash8_cstring(const char*);
- namespace {
struct eqstr {
--- 49,64 ----
#define hasht_eq equ8
! typedef guint32 u4; /* unsigned 4-byte type */
! typedef guint8 u1; /* unsigned 1-byte type */
! typedef guint64 u8; /* unsigned 8-byte type */
! typedef u8 hasht;
NAMESPACE_SIMDATA
! typedef u8 hasht;
extern u4 newhash4_cstring(const char*);
extern u8 newhash8_cstring(const char*);
struct eqstr {
***************
*** 93,97 ****
};
- } // anonymous namespace
typedef std::hash_map<hasht, int, hasht_hash, hasht_eq> hasht_map;
--- 92,95 ----
Index: hash_map.h
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/SimData/Include/SimData/Attic/hash_map.h,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C2 -d -r1.1.2.2 -r1.1.2.3
*** hash_map.h 20 Jan 2003 04:36:58 -0000 1.1.2.2
--- hash_map.h 20 Jan 2003 04:56:49 -0000 1.1.2.3
***************
*** 1,5 ****
#ifdef __GNUC__
#if __GNUC__ == 3
! #include <backward/hash_map.h>
#else
#include <hash_map>
--- 1,5 ----
#ifdef __GNUC__
#if __GNUC__ == 3
! #include <ext/hash_map>
#else
#include <hash_map>
|