From b389685fc8956a9df08c31963140c9a0fc98f12d Mon Sep 17 00:00:00 2001 From: twanvl Date: Thu, 12 Oct 2006 14:07:34 +0000 Subject: [PATCH] Added Alignment, Defaultable and Scriptable types, needed some reflection tweaks for the last two. git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@17 0fc631ac-6414-0410-93d0-97cfa31319b6 --- src/data/field.cpp | 4 +-- src/data/field.hpp | 5 +-- src/data/field/text.cpp | 6 ++-- src/data/field/text.hpp | 12 ++++--- src/data/game.cpp | 3 +- src/data/game.hpp | 10 +++--- src/main.cpp | 4 +-- src/mse.vcproj | 73 ++++++++++++++++++++++++-------------- src/script/dependency.cpp | 2 +- src/script/parser.cpp | 10 +++--- src/script/script.hpp | 2 +- src/script/value.cpp | 9 ++--- src/script/value.hpp | 12 +++---- src/util/alignment.cpp | 49 +++++++++++++++++++++++++ src/util/alignment.hpp | 51 ++++++++++++++++++++++++++ src/util/defaultable.hpp | 68 +++++++++++++++++++++++++++++++++++ src/util/io/get_member.cpp | 17 +++++---- src/util/io/get_member.hpp | 24 ++++++------- src/util/io/reader.cpp | 12 +++---- src/util/io/reader.hpp | 15 +++++++- src/util/io/writer.hpp | 4 +++ src/util/reflect.hpp | 2 ++ src/util/smart_ptr.hpp | 7 ++++ 23 files changed, 311 insertions(+), 90 deletions(-) create mode 100644 src/util/alignment.cpp create mode 100644 src/util/alignment.hpp create mode 100644 src/util/defaultable.hpp diff --git a/src/data/field.cpp b/src/data/field.cpp index 7b1763a1..50570ee5 100644 --- a/src/data/field.cpp +++ b/src/data/field.cpp @@ -20,7 +20,7 @@ Field::Field() , card_list_column (-1) , card_list_width (100) , card_list_allow (true) -// , card_list_align (ALIGN_LEFT) + , card_list_align (ALIGN_LEFT) , tab_index (0) {} @@ -38,7 +38,7 @@ IMPLEMENT_REFLECTION(Field) { REFLECT(card_list_column); REFLECT(card_list_width); REFLECT(card_list_allow); -// REFLECT(card_list_align); + REFLECT(card_list_align); REFLECT(tab_index); } diff --git a/src/data/field.hpp b/src/data/field.hpp index b60267ff..502aa534 100644 --- a/src/data/field.hpp +++ b/src/data/field.hpp @@ -11,6 +11,7 @@ #include #include +#include DECLARE_POINTER_TYPE(Field); DECLARE_POINTER_TYPE(Style); @@ -35,9 +36,9 @@ class Field { UInt card_list_width; ///< Width of the card list column (pixels). bool card_list_allow; ///< Is this field allowed to appear in the card list. String card_list_name; ///< Alternate name to use in card list. -// Alignment card_list_align; ///< Alignment of the card list colummn. + Alignment card_list_align; ///< Alignment of the card list colummn. int tab_index; ///< Tab index in editor -// Vector dependendScripts; // scripts that depend on values of this field +// vector dependentScripts; // scripts that depend on values of this field /// Creates a new Value corresponding to this Field /** thisP is a smart pointer to this */ diff --git a/src/data/field/text.cpp b/src/data/field/text.cpp index b5304162..858f39c8 100644 --- a/src/data/field/text.cpp +++ b/src/data/field/text.cpp @@ -7,6 +7,7 @@ // ----------------------------------------------------------------------------- : Includes #include +#include