]> git.buserror.net Git - polintos/scott/priv.git/blobdiff - idlcomp/languages/c++/marshall.cc
Some weak symbol usage, and some marshalling stuff.
[polintos/scott/priv.git] / idlcomp / languages / c++ / marshall.cc
index 2391b37980b9e1476e15b6a94e008d918fff415c..6deb115ad7f2842a10c7a6accc6db0356456d7f2 100644 (file)
@@ -18,10 +18,39 @@ void CPPFile::output_ifaceinfo(Interface *iface)
 {
        extra_newline();
 
-       file << indent << "static const __attribute__((unused))\n"
+#if 0
+       file << indent << "void _invoke(::System::RunTime::Array"
+                      << "< ::System::RunTime::ID> objlist,\n"
+            << indent << "             ::System::RunTime::ParamInfoBlock::Segment *segs,\n"
+            << indent << "             int nsegs);\n\n";
+#endif
+
+       file << indent << "__attribute__((weak)) __attribute__((unused))\n"
             << indent << "::System::RunTime::IFaceInfo _info = {\n"
             << indent << "\t&_guid,\n"
             << indent << "};\n";
        
        do_extra_newline = true;
 }
+
+void CPPFile::output_marshall(Struct *sym, int pass)
+{
+       switch (pass) {
+               case trav_nsdecl:
+                       extra_newline();
+                       
+                       file << indent << "int _marshall(::System::RunTime::GrowableArray<uint8_t> &buf,\n"
+                            << indent << "              ::System::RunTime::GrowableArray< ::System::RunTime::ID> &objlist,\n"
+                            << indent << "              ::System::RunTime::GrowableArray< ::System::RunTime::NewObject> &newobjlist,\n"
+                            << indent << "              ::System::RunTime::ParamInfoBlock::Segment *segs,\n"
+                            << indent << "              int nsegs);\n";
+
+                       file << indent << "void _unmarshall(::System::RunTime::Array<uint8_t> buf,\n"
+                            << indent << "                 ::System::RunTime::Array< ::System::_i_Object *> objlist,\n"
+                            << indent << "                 ::System::RunTime::ParamInfoBlock::Segment *segs,\n"
+                            << indent << "                 int nsegs);\n";
+
+                       do_extra_newline = true;
+                       break;
+       }
+}