diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2009-03-16 08:16:43 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2009-03-16 08:16:43 +0200 |
commit | bce9d5a76072ec697ef69021818aa68709036da5 (patch) | |
tree | 9ec56eff60abacaea121d1602a1e48388ca34216 /xsde/cxx/hybrid/tree-source.cxx | |
parent | be19f3aae4e16b4dc9c980cb9b53e807616662ef (diff) |
Add support for type customization in C++/Hybrid
examples/cxx/hybrid/custom/wildcard/: new example
Diffstat (limited to 'xsde/cxx/hybrid/tree-source.cxx')
-rw-r--r-- | xsde/cxx/hybrid/tree-source.cxx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/xsde/cxx/hybrid/tree-source.cxx b/xsde/cxx/hybrid/tree-source.cxx index d6c3672..6de3e35 100644 --- a/xsde/cxx/hybrid/tree-source.cxx +++ b/xsde/cxx/hybrid/tree-source.cxx @@ -1456,9 +1456,15 @@ namespace CXX virtual Void traverse (Type& c) { - Boolean restriction (restriction_p (c)); + String const& name (ename_custom (c)); + + // We may not need to generate the class if this type is + // being customized. + // + if (!name) + return; - String name (ename (c)); + Boolean restriction (restriction_p (c)); os << "// " << comment (c.name ()) << endl << "//" << endl |