From bce9d5a76072ec697ef69021818aa68709036da5 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 16 Mar 2009 08:16:43 +0200 Subject: Add support for type customization in C++/Hybrid examples/cxx/hybrid/custom/wildcard/: new example --- xsde/cxx/hybrid/elements.hxx | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'xsde/cxx/hybrid/elements.hxx') diff --git a/xsde/cxx/hybrid/elements.hxx b/xsde/cxx/hybrid/elements.hxx index cd1a40f..d324b04 100644 --- a/xsde/cxx/hybrid/elements.hxx +++ b/xsde/cxx/hybrid/elements.hxx @@ -94,6 +94,17 @@ namespace CXX } static String const& + ename_custom (SemanticGraph::Type& t) + { + SemanticGraph::Context& c (t.context ()); + + if (!c.count ("name-base")) + return c.get ("name"); + else + return c.get ("name-base"); + } + + static String const& etype (SemanticGraph::Compositor& c) { return c.context ().get ("type"); -- cgit v1.1