aboutsummaryrefslogtreecommitdiff
path: root/xsde/cxx/hybrid/serializer-header.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2009-04-12 17:57:33 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2009-04-12 17:57:33 +0200
commit528e17cf181f4ce0d1bbc1cf1bc92ef0c3b14eb1 (patch)
tree63746d016a9b777f8b030ed42a4665849a2d3c20 /xsde/cxx/hybrid/serializer-header.cxx
parent205ef24bc692e0958f2e379f3d8fd18c0e8e2eaa (diff)
Fix reset code for mixin reuse
Diffstat (limited to 'xsde/cxx/hybrid/serializer-header.cxx')
-rw-r--r--xsde/cxx/hybrid/serializer-header.cxx17
1 files changed, 12 insertions, 5 deletions
diff --git a/xsde/cxx/hybrid/serializer-header.cxx b/xsde/cxx/hybrid/serializer-header.cxx
index db0578f..153da8d 100644
--- a/xsde/cxx/hybrid/serializer-header.cxx
+++ b/xsde/cxx/hybrid/serializer-header.cxx
@@ -494,15 +494,22 @@ namespace CXX
os << "virtual void" << endl
<< "post ();"
<< endl;
+ }
- // reset
+ // reset
+ //
+ if (reset && (rec || (mixin && recursive_base (c))))
+ {
+ // If we are using mixin and this type has a base with _reset(),
+ // then we need to provide _reset() in the whole hierarchy to
+ // resolve an ambiguity.
//
- if (reset)
- os << "virtual void" << endl
- << "_reset ();"
- << endl;
+ os << "virtual void" << endl
+ << "_reset ();"
+ << endl;
}
+
if (tiein && hb)
os << (tiein ? "public:" : "protected:") << endl
<< fq_name (c.inherits ().base (), "s:impl") << " base_impl_;"