From: <mk...@us...> - 2003-08-22 00:21:52
|
Update of /cvsroot/csp/APPLICATIONS/SimData In directory sc8-pr-cvs1:/tmp/cvs-serv20073 Modified Files: Tag: b0_4_0 CHANGES.current setup.py Added Files: Tag: b0_4_0 runtests.py Log Message: --- NEW FILE: runtests.py --- #!/usr/bin/env python import sys sys.path = ['.', 'SimData/Tests'] + sys.path import SimData import SimData.Tests Index: CHANGES.current =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/CHANGES.current,v retrieving revision 1.75.2.1 retrieving revision 1.75.2.2 diff -C2 -d -r1.75.2.1 -r1.75.2.2 *** CHANGES.current 21 Aug 2003 04:39:32 -0000 1.75.2.1 --- CHANGES.current 22 Aug 2003 00:21:44 -0000 1.75.2.2 *************** *** 2,5 **** --- 2,47 ---- =========================== + 2003-08-21: onsight + Convertied from pack/unpack to serialize for BaseType + serialization: + + o Removed Pack.i, Pack.h, Pack.cpp + o Added Archive.h, Archive.i + o Appropriate changes to setup.py and Source/Makefile + + Object classes should now only implement serialize(Archive&) + to save and load themselves from data archives. The Archive + parameter is a functor, which handles both saving and + loading transparently. So instead of one list of + Packer.pack(...) methods, and another identical list of + UnPacker.unpack(..) methods, you now just make one list of + archive(..) calls: + + void MyClass::serialize(Archive& archive) { + MyBaseClass::serialize(archive); + archive(member_var1); + archive(member_var2); + ... + } + + See the basic data type implementations for additional examples. + Note however that the basic data types generally have more + complicated serialization routines than most object classes will + require. Many basic data types test whether the archive is + loading or saving and respond differently depending on the + situation. For object classes this should almost always be + unnecessary. + + Added equality and inequality operators to several base types. + + Modified the Python serialization interface (still subject to + further changes). + + Added a unit testing framework based on Python's unittest module: + o runtests.py runs all the tests (not many so far) + o SimData/Tests contains the unit test modules + o SimData/Tests/ArchiveTests tests storage and retrieval + of many basic data types (not complete yet) + 2003-08-20: onsight Tagged r0_3_4, version 0_3_5 started. Index: setup.py =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/setup.py,v retrieving revision 1.30 retrieving revision 1.30.2.1 diff -C2 -d -r1.30 -r1.30.2.1 *** setup.py 16 Aug 2003 10:29:43 -0000 1.30 --- setup.py 22 Aug 2003 00:21:44 -0000 1.30.2.1 *************** *** 245,249 **** "Object", "Noise", - "Pack", "Path", "Quat", --- 245,248 ---- *************** *** 256,259 **** --- 255,259 ---- headers = [ + "Archive.h", "BaseType.h", "Conversions.h", *************** *** 285,289 **** "ObjectInterface.h", "osg.h", - "Pack.h", "Path.h", "PTS.h", --- 285,288 ---- *************** *** 302,305 **** --- 301,305 ---- interfaces = [ "cSimData.i", + "Archive.i", "BaseType.i", "Conversions.i", *************** *** 323,327 **** "Noise.i", "Object.i", - "Pack.i", "Path.i", "Quat.i", --- 323,326 ---- |