aboutsummaryrefslogtreecommitdiff
path: root/xsde/cxx/hybrid/elements.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2009-03-16 08:16:43 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2009-03-16 08:16:43 +0200
commitbce9d5a76072ec697ef69021818aa68709036da5 (patch)
tree9ec56eff60abacaea121d1602a1e48388ca34216 /xsde/cxx/hybrid/elements.hxx
parentbe19f3aae4e16b4dc9c980cb9b53e807616662ef (diff)
Add support for type customization in C++/Hybrid
examples/cxx/hybrid/custom/wildcard/: new example
Diffstat (limited to 'xsde/cxx/hybrid/elements.hxx')
-rw-r--r--xsde/cxx/hybrid/elements.hxx11
1 files changed, 11 insertions, 0 deletions
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<String> ("name");
+ else
+ return c.get<String> ("name-base");
+ }
+
+ static String const&
etype (SemanticGraph::Compositor& c)
{
return c.context ().get<String> ("type");