diff options
author | Marc Laukien <marc@zeroc.com> | 2001-10-09 18:27:58 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2001-10-09 18:27:58 +0000 |
commit | ca9e4073d50175daa12dba5f197f3324eb2722cc (patch) | |
tree | ee1813a45b738c456b4bc3eb72e19e78d1b35b36 /cpp/src/slice2cpp | |
parent | removed pickler, native (diff) | |
download | ice-ca9e4073d50175daa12dba5f197f3324eb2722cc.tar.bz2 ice-ca9e4073d50175daa12dba5f197f3324eb2722cc.tar.xz ice-ca9e4073d50175daa12dba5f197f3324eb2722cc.zip |
IntStream
Diffstat (limited to 'cpp/src/slice2cpp')
-rw-r--r-- | cpp/src/slice2cpp/Gen.cpp | 59 |
1 files changed, 29 insertions, 30 deletions
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index 50bef5c31e1..98af2278416 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -100,7 +100,6 @@ Slice::Gen::generate(const UnitPtr& unit) H << "\n#include <Ice/ProxyF.h>"; H << "\n#include <Ice/ObjectF.h>"; H << "\n#include <Ice/LocalObjectF.h>"; - H << "\n#include <Ice/Native.h>"; if (unit->hasProxies()) { H << "\n#include <Ice/Proxy.h>"; @@ -113,7 +112,7 @@ Slice::Gen::generate(const UnitPtr& unit) else { H << "\n#include <Ice/LocalObject.h>"; - C << "\n#include <Ice/Stream.h>"; + C << "\n#include <Ice/IntStream.h>"; } StringList includes = unit->includeFiles(); @@ -215,8 +214,8 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p) string scoped = p->scoped(); H << sp; - H << nl << _dllExport << "void __write(::IceInternal::Stream*) const;"; // NOT virtual! - H << nl << _dllExport << "void __read(::IceInternal::Stream*);"; // NOT virtual! + H << nl << _dllExport << "void __write(::IceInternal::IntStream*) const;"; // NOT virtual! + H << nl << _dllExport << "void __read(::IceInternal::IntStream*);"; // NOT virtual! H << eb << ';'; TypeStringList memberList; @@ -226,12 +225,12 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p) memberList.push_back(make_pair((*q)->type(), (*q)->name())); } C << sp; - C << nl << "void" << nl << scoped.substr(2) << "::__write(::IceInternal::Stream* __os) const"; + C << nl << "void" << nl << scoped.substr(2) << "::__write(::IceInternal::IntStream* __os) const"; C << sb; writeMarshalCode(C, memberList, 0); C << eb; C << sp; - C << nl << "void" << nl << scoped.substr(2) << "::__read(::IceInternal::Stream* __is)"; + C << nl << "void" << nl << scoped.substr(2) << "::__read(::IceInternal::IntStream* __is)"; C << sb; writeUnmarshalCode(C, memberList, 0); C << eb; @@ -267,10 +266,10 @@ Slice::Gen::TypesVisitor::visitSequence(const SequencePtr& p) H << sp; H << nl << "class __U__" << name << " { };"; - H << nl << _dllExport << "void __write(::IceInternal::Stream*, const " << name << "&, __U__" << name << ");"; - H << nl << _dllExport << "void __read(::IceInternal::Stream*, " << name << "&, __U__" << name << ");"; + H << nl << _dllExport << "void __write(::IceInternal::IntStream*, const " << name << "&, __U__" << name << ");"; + H << nl << _dllExport << "void __read(::IceInternal::IntStream*, " << name << "&, __U__" << name << ");"; C << sp; - C << nl << "void" << nl << scope.substr(2) << "__write(::IceInternal::Stream* __os, const " << scoped + C << nl << "void" << nl << scope.substr(2) << "__write(::IceInternal::IntStream* __os, const " << scoped << "& v, " << scope << "__U__" << name << ')'; C << sb; C << nl << "__os->write(::Ice::Int(v.size()));"; @@ -281,7 +280,7 @@ Slice::Gen::TypesVisitor::visitSequence(const SequencePtr& p) C << eb; C << eb; C << sp; - C << nl << "void" << nl << scope.substr(2) << "__read(::IceInternal::Stream* __is, " << scoped + C << nl << "void" << nl << scope.substr(2) << "__read(::IceInternal::IntStream* __is, " << scoped << "& v, " << scope << "__U__" << name << ')'; C << sb; C << nl << "::Ice::Int sz;"; @@ -327,10 +326,10 @@ Slice::Gen::TypesVisitor::visitDictionary(const DictionaryPtr& p) H << sp; H << nl << "class __U__" << name << " { };"; - H << nl << _dllExport << "void __write(::IceInternal::Stream*, const " << name << "&, __U__" << name << ");"; - H << nl << _dllExport << "void __read(::IceInternal::Stream*, " << name << "&, __U__" << name << ");"; + H << nl << _dllExport << "void __write(::IceInternal::IntStream*, const " << name << "&, __U__" << name << ");"; + H << nl << _dllExport << "void __read(::IceInternal::IntStream*, " << name << "&, __U__" << name << ");"; C << sp; - C << nl << "void" << nl << scope.substr(2) << "__write(::IceInternal::Stream* __os, const " << scoped + C << nl << "void" << nl << scope.substr(2) << "__write(::IceInternal::IntStream* __os, const " << scoped << "& v, " << scope << "__U__" << name << ')'; C << sb; C << nl << "__os->write(::Ice::Int(v.size()));"; @@ -342,7 +341,7 @@ Slice::Gen::TypesVisitor::visitDictionary(const DictionaryPtr& p) C << eb; C << eb; C << sp; - C << nl << "void" << nl << scope.substr(2) << "__read(::IceInternal::Stream* __is, " << scoped + C << nl << "void" << nl << scope.substr(2) << "__read(::IceInternal::IntStream* __is, " << scoped << "& v, " << scope << "__U__" << name << ')'; C << sb; C << nl << "::Ice::Int sz;"; @@ -382,10 +381,10 @@ Slice::Gen::TypesVisitor::visitEnum(const EnumPtr& p) int sz = enumerators.size(); H << sp; - H << nl << _dllExport << "void __write(::IceInternal::Stream*, " << name << ");"; - H << nl << _dllExport << "void __read(::IceInternal::Stream*, " << name << "&);"; + H << nl << _dllExport << "void __write(::IceInternal::IntStream*, " << name << ");"; + H << nl << _dllExport << "void __read(::IceInternal::IntStream*, " << name << "&);"; C << sp; - C << nl << "void" << nl << scope.substr(2) << "__write(::IceInternal::Stream* __os, " << scoped << " v)"; + C << nl << "void" << nl << scope.substr(2) << "__write(::IceInternal::IntStream* __os, " << scoped << " v)"; C << sb; if (sz <= 0x7f) { @@ -405,7 +404,7 @@ Slice::Gen::TypesVisitor::visitEnum(const EnumPtr& p) } C << eb; C << sp; - C << nl << "void" << nl << scope.substr(2) << "__read(::IceInternal::Stream* __is, " << scoped << "& v)"; + C << nl << "void" << nl << scope.substr(2) << "__read(::IceInternal::IntStream* __is, " << scoped << "& v)"; C << sb; if (sz <= 0x7f) { @@ -1019,9 +1018,9 @@ Slice::Gen::DelegateMVisitor::visitOperation(const OperationPtr& p) C << nl << "::IceInternal::Outgoing __out(__emitter, __reference);"; if (ret || !outParams.empty() || !throws.empty()) { - C << nl << "::IceInternal::Stream* __is = __out.is();"; + C << nl << "::IceInternal::IntStream* __is = __out.is();"; } - C << nl << "::IceInternal::Stream* __os = __out.os();"; + C << nl << "::IceInternal::IntStream* __os = __out.os();"; C << nl << "__os->write(\"" << name << "\");"; writeMarshalCode(C, inParams, 0); C << nl << "if (!__out.invoke())"; @@ -1703,8 +1702,8 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p) C << eb; } H << sp; - H << nl << exp2 << "virtual void __write(::IceInternal::Stream*);"; - H << nl << exp2 << "virtual void __read(::IceInternal::Stream*);"; + H << nl << exp2 << "virtual void __write(::IceInternal::IntStream*);"; + H << nl << exp2 << "virtual void __read(::IceInternal::IntStream*);"; TypeStringList memberList; DataMemberList dataMembers = p->dataMembers(); for (DataMemberList::const_iterator q = dataMembers.begin(); q != dataMembers.end(); ++q) @@ -1712,7 +1711,7 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p) memberList.push_back(make_pair((*q)->type(), (*q)->name())); } C << sp; - C << nl << "void" << nl << scoped.substr(2) << "::__write(::IceInternal::Stream* __os)"; + C << nl << "void" << nl << scoped.substr(2) << "::__write(::IceInternal::IntStream* __os)"; C << sb; C << nl << "__os->startWriteEncaps();"; writeMarshalCode(C, memberList, 0); @@ -1733,7 +1732,7 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p) } C << eb; C << sp; - C << nl << "void" << nl << scoped.substr(2) << "::__read(::IceInternal::Stream* __is)"; + C << nl << "void" << nl << scoped.substr(2) << "::__read(::IceInternal::IntStream* __is)"; C << sb; C << nl << "__is->startReadEncaps();"; writeUnmarshalCode(C, memberList, 0); @@ -1844,11 +1843,11 @@ Slice::Gen::ObjectVisitor::visitOperation(const OperationPtr& p) C << sb; if (!inParams.empty()) { - C << nl << "::IceInternal::Stream* __is = __in.is();"; + C << nl << "::IceInternal::IntStream* __is = __in.is();"; } if (ret || !outParams.empty() || !throws.empty()) { - C << nl << "::IceInternal::Stream* __os = __in.os();"; + C << nl << "::IceInternal::IntStream* __os = __in.os();"; } writeAllocateCode(C, inParams, 0); writeUnmarshalCode(C, inParams, 0); @@ -2042,8 +2041,8 @@ Slice::Gen::HandleVisitor::visitClassDecl(const ClassDeclPtr& p) { H << nl << "typedef ::IceInternal::ProxyHandle< ::IceProxy" << scoped << "> " << name << "Prx;"; H << sp; - H << nl << _dllExport << "void __write(::IceInternal::Stream*, const " << name << "Prx&);"; - H << nl << _dllExport << "void __read(::IceInternal::Stream*, " << name << "Prx&);"; + H << nl << _dllExport << "void __write(::IceInternal::IntStream*, const " << name << "Prx&);"; + H << nl << _dllExport << "void __read(::IceInternal::IntStream*, " << name << "Prx&);"; } } @@ -2059,12 +2058,12 @@ Slice::Gen::HandleVisitor::visitClassDefStart(const ClassDefPtr& p) string scope = p->scope(); C << sp; - C << nl << "void" << nl << scope.substr(2) << "__write(::IceInternal::Stream* __os, const " << scoped << "Prx& v)"; + C << nl << "void" << nl << scope.substr(2) << "__write(::IceInternal::IntStream* __os, const " << scoped << "Prx& v)"; C << sb; C << nl << "__os->write(::Ice::ObjectPrx(v));"; C << eb; C << sp; - C << nl << "void" << nl << scope.substr(2) << "__read(::IceInternal::Stream* __is, " << scoped << "Prx& v)"; + C << nl << "void" << nl << scope.substr(2) << "__read(::IceInternal::IntStream* __is, " << scoped << "Prx& v)"; C << sb; C << nl << "::Ice::ObjectPrx proxy;"; C << nl << "__is->read(proxy);"; |