Update of /cvsroot/csp/APPLICATIONS/SimData/Source In directory sc8-pr-cvs1:/tmp/cvs-serv26134/Source Modified Files: Tag: simdata DataArchive.cpp HashUtility.cpp InterfaceRegistry.cpp cSimData.py cSimData_wrap.cpp Log Message: more hasht fixes Index: DataArchive.cpp =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Source/Attic/DataArchive.cpp,v retrieving revision 1.1.2.4 retrieving revision 1.1.2.5 diff -C2 -d -r1.1.2.4 -r1.1.2.5 *** DataArchive.cpp 20 Jan 2003 18:26:30 -0000 1.1.2.4 --- DataArchive.cpp 20 Jan 2003 23:06:48 -0000 1.1.2.5 *************** *** 102,106 **** //printf("%6d %d\n", i, table[i].pathhash); table_map[table[i].pathhash] = i; ! printf("%02d: %llu %llu %08x %d\n", i, table[i].pathhash, table[i].classhash, table[i].offset, table[i].length); } } --- 102,106 ---- //printf("%6d %d\n", i, table[i].pathhash); table_map[table[i].pathhash] = i; ! //printf("%02d: %llu %llu %08x %d\n", i, table[i].pathhash, table[i].classhash, table[i].offset, table[i].length); } } Index: HashUtility.cpp =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Source/Attic/HashUtility.cpp,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** HashUtility.cpp 19 Jan 2003 20:31:41 -0000 1.1.2.1 --- HashUtility.cpp 20 Jan 2003 23:06:48 -0000 1.1.2.2 *************** *** 112,116 **** --- 112,128 ---- } + HashT newhasht_cstring(const char* str) { + u4 h0, h1; + h0 = newhash((u1*)str, strlen(str), 0); + h1 = newhash((u1*)str, strlen(str), 1); + return HashT(h1, h0); + } + NAMESPACE_END // namespace simdata + + + std::ostream & operator<<(std::ostream &o, const hasht &x) { + return o << "(" << x.b << ":" << x.a << ")"; + } Index: InterfaceRegistry.cpp =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Source/Attic/InterfaceRegistry.cpp,v retrieving revision 1.1.2.4 retrieving revision 1.1.2.5 diff -C2 -d -r1.1.2.4 -r1.1.2.5 *** InterfaceRegistry.cpp 20 Jan 2003 18:27:54 -0000 1.1.2.4 --- InterfaceRegistry.cpp 20 Jan 2003 23:06:48 -0000 1.1.2.5 *************** *** 63,67 **** InterfaceProxy::InterfaceProxy(const char *cname, hasht chash) { ! assert(chash); g_InterfaceRegistry.addInterface(cname, chash, this); } --- 63,67 ---- InterfaceProxy::InterfaceProxy(const char *cname, hasht chash) { ! assert(chash != 0); g_InterfaceRegistry.addInterface(cname, chash, this); } Index: cSimData.py =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Source/Attic/cSimData.py,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** cSimData.py 20 Jan 2003 04:30:48 -0000 1.1.2.1 --- cSimData.py 20 Jan 2003 23:06:48 -0000 1.1.2.2 *************** *** 77,80 **** --- 77,110 ---- _cSimData.PythonException_swigregister(PythonExceptionPtr) + class HashT(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, HashT, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, HashT, name) + __swig_setmethods__["a"] = _cSimData.HashT_a_set + __swig_getmethods__["a"] = _cSimData.HashT_a_get + if _newclass:a = property(_cSimData.HashT_a_get,_cSimData.HashT_a_set) + __swig_setmethods__["b"] = _cSimData.HashT_b_set + __swig_getmethods__["b"] = _cSimData.HashT_b_get + if _newclass:b = property(_cSimData.HashT_b_get,_cSimData.HashT_b_set) + def __init__(self,*args): + self.this = apply(_cSimData.new_HashT,args) + self.thisown = 1 + def __eq__(*args): return apply(_cSimData.HashT___eq__,args) + def __ne__(*args): return apply(_cSimData.HashT___ne__,args) + def __del__(self, destroy= _cSimData.delete_HashT): + try: + if self.thisown: destroy(self) + except: pass + def __repr__(self): + return "<C HashT instance at %s>" % (self.this,) + + class HashTPtr(HashT): + def __init__(self,this): + self.this = this + if not hasattr(self,"thisown"): self.thisown = 0 + self.__class__ = HashT + _cSimData.HashT_swigregister(HashTPtr) + newhash4_cstring = _cSimData.newhash4_cstring Index: cSimData_wrap.cpp =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Source/Attic/cSimData_wrap.cpp,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -C2 -d -r1.1.2.3 -r1.1.2.4 *** cSimData_wrap.cpp 20 Jan 2003 18:47:46 -0000 1.1.2.3 --- cSimData_wrap.cpp 20 Jan 2003 23:06:48 -0000 1.1.2.4 *************** *** 657,720 **** #define SWIGTYPE_p_simdata__InterfaceRegistry swig_types[8] #define SWIGTYPE_p_simdata__External swig_types[9] ! #define SWIGTYPE_p_bool swig_types[10] ! #define SWIGTYPE_p_simdata__InvalidDate swig_types[11] ! #define SWIGTYPE_p_simdata__BadMagic swig_types[12] ! #define SWIGTYPE_p_double swig_types[13] ! #define SWIGTYPE_p_a_3__double swig_types[14] ! #define SWIGTYPE_p_std__vectorTsimdata__Spread_t swig_types[15] ! #define SWIGTYPE_p_simdata__Enumeration swig_types[16] ! #define SWIGTYPE_p_simdata__ListTsimdata__Spread_t swig_types[17] [...1751 lines suppressed...] _swigt__p_FILE, + _swigt__p_tm, + _swigt__p_simdata__HashT, _swigt__p_int, _swigt__p_std__vectorTsimdata__Table_t, *************** *** 22372,22377 **** _swigt__p_simdata__IOError, _swigt__p_std__vectorTsimdata__InterfaceProxy_p_t, - _swigt__p_simdata__SimDate, _swigt__p_simdata__InterpolatedData, _swigt__p_std__vectorTstd__string_t, _swigt__p_simdata__Matrix3, --- 22930,22935 ---- _swigt__p_simdata__IOError, _swigt__p_std__vectorTsimdata__InterfaceProxy_p_t, _swigt__p_simdata__InterpolatedData, + _swigt__p_simdata__SimDate, _swigt__p_std__vectorTstd__string_t, _swigt__p_simdata__Matrix3, |