diff options
Diffstat (limited to 'xsde/cxx/hybrid/parser-header.cxx')
-rw-r--r-- | xsde/cxx/hybrid/parser-header.cxx | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/xsde/cxx/hybrid/parser-header.cxx b/xsde/cxx/hybrid/parser-header.cxx index 72cc2e3..6a893c5 100644 --- a/xsde/cxx/hybrid/parser-header.cxx +++ b/xsde/cxx/hybrid/parser-header.cxx @@ -347,6 +347,34 @@ namespace CXX } }; + // + // + struct PostOverride: Traversal::Complex, Context + { + PostOverride (Context& c) + : Context (c) + { + } + + virtual Void + traverse (SemanticGraph::Complex& c) + { + if (c.inherits_p ()) + { + SemanticGraph::Type& b (c.inherits ().base ()); + + if (polymorphic (b)) + { + if (tiein) + dispatch (b); + + os << "virtual " << pret_type (b) << endl + << post_name (b) << " ();" + << endl; + } + } + } + }; // // @@ -354,6 +382,8 @@ namespace CXX { Complex (Context& c) : Context (c), + post_override_ (c), + // State. // compositor_state_ (c), @@ -472,6 +502,9 @@ namespace CXX // post // + if (polymorphic (c)) + post_override_.dispatch (c); + os << "virtual " << ret << endl << post_name (c) << " ();" << endl; @@ -546,6 +579,8 @@ namespace CXX } private: + PostOverride post_override_; + // State. // CompositorState compositor_state_; |