aboutsummaryrefslogtreecommitdiff
path: root/xsde/cxx/hybrid/tree-inline.cxx
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/tree-inline.cxx
parentbe19f3aae4e16b4dc9c980cb9b53e807616662ef (diff)
Add support for type customization in C++/Hybrid
examples/cxx/hybrid/custom/wildcard/: new example
Diffstat (limited to 'xsde/cxx/hybrid/tree-inline.cxx')
-rw-r--r--xsde/cxx/hybrid/tree-inline.cxx33
1 files changed, 26 insertions, 7 deletions
diff --git a/xsde/cxx/hybrid/tree-inline.cxx b/xsde/cxx/hybrid/tree-inline.cxx
index 34d0cc3..b1c60e6 100644
--- a/xsde/cxx/hybrid/tree-inline.cxx
+++ b/xsde/cxx/hybrid/tree-inline.cxx
@@ -24,7 +24,13 @@ namespace CXX
virtual Void
traverse (Type& l)
{
- String name (ename (l));
+ String const& name (ename_custom (l));
+
+ // We may not need to generate the class if this type is
+ // being customized.
+ //
+ if (!name)
+ return;
os << "// " << comment (l.name ()) << endl
<< "//" << endl
@@ -82,7 +88,13 @@ namespace CXX
virtual Void
traverse (Type& u)
{
- String name (ename (u));
+ String const& name (ename_custom (u));
+
+ // We may not need to generate the class if this type is
+ // being customized.
+ //
+ if (!name)
+ return;
os << "// " << comment (u.name ()) << endl
<< "//" << endl
@@ -1810,12 +1822,20 @@ namespace CXX
virtual Void
traverse (Type& c)
{
+ String const& scope (ename_custom (c));
+
+ // We may not need to generate the class if this type is
+ // being customized.
+ //
+ if (!scope)
+ return;
+
+ os << "// " << comment (c.name ()) << endl
+ << "//" << endl
+ << endl;
+
if (!restriction_p (c))
{
- os << "// " << comment (c.name ()) << endl
- << "//" << endl
- << endl;
-
Complex::names (c, attribute_names_func_);
if (c.contains_compositor_p ())
@@ -1831,7 +1851,6 @@ namespace CXX
//
if (c.context ().count ("cd-name"))
{
- String const& scope (ename (c));
String const& name (ecd_name (c));
String const& member (ecd_member (c));
String const& sequence (ecd_sequence (c));