aboutsummaryrefslogtreecommitdiff
path: root/xsde/cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-10-19 08:02:45 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-10-19 08:02:45 +0200
commita3a528fa2d379e11503f652dbdd7e81c4f543262 (patch)
tree0ac82ef36834345f3aafa39199e6e6b4fb1a5efe /xsde/cxx
parent986f9dabf1f4cb8a6227658dd7a2a1d9b5365c42 (diff)
Return the ultimate enum base
Diffstat (limited to 'xsde/cxx')
-rw-r--r--xsde/cxx/hybrid/elements.hxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/xsde/cxx/hybrid/elements.hxx b/xsde/cxx/hybrid/elements.hxx
index 50f0931..8539009 100644
--- a/xsde/cxx/hybrid/elements.hxx
+++ b/xsde/cxx/hybrid/elements.hxx
@@ -967,7 +967,8 @@ namespace CXX
};
- // Check whether this is a enumeration-based type.
+ // Check whether this is a enumeration-based type. Return ultimate
+ // enumeration base of 0.
//
struct EnumBasedType: Traversal::Complex
{
@@ -992,17 +993,19 @@ namespace CXX
Enumeration (SemanticGraph::Enumeration*& e)
: e_ (e)
{
+ *this >> inherits_ >> *this;
}
virtual Void
traverse (Type& e)
{
- if (e_ == 0)
- e_ = &e;
+ e_ = &e;
+ inherits (e, inherits_);
}
private:
SemanticGraph::Enumeration*& e_;
+ Traversal::Inherits inherits_;
};