From 1ef92819aa657e92b6bbafe4c6e3f2020b14c053 Mon Sep 17 00:00:00 2001 From: Benoit Foucher Date: Thu, 24 Oct 2002 12:53:11 +0000 Subject: Back out change that prevented proxy to be generated for class without operations, this doesn't work because of forward declarations --- cpp/src/slice2cpp/Gen.cpp | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) (limited to 'cpp/src/slice2cpp/Gen.cpp') diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index e73cb72c486..428d5bd69f7 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -2431,7 +2431,7 @@ Slice::Gen::IceInternalVisitor::visitClassDefStart(const ClassDefPtr& p) C << nl << "p->__decRef();"; C << eb; - if(!p->isLocal() && (p->isInterface() || p->allOperations().size() != 0)) + if(!p->isLocal()) { C << sp; C << nl << "void" << nl << "IceInternal::incRef(::IceProxy" << scoped << "* p)"; @@ -2554,27 +2554,24 @@ Slice::Gen::HandleVisitor::visitClassDecl(const ClassDeclPtr& p) H << nl << "typedef ::IceInternal::Handle< " << scoped << "> " << name << "Ptr;"; if(!p->isLocal()) { - if(p->isInterface() || (p->definition() && p->definition()->allOperations().size() != 0)) - { - H << nl << "typedef ::IceInternal::ProxyHandle< ::IceProxy" << scoped << "> " << name << "Prx;"; + H << nl << "typedef ::IceInternal::ProxyHandle< ::IceProxy" << scoped << "> " << name << "Prx;"; - H << sp; - H << nl << _dllExport << "void __write(::IceInternal::BasicStream*, const " << name << "Prx&);"; - H << nl << _dllExport << "void __read(::IceInternal::BasicStream*, " << name << "Prx&);"; + H << sp; + H << nl << _dllExport << "void __write(::IceInternal::BasicStream*, const " << name << "Prx&);"; + H << nl << _dllExport << "void __read(::IceInternal::BasicStream*, " << name << "Prx&);"; - H << sp; - H << nl << _dllExport << "void ice_marshal(const ::std::string&, const ::Ice::StreamPtr&, const " - << name << "Prx&);"; - H << nl << _dllExport << "void ice_unmarshal(const ::std::string&, const ::Ice::StreamPtr&, " - << name << "Prx&);"; - } + H << sp; + H << nl << _dllExport << "void ice_marshal(const ::std::string&, const ::Ice::StreamPtr&, const " + << name << "Prx&);"; + H << nl << _dllExport << "void ice_unmarshal(const ::std::string&, const ::Ice::StreamPtr&, " + << name << "Prx&);"; } } bool Slice::Gen::HandleVisitor::visitClassDefStart(const ClassDefPtr& p) { - if(!p->isLocal() && (p->isInterface() || p->allOperations().size()) != 0) + if(!p->isLocal()) { string scoped = fixKwd(p->scoped()); string scope = fixKwd(p->scope()); -- cgit v1.2.3