Update of /cvsroot/csp/APPLICATIONS/SimData/Include/SimData In directory sc8-pr-cvs1:/tmp/cvs-serv18849/Include/SimData Modified Files: DataArchive.h Date.h HashUtility.h HashUtility.i Key.h cSimData.i Added Files: Uniform.h Removed Files: GlibCsp.h Log Message: --- NEW FILE: Uniform.h --- /* SimData: Data Infrastructure for Simulations * Copyright (C) 2002, 2003 Mark Rose <tm...@st...> * * This file is part of SimData. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /** * @file Uniform.h * @author Mark Rose <mr...@st...> */ #ifndef __SIMDATA_UNIFORM_H__ #define __SIMDATA_UNIFORM_H__ #include <SimData/Namespace.h> NAMESPACE_SIMDATA typedef signed char int8; typedef unsigned char uint8; typedef signed short int16; typedef unsigned short uint16; typedef signed int int32; typedef unsigned int uint32; NAMESPACE_SIMDATA_END #endif // __SIMDATA_UNIFORM_H__ Index: DataArchive.h =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Include/SimData/DataArchive.h,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** DataArchive.h 15 Aug 2003 01:17:06 -0000 1.17 --- DataArchive.h 15 Aug 2003 06:59:16 -0000 1.18 *************** *** 28,31 **** --- 28,32 ---- #include <SimData/Export.h> + #include <SimData/Uniform.h> #include <SimData/Link.h> #include <SimData/Exception.h> *************** *** 81,86 **** hasht pathhash; hasht classhash; ! gint32 offset; ! gint32 length; }; --- 82,87 ---- hasht pathhash; hasht classhash; ! int32 offset; ! int32 length; }; Index: Date.h =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Include/SimData/Date.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Date.h 15 Aug 2003 04:52:05 -0000 1.14 --- Date.h 15 Aug 2003 06:59:16 -0000 1.15 *************** *** 35,39 **** * * DateZulu: - * * This class simply combines Date and Zulu, implementing * date/time rollover. Some astronical time routines, such --- 35,38 ---- *************** *** 41,50 **** * * SimTime: [...1564 lines suppressed...] --- 942,960 ---- } + /** Serialize the date and time to a data archive. + */ virtual void pack(Packer &p) const; + /** Deserialize the date and time from a data archive. + */ virtual void unpack(UnPacker &p); ! /** Parse date/time string from XML cdata. * ! * The format is either: * <Date name='...'>yyyy-mm-dd hh-mm-ss.ms</Date> ! * where '.ms' is optional, or: * <Date name='...'>yyyy-mm-dd</Date> ! * in which case the time is set to zero. */ virtual void parseXML(const char* cdata); Index: HashUtility.h =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Include/SimData/HashUtility.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** HashUtility.h 15 Aug 2003 01:17:06 -0000 1.15 --- HashUtility.h 15 Aug 2003 06:59:16 -0000 1.16 *************** *** 33,68 **** # endif - #include <iostream> - #include <string> #include <SimData/Export.h> ! #include <SimData/GlibCsp.h> #include <SimData/hash_map.h> #include <SimData/Namespace.h> ! //typedef int int32; ! //typedef char* cstring; ! ! //typedef hash<const char*> hashstr; ! //#define hashstr4 newhash4_cstring ! //#define hashstr8 newhash8_cstring - // use 64-bit hash values - //#define hasht u8 #define hash_string newhasht_cstring - //#define hash_string hashstr8 - //#define hasht_hash hashu8 - //#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 /** --- 33,51 ---- # endif #include <SimData/Export.h> ! #include <SimData/Uniform.h> #include <SimData/hash_map.h> #include <SimData/Namespace.h> ! #include <iostream> ! #include <string> ! NAMESPACE_SIMDATA #define hash_string newhasht_cstring /** *************** *** 74,82 **** struct HashT; ! extern SIMDATA_EXPORT u4 newhash4_cstring(std::string const &); ! extern HashT newhasht_cstring(std::string const &); ! //extern u8 newhash8_cstring(std::string const &); - //typedef u8 hasht; /** --- 57,63 ---- struct HashT; ! extern SIMDATA_EXPORT uint32 newhash4_cstring(std::string const &); ! extern SIMDATA_EXPORT HashT newhasht_cstring(std::string const &); /** *************** *** 85,96 **** */ struct SIMDATA_EXPORT HashT { ! guint32 a, b; HashT() { a = b = 0; } ! HashT(guint32 x) { a = x; b = 0; } ! HashT(guint32 b_, guint32 a_) { a = a_; b = b_; } --- 66,77 ---- */ struct SIMDATA_EXPORT HashT { ! uint32 a, b; HashT() { a = b = 0; } ! HashT(uint32 x) { a = x; b = 0; } ! HashT(uint32 b_, uint32 a_) { a = a_; b = b_; } *************** *** 101,108 **** *this = newhasht_cstring(x); } ! bool operator ==(guint32 x) const { return (b == 0 && a == x); } ! bool operator !=(guint32 x) const { return (b != 0 || a != x); } --- 82,89 ---- *this = newhasht_cstring(x); } ! bool operator ==(uint32 x) const { return (b == 0 && a == x); } ! bool operator !=(uint32 x) const { return (b != 0 || a != x); } *************** *** 117,121 **** return *this; } ! HashT & operator =(guint32 x) { a = x; b = 0; return *this; --- 98,102 ---- return *this; } ! HashT & operator =(uint32 x) { a = x; b = 0; return *this; *************** *** 131,136 **** ! /** ! * @brief Integer equality functor for hash_map. */ #if defined(_MSC_VER) && (_MSC_VER >= 1300) --- 112,116 ---- ! /** Integer equality functor for hash_map. */ #if defined(_MSC_VER) && (_MSC_VER >= 1300) *************** *** 151,156 **** #endif ! /** ! * @brief Integer hash functor for hash_map. */ struct hashint { --- 131,135 ---- #endif ! /** Integer hash functor for hash_map. */ struct hashint { *************** *** 161,166 **** ! /** ! * @brief const char* equality functor for hash_map. */ #if defined(_MSC_VER) && (_MSC_VER >= 1300) --- 140,144 ---- ! /** const char* equality functor for hash_map. */ #if defined(_MSC_VER) && (_MSC_VER >= 1300) *************** *** 183,197 **** #endif ! /** ! * @brief hasht hash functor for hash_map. */ struct hasht_hash { ! guint32 operator()(hasht i1) const { return i1.a; } }; ! /** ! * @brief hasht equality functor for hash_map. */ #if defined(_MSC_VER) && (_MSC_VER >= 1300) --- 161,173 ---- #endif ! /** hasht hash functor for hash_map. */ struct hasht_hash { ! uint32 operator()(hasht i1) const { return i1.a; } }; ! /** hasht equality functor for hash_map. */ #if defined(_MSC_VER) && (_MSC_VER >= 1300) *************** *** 213,218 **** ! /** ! * @brief String hash functor for hash_map. */ struct SIMDATA_EXPORT hashstring { --- 189,193 ---- ! /** String hash functor for hash_map. */ struct SIMDATA_EXPORT hashstring { *************** *** 223,228 **** }; ! /** ! * @brief String equality functor for hash_map. */ #if defined(_MSC_VER) && (_MSC_VER >= 1300) --- 198,202 ---- }; ! /** String equality functor for hash_map. */ #if defined(_MSC_VER) && (_MSC_VER >= 1300) *************** *** 246,251 **** class ObjectProxyBase; ! /** ! * @brief hash_map specialization type for hasht to T maps. */ template <class T> --- 220,224 ---- class ObjectProxyBase; ! /** hash_map specialization type for hasht to T maps. */ template <class T> *************** *** 254,264 **** }; ! /** ! * @brief A hasht to int map. */ typedef HASH_MAPS<hasht, int, hasht_hash, hasht_eq>::Type hasht_map; ! /** ! * @brief A hasht to ObjectProxyBase* map. */ typedef HASH_MAPS<hasht, ObjectProxyBase*, hasht_hash, hasht_eq>::Type proxy_map; --- 227,235 ---- }; ! /** A hasht to int map. */ typedef HASH_MAPS<hasht, int, hasht_hash, hasht_eq>::Type hasht_map; ! /** A hasht to ObjectProxyBase* map. */ typedef HASH_MAPS<hasht, ObjectProxyBase*, hasht_hash, hasht_eq>::Type proxy_map; Index: HashUtility.i =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Include/SimData/HashUtility.i,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** HashUtility.i 6 Aug 2003 06:36:24 -0000 1.4 --- HashUtility.i 15 Aug 2003 06:59:16 -0000 1.5 *************** *** 26,32 **** #include "SimData/Namespace.h" - typedef unsigned long int u4; /* unsigned 4-byte type */ - typedef unsigned char u1; /* unsigned 1-byte type */ - %rename(hash_string) SIMDATA(newhasht_cstring)(const char*); --- 26,29 ---- *************** *** 35,43 **** struct HashT { HashT(); ! HashT(guint32 x); ! HashT(guint32 b_, guint32 a_); HashT(const HashT &x); ! bool operator ==(guint32 x) const; ! bool operator !=(guint32 x) const; bool operator ==(HashT const &x) const; bool operator !=(HashT const &x) const; --- 32,40 ---- struct HashT { HashT(); ! HashT(uint32 x); ! HashT(uint32 b_, uint32 a_); HashT(const HashT &x); ! bool operator ==(uint32 x) const; ! bool operator !=(uint32 x) const; bool operator ==(HashT const &x) const; bool operator !=(HashT const &x) const; Index: Key.h =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Include/SimData/Key.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Key.h 15 Aug 2003 01:17:06 -0000 1.4 --- Key.h 15 Aug 2003 06:59:16 -0000 1.5 *************** *** 44,48 **** class SIMDATA_EXPORT Key: public BaseType { protected: ! u4 _key; public: --- 44,48 ---- class SIMDATA_EXPORT Key: public BaseType { protected: ! uint32 _key; public: Index: cSimData.i =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Include/SimData/cSimData.i,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** cSimData.i 10 Aug 2003 17:52:08 -0000 1.11 --- cSimData.i 15 Aug 2003 06:59:16 -0000 1.12 *************** *** 38,41 **** --- 38,42 ---- %include "SimData/Export.h" %include "SimData/Version.h" + %include "SimData/Uniform.h" %include "SimData/Log.i" --- GlibCsp.h DELETED --- |