mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Switched to a new coding style, which plays nicely with the Reader/Writer. This new style allows REFLECT to be used instead of REFLECT_N in most places.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@15 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
+24
-11
@@ -12,16 +12,16 @@
|
||||
// ----------------------------------------------------------------------------- : Field
|
||||
|
||||
Field::Field()
|
||||
: index (0) // sensible default?
|
||||
, editable (true)
|
||||
, saveValue (true)
|
||||
, showStatistics (true)
|
||||
, identifying (false)
|
||||
, cardListColumn (-1)
|
||||
, cardListWidth (100)
|
||||
, cardListAllow (true)
|
||||
// , cardListAlign (ALIGN_LEFT)
|
||||
, tabIndex (0)
|
||||
: index (0) // sensible default?
|
||||
, editable (true)
|
||||
, save_value (true)
|
||||
, show_statistics (true)
|
||||
, identifying (false)
|
||||
, card_list_column (-1)
|
||||
, card_list_width (100)
|
||||
, card_list_allow (true)
|
||||
// , card_list_align (ALIGN_LEFT)
|
||||
, tab_index (0)
|
||||
{}
|
||||
|
||||
Field::~Field() {}
|
||||
@@ -29,8 +29,17 @@ Field::~Field() {}
|
||||
IMPLEMENT_REFLECTION(Field) {
|
||||
if (!tag.reading()) {
|
||||
String type = typeName();
|
||||
REFLECT_N("type", type);
|
||||
REFLECT(type);
|
||||
}
|
||||
REFLECT(editable);
|
||||
REFLECT(save_value);
|
||||
REFLECT(show_statistics);
|
||||
REFLECT(identifying);
|
||||
REFLECT(card_list_column);
|
||||
REFLECT(card_list_width);
|
||||
REFLECT(card_list_allow);
|
||||
// REFLECT(card_list_align);
|
||||
REFLECT(tab_index);
|
||||
}
|
||||
|
||||
template <>
|
||||
@@ -49,6 +58,8 @@ shared_ptr<Field> read_new<Field>(Reader& reader) {
|
||||
|
||||
// ----------------------------------------------------------------------------- : Style
|
||||
|
||||
Style::~Style() {}
|
||||
|
||||
IMPLEMENT_REFLECTION(Style) {
|
||||
}
|
||||
|
||||
@@ -58,6 +69,8 @@ void initObject(const FieldP& field, StyleP& style) {
|
||||
|
||||
// ----------------------------------------------------------------------------- : Value
|
||||
|
||||
Value::~Value() {}
|
||||
|
||||
IMPLEMENT_REFLECTION(Value) {
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user