Added clone() function to Value.

Added support for per-card styling

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@430 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-06-24 01:30:34 +00:00
parent df9bb78e51
commit f0628317a3
25 changed files with 147 additions and 21 deletions
+6
View File
@@ -172,6 +172,9 @@ class Value : public IntrusivePtrVirtualBase {
const FieldP fieldP; ///< Field this value is for, should have the right type!
Age last_script_update; ///< When where the scripts last updated? (by calling update)
/// Get a copy of this value
virtual ValueP clone() const = 0;
/// Convert this value to a string for use in tables
virtual String toString() const = 0;
/// Apply scripts to this value, return true if the value has changed
@@ -213,6 +216,9 @@ template <> ValueP read_new<Value>(Reader&);
} \
StyleP Type ## Style::clone() const { \
return new_intrusive1<Type ## Style>(*this); \
} \
ValueP Type ## Value::clone() const { \
return new_intrusive1<Type ## Value>(*this); \
}
#define DECLARE_STYLE_TYPE(Type) \