aboutsummaryrefslogtreecommitdiff
path: root/xsde/cxx/hybrid/serializer-aggregate-header.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'xsde/cxx/hybrid/serializer-aggregate-header.cxx')
-rw-r--r--xsde/cxx/hybrid/serializer-aggregate-header.cxx36
1 files changed, 36 insertions, 0 deletions
diff --git a/xsde/cxx/hybrid/serializer-aggregate-header.cxx b/xsde/cxx/hybrid/serializer-aggregate-header.cxx
index 97eb60b..3e7708c 100644
--- a/xsde/cxx/hybrid/serializer-aggregate-header.cxx
+++ b/xsde/cxx/hybrid/serializer-aggregate-header.cxx
@@ -580,6 +580,7 @@ namespace CXX
String root_serializer (unclash (name, "root_serializer"));
String root_map;
String error, reset;
+ String poly_name;
String serializer_map, serializer_map_entries;
InstanceSet set;
@@ -606,6 +607,12 @@ namespace CXX
set.insert (reset);
}
+ if (poly_runtime)
+ {
+ poly_name = unclash (name, "polymorphic");
+ set.insert (poly_name);
+ }
+
if (poly_code)
{
serializer_map = unclash (name, "serializer_map_");
@@ -717,6 +724,17 @@ namespace CXX
os << "}";
}
+ // polymorphic ()
+ //
+ if (poly_runtime)
+ {
+ os << "static bool" << endl
+ << poly_name << " ()"
+ << "{"
+ << "return " << (tid_map.size () > 0 ? "true" : "false") << ";"
+ << "}";
+ }
+
os << "public:" << endl;
for (TypeInstanceMap::Iterator i (map.begin ()), end (map.end ());
@@ -762,6 +780,7 @@ namespace CXX
String root_name (unclash (name, "root_name"));
String root_namespace (unclash (name, "root_namespace"));
String error, reset;
+ String poly_name;
String serializer_map, serializer_map_entries;
InstanceSet set;
@@ -791,6 +810,12 @@ namespace CXX
set.insert (reset);
}
+ if (poly_runtime)
+ {
+ poly_name = unclash (name, "polymorphic");
+ set.insert (poly_name);
+ }
+
if (poly_code)
{
serializer_map = unclash (name, "serializer_map_");
@@ -914,6 +939,17 @@ namespace CXX
os << "}";
}
+ // polymorphic ()
+ //
+ if (poly_runtime)
+ {
+ os << "static bool" << endl
+ << poly_name << " ()"
+ << "{"
+ << "return " << (tid_map.size () > 0 ? "true" : "false") << ";"
+ << "}";
+ }
+
os << "public:" << endl;
for (TypeInstanceMap::Iterator i (map.begin ()), end (map.end ());