From: <mk...@us...> - 2003-07-17 10:12:43
|
Update of /cvsroot/csp/APPLICATIONS/SimData/Source In directory sc8-pr-cvs1:/tmp/cvs-serv5974/Source Modified Files: DataArchive.cpp Makefile Added Files: Key.cpp Log Message: see CHANGES.current --- NEW FILE: Key.cpp --- /* SimDataCSP: Data Infrastructure for Simulations * Copyright (C) 2002 Mark Rose <tm...@st...> * * This file is part of SimDataCSP. * * 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. */ #include <SimData/Key.h> #include <SimData/Pack.h> NAMESPACE_SIMDATA const Key &Key::operator=(std::string const &id) { _key = newhash4_cstring(id.c_str()); return *this; } bool Key::operator==(std::string const &id) const { return *this == Key(id); } void Key::pack(Packer& p) const { p.pack(static_cast<int>(_key)); } void Key::unpack(UnPacker& p) { int k; p.unpack(k); _key = static_cast<u4>(k); } std::string Key::asString() const { char buff[32]; sprintf(buff, "Key<%08X>", _key); return buff; } NAMESPACE_END // namespace simdata Index: DataArchive.cpp =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Source/DataArchive.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** DataArchive.cpp 2 May 2003 20:59:05 -0000 1.8 --- DataArchive.cpp 17 Jul 2003 10:12:40 -0000 1.9 *************** *** 331,335 **** std::string msg; if (path_str==0 || *path_str==0) { ! msg = "human-readable path unavailable"; } else { msg = path_str; --- 331,338 ---- std::string msg; if (path_str==0 || *path_str==0) { ! msg = getPathString(key); ! if (msg == "") { ! msg = "human-readable path unavailable"; ! } } else { msg = path_str; Index: Makefile =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Source/Makefile,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Makefile 23 Apr 2003 09:14:23 -0000 1.10 --- Makefile 17 Jul 2003 10:12:40 -0000 1.11 *************** *** 22,25 **** --- 22,26 ---- InterfaceRegistry \ Interpolate \ + Key \ Link \ List \ |