diff options
author | Marc Laukien <marc@zeroc.com> | 2001-08-14 21:00:02 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2001-08-14 21:00:02 +0000 |
commit | b2b071cf79af4e4d71c6ce41da7d3b4ae3cf9598 (patch) | |
tree | 9a117cb3adc3f755026346c939853719aeb5cecd /cpp/src/slice2cpp/Gen.cpp | |
parent | changed directory structure (diff) | |
download | ice-b2b071cf79af4e4d71c6ce41da7d3b4ae3cf9598.tar.bz2 ice-b2b071cf79af4e4d71c6ce41da7d3b4ae3cf9598.tar.xz ice-b2b071cf79af4e4d71c6ce41da7d3b4ae3cf9598.zip |
IcePack
Diffstat (limited to 'cpp/src/slice2cpp/Gen.cpp')
-rw-r--r-- | cpp/src/slice2cpp/Gen.cpp | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index 57206998170..c261ac5ee5f 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -10,7 +10,6 @@ #include <Ice/Functional.h> #include <Gen.h> -#include <GenUtil.h> #include <limits> // @@ -158,6 +157,22 @@ Slice::Gen::generate(const UnitPtr& unit) C << "\n#endif"; C.restoreIndent(); + if (_dllExport.length()) + { + H << sp; + H.zeroIndent(); + H << "\n#ifdef WIN32"; + H << "\n# ifdef" << _dllExport << "_EXPORTS"; + H << "\n# define" << _dllExport << " __declspec(dllexport)"; + H << "\n# else"; + H << "\n# define" << _dllExport << " __declspec(dllimport)"; + H << "\n# endif"; + H << "\n#else"; + H << "\n# define" << _dllExport << " /**/"; + H << "\n#endif"; + H.restoreIndent(); + } + ProxyDeclVisitor proxyDeclVisitor(H, C, _dllExport); unit->visit(&proxyDeclVisitor); @@ -1849,15 +1864,13 @@ Slice::Gen::HandleVisitor::visitClassDefStart(const ClassDefPtr& p) C << sp; C << nl << "void" << nl << scope << "::__write(::IceInternal::Stream* __os, const " << scoped << "Prx& v)"; C << sb; - // TODO: Should be ::Ice::__write - C << nl << "::IceInternal::write(__os, ::Ice::ObjectPrx(v));"; + C << nl << "__os->write(::Ice::ObjectPrx(v));"; C << eb; C << sp; C << nl << "void" << nl << scope << "::__read(::IceInternal::Stream* __is, " << scoped << "Prx& v)"; C << sb; C << nl << "::Ice::ObjectPrx proxy;"; - // TODO: Should be ::Ice::__read - C << nl << "::IceInternal::read(__is, proxy);"; + C << nl << "__is->read(proxy);"; C << nl << "if (!proxy)"; C << sb; C << nl << "v = 0;"; |