From c15bc94ee75ddcbc866f49a8248a8b0360ca864a Mon Sep 17 00:00:00 2001 From: twanvl Date: Thu, 19 Oct 2006 21:01:17 +0000 Subject: [PATCH] Added version number to files; IndexMap now works with GetMember git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@40 0fc631ac-6414-0410-93d0-97cfa31319b6 --- src/data/game.cpp | 11 ++++++++++- src/data/set.cpp | 8 ++++++++ src/data/set.hpp | 7 +++++++ src/mse.vcproj | 9 ++++++--- src/script/value.hpp | 27 +++++++++++++++++++++------ src/util/index_map.hpp | 12 +++++++++++- src/util/io/get_member.hpp | 2 ++ src/util/io/package.cpp | 1 + src/util/io/reader.cpp | 15 +++++++++++++++ src/util/io/reader.hpp | 13 ++++++++++++- src/util/io/writer.cpp | 5 +++++ src/util/io/writer.hpp | 8 ++++++++ src/util/version.hpp | 22 +++++++++------------- 13 files changed, 115 insertions(+), 25 deletions(-) diff --git a/src/data/game.cpp b/src/data/game.cpp index b5e86d28..63c60b21 100644 --- a/src/data/game.cpp +++ b/src/data/game.cpp @@ -50,4 +50,13 @@ IMPLEMENT_REFLECTION(Game) { void Game::validate() { // a default for the full name if (full_name.empty()) full_name = name(); -} \ No newline at end of file +} + +// special behaviour of reading/writing GamePs: only read/write the name + +void Reader::handle(GameP& game) { + game = Game::byName(value); +} +void Writer::handle(const GameP& game) { + handle(game->name()); +} diff --git a/src/data/set.cpp b/src/data/set.cpp index 26baee26..988ab457 100644 --- a/src/data/set.cpp +++ b/src/data/set.cpp @@ -7,7 +7,9 @@ // ----------------------------------------------------------------------------- : Includes #include +#include #include +#include #include