tweaks to compact reading with tag.isComplex(): no longer requires that many hacks

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1312 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2009-01-09 02:03:24 +00:00
parent 432cdcd583
commit 7d1bb77163
5 changed files with 18 additions and 18 deletions
+5
View File
@@ -33,3 +33,8 @@ template <> void GetDefaultMember::handle(const Color& v) { value = to_sc
GetMember::GetMember(const String& name)
: target_name(name)
{}
// caused by the pattern: if (!tag.isComplex()) { REFLECT_NAMELESS(stuff) }
template <> void GetMember::handle(const String& v) {
throw InternalError(_("GetDefaultMember::handle"));
}
+1 -1
View File
@@ -74,7 +74,7 @@ class GetMember : private GetDefaultMember {
/// Tell the reflection code we are not reading
inline bool reading() const { return false; }
inline bool scripting() const { return true; }
inline bool isComplex() const { return false; }
inline bool isComplex() const { return true; }
inline void addAlias(int, const Char*, const Char*) {}
inline void handleIgnore(int, const Char*) {}
+1 -1
View File
@@ -31,7 +31,7 @@ class Writer {
/// Tell the reflection code we are not reading
inline bool reading() const { return false; }
inline bool scripting() const { return false; }
inline bool isComplex() const { return false; }
inline bool isComplex() const { return true; }
inline void addAlias(int, const Char*, const Char*) {}
inline void handleIgnore(int, const Char*) {}