diff options
Diffstat (limited to 'xsde/cxx/hybrid/insertion-source.cxx')
-rw-r--r-- | xsde/cxx/hybrid/insertion-source.cxx | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/xsde/cxx/hybrid/insertion-source.cxx b/xsde/cxx/hybrid/insertion-source.cxx index 58fe9f5..b0b89c9 100644 --- a/xsde/cxx/hybrid/insertion-source.cxx +++ b/xsde/cxx/hybrid/insertion-source.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; for (Streams::ConstIterator i (ostreams.begin ()); i != ostreams.end (); ++i) @@ -57,7 +63,14 @@ 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; + String const& value (u.context ().get<String> ("value")); for (Streams::ConstIterator i (ostreams.begin ()); @@ -590,9 +603,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)); for (Streams::ConstIterator i (ostreams.begin ()); i != ostreams.end (); ++i) |