From a3a528fa2d379e11503f652dbdd7e81c4f543262 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 19 Oct 2010 08:02:45 +0200 Subject: Return the ultimate enum base --- xsde/cxx/hybrid/elements.hxx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'xsde/cxx') 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_; }; -- cgit v1.1