aboutsummaryrefslogtreecommitdiff
path: root/xsde/cxx/hybrid/serializer-name-processor.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'xsde/cxx/hybrid/serializer-name-processor.cxx')
-rw-r--r--xsde/cxx/hybrid/serializer-name-processor.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/xsde/cxx/hybrid/serializer-name-processor.cxx b/xsde/cxx/hybrid/serializer-name-processor.cxx
index 8d3c15d..b6ab09b 100644
--- a/xsde/cxx/hybrid/serializer-name-processor.cxx
+++ b/xsde/cxx/hybrid/serializer-name-processor.cxx
@@ -142,6 +142,13 @@ namespace CXX
}
public:
+ Boolean
+ recursive (SemanticGraph::Type& t)
+ {
+ return t.context ().count ("recursive");
+ }
+
+ public:
using CXX::Context::ename;
static String const&
@@ -391,6 +398,14 @@ namespace CXX
cc.set ("sstate-type", state_type);
cc.set ("sstate", find_name (state_type, "_", set));
+ if (recursive (c))
+ {
+ cc.set ("sstate-first", find_name (state_type, "_first_", set));
+
+ if (c.inherits_p () && !recursive (c.inherits ().base ()))
+ cc.set ("sstate-top", find_name (state_type, "_top_", set));
+ }
+
// State members are in a nested struct so use a new and
// empty name set.
//