aboutsummaryrefslogtreecommitdiff
path: root/xsde/cxx/hybrid/insertion-header.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'xsde/cxx/hybrid/insertion-header.cxx')
-rw-r--r--xsde/cxx/hybrid/insertion-header.cxx49
1 files changed, 32 insertions, 17 deletions
diff --git a/xsde/cxx/hybrid/insertion-header.cxx b/xsde/cxx/hybrid/insertion-header.cxx
index 050b58f..4898c02 100644
--- a/xsde/cxx/hybrid/insertion-header.cxx
+++ b/xsde/cxx/hybrid/insertion-header.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)
@@ -47,7 +53,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;
for (Streams::ConstIterator i (ostreams.begin ());
i != ostreams.end (); ++i)
@@ -195,24 +207,27 @@ namespace CXX
virtual Void
traverse (Type& c)
{
- if (!restriction_p (c))
- {
- String name (ename (c));
+ String const& name (ename_custom (c));
- for (Streams::ConstIterator i (ostreams.begin ());
- i != ostreams.end (); ++i)
- {
- os << (exceptions ? "void" : "bool") << endl
- << "operator<< (" << ostream (*i) << "&," << endl
- << "const " << name << "&);"
- << endl;
- }
+ // We may not need to generate the class if this type is
+ // being customized.
+ //
+ if (!name)
+ return;
- // Operators for nested classes.
- //
- if (c.contains_compositor_p ())
- Complex::contains_compositor (c, contains_compositor_);
+ for (Streams::ConstIterator i (ostreams.begin ());
+ i != ostreams.end (); ++i)
+ {
+ os << (exceptions ? "void" : "bool") << endl
+ << "operator<< (" << ostream (*i) << "&," << endl
+ << "const " << name << "&);"
+ << endl;
}
+
+ // Operators for nested classes.
+ //
+ if (!restriction_p (c) && c.contains_compositor_p ())
+ Complex::contains_compositor (c, contains_compositor_);
}
private: