diff options
135 files changed, 2813 insertions, 2749 deletions
diff --git a/cpp/src/Slice/CsUtil.cpp b/cpp/src/Slice/CsUtil.cpp index 2aa48cb64b9..e1e48eff95f 100755 --- a/cpp/src/Slice/CsUtil.cpp +++ b/cpp/src/Slice/CsUtil.cpp @@ -227,11 +227,11 @@ Slice::CsGenerator::writeMarshalUnmarshalCode(Output &out, if(marshal) { - stream = streamingAPI ? "__outS" : "__os"; + stream = streamingAPI ? "outS__" : "os__"; } else { - stream = streamingAPI ? "__inS" : "__is"; + stream = streamingAPI ? "inS__" : "is__"; } BuiltinPtr builtin = BuiltinPtr::dynamicCast(type); @@ -361,7 +361,7 @@ Slice::CsGenerator::writeMarshalUnmarshalCode(Output &out, { out << "(Ice.ReadObjectCallback)"; } - out << "new __Patcher(" << patchParams << "));"; + out << "new Patcher__(" << patchParams << "));"; } } break; @@ -394,21 +394,21 @@ Slice::CsGenerator::writeMarshalUnmarshalCode(Output &out, string typeS = typeToString(type); if(marshal) { - out << nl << typeS << "Helper."; + out << nl << typeS << "Helper.write"; if(!streamingAPI) { out << "__"; } - out << "write(" << stream << ", " << param << ");"; + out << "(" << stream << ", " << param << ");"; } else { - out << nl << param << " = " << typeS << "Helper."; + out << nl << param << " = " << typeS << "Helper.read"; if(!streamingAPI) { out << "__"; } - out << "read(" << stream << ')' << ';'; + out << "(" << stream << ");"; } return; } @@ -440,7 +440,7 @@ Slice::CsGenerator::writeMarshalUnmarshalCode(Output &out, { out << "(Ice.ReadObjectCallback)"; } - out << "new __Patcher(" << patchParams << "));"; + out << "new Patcher__(" << patchParams << "));"; } } return; @@ -451,13 +451,13 @@ Slice::CsGenerator::writeMarshalUnmarshalCode(Output &out, { if(marshal) { - out << nl << param << ".__write(" << stream << ");"; + out << nl << param << ".write__(" << stream << ");"; } else { string typeS = typeToString(type); out << nl << param << " = new " << typeS << "();"; - out << nl << param << ".__read(" << stream << ");"; + out << nl << param << ".read__(" << stream << ");"; } return; } @@ -523,11 +523,11 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out, string stream; if(marshal) { - stream = streamingAPI ? "__outS" : "__os"; + stream = streamingAPI ? "outS__" : "os__"; } else { - stream = streamingAPI ? "__inS" : "__is"; + stream = streamingAPI ? "inS__" : "is__"; } TypePtr type = seq->type(); @@ -553,26 +553,26 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out, out << nl << "else"; out << sb; out << nl << stream << ".writeSize(" << param << '.' << limitID << ");"; - out << nl << "for(int __ix = 0; __ix < " << param << '.' << limitID << "; ++__ix)"; + out << nl << "for(int ix__ = 0; ix__ < " << param << '.' << limitID << "; ++ix__)"; out << sb; string func = builtin->kind() == Builtin::KindObject ? "writeObject" : "writeProxy"; - out << nl << stream << '.' << func << '(' << param << "[__ix]);"; + out << nl << stream << '.' << func << '(' << param << "[ix__]);"; out << eb; out << eb; } else { - out << nl << "int __lenx = " << stream << ".readSize();"; + out << nl << "int lenx__ = " << stream << ".readSize();"; if(!streamingAPI) { if(builtin->isVariableLength()) { - out << nl << stream << ".startSeq(__lenx, " + out << nl << stream << ".startSeq(lenx__, " << static_cast<unsigned>(builtin->minWireSize()) << ");"; } else { - out << nl << stream << ".checkFixedSeq(__lenx, " + out << nl << stream << ".checkFixedSeq(lenx__, " << static_cast<unsigned>(builtin->minWireSize()) << ");"; } } @@ -581,42 +581,42 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out, { if(isArray) { - out << "Ice.Object[__lenx];"; + out << "Ice.Object[lenx__];"; } else { - out << typeToString(seq) << "(__lenx);"; + out << typeToString(seq) << "(lenx__);"; } - out << nl << "for(int __ix = 0; __ix < __lenx; ++__ix)"; + out << nl << "for(int ix__ = 0; ix__ < lenx__; ++ix__)"; out << sb; out << nl << stream << ".readObject("; if(streamingAPI) { out << "(ReadObjectCallback)"; } - out << "new IceInternal.SequencePatcher(" << param << ", typeof(Ice.Object), __ix));"; + out << "new IceInternal.SequencePatcher(" << param << ", typeof(Ice.Object), ix__));"; } else { if(isArray) { - out << "Ice.ObjectPrx[__lenx];"; + out << "Ice.ObjectPrx[lenx__];"; } else { - out << typeToString(seq) << "(__lenx);"; + out << typeToString(seq) << "(lenx__);"; } - out << nl << "for(int __ix = 0; __ix < __lenx; ++__ix)"; + out << nl << "for(int ix__ = 0; ix__ < lenx__; ++ix__)"; out << sb; if(isArray) { - out << nl << param << "[__ix] = " << stream << ".readProxy();"; + out << nl << param << "[ix__] = " << stream << ".readProxy();"; } else { - out << nl << "Ice.ObjectPrx __val = new Ice.ObjectPrxHelperBase();"; - out << nl << "__val = " << stream << ".readProxy();"; - out << nl << param << ".Add(__val);"; + out << nl << "Ice.ObjectPrx val__ = new Ice.ObjectPrxHelperBase();"; + out << nl << "val__ = " << stream << ".readProxy();"; + out << nl << param << ".Add(val__);"; } } if(!streamingAPI && builtin->isVariableLength()) @@ -627,7 +627,7 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out, out << eb; if(!streamingAPI && builtin->isVariableLength()) { - out << nl << stream << ".endSeq(__lenx);"; + out << nl << stream << ".endSeq(lenx__);"; } } break; @@ -674,41 +674,41 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out, out << nl << "else"; out << sb; out << nl << stream << ".writeSize(" << param << '.' << limitID << ");"; - out << nl << "for(int __ix = 0; __ix < " << param << '.' << limitID << "; ++__ix)"; + out << nl << "for(int ix__ = 0; ix__ < " << param << '.' << limitID << "; ++ix__)"; out << sb; - out << nl << stream << ".writeObject(" << param << "[__ix]);"; + out << nl << stream << ".writeObject(" << param << "[ix__]);"; out << eb; out << eb; } else { out << sb; - out << nl << "int __szx = " << stream << ".readSize();"; + out << nl << "int szx__ = " << stream << ".readSize();"; if(!streamingAPI) { if(type->isVariableLength()) { - out << nl << stream << ".startSeq(__szx, " << static_cast<unsigned>(type->minWireSize()) << ");"; + out << nl << stream << ".startSeq(szx__, " << static_cast<unsigned>(type->minWireSize()) << ");"; } else { - out << nl << stream << ".checkFixedSeq(__szx, " << static_cast<unsigned>(type->minWireSize()) << ");"; + out << nl << stream << ".checkFixedSeq(szx__, " << static_cast<unsigned>(type->minWireSize()) << ");"; } } out << nl << param << " = new "; if(isArray) { - out << toArrayAlloc(typeS + "[]", "__szx"); + out << toArrayAlloc(typeS + "[]", "szx__"); } else { - out << fixId(seq->scoped()) << "(__szx)"; + out << fixId(seq->scoped()) << "(szx__)"; } out << ';'; - out << nl << "for(int __i = 0; __i < __szx; ++__i)"; + out << nl << "for(int i__ = 0; i__ < szx__; ++i__)"; out << sb; out << nl << "IceInternal.SequencePatcher spx = new IceInternal.SequencePatcher(" - << param << ", " << "typeof(" << typeS << "), __i);"; + << param << ", " << "typeof(" << typeS << "), i__);"; out << nl << stream << ".readObject("; if(streamingAPI) { @@ -723,7 +723,7 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out, out << eb; if(!streamingAPI && type->isVariableLength()) { - out << nl << stream << ".endSeq(__szx);"; + out << nl << stream << ".endSeq(szx__);"; } out << eb; } @@ -742,52 +742,52 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out, out << nl << "else"; out << sb; out << nl << stream << ".writeSize(" << param << '.' << limitID << ");"; - out << nl << "for(int __ix = 0; __ix < " << param << '.' << limitID << "; ++__ix)"; + out << nl << "for(int ix__ = 0; ix__ < " << param << '.' << limitID << "; ++ix__)"; out << sb; - out << nl << param << "[__ix].__write(" << stream << ");"; + out << nl << param << "[ix__].write__(" << stream << ");"; out << eb; out << eb; } else { out << sb; - out << nl << "int __szx = " << stream << ".readSize();"; + out << nl << "int szx__ = " << stream << ".readSize();"; if(!streamingAPI) { if(type->isVariableLength()) { - out << nl << stream << ".startSeq(__szx, " << static_cast<unsigned>(type->minWireSize()) << ");"; + out << nl << stream << ".startSeq(szx__, " << static_cast<unsigned>(type->minWireSize()) << ");"; } else { - out << nl << stream << ".checkFixedSeq(__szx, " << static_cast<unsigned>(type->minWireSize()) << ");"; + out << nl << stream << ".checkFixedSeq(szx__, " << static_cast<unsigned>(type->minWireSize()) << ");"; } } out << nl << param << " = new "; if(isArray) { - out << toArrayAlloc(typeS + "[]", "__szx"); + out << toArrayAlloc(typeS + "[]", "szx__"); } else { - out << fixId(seq->scoped()) << "(__szx)"; + out << fixId(seq->scoped()) << "(szx__)"; } out << ';'; - out << nl << "for(int __ix = 0; __ix < __szx; ++__ix)"; + out << nl << "for(int ix__ = 0; ix__ < szx__; ++ix__)"; out << sb; if(isArray) { if(st->hasMetaData("clr:class")) { - out << nl << param << "[__ix] = new " << typeS << "();"; + out << nl << param << "[ix__] = new " << typeS << "();"; } - out << nl << param << "[__ix].__read(" << stream << ");"; + out << nl << param << "[ix__].read__(" << stream << ");"; } else { - out << nl << typeS << " __val = new " << typeS << "();"; - out << nl << "__val.__read(" << stream << ");"; - out << nl << param << ".Add(__val);"; + out << nl << typeS << " val__ = new " << typeS << "();"; + out << nl << "val__.read__(" << stream << ");"; + out << nl << param << ".Add(val__);"; } if(!streamingAPI && type->isVariableLength()) { @@ -797,7 +797,7 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out, out << eb; if(!streamingAPI && type->isVariableLength()) { - out << nl << stream << ".endSeq(__szx);"; + out << nl << stream << ".endSeq(szx__);"; } out << eb; } @@ -816,35 +816,35 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out, out << nl << "else"; out << sb; out << nl << stream << ".writeSize(" << param << '.'<< limitID << ");"; - out << nl << "for(int __ix = 0; __ix < " << param << '.' << limitID << "; ++__ix)"; + out << nl << "for(int ix__ = 0; ix__ < " << param << '.' << limitID << "; ++ix__)"; out << sb; - out << nl << stream << ".writeByte((byte)" << param << "[__ix]);"; + out << nl << stream << ".writeByte((byte)" << param << "[ix__]);"; out << eb; out << eb; } else { out << sb; - out << nl << "int __szx = " << stream << ".readSize();"; + out << nl << "int szx__ = " << stream << ".readSize();"; if(!streamingAPI) { - out << nl << stream << ".checkFixedSeq(__szx, " << static_cast<unsigned>(type->minWireSize()) << ");"; + out << nl << stream << ".checkFixedSeq(szx__, " << static_cast<unsigned>(type->minWireSize()) << ");"; } out << nl << param << " = new "; if(isArray) { - out << toArrayAlloc(typeS + "[]", "__szx"); + out << toArrayAlloc(typeS + "[]", "szx__"); } else { - out << fixId(seq->scoped()) << "(__szx)"; + out << fixId(seq->scoped()) << "(szx__)"; } out << ';'; - out << nl << "for(int __ix = 0; __ix < __szx; ++__ix)"; + out << nl << "for(int ix__ = 0; ix__ < szx__; ++ix__)"; out << sb; if(isArray) { - out << nl << param << "[__ix] = (" << typeS << ')' << stream << ".readByte();"; + out << nl << param << "[ix__] = (" << typeS << ')' << stream << ".readByte();"; } else { @@ -867,13 +867,13 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out, } string func; - if(!streamingAPI && ProxyPtr::dynamicCast(type)) - { - func = "__"; - } if(marshal) { - func += "write"; + func = "write"; + if(!streamingAPI && ProxyPtr::dynamicCast(type)) + { + func += "__"; + } out << nl << "if(" << param << " == null)"; out << sb; out << nl << stream << ".writeSize(0);"; @@ -881,43 +881,47 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out, out << nl << "else"; out << sb; out << nl << stream << ".writeSize(" << param << '.' << limitID << ");"; - out << nl << "for(int __ix = 0; __ix < " << param << '.' << limitID << "; ++__ix)"; + out << nl << "for(int ix__ = 0; ix__ < " << param << '.' << limitID << "; ++ix__)"; out << sb; - out << nl << helperName << '.' << func << '(' << stream << ", " << param << "[__ix]);"; + out << nl << helperName << '.' << func << '(' << stream << ", " << param << "[ix__]);"; out << eb; out << eb; } else { - func += "read"; + func = "read"; + if(!streamingAPI && ProxyPtr::dynamicCast(type)) + { + func += "__"; + } out << sb; - out << nl << "int __szx = " << stream << ".readSize();"; + out << nl << "int szx__ = " << stream << ".readSize();"; if(!streamingAPI) { if(type->isVariableLength()) { - out << nl << stream << ".startSeq(__szx, " << static_cast<unsigned>(type->minWireSize()) << ");"; + out << nl << stream << ".startSeq(szx__, " << static_cast<unsigned>(type->minWireSize()) << ");"; } else { - out << nl << stream << ".checkFixedSeq(__szx, " << static_cast<unsigned>(type->minWireSize()) << ");"; + out << nl << stream << ".checkFixedSeq(szx__, " << static_cast<unsigned>(type->minWireSize()) << ");"; } } out << nl << param << " = new "; if(isArray) { - out << toArrayAlloc(typeS + "[]", "__szx"); + out << toArrayAlloc(typeS + "[]", "szx__"); } else { - out << fixId(seq->scoped()) << "(__szx)"; + out << fixId(seq->scoped()) << "(szx__)"; } out << ';'; - out << nl << "for(int __ix = 0; __ix < __szx; ++__ix)"; + out << nl << "for(int ix__ = 0; ix__ < szx__; ++ix__)"; out << sb; if(isArray) { - out << nl << param << "[__ix] = " << helperName << '.' << func << '(' << stream << ");"; + out << nl << param << "[ix__] = " << helperName << '.' << func << '(' << stream << ");"; } else { @@ -934,7 +938,7 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out, out << eb; if(!streamingAPI && type->isVariableLength()) { - out << nl << stream << ".endSeq(__szx);"; + out << nl << stream << ".endSeq(szx__);"; } out << eb; } diff --git a/cpp/src/Slice/DotNetNames.cpp b/cpp/src/Slice/DotNetNames.cpp index 379792ad671..58b42376ba3 100755 --- a/cpp/src/Slice/DotNetNames.cpp +++ b/cpp/src/Slice/DotNetNames.cpp @@ -104,7 +104,8 @@ ciEquals(const string& s, const char* p) return true; } -const char* manglePrefix = "_Ice_"; +const char* manglePrefix = "ice_"; +const char* mangleSuffix = "_"; static bool mangle(const string& s, const Node* np, string& newName) @@ -114,7 +115,7 @@ mangle(const string& s, const Node* np, string& newName) { if(ciEquals(s, *namep)) { - newName = manglePrefix + s; + newName = manglePrefix + s + mangleSuffix; return true; } ++namep; diff --git a/cpp/src/Slice/VbUtil.cpp b/cpp/src/Slice/VbUtil.cpp index 528d393c7c9..4a974119639 100755 --- a/cpp/src/Slice/VbUtil.cpp +++ b/cpp/src/Slice/VbUtil.cpp @@ -235,11 +235,11 @@ Slice::VbGenerator::writeMarshalUnmarshalCode(Output &out, if(marshal) { - stream = streamingAPI ? "__outS" : "__os"; + stream = streamingAPI ? "outS__" : "os__"; } else { - stream = streamingAPI ? "__inS" : "__is"; + stream = streamingAPI ? "inS__" : "is__"; } BuiltinPtr builtin = BuiltinPtr::dynamicCast(type); @@ -368,12 +368,12 @@ Slice::VbGenerator::writeMarshalUnmarshalCode(Output &out, { if(streamingAPI) { - out << nl << stream << ".readObject(CType(New __Patcher(" << patchParams + out << nl << stream << ".readObject(CType(New Patcher__(" << patchParams << ", Ice.ReadObjectCallback)))"; } else { - out << nl << stream << ".readObject(New __Patcher(" << patchParams << "))"; + out << nl << stream << ".readObject(New Patcher__(" << patchParams << "))"; } } } @@ -407,21 +407,21 @@ Slice::VbGenerator::writeMarshalUnmarshalCode(Output &out, string helperName = fixId((contained ? contained->scoped() : typeToString(type)) + "Helper"); if(marshal) { - out << nl << helperName << '.'; + out << nl << helperName << ".write"; if(!streamingAPI) { out << "__"; } - out << "write(" << stream << ", " << param << ')'; + out << '(' << stream << ", " << param << ')'; } else { - out << nl << param << " = " << helperName << '.'; + out << nl << param << " = " << helperName << ".read"; if(!streamingAPI) { out << "__"; } - out << "read(" << stream << ')'; + out << "(" << stream << ')'; } return; } @@ -453,12 +453,12 @@ Slice::VbGenerator::writeMarshalUnmarshalCode(Output &out, { if(streamingAPI) { - out << nl << stream << ".readObject(New __Patcher(CType(" << patchParams + out << nl << stream << ".readObject(New Patcher__(CType(" << patchParams << ", Ice.ReadObjectCallback)))"; } else { - out << nl << stream << ".readObject(New __Patcher(" << patchParams << "))"; + out << nl << stream << ".readObject(New Patcher__(" << patchParams << "))"; } } } @@ -470,13 +470,13 @@ Slice::VbGenerator::writeMarshalUnmarshalCode(Output &out, { if(marshal) { - out << nl << param << ".__write(" << stream << ')'; + out << nl << param << ".write__(" << stream << ')'; } else { string typeS = typeToString(type); out << nl << param << " = New " << typeS; - out << nl << param << ".__read(" << stream << ")"; + out << nl << param << ".read__(" << stream << ")"; } return; } @@ -542,11 +542,11 @@ Slice::VbGenerator::writeSequenceMarshalUnmarshalCode(Output& out, string stream; if(marshal) { - stream = streamingAPI ? "__outS" : "__os"; + stream = streamingAPI ? "outS__" : "os__"; } else { - stream = streamingAPI ? "__inS" : "__is"; + stream = streamingAPI ? "inS__" : "is__"; } TypePtr type = seq->type(); @@ -572,10 +572,10 @@ Slice::VbGenerator::writeSequenceMarshalUnmarshalCode(Output& out, out << nl << "Else"; out.inc(); out << nl << stream << ".writeSize(" << param << '.' << limitID << ")"; - out << nl << "For __ix As Integer = 0 To " << param << '.' << limitID << " - 1"; + out << nl << "For ix__ As Integer = 0 To " << param << '.' << limitID << " - 1"; out.inc(); string func = builtin->kind() == Builtin::KindObject ? "writeObject" : "writeProxy"; - out << nl << stream << '.' << func << '(' << param << "(__ix))"; + out << nl << stream << '.' << func << '(' << param << "(ix__))"; out.dec(); out << nl << "Next"; out.dec(); @@ -583,19 +583,19 @@ Slice::VbGenerator::writeSequenceMarshalUnmarshalCode(Output& out, } else { - out << nl << "For __block As Integer = 0 To 0"; + out << nl << "For block__ As Integer = 0 To 0"; out.inc(); - out << nl << "Dim __lenx As Integer = " << stream << ".readSize()"; + out << nl << "Dim lenx__ As Integer = " << stream << ".readSize()"; if(!streamingAPI) { if(builtin->isVariableLength()) { - out << nl << stream << ".startSeq(__lenx, " << static_cast<unsigned>(builtin->minWireSize()) + out << nl << stream << ".startSeq(lenx__, " << static_cast<unsigned>(builtin->minWireSize()) << ")"; } else { - out << nl << stream << ".checkFixedSeq(__lenx, " + out << nl << stream << ".checkFixedSeq(lenx__, " << static_cast<unsigned>(builtin->minWireSize()) << ")"; } } @@ -604,23 +604,23 @@ Slice::VbGenerator::writeSequenceMarshalUnmarshalCode(Output& out, { if(isArray) { - out << "Ice.Object(__lenx - 1) {}"; + out << "Ice.Object(lenx__ - 1) {}"; } else { out << typeToString(seq); } - out << nl << "For __ix As Integer = 0 To __lenx - 1"; + out << nl << "For ix__ As Integer = 0 To lenx__ - 1"; out.inc(); if(streamingAPI) { out << nl << stream << ".readObject(CType(New IceInternal.SequencePatcher(" - << param << ", GetType(Ice.Object), __ix), Ice.ReadObjectCallback))"; + << param << ", GetType(Ice.Object), ix__), Ice.ReadObjectCallback))"; } else { out << nl << stream << ".readObject(New IceInternal.SequencePatcher(" - << param << ", GetType(Ice.Object), __ix))"; + << param << ", GetType(Ice.Object), ix__))"; } out.dec(); out << nl << "Next"; @@ -629,23 +629,23 @@ Slice::VbGenerator::writeSequenceMarshalUnmarshalCode(Output& out, { if(isArray) { - out << "Ice.ObjectPrx(__lenx - 1) {}"; + out << "Ice.ObjectPrx(lenx__ - 1) {}"; } else { out << typeToString(seq); } - out << nl << "For __ix As Integer = 0 To __lenx - 1"; + out << nl << "For ix__ As Integer = 0 To lenx__ - 1"; out.inc(); if(isArray) { - out << nl << param << "(__ix) = " << stream << ".readProxy()"; + out << nl << param << "(ix__) = " << stream << ".readProxy()"; } else { - out << nl << "Dim __val As Ice.ObjectPrx = New Ice.ObjectPrxHelperBase"; - out << nl << "__val = " << stream << ".readProxy()"; - out << nl << param << ".Add(__val)"; + out << nl << "Dim val__ As Ice.ObjectPrx = New Ice.ObjectPrxHelperBase"; + out << nl << "val__ = " << stream << ".readProxy()"; + out << nl << param << ".Add(val__)"; } out.dec(); out << nl << "Next"; @@ -654,7 +654,7 @@ Slice::VbGenerator::writeSequenceMarshalUnmarshalCode(Output& out, { out << nl << stream << ".checkSeq()"; out << nl << stream << ".endElement()"; - out << nl << stream << ".endSeq(__lenx)"; + out << nl << stream << ".endSeq(lenx__)"; } out.dec(); out << nl << "Next"; @@ -695,7 +695,7 @@ Slice::VbGenerator::writeSequenceMarshalUnmarshalCode(Output& out, ClassDeclPtr cl = ClassDeclPtr::dynamicCast(type); if(cl) { - out << nl << "For __block As Integer = 0 To 0"; + out << nl << "For block__ As Integer = 0 To 0"; out.inc(); if(marshal) { @@ -706,9 +706,9 @@ Slice::VbGenerator::writeSequenceMarshalUnmarshalCode(Output& out, out << nl << "Else"; out.inc(); out << nl << stream << ".writeSize(" << param << '.' << limitID << ")"; - out << nl << "For __ix As Integer = 0 To " << param << '.' << limitID << " - 1"; + out << nl << "For ix__ As Integer = 0 To " << param << '.' << limitID << " - 1"; out.inc(); - out << nl << stream << ".writeObject(" << param << "(__ix))"; + out << nl << stream << ".writeObject(" << param << "(ix__))"; out.dec(); out << nl << "Next"; out.dec(); @@ -716,38 +716,38 @@ Slice::VbGenerator::writeSequenceMarshalUnmarshalCode(Output& out, } else { - out << nl << "Dim __szx As Integer = " << stream << ".readSize()"; + out << nl << "Dim szx__ As Integer = " << stream << ".readSize()"; if(!streamingAPI) { if(type->isVariableLength()) { - out << nl << stream << ".startSeq(__szx, " << static_cast<unsigned>(type->minWireSize()) << ')'; + out << nl << stream << ".startSeq(szx__, " << static_cast<unsigned>(type->minWireSize()) << ')'; } else { - out << nl << stream << ".checkFixedSeq(__szx, " << static_cast<unsigned>(type->minWireSize()) << ')'; + out << nl << stream << ".checkFixedSeq(szx__, " << static_cast<unsigned>(type->minWireSize()) << ')'; } } out << nl << param << " = New "; if(isArray) { - out << toArrayAlloc(typeS + "()", "__szx - 1") << " {}"; + out << toArrayAlloc(typeS + "()", "szx__ - 1") << " {}"; } else { - out << fixId(seq->scoped()) << "(__szx)"; + out << fixId(seq->scoped()) << "(szx__)"; } - out << nl << "For __ix As Integer = 0 To __szx - 1"; + out << nl << "For ix__ As Integer = 0 To szx__ - 1"; out.inc(); - out << nl << "Dim __spx As IceInternal.SequencePatcher = New IceInternal.SequencePatcher(" - << param << ", " << "GetType(" << typeS << "), __ix)"; + out << nl << "Dim spx__ As IceInternal.SequencePatcher = New IceInternal.SequencePatcher(" + << param << ", " << "GetType(" << typeS << "), ix__)"; if(streamingAPI) { - out << nl << stream << ".readObject(CType(__spx, Ice.ReadObjectCallback))"; + out << nl << stream << ".readObject(CType(spx__, Ice.ReadObjectCallback))"; } else { - out << nl << stream << ".readObject(__spx)"; + out << nl << stream << ".readObject(spx__)"; } if(!streamingAPI && type->isVariableLength()) { @@ -758,7 +758,7 @@ Slice::VbGenerator::writeSequenceMarshalUnmarshalCode(Output& out, out << nl << "Next"; if(!streamingAPI && type->isVariableLength()) { - out << nl << stream << ".endSeq(__szx)"; + out << nl << stream << ".endSeq(szx__)"; } } out.dec(); @@ -769,7 +769,7 @@ Slice::VbGenerator::writeSequenceMarshalUnmarshalCode(Output& out, StructPtr st = StructPtr::dynamicCast(type); if(st) { - out << nl << "For __block As Integer = 0 To 0"; + out << nl << "For block__ As Integer = 0 To 0"; out.inc(); if(marshal) { @@ -780,9 +780,9 @@ Slice::VbGenerator::writeSequenceMarshalUnmarshalCode(Output& out, out << nl << "Else"; out.inc(); out << nl << stream << ".writeSize(" << param << '.' << limitID << ")"; - out << nl << "For __ix As Integer = 0 To " << param << '.' << limitID << " - 1"; + out << nl << "For ix__ As Integer = 0 To " << param << '.' << limitID << " - 1"; out.inc(); - out << nl << param << "(__ix).__write(" << stream << ")"; + out << nl << param << "(ix__).write__(" << stream << ")"; out.dec(); out << nl << "Next"; out.dec(); @@ -790,42 +790,42 @@ Slice::VbGenerator::writeSequenceMarshalUnmarshalCode(Output& out, } else { - out << nl << "Dim __szx As Integer = " << stream << ".readSize()"; + out << nl << "Dim szx__ As Integer = " << stream << ".readSize()"; if(!streamingAPI) { if(type->isVariableLength()) { - out << nl << stream << ".startSeq(__szx, " << static_cast<unsigned>(type->minWireSize()) << ')'; + out << nl << stream << ".startSeq(szx__, " << static_cast<unsigned>(type->minWireSize()) << ')'; } else { - out << nl << stream << ".checkFixedSeq(__szx, " << static_cast<unsigned>(type->minWireSize()) << ')'; + out << nl << stream << ".checkFixedSeq(szx__, " << static_cast<unsigned>(type->minWireSize()) << ')'; } } out << nl << param << " = New "; if(isArray) { - out << toArrayAlloc(typeS + "()", "__szx - 1") << " {}"; + out << toArrayAlloc(typeS + "()", "szx__ - 1") << " {}"; } else { - out << fixId(seq->scoped()) << "(__szx)"; + out << fixId(seq->scoped()) << "(szx__)"; } - out << nl << "For __ix As Integer = 0 To __szx - 1"; + out << nl << "For ix__ As Integer = 0 To szx__ - 1"; out.inc(); if(isArray) { if(st->hasMetaData("clr:class")) { - out << nl << param << "(__ix) = New " << typeS; + out << nl << param << "(ix__) = New " << typeS; } - out << nl << param << "(__ix).__read(" << stream << ")"; + out << nl << param << "(ix__).read__(" << stream << ")"; } else { - out << nl << "Dim __val As " << typeS << " = New " << typeS; - out << nl << "__val.__read(" << stream << ')'; - out << nl << param << ".Add(__val)"; + out << nl << "Dim val__ As " << typeS << " = New " << typeS; + out << nl << "val__.read__(" << stream << ')'; + out << nl << param << ".Add(val__)"; } if(!streamingAPI && type->isVariableLength()) { @@ -836,7 +836,7 @@ Slice::VbGenerator::writeSequenceMarshalUnmarshalCode(Output& out, out << nl << "Next"; if(!streamingAPI && type->isVariableLength()) { - out << nl << stream << ".endSeq(__szx)"; + out << nl << stream << ".endSeq(szx__)"; } } out.dec(); @@ -847,7 +847,7 @@ Slice::VbGenerator::writeSequenceMarshalUnmarshalCode(Output& out, EnumPtr en = EnumPtr::dynamicCast(type); if(en) { - out << nl << "For __block As Integer = 0 To 0"; + out << nl << "For block__ As Integer = 0 To 0"; out.inc(); if(marshal) { @@ -858,9 +858,9 @@ Slice::VbGenerator::writeSequenceMarshalUnmarshalCode(Output& out, out << nl << "Else"; out.inc(); out << nl << stream << ".writeSize(" << param << '.'<< limitID << ')'; - out << nl << "For __ix As Integer = 0 To " << param << '.' << limitID << " - 1"; + out << nl << "For ix__ As Integer = 0 To " << param << '.' << limitID << " - 1"; out.inc(); - out << nl << stream << ".writeByte(CType(" << param << "(__ix), Byte))"; + out << nl << stream << ".writeByte(CType(" << param << "(ix__), Byte))"; out.dec(); out << nl << "Next"; out.dec(); @@ -868,25 +868,25 @@ Slice::VbGenerator::writeSequenceMarshalUnmarshalCode(Output& out, } else { - out << nl << "Dim __szx As Integer = " << stream << ".readSize()"; + out << nl << "Dim szx__ As Integer = " << stream << ".readSize()"; if(!streamingAPI) { - out << nl << stream << ".checkFixedSeq(__szx, " << static_cast<unsigned>(type->minWireSize()) << ')'; + out << nl << stream << ".checkFixedSeq(szx__, " << static_cast<unsigned>(type->minWireSize()) << ')'; } out << nl << param << " = New "; if(isArray) { - out << toArrayAlloc(typeS + "()", "__szx - 1") << " {}"; + out << toArrayAlloc(typeS + "()", "szx__ - 1") << " {}"; } else { - out << fixId(seq->scoped()) << "(__szx)"; + out << fixId(seq->scoped()) << "(szx__)"; } - out << nl << "For __ix As Integer = 0 To __szx - 1"; + out << nl << "For ix__ As Integer = 0 To szx__ - 1"; out.inc(); if(isArray) { - out << nl << param << "(__ix) = CType(" << stream << ".readByte(), " << typeS << ')'; + out << nl << param << "(ix__) = CType(" << stream << ".readByte(), " << typeS << ')'; } else { @@ -911,13 +911,13 @@ Slice::VbGenerator::writeSequenceMarshalUnmarshalCode(Output& out, } string func; - if(!streamingAPI && ProxyPtr::dynamicCast(type)) - { - func = "__"; - } if(marshal) { - func += "write"; + func = "write"; + if(!streamingAPI && ProxyPtr::dynamicCast(type)) + { + func += "__"; + } out << nl << "If " << param << " Is Nothing"; out.inc(); out << nl << stream << ".writeSize(0)"; @@ -925,9 +925,9 @@ Slice::VbGenerator::writeSequenceMarshalUnmarshalCode(Output& out, out << nl << "Else"; out.inc(); out << nl << stream << ".writeSize(" << param << '.' << limitID << ")"; - out << nl << "For __ix As Integer = 0 To " << param << '.' << limitID << " - 1"; + out << nl << "For ix__ As Integer = 0 To " << param << '.' << limitID << " - 1"; out.inc(); - out << nl << helperName << '.' << func << '(' << stream << ", " << param << "(__ix))"; + out << nl << helperName << '.' << func << '(' << stream << ", " << param << "(ix__))"; out.dec(); out << nl << "Next"; out.dec(); @@ -935,36 +935,40 @@ Slice::VbGenerator::writeSequenceMarshalUnmarshalCode(Output& out, } else { - func += "read"; - out << nl << "For __block As Integer = 0 To 0"; + func = "read"; + if(!streamingAPI && ProxyPtr::dynamicCast(type)) + { + func += "__"; + } + out << nl << "For block__ As Integer = 0 To 0"; out.inc(); - string func = ProxyPtr::dynamicCast(type) ? "__read" : "read"; - out << nl << "Dim __szx As Integer = " << stream << ".readSize()"; + string func = ProxyPtr::dynamicCast(type) ? "read__" : "read"; + out << nl << "Dim szx__ As Integer = " << stream << ".readSize()"; if(!streamingAPI) { if(type->isVariableLength()) { - out << nl << stream << ".startSeq(__szx, " << static_cast<unsigned>(type->minWireSize()) << ")"; + out << nl << stream << ".startSeq(szx__, " << static_cast<unsigned>(type->minWireSize()) << ")"; } else { - out << nl << stream << ".checkFixedSeq(__szx, " << static_cast<unsigned>(type->minWireSize()) << ")"; + out << nl << stream << ".checkFixedSeq(szx__, " << static_cast<unsigned>(type->minWireSize()) << ")"; } } out << nl << param << " = New "; if(isArray) { - out << toArrayAlloc(typeS + "()", "__szx - 1") << " {}"; + out << toArrayAlloc(typeS + "()", "szx__ - 1") << " {}"; } else { - out << fixId(seq->scoped()) << "(__szx)"; + out << fixId(seq->scoped()) << "(szx__)"; } - out << nl << "For __ix As Integer = 0 To __szx - 1"; + out << nl << "For ix__ As Integer = 0 To szx__ - 1"; out.inc(); if(isArray) { - out << nl << param << "(__ix) = " << helperName << '.' << func << '(' << stream << ")"; + out << nl << param << "(ix__) = " << helperName << '.' << func << '(' << stream << ")"; } else { @@ -982,7 +986,7 @@ Slice::VbGenerator::writeSequenceMarshalUnmarshalCode(Output& out, out << nl << "Next"; if(!streamingAPI && type->isVariableLength()) { - out << nl << stream << ".endSeq(__szx)"; + out << nl << stream << ".endSeq(szx__)"; } out.dec(); out << nl << "Next"; diff --git a/cpp/src/slice2cs/Gen.cpp b/cpp/src/slice2cs/Gen.cpp index bd9132b0fe2..0660a73e3f4 100755 --- a/cpp/src/slice2cs/Gen.cpp +++ b/cpp/src/slice2cs/Gen.cpp @@ -120,7 +120,7 @@ Slice::CsVisitor::writeInheritedOperations(const ClassDefPtr& p) _out << sp << nl << "public abstract " << retS << ' ' << name << spar << params; if(!containingClass->isLocal()) { - _out << "Ice.Current __current"; + _out << "Ice.Current current__"; } _out << epar << ';'; } @@ -135,7 +135,7 @@ Slice::CsVisitor::writeInheritedOperations(const ClassDefPtr& p) _out << eb; _out << sp << nl << "public abstract void " << name << "_async" - << spar << params << "Ice.Current __current" << epar << ';'; + << spar << params << "Ice.Current current__" << epar << ';'; } } @@ -186,7 +186,7 @@ Slice::CsVisitor::writeDispatch(const ClassDefPtr& p) _out << sp << nl << "#region Slice type-related members"; - _out << sp << nl << "public static new string[] __ids = "; + _out << sp << nl << "public static new string[] ids__ = "; _out << sb; StringList::const_iterator q = ids.begin(); @@ -205,20 +205,20 @@ Slice::CsVisitor::writeDispatch(const ClassDefPtr& p) // // TODO: Remove linear search for Mono once this bug is fixed. // - _out << nl << "if(IceInternal.AssemblyUtil._runtime == IceInternal.AssemblyUtil.Runtime.Mono)"; + _out << nl << "if(IceInternal.AssemblyUtil.runtime_ == IceInternal.AssemblyUtil.Runtime.Mono)"; _out << sb; _out << nl << "// Mono bug: System.Array.BinarySearch() uses the wrong collation sequence,"; _out << nl << "// so we do a linear search for the time being"; _out << nl << "int pos = 0;"; - _out << nl << "while(pos < __ids.Length)"; + _out << nl << "while(pos < ids__.Length)"; _out << sb; - _out << nl << "if(__ids[pos] == s)"; + _out << nl << "if(ids__[pos] == s)"; _out << sb; _out << nl << "break;"; _out << eb; _out << nl << "++pos;"; _out << eb; - _out << nl << "if(pos == __ids.Length)"; + _out << nl << "if(pos == ids__.Length)"; _out << sb; _out << nl << "pos = -1;"; _out << eb; @@ -226,29 +226,29 @@ Slice::CsVisitor::writeDispatch(const ClassDefPtr& p) _out << eb; _out << nl << "else"; _out << sb; - _out << nl << "return _System.Array.BinarySearch(__ids, s, _System.Collections.Comparer.DefaultInvariant) >= 0;"; + _out << nl << "return _System.Array.BinarySearch(ids__, s, _System.Collections.Comparer.DefaultInvariant) >= 0;"; _out << eb; _out << eb; - _out << sp << nl << "public override bool ice_isA(string s, Ice.Current __current)"; + _out << sp << nl << "public override bool ice_isA(string s, Ice.Current current__)"; _out << sb; // // TODO: Remove linear search for Mono once this bug is fixed. // - _out << nl << "if(IceInternal.AssemblyUtil._runtime == IceInternal.AssemblyUtil.Runtime.Mono)"; + _out << nl << "if(IceInternal.AssemblyUtil.runtime_ == IceInternal.AssemblyUtil.Runtime.Mono)"; _out << sb; _out << nl << "// Mono bug: System.Array.BinarySearch() uses the wrong collation sequence,"; _out << nl << "// so we do a linear search for the time being"; _out << nl << "int pos = 0;"; - _out << nl << "while(pos < __ids.Length)"; + _out << nl << "while(pos < ids__.Length)"; _out << sb; - _out << nl << "if(__ids[pos] == s)"; + _out << nl << "if(ids__[pos] == s)"; _out << sb; _out << nl << "break;"; _out << eb; _out << nl << "++pos;"; _out << eb; - _out << nl << "if(pos == __ids.Length)"; + _out << nl << "if(pos == ids__.Length)"; _out << sb; _out << nl << "pos = -1;"; _out << eb; @@ -256,33 +256,33 @@ Slice::CsVisitor::writeDispatch(const ClassDefPtr& p) _out << eb; _out << nl << "else"; _out << sb; - _out << nl << "return _System.Array.BinarySearch(__ids, s, _System.Collections.Comparer.DefaultInvariant) >= 0;"; + _out << nl << "return _System.Array.BinarySearch(ids__, s, _System.Collections.Comparer.DefaultInvariant) >= 0;"; _out << eb; _out << eb; _out << sp << nl << "public override string[] ice_ids()"; _out << sb; - _out << nl << "return __ids;"; + _out << nl << "return ids__;"; _out << eb; - _out << sp << nl << "public override string[] ice_ids(Ice.Current __current)"; + _out << sp << nl << "public override string[] ice_ids(Ice.Current current__)"; _out << sb; - _out << nl << "return __ids;"; + _out << nl << "return ids__;"; _out << eb; _out << sp << nl << "public override string ice_id()"; _out << sb; - _out << nl << "return __ids[" << scopedPos << "];"; + _out << nl << "return ids__[" << scopedPos << "];"; _out << eb; - _out << sp << nl << "public override string ice_id(Ice.Current __current)"; + _out << sp << nl << "public override string ice_id(Ice.Current current__)"; _out << sb; - _out << nl << "return __ids[" << scopedPos << "];"; + _out << nl << "return ids__[" << scopedPos << "];"; _out << eb; _out << sp << nl << "public static new string ice_staticId()"; _out << sb; - _out << nl << "return __ids[" << scopedPos << "];"; + _out << nl << "return ids__[" << scopedPos << "];"; _out << eb; _out << sp << nl << "#endregion"; // Slice type-related members @@ -302,8 +302,8 @@ Slice::CsVisitor::writeDispatch(const ClassDefPtr& p) assert(cl); string opName = op->name(); - _out << sp << nl << "public static IceInternal.DispatchStatus ___" << opName << '(' << name - << " __obj, IceInternal.Incoming __inS, Ice.Current __current)"; + _out << sp << nl << "public static IceInternal.DispatchStatus " << opName << "___(" << name + << " obj__, IceInternal.Incoming inS__, Ice.Current current__)"; _out << sb; bool amd = p->hasMetaData("amd") || op->hasMetaData("amd"); @@ -344,14 +344,14 @@ Slice::CsVisitor::writeDispatch(const ClassDefPtr& p) TypeStringList::const_iterator q; - _out << nl << "__checkMode(" << sliceModeToIceMode(op) << ", __current.mode);";
+ _out << nl << "checkMode__(" << sliceModeToIceMode(op) << ", current__.mode);";
if(!inParams.empty()) { - _out << nl << "IceInternal.BasicStream __is = __inS.istr();"; + _out << nl << "IceInternal.BasicStream is__ = inS__.istr();"; } if(!outParams.empty() || ret || !throws.empty()) { - _out << nl << "IceInternal.BasicStream __os = __inS.ostr();"; + _out << nl << "IceInternal.BasicStream os__ = inS__.ostr();"; } // @@ -372,7 +372,7 @@ Slice::CsVisitor::writeDispatch(const ClassDefPtr& p) } if(op->sendsClasses()) { - _out << nl << "__is.readPendingObjects();"; + _out << nl << "is__.readPendingObjects();"; } for(q = inParams.begin(); q != inParams.end(); ++q) { @@ -380,7 +380,7 @@ Slice::CsVisitor::writeDispatch(const ClassDefPtr& p) bool patchStruct = st && !st->hasMetaData("clr:class") && st->classDataMembers().size() != 0; if(patchStruct) { - _out << nl << fixId(q->second) << ".__patch();"; + _out << nl << fixId(q->second) << ".patch__();"; } } @@ -402,9 +402,9 @@ Slice::CsVisitor::writeDispatch(const ClassDefPtr& p) if(ret) { string retS = typeToString(ret); - _out << retS << " __ret = "; + _out << retS << " ret__ = "; } - _out << "__obj." << fixId(opName, DotNet::ICloneable, true) << spar; + _out << "obj__." << fixId(opName, DotNet::ICloneable, true) << spar; for(q = inParams.begin(); q != inParams.end(); ++q) { BuiltinPtr builtin = BuiltinPtr::dynamicCast(q->first); @@ -427,7 +427,7 @@ Slice::CsVisitor::writeDispatch(const ClassDefPtr& p) { _out << "out " + fixId(q->second); } - _out << "__current" << epar << ';'; + _out << "current__" << epar << ';'; // // Marshal 'out' parameters and return value. @@ -438,11 +438,11 @@ Slice::CsVisitor::writeDispatch(const ClassDefPtr& p) } if(ret) { - writeMarshalUnmarshalCode(_out, ret, "__ret", true, false, true, ""); + writeMarshalUnmarshalCode(_out, ret, "ret__", true, false, true, ""); } if(op->returnsClasses()) { - _out << nl << "__os.writePendingObjects();"; + _out << nl << "os__.writePendingObjects();"; } _out << nl << "return IceInternal.DispatchStatus.DispatchOK;"; @@ -458,7 +458,7 @@ Slice::CsVisitor::writeDispatch(const ClassDefPtr& p) string exS = fixId((*t)->scoped()); _out << nl << "catch(" << exS << " ex)"; _out << sb; - _out << nl << "__os.writeUserException(ex);"; + _out << nl << "os__.writeUserException(ex);"; _out << nl << "return IceInternal.DispatchStatus.DispatchUserException;"; _out << eb; } @@ -479,11 +479,11 @@ Slice::CsVisitor::writeDispatch(const ClassDefPtr& p) } TypeStringList::const_iterator q; - _out << nl << "__checkMode(" << sliceModeToIceMode(op) << ", __current.mode);";
+ _out << nl << "checkMode__(" << sliceModeToIceMode(op) << ", current__.mode);";
if(!inParams.empty()) { - _out << nl << "IceInternal.BasicStream __is = __inS.istr();"; + _out << nl << "IceInternal.BasicStream is__ = inS__.istr();"; } // @@ -502,7 +502,7 @@ Slice::CsVisitor::writeDispatch(const ClassDefPtr& p) } if(op->sendsClasses()) { - _out << nl << "__is.readPendingObjects();"; + _out << nl << "is__.readPendingObjects();"; } for(q = inParams.begin(); q != inParams.end(); ++q) { @@ -510,7 +510,7 @@ Slice::CsVisitor::writeDispatch(const ClassDefPtr& p) bool patchStruct = st && !st->hasMetaData("clr:class") && st->classDataMembers().size() != 0; if(patchStruct) { - _out << nl << fixId(q->second) << ".__patch();"; + _out << nl << fixId(q->second) << ".patch__();"; } } @@ -518,11 +518,11 @@ Slice::CsVisitor::writeDispatch(const ClassDefPtr& p) // Call on the servant. // string classNameAMD = "AMD_" + p->name(); - _out << nl << classNameAMD << '_' << opName << " __cb = new _" << classNameAMD << '_' << opName - << "(__inS);"; + _out << nl << classNameAMD << '_' << opName << " cb__ = new _" << classNameAMD << '_' << opName + << "(inS__);"; _out << nl << "try"; _out << sb; - _out << nl << "__obj."; + _out << nl << "obj__."; if(amd) { _out << opName << "_async"; @@ -534,7 +534,7 @@ Slice::CsVisitor::writeDispatch(const ClassDefPtr& p) _out << spar; if(amd) { - _out << "__cb"; + _out << "cb__"; } for(q = inParams.begin(); q != inParams.end(); ++q) { @@ -553,11 +553,11 @@ Slice::CsVisitor::writeDispatch(const ClassDefPtr& p) } _out << arg; } - _out << "__current" << epar << ';'; + _out << "current__" << epar << ';'; _out << eb; _out << nl << "catch(_System.Exception ex)"; _out << sb; - _out << nl << "__cb.ice_exception(ex);"; + _out << nl << "cb__.ice_exception(ex);"; _out << eb; _out << nl << "return IceInternal.DispatchStatus.DispatchAsync;"; @@ -596,7 +596,7 @@ Slice::CsVisitor::writeDispatch(const ClassDefPtr& p) StringList::const_iterator q; - _out << sp << nl << "private static string[] __all ="; + _out << sp << nl << "private static string[] all__ ="; _out << sb; q = allOpNames.begin(); while(q != allOpNames.end()) @@ -610,33 +610,33 @@ Slice::CsVisitor::writeDispatch(const ClassDefPtr& p) _out << eb << ';'; _out << sp << nl << "public override IceInternal.DispatchStatus " - << "__dispatch(IceInternal.Incoming __inS, Ice.Current __current)"; + << "dispatch__(IceInternal.Incoming inS__, Ice.Current current__)"; _out << sb; _out << nl << "int pos;"; // // TODO: Remove linear search for Mono once this bug is fixed. // - _out << nl << "if(IceInternal.AssemblyUtil._runtime == IceInternal.AssemblyUtil.Runtime.Mono)"; + _out << nl << "if(IceInternal.AssemblyUtil.runtime_ == IceInternal.AssemblyUtil.Runtime.Mono)"; _out << sb; _out << nl << "// Mono bug: System.Array.BinarySearch() uses the wrong collation sequence,"; _out << nl << "// so we do a linear search for the time being"; _out << nl << "pos = 0;"; - _out << nl << "while(pos < __all.Length)"; + _out << nl << "while(pos < all__.Length)"; _out << sb; - _out << nl << "if(__all[pos] == __current.operation)"; + _out << nl << "if(all__[pos] == current__.operation)"; _out << sb; _out << nl << "break;"; _out << eb; _out << nl << "++pos;"; _out << eb; - _out << nl << "if(pos == __all.Length)"; + _out << nl << "if(pos == all__.Length)"; _out << sb; _out << nl << "pos = -1;"; _out << eb; _out << eb; _out << nl << "else"; _out << sb; - _out << nl << "pos = _System.Array.BinarySearch(__all, __current.operation, " + _out << nl << "pos = _System.Array.BinarySearch(all__, current__.operation, " << "_System.Collections.Comparer.DefaultInvariant);"; _out << eb; _out << nl << "if(pos < 0)"; @@ -654,19 +654,19 @@ Slice::CsVisitor::writeDispatch(const ClassDefPtr& p) _out << sb; if(opName == "ice_id") { - _out << nl << "return ___ice_id(this, __inS, __current);"; + _out << nl << "return ice_id___(this, inS__, current__);"; } else if(opName == "ice_ids") { - _out << nl << "return ___ice_ids(this, __inS, __current);"; + _out << nl << "return ice_ids___(this, inS__, current__);"; } else if(opName == "ice_isA") { - _out << nl << "return ___ice_isA(this, __inS, __current);"; + _out << nl << "return ice_isA___(this, inS__, current__);"; } else if(opName == "ice_ping") { - _out << nl << "return ___ice_ping(this, __inS, __current);"; + _out << nl << "return ice_ping___(this, inS__, current__);"; } else { @@ -682,19 +682,16 @@ Slice::CsVisitor::writeDispatch(const ClassDefPtr& p) assert(cl); if(cl->scoped() == p->scoped()) { - _out << nl << "return ___" << opName << "(this, __inS, __current);"; + _out << nl << "return " << opName << "___(this, inS__, current__);"; } else { string base = cl->scoped(); if(cl->isInterface()) { - string::size_type pos = base.rfind("::"); - assert(pos != string::npos); - base = base.insert(pos + 2, "_"); - base += "Disp"; + base += "Disp_"; } - _out << nl << "return " << fixId(base) << ".___" << opName << "(this, __inS, __current);"; + _out << nl << "return " << fixId(base) << "." << opName << "___(this, inS__, current__);"; } break; } @@ -757,7 +754,7 @@ Slice::CsVisitor::getParamsAsync(const OperationPtr& op, bool amd) ContainerPtr container = op->container(); ClassDefPtr cl = ClassDefPtr::dynamicCast(container); // Get the class containing the op. string scope = fixId(cl->scope()); - params.push_back(scope + (amd ? "AMD_" : "AMI_") + cl->name() + '_' + op->name() + " __cb"); + params.push_back(scope + (amd ? "AMD_" : "AMI_") + cl->name() + '_' + op->name() + " cb__"); ParamDeclList paramList = op->parameters(); for(ParamDeclList::const_iterator q = paramList.begin(); q != paramList.end(); ++q) @@ -778,7 +775,7 @@ Slice::CsVisitor::getParamsAsyncCB(const OperationPtr& op) TypePtr ret = op->returnType(); if(ret) { - params.push_back(typeToString(ret) + " __ret"); + params.push_back(typeToString(ret) + " ret__"); } ParamDeclList paramList = op->parameters(); @@ -815,7 +812,7 @@ Slice::CsVisitor::getArgsAsync(const OperationPtr& op) { vector<string> args; - args.push_back("__cb"); + args.push_back("cb__"); ParamDeclList paramList = op->parameters(); for(ParamDeclList::const_iterator q = paramList.begin(); q != paramList.end(); ++q) @@ -836,7 +833,7 @@ Slice::CsVisitor::getArgsAsyncCB(const OperationPtr& op) TypePtr ret = op->returnType(); if(ret) { - args.push_back("__ret"); + args.push_back("ret__"); } ParamDeclList paramList = op->parameters(); @@ -1152,15 +1149,15 @@ Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p) _out << sp << nl << "public sealed class " << name << "Helper"; _out << sb; - _out << sp << nl << "public " << name << "Helper(Ice.InputStream __inS)"; + _out << sp << nl << "public " << name << "Helper(Ice.InputStream inS__)"; _out << sb; - _out << nl << "_in = __inS;"; + _out << nl << "_in = inS__;"; _out << nl << "_pp = new IceInternal.ParamPatcher(typeof(" << scoped << "));"; _out << eb; - _out << sp << nl << "public static void write(Ice.OutputStream __outS, " << fixId(name) << " __v)"; + _out << sp << nl << "public static void write(Ice.OutputStream outS__, " << fixId(name) << " v__)"; _out << sb; - _out << nl << "__outS.writeObject(__v);"; + _out << nl << "outS__.writeObject(v__);"; _out << eb; _out << sp << nl << "public void read()"; @@ -1195,12 +1192,12 @@ Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p) { _out << "Ice.Object"; } - _out << ", _" << name; + _out << ", " << name; if(!p->isLocal()) { - _out << "Operations, _" << name; + _out << "Operations_, " << name; } - _out << "OperationsNC"; + _out << "OperationsNC_"; if(!bases.empty()) { ClassList::const_iterator q = bases.begin(); @@ -1240,9 +1237,9 @@ Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p) { if(!p->isLocal()) { - _out << ", _" << name << "Operations"; + _out << ", " << name << "Operations_"; } - _out << ", _" << name << "OperationsNC"; + _out << ", " << name << "OperationsNC_"; } for(ClassList::const_iterator q = bases.begin(); q != bases.end(); ++q) { @@ -1359,10 +1356,10 @@ Slice::Gen::TypesVisitor::visitClassDefEnd(const ClassDefPtr& p) _out << sp << nl << "#region Marshaling support"; - _out << sp << nl << "public override void __write(IceInternal.BasicStream __os)"; + _out << sp << nl << "public override void write__(IceInternal.BasicStream os__)"; _out << sb; - _out << nl << "__os.writeTypeId(ice_staticId());"; - _out << nl << "__os.startWriteSlice();"; + _out << nl << "os__.writeTypeId(ice_staticId());"; + _out << nl << "os__.startWriteSlice();"; for(d = members.begin(); d != members.end(); ++d) { StringList metaData = (*d)->getMetaData(); @@ -1370,8 +1367,8 @@ Slice::Gen::TypesVisitor::visitClassDefEnd(const ClassDefPtr& p) fixId((*d)->name(), DotNet::ICloneable, true), true, false, false); } - _out << nl << "__os.endWriteSlice();"; - _out << nl << "base.__write(__os);"; + _out << nl << "os__.endWriteSlice();"; + _out << nl << "base.write__(os__);"; _out << eb; if(allClassMembers.size() != 0) @@ -1381,9 +1378,9 @@ Slice::Gen::TypesVisitor::visitClassDefEnd(const ClassDefPtr& p) { _out << "new "; } - _out << "class __Patcher : IceInternal.Patcher"; + _out << "class Patcher__ : IceInternal.Patcher"; _out << sb; - _out << sp << nl << "internal __Patcher(Ice.ObjectImpl instance"; + _out << sp << nl << "internal Patcher__(Ice.ObjectImpl instance"; if(allClassMembers.size() > 1) { _out << ", int member"; @@ -1415,7 +1412,7 @@ Slice::Gen::TypesVisitor::visitClassDefEnd(const ClassDefPtr& p) } string memberName = fixId((*d)->name(), DotNet::ICloneable, true); string memberType = typeToString((*d)->type()); - _out << nl << "_type = typeof(" << memberType << ");"; + _out << nl << "type_ = typeof(" << memberType << ");"; _out << nl << "_instance." << memberName << " = (" << memberType << ")v;"; if(allClassMembers.size() > 1) { @@ -1437,13 +1434,13 @@ Slice::Gen::TypesVisitor::visitClassDefEnd(const ClassDefPtr& p) _out << eb; } - _out << sp << nl << "public override void __read(IceInternal.BasicStream __is, bool __rid)"; + _out << sp << nl << "public override void read__(IceInternal.BasicStream is__, bool rid__)"; _out << sb; - _out << nl << "if(__rid)"; + _out << nl << "if(rid__)"; _out << sb; - _out << nl << "/* string myId = */ __is.readTypeId();"; + _out << nl << "/* string myId = */ is__.readTypeId();"; _out << eb; - _out << nl << "__is.startReadSlice();"; + _out << nl << "is__.startReadSlice();"; int classMemberCount = static_cast<int>(allClassMembers.size() - classMembers.size()); for(d = members.begin(); d != members.end(); ++d) { @@ -1462,8 +1459,8 @@ Slice::Gen::TypesVisitor::visitClassDefEnd(const ClassDefPtr& p) fixId((*d)->name(), DotNet::ICloneable, true), false, false, false, patchParams.str()); } - _out << nl << "__is.endReadSlice();"; - _out << nl << "base.__read(__is, true);"; + _out << nl << "is__.endReadSlice();"; + _out << nl << "base.read__(is__, true);"; _out << eb; // @@ -1471,10 +1468,10 @@ Slice::Gen::TypesVisitor::visitClassDefEnd(const ClassDefPtr& p) // if(_stream) { - _out << sp << nl << "public override void __write(Ice.OutputStream __outS)"; + _out << sp << nl << "public override void write__(Ice.OutputStream outS__)"; _out << sb; - _out << nl << "__outS.writeTypeId(ice_staticId());"; - _out << nl << "__outS.startSlice();"; + _out << nl << "outS__.writeTypeId(ice_staticId());"; + _out << nl << "outS__.startSlice();"; for(d = members.begin(); d != members.end(); ++d) { StringList metaData = (*d)->getMetaData(); @@ -1482,17 +1479,17 @@ Slice::Gen::TypesVisitor::visitClassDefEnd(const ClassDefPtr& p) fixId((*d)->name(), DotNet::ICloneable, true), true, true, false); } - _out << nl << "__outS.endSlice();"; - _out << nl << "base.__write(__outS);"; + _out << nl << "outS__.endSlice();"; + _out << nl << "base.write__(outS__);"; _out << eb; - _out << sp << nl << "public override void __read(Ice.InputStream __inS, bool __rid)"; + _out << sp << nl << "public override void read__(Ice.InputStream inS__, bool rid__)"; _out << sb; - _out << nl << "if(__rid)"; + _out << nl << "if(rid__)"; _out << sb; - _out << nl << "/* string myId = */ __inS.readTypeId();"; + _out << nl << "/* string myId = */ inS__.readTypeId();"; _out << eb; - _out << nl << "__inS.startSlice();"; + _out << nl << "inS__.startSlice();"; for(d = members.begin(); d != members.end(); ++d) { StringList metaData = (*d)->getMetaData(); @@ -1510,8 +1507,8 @@ Slice::Gen::TypesVisitor::visitClassDefEnd(const ClassDefPtr& p) fixId((*d)->name(), DotNet::ICloneable, true), false, true, false, patchParams.str()); } - _out << nl << "__inS.endSlice();"; - _out << nl << "base.__read(__inS, true);"; + _out << nl << "inS__.endSlice();"; + _out << nl << "base.read__(inS__, true);"; _out << eb; } else @@ -1520,14 +1517,14 @@ Slice::Gen::TypesVisitor::visitClassDefEnd(const ClassDefPtr& p) // Emit placeholder functions to catch errors. // string scoped = p->scoped(); - _out << sp << nl << "public override void __write(Ice.OutputStream __outS)"; + _out << sp << nl << "public override void write__(Ice.OutputStream outS__)"; _out << sb; _out << nl << "Ice.MarshalException ex = new Ice.MarshalException();"; _out << nl << "ex.reason = \"type " << scoped.substr(2) << " was not generated with stream support\";"; _out << nl << "throw ex;"; _out << eb; - _out << sp << nl << "public override void __read(Ice.InputStream __inS, bool __rid)"; + _out << sp << nl << "public override void read__(Ice.InputStream inS__, bool rid__)"; _out << sb; _out << nl << "Ice.MarshalException ex = new Ice.MarshalException();"; _out << nl << "ex.reason = \"type " << scoped.substr(2) << " was not generated with stream support\";"; @@ -1602,7 +1599,7 @@ Slice::Gen::TypesVisitor::visitOperation(const OperationPtr& p) if(!isLocal) { _out << nl << "public abstract " << retS << " " << name - << spar << params << "Ice.Current __current" << epar << ';'; + << spar << params << "Ice.Current current__" << epar << ';'; } } @@ -1638,49 +1635,49 @@ Slice::Gen::TypesVisitor::visitSequence(const SequencePtr& p) _out << nl << "InnerList.Capacity = capacity;"; _out << eb; - _out << sp << nl << "public " << name << "(" << s << "[] __a)"; + _out << sp << nl << "public " << name << "(" << s << "[] a__)"; _out << sb; - _out << nl << "InnerList.AddRange(__a);"; + _out << nl << "InnerList.AddRange(a__);"; _out << eb; _out << sp << nl << "#endregion"; // Constructors _out << sp << nl << "#region Array copy and conversion"; - _out << sp << nl << "public void CopyTo(" << s << "[] __a)"; + _out << sp << nl << "public void CopyTo(" << s << "[] a__)"; _out << sb; - _out << nl << "InnerList.CopyTo(__a);"; + _out << nl << "InnerList.CopyTo(a__);"; _out << eb; - _out << sp << nl << "public void CopyTo(" << s << "[] __a, int __i)"; + _out << sp << nl << "public void CopyTo(" << s << "[] a__, int i__)"; _out << sb; - _out << nl << "InnerList.CopyTo(__a, __i);"; + _out << nl << "InnerList.CopyTo(a__, i__);"; _out << eb; - _out << sp << nl << "public void CopyTo(int __i, " << s << "[] __a, int __ai, int __c)"; + _out << sp << nl << "public void CopyTo(int i__, " << s << "[] a__, int ai__, int c__)"; _out << sb; - _out << nl << "InnerList.CopyTo(__i, __a, __ai, __c);"; + _out << nl << "InnerList.CopyTo(i__, a__, ai__, c__);"; _out << eb; _out << sp << nl << "public " << s << "[] ToArray()"; _out << sb; - _out << nl << s << "[] __a = new " << toArrayAlloc(s + "[]", "InnerList.Count") << ';'; - _out << nl << "InnerList.CopyTo(__a, 0);"; - _out << nl << "return __a;"; + _out << nl << s << "[] a__ = new " << toArrayAlloc(s + "[]", "InnerList.Count") << ';'; + _out << nl << "InnerList.CopyTo(a__, 0);"; + _out << nl << "return a__;"; _out << eb; _out << sp << nl << "#endregion"; // Array copy and conversion _out << sp << nl << "#region AddRange members"; - _out << sp << nl << "public void AddRange(" << name << " __s)"; + _out << sp << nl << "public void AddRange(" << name << " s__)"; _out << sb; - _out << nl << "InnerList.AddRange(__s);"; + _out << nl << "InnerList.AddRange(s__);"; _out << eb; - _out << sp << nl << "public void AddRange(" << s << "[] __a)"; + _out << sp << nl << "public void AddRange(" << s << "[] a__)"; _out << sb; - _out << nl << "InnerList.AddRange(__a);"; + _out << nl << "InnerList.AddRange(a__);"; _out << eb; _out << sp << nl << "#endregion"; // AddRange members @@ -1815,16 +1812,16 @@ Slice::Gen::TypesVisitor::visitSequence(const SequencePtr& p) _out << sb; _out << nl << "return false;"; _out << eb; - _out << nl << "for(int __i = 0; __i < Count; ++__i)"; + _out << nl << "for(int i__ = 0; i__ < Count; ++i__)"; _out << sb; if(!isValue) { - _out << nl << "if(InnerList[__i] == null && ((" << name << ")other)[__i] != null)"; + _out << nl << "if(InnerList[i__] == null && ((" << name << ")other)[i__] != null)"; _out << sb; _out << nl << "return false;"; _out << eb; } - _out << nl << "if(!((" << s << ")(InnerList[__i])).Equals(((" << name << ")other)[__i]))"; + _out << nl << "if(!((" << s << ")(InnerList[i__])).Equals(((" << name << ")other)[i__]))"; _out << sb; _out << nl << "return false;"; _out << eb; @@ -1836,21 +1833,21 @@ Slice::Gen::TypesVisitor::visitSequence(const SequencePtr& p) _out << sp << nl << "#region Comparison members"; - _out << sp << nl << "public static bool Equals(" << name << " __lhs, " << name << " __rhs)"; + _out << sp << nl << "public static bool Equals(" << name << " lhs__, " << name << " rhs__)"; _out << sb; - _out << nl << "return object.ReferenceEquals(__lhs, null)"; - _out << nl << " ? object.ReferenceEquals(__rhs, null)"; - _out << nl << " : __lhs.Equals(__rhs);"; + _out << nl << "return object.ReferenceEquals(lhs__, null)"; + _out << nl << " ? object.ReferenceEquals(rhs__, null)"; + _out << nl << " : lhs__.Equals(rhs__);"; _out << eb; - _out << sp << nl << "public static bool operator==(" << name << " __lhs, " << name << " __rhs)"; + _out << sp << nl << "public static bool operator==(" << name << " lhs__, " << name << " rhs__)"; _out << sb; - _out << nl << "return Equals(__lhs, __rhs);"; + _out << nl << "return Equals(lhs__, rhs__);"; _out << eb; - _out << sp << nl << "public static bool operator!=(" << name << " __lhs, " << name << " __rhs)"; + _out << sp << nl << "public static bool operator!=(" << name << " lhs__, " << name << " rhs__)"; _out << sb; - _out << nl << "return !Equals(__lhs, __rhs);"; + _out << nl << "return !Equals(lhs__, rhs__);"; _out << eb; _out << sp << nl << "#endregion"; // Comparison members @@ -1907,15 +1904,15 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p) _out << sb; _out << eb; - _out << sp << nl << "public " << name << "(string __m) : base(__m)"; + _out << sp << nl << "public " << name << "(string m__) : base(m__)"; _out << sb; _out << eb; - _out << sp << nl << "public " << name << "(_System.Exception __ex) : base(_dflt, __ex)"; + _out << sp << nl << "public " << name << "(_System.Exception ex__) : base(_dflt, ex__)"; _out << sb; _out << eb; - _out << sp << nl << "public " << name << "(string __m, _System.Exception __ex) : base(__m, __ex)"; + _out << sp << nl << "public " << name << "(string m__, _System.Exception ex__) : base(m__, ex__)"; _out << sb; _out << eb; @@ -1925,7 +1922,7 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p) _out << sp << nl << "public override int GetHashCode()"; _out << sb; - _out << nl << "int __h = 0;"; + _out << nl << "int h__ = 0;"; for(q = dataMembers.begin(); q != dataMembers.end(); ++q) { string memberName = fixId((*q)->name(), DotNet::ApplicationException); @@ -1935,33 +1932,33 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p) _out << nl << "if((object)" << memberName << " != null)"; _out << sb; } - _out << nl << "__h = 5 * __h + " << memberName << ".GetHashCode();"; + _out << nl << "h__ = 5 * h__ + " << memberName << ".GetHashCode();"; if(!isValue) { _out << eb; } } - _out << nl << "return __h;"; + _out << nl << "return h__;"; _out << eb; - _out << sp << nl << "public override bool Equals(object __other)"; + _out << sp << nl << "public override bool Equals(object other__)"; _out << sb; - _out << nl << "if(__other == null)"; + _out << nl << "if(other__ == null)"; _out << sb; _out << nl << "return false;"; _out << eb; - _out << nl << "if(object.ReferenceEquals(this, __other))"; + _out << nl << "if(object.ReferenceEquals(this, other__))"; _out << sb; _out << nl << "return true;"; _out << eb; - _out << nl << "if(!(__other is " << name << "))"; + _out << nl << "if(!(other__ is " << name << "))"; _out << sb; - _out << nl << "throw new _System.ArgumentException(\"expected argument of type `" << name << "'\", \"__other\");"; + _out << nl << "throw new _System.ArgumentException(\"expected argument of type `" << name << "'\", \"other__\");"; _out << eb; for(q = dataMembers.begin(); q != dataMembers.end(); ++q) { string memberName = fixId((*q)->name(), DotNet::ApplicationException); - _out << nl << "if(!" << memberName << ".Equals(((" << name << ")__other)." << memberName << "))"; + _out << nl << "if(!" << memberName << ".Equals(((" << name << ")other__)." << memberName << "))"; _out << sb; _out << nl << "return false;"; _out << eb; @@ -1973,21 +1970,21 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p) _out << sp << nl << "#region Comparison members"; - _out << sp << nl << "public static bool Equals(" << name << " __lhs, " << name << " __rhs)"; + _out << sp << nl << "public static bool Equals(" << name << " lhs__, " << name << " rhs__)"; _out << sb; - _out << nl << "return object.ReferenceEquals(__lhs, null)"; - _out << nl << " ? object.ReferenceEquals(__rhs, null)"; - _out << nl << " : __lhs.Equals(__rhs);"; + _out << nl << "return object.ReferenceEquals(lhs__, null)"; + _out << nl << " ? object.ReferenceEquals(rhs__, null)"; + _out << nl << " : lhs__.Equals(rhs__);"; _out << eb; - _out << sp << nl << "public static bool operator==(" << name << " __lhs, " << name << " __rhs)"; + _out << sp << nl << "public static bool operator==(" << name << " lhs__, " << name << " rhs__)"; _out << sb; - _out << nl << "return Equals(__lhs, __rhs);"; + _out << nl << "return Equals(lhs__, rhs__);"; _out << eb; - _out << sp << nl << "public static bool operator!=(" << name << " __lhs, " << name << " __rhs)"; + _out << sp << nl << "public static bool operator!=(" << name << " lhs__, " << name << " rhs__)"; _out << sb; - _out << nl << "return !Equals(__lhs, __rhs);"; + _out << nl << "return !Equals(lhs__, rhs__);"; _out << eb; _out << sp << nl << "#endregion"; // Comparison members @@ -2000,20 +1997,20 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p) ExceptionPtr base = p->base(); - _out << sp << nl << "public override void __write(IceInternal.BasicStream __os)"; + _out << sp << nl << "public override void write__(IceInternal.BasicStream os__)"; _out << sb; - _out << nl << "__os.writeString(\"" << scoped << "\");"; - _out << nl << "__os.startWriteSlice();"; + _out << nl << "os__.writeString(\"" << scoped << "\");"; + _out << nl << "os__.startWriteSlice();"; for(q = dataMembers.begin(); q != dataMembers.end(); ++q) { writeMarshalUnmarshalCode(_out, (*q)->type(), fixId((*q)->name(), DotNet::ApplicationException), true, false, false); } - _out << nl << "__os.endWriteSlice();"; + _out << nl << "os__.endWriteSlice();"; if(base) { - _out << nl << "base.__write(__os);"; + _out << nl << "base.write__(os__);"; } _out << eb; @@ -2025,9 +2022,9 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p) { _out << "new "; } - _out << "class __Patcher : IceInternal.Patcher"; + _out << "class Patcher__ : IceInternal.Patcher"; _out << sb; - _out << sp << nl << "internal __Patcher(Ice.Exception instance"; + _out << sp << nl << "internal Patcher__(Ice.Exception instance"; if(allClassMembers.size() > 1) { _out << ", int member"; @@ -2059,7 +2056,7 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p) } string memberName = fixId((*q)->name(), DotNet::ApplicationException); string memberType = typeToString((*q)->type()); - _out << nl << "_type = typeof(" << memberType << ");"; + _out << nl << "type_ = typeof(" << memberType << ");"; _out << nl << "_instance." << memberName << " = (" << memberType << ")v;"; if(allClassMembers.size() > 1) { @@ -2081,13 +2078,13 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p) _out << eb; } - _out << sp << nl << "public override void __read(IceInternal.BasicStream __is, bool __rid)"; + _out << sp << nl << "public override void read__(IceInternal.BasicStream is__, bool rid__)"; _out << sb; - _out << nl << "if(__rid)"; + _out << nl << "if(rid__)"; _out << sb; - _out << nl << "/* string myId = */ __is.readString();"; + _out << nl << "/* string myId = */ is__.readString();"; _out << eb; - _out << nl << "__is.startReadSlice();"; + _out << nl << "is__.startReadSlice();"; DataMemberList classMembers = p->classDataMembers(); int classMemberCount = static_cast<int>(allClassMembers.size() - classMembers.size()); for(q = dataMembers.begin(); q != dataMembers.end(); ++q) @@ -2106,39 +2103,39 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p) fixId((*q)->name(), DotNet::ApplicationException), false, false, false, patchParams.str()); } - _out << nl << "__is.endReadSlice();"; + _out << nl << "is__.endReadSlice();"; if(base) { - _out << nl << "base.__read(__is, true);"; + _out << nl << "base.read__(is__, true);"; } _out << eb; if(_stream) { - _out << sp << nl << "public override void __write(Ice.OutputStream __outS)"; + _out << sp << nl << "public override void write__(Ice.OutputStream outS__)"; _out << sb; - _out << nl << "__outS.writeString(\"" << scoped << "\");"; - _out << nl << "__outS.startSlice();"; + _out << nl << "outS__.writeString(\"" << scoped << "\");"; + _out << nl << "outS__.startSlice();"; for(q = dataMembers.begin(); q != dataMembers.end(); ++q) { writeMarshalUnmarshalCode(_out, (*q)->type(), fixId((*q)->name(), DotNet::ApplicationException), true, true, false); } - _out << nl << "__outS.endSlice();"; + _out << nl << "outS__.endSlice();"; if(base) { - _out << nl << "base.__write(__outS);"; + _out << nl << "base.write__(outS__);"; } _out << eb; - _out << sp << nl << "public override void __read(Ice.InputStream __inS, bool __rid)"; + _out << sp << nl << "public override void read__(Ice.InputStream inS__, bool rid__)"; _out << sb; - _out << nl << "if(__rid)"; + _out << nl << "if(rid__)"; _out << sb; - _out << nl << "/* string myId = */ __inS.readString();"; + _out << nl << "/* string myId = */ inS__.readString();"; _out << eb; - _out << nl << "__inS.startSlice();"; + _out << nl << "inS__.startSlice();"; classMemberCount = static_cast<int>(allClassMembers.size() - classMembers.size()); for(q = dataMembers.begin(); q != dataMembers.end(); ++q) { @@ -2156,10 +2153,10 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p) fixId((*q)->name(), DotNet::ApplicationException), false, true, false, patchParams.str()); } - _out << nl << "__inS.endSlice();"; + _out << nl << "inS__.endSlice();"; if(base) { - _out << nl << "base.__read(__inS, true);"; + _out << nl << "base.read__(inS__, true);"; } _out << eb; } @@ -2169,14 +2166,14 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p) // Emit placeholder functions to catch errors. // string scoped = p->scoped(); - _out << sp << nl << "public override void __write(Ice.OutputStream __outS)"; + _out << sp << nl << "public override void write__(Ice.OutputStream outS__)"; _out << sb; _out << nl << "Ice.MarshalException ex = new Ice.MarshalException();"; _out << nl << "ex.reason = \"exception " << scoped.substr(2) << " was not generated with stream support\";"; _out << nl << "throw ex;"; _out << eb; - _out << sp << nl << "public override void __read(Ice.InputStream __inS, bool __rid)"; + _out << sp << nl << "public override void read__(Ice.InputStream inS__, bool rid__)"; _out << sb; _out << nl << "Ice.MarshalException ex = new Ice.MarshalException();"; _out << nl << "ex.reason = \"exception " << scoped.substr(2) << " was not generated with stream support\";"; @@ -2186,7 +2183,7 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p) if(!base || base && !base->usesClasses()) { - _out << sp << nl << "public override bool __usesClasses()"; + _out << sp << nl << "public override bool usesClasses__()"; _out << sb; _out << nl << "return true;"; _out << eb; @@ -2208,16 +2205,16 @@ Slice::Gen::TypesVisitor::visitStructStart(const StructPtr& p) _out << sp << nl << "public sealed class " << p->name() << "Helper"; _out << sb; - _out << sp << nl << "public static void write(Ice.OutputStream __outS, " << name << " __v)"; + _out << sp << nl << "public static void write(Ice.OutputStream outS__, " << name << " v__)"; _out << sb; - _out << nl << "__v.__write(__outS);"; + _out << nl << "v__.write__(outS__);"; _out << eb; - _out << sp << nl << "public static " << name << " read(Ice.InputStream __inS)"; + _out << sp << nl << "public static " << name << " read(Ice.InputStream inS__)"; _out << sb; - _out << nl << name << " __v = new " << name << "();"; - _out << nl << "__v.__read(__inS);"; - _out << nl << "return __v;"; + _out << nl << name << " v__ = new " << name << "();"; + _out << nl << "v__.read__(inS__);"; + _out << nl << "return v__;"; _out << eb; _out << eb; @@ -2281,7 +2278,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p) bool patchStruct = !isClass && classMembers.size() != 0; if(!p->isLocal() && patchStruct) { - _out << nl << "_pm = null;"; + _out << nl << "pm_ = null;"; } _out << eb; @@ -2303,7 +2300,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p) _out << sp << nl << "public override int GetHashCode()"; _out << sb; - _out << nl << "int __h = 0;"; + _out << nl << "int h__ = 0;"; for(q = dataMembers.begin(); q != dataMembers.end(); ++q) { string memberName = fixId((*q)->name(), isClass ? DotNet::ICloneable : 0); @@ -2313,22 +2310,22 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p) _out << nl << "if(" << memberName << " != null)"; _out << sb; } - _out << nl << "__h = 5 * __h + " << memberName << ".GetHashCode();"; + _out << nl << "h__ = 5 * h__ + " << memberName << ".GetHashCode();"; if(!isValue) { _out << eb; } } - _out << nl << "return __h;"; + _out << nl << "return h__;"; _out << eb; - _out << sp << nl << "public override bool Equals(object __other)"; + _out << sp << nl << "public override bool Equals(object other__)"; _out << sb; - _out << nl << "if(object.ReferenceEquals(this, __other))"; + _out << nl << "if(object.ReferenceEquals(this, other__))"; _out << sb; _out << nl << "return true;"; _out << eb; - _out << nl << "if(!(__other is " << name << "))"; + _out << nl << "if(!(other__ is " << name << "))"; _out << sb; _out << nl << "return false;"; _out << eb; @@ -2339,14 +2336,14 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p) { _out << nl << "if(" << memberName << " == null)"; _out << sb; - _out << nl << "if(((" << name << ")__other)." << memberName << " != null)"; + _out << nl << "if(((" << name << ")other__)." << memberName << " != null)"; _out << sb; _out << nl << "return false;"; _out << eb; _out << eb; _out << nl << "else"; _out << sb; - _out << nl << "if(!(" << memberName << ".Equals(((" << name << ")__other)." << memberName << ")))"; + _out << nl << "if(!(" << memberName << ".Equals(((" << name << ")other__)." << memberName << ")))"; _out << sb; _out << nl << "return false;"; _out << eb; @@ -2354,7 +2351,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p) } else { - _out << nl << "if(!(" << memberName << ".Equals(((" << name << ")__other)." << memberName << ")))"; + _out << nl << "if(!(" << memberName << ".Equals(((" << name << ")other__)." << memberName << ")))"; _out << sb; _out << nl << "return false;"; _out << eb; @@ -2367,21 +2364,21 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p) _out << sp << nl << "#region Comparison members"; - _out << sp << nl << "public static bool Equals(" << name << " __lhs, " << name << " __rhs)"; + _out << sp << nl << "public static bool Equals(" << name << " lhs__, " << name << " rhs__)"; _out << sb; - _out << nl << "return object.ReferenceEquals(__lhs, null)"; - _out << nl << " ? object.ReferenceEquals(__rhs, null)"; - _out << nl << " : __lhs.Equals(__rhs);"; + _out << nl << "return object.ReferenceEquals(lhs__, null)"; + _out << nl << " ? object.ReferenceEquals(rhs__, null)"; + _out << nl << " : lhs__.Equals(rhs__);"; _out << eb; - _out << sp << nl << "public static bool operator==(" << name << " __lhs, " << name << " __rhs)"; + _out << sp << nl << "public static bool operator==(" << name << " lhs__, " << name << " rhs__)"; _out << sb; - _out << nl << "return Equals(__lhs, __rhs);"; + _out << nl << "return Equals(lhs__, rhs__);"; _out << eb; - _out << sp << nl << "public static bool operator!=(" << name << " __lhs, " << name << " __rhs)"; + _out << sp << nl << "public static bool operator!=(" << name << " lhs__, " << name << " rhs__)"; _out << sb; - _out << nl << "return !Equals(__lhs, __rhs);"; + _out << nl << "return !Equals(lhs__, rhs__);"; _out << eb; _out << sp << nl << "#endregion"; // Comparison members @@ -2390,7 +2387,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p) { _out << sp << nl << "#region Marshalling support"; - _out << sp << nl << "public void __write(IceInternal.BasicStream __os)"; + _out << sp << nl << "public void write__(IceInternal.BasicStream os__)"; _out << sb; for(q = dataMembers.begin(); q != dataMembers.end(); ++q) { @@ -2403,12 +2400,12 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p) if(classMembers.size() != 0) { - _out << sp << nl << "public sealed class __Patcher : IceInternal.Patcher"; + _out << sp << nl << "public sealed class Patcher__ : IceInternal.Patcher"; _out << sb; - _out << sp << nl << "internal __Patcher(" << name; + _out << sp << nl << "internal Patcher__(" << name; if(patchStruct) { - _out << ".__PatchMembers"; + _out << ".PatchMembers__"; } _out << " instance"; if(classMembers.size() > 1) @@ -2442,7 +2439,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p) } string memberType = typeToString((*q)->type()); string memberName = fixId((*q)->name(), isClass ? DotNet::ICloneable : 0); - _out << nl << "_type = typeof(" << memberType << ");"; + _out << nl << "type_ = typeof(" << memberType << ");"; _out << nl << "_instance." << memberName << " = (" << memberType << ")v;"; if(classMembers.size() > 1) { @@ -2459,7 +2456,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p) _out << sp << nl << "private " << name; if(patchStruct) { - _out << ".__PatchMembers"; + _out << ".PatchMembers__"; } _out << " _instance;"; if(classMembers.size() > 1) @@ -2470,7 +2467,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p) if(patchStruct) { - _out << sp << nl << "internal class __PatchMembers"; + _out << sp << nl << "internal class PatchMembers__"; _out << sb; for(q = classMembers.begin(); q != classMembers.end(); ++q) { @@ -2480,33 +2477,33 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p) } _out << eb; - _out << sp << nl << "private __PatchMembers _pm;"; + _out << sp << nl << "private PatchMembers__ pm_;"; - _out << sp << nl << "public void __patch()"; + _out << sp << nl << "public void patch__()"; _out << sb; for(q = classMembers.begin(); q != classMembers.end(); ++q) { string memberName = fixId((*q)->name(), isClass ? DotNet::ICloneable : 0); - _out << nl << memberName << " = _pm." << memberName << ';'; + _out << nl << memberName << " = pm_." << memberName << ';'; } _out << eb; } } - _out << sp << nl << "public void __read(IceInternal.BasicStream __is)"; + _out << sp << nl << "public void read__(IceInternal.BasicStream is__)"; _out << sb; if(patchStruct) { - _out << nl << "if(_pm == null)"; + _out << nl << "if(pm_ == null)"; _out << sb; - _out << nl << "_pm = new __PatchMembers();"; + _out << nl << "pm_ = new PatchMembers__();"; _out << eb; } int classMemberCount = 0; for(q = dataMembers.begin(); q != dataMembers.end(); ++q) { ostringstream patchParams; - patchParams << (patchStruct ? "_pm" : "this"); + patchParams << (patchStruct ? "pm_" : "this"); BuiltinPtr builtin = BuiltinPtr::dynamicCast((*q)->type()); if((builtin && builtin->kind() == Builtin::KindObject) || ClassDeclPtr::dynamicCast((*q)->type())) { @@ -2523,7 +2520,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p) if(_stream) { - _out << sp << nl << "public void __write(Ice.OutputStream __outS)"; + _out << sp << nl << "public void write__(Ice.OutputStream outS__)"; _out << sb; for(q = dataMembers.begin(); q != dataMembers.end(); ++q) { @@ -2533,20 +2530,20 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p) } _out << eb; - _out << sp << nl << "public void __read(Ice.InputStream __inS)"; + _out << sp << nl << "public void read__(Ice.InputStream inS__)"; _out << sb; if(patchStruct) { - _out << nl << "if(_pm == null)"; + _out << nl << "if(pm_ == null)"; _out << sb; - _out << nl << "_pm = new __PatchMembers();"; + _out << nl << "pm_ = new _PatchMembers_();"; _out << eb; } classMemberCount = 0; for(q = dataMembers.begin(); q != dataMembers.end(); ++q) { ostringstream patchParams; - patchParams << (patchStruct ? "_pm" : "this"); + patchParams << (patchStruct ? "pm_" : "this"); BuiltinPtr builtin = BuiltinPtr::dynamicCast((*q)->type()); if((builtin && builtin->kind() == Builtin::KindObject) || ClassDeclPtr::dynamicCast((*q)->type())) { @@ -2584,9 +2581,9 @@ Slice::Gen::TypesVisitor::visitDictionary(const DictionaryPtr& p) _out << sp << nl << "#region " << name << " members"; - _out << sp << nl << "public void AddRange(" << name << " __d)"; + _out << sp << nl << "public void AddRange(" << name << " d__)"; _out << sb; - _out << nl << "foreach(_System.Collections.DictionaryEntry e in __d)"; + _out << nl << "foreach(_System.Collections.DictionaryEntry e in d__)"; _out << sb; _out << nl << "try"; _out << sb; @@ -2734,15 +2731,15 @@ Slice::Gen::TypesVisitor::visitDictionary(const DictionaryPtr& p) _out << sb; _out << nl << "return false;"; _out << eb; - _out << nl << ks << "[] __klhs = new " << ks << "[Count];"; - _out << nl << "Keys.CopyTo(__klhs, 0);"; - _out << nl << "_System.Array.Sort(__klhs);"; - _out << nl << ks << "[] __krhs = new " << ks << "[((" << name << ")other).Count];"; - _out << nl << "((" << name << ")other).Keys.CopyTo(__krhs, 0);"; - _out << nl << "_System.Array.Sort(__krhs);"; + _out << nl << ks << "[] klhs__ = new " << ks << "[Count];"; + _out << nl << "Keys.CopyTo(klhs__, 0);"; + _out << nl << "_System.Array.Sort(klhs__);"; + _out << nl << ks << "[] krhs__ = new " << ks << "[((" << name << ")other).Count];"; + _out << nl << "((" << name << ")other).Keys.CopyTo(krhs__, 0);"; + _out << nl << "_System.Array.Sort(krhs__);"; _out << nl << "for(int i = 0; i < Count; ++i)"; _out << sb; - _out << nl << "if(!__klhs[i].Equals(__krhs[i]))"; + _out << nl << "if(!klhs__[i].Equals(krhs__[i]))"; _out << sb; _out << nl << "return false;"; _out << eb; @@ -2751,35 +2748,35 @@ Slice::Gen::TypesVisitor::visitDictionary(const DictionaryPtr& p) bool valueIsArray = seq && !seq->hasMetaData("clr:collection"); if(valueIsArray) { - _out << nl << vs << "[] __vlhs = new " << toArrayAlloc(vs + "[]", "Count") << ';'; + _out << nl << vs << "[] vlhs__ = new " << toArrayAlloc(vs + "[]", "Count") << ';'; } else { - _out << nl << vs << "[] __vlhs = new " << vs << "[Count];"; + _out << nl << vs << "[] vlhs__ = new " << vs << "[Count];"; } - _out << nl << "Values.CopyTo(__vlhs, 0);"; - _out << nl << "_System.Array.Sort(__vlhs);"; + _out << nl << "Values.CopyTo(vlhs__, 0);"; + _out << nl << "_System.Array.Sort(vlhs__);"; string vrhsCount = "((" + name + ")other).Count"; if(valueIsArray) { - _out << nl << vs << "[] __vrhs = new " << toArrayAlloc(vs + "[]", vrhsCount) << ';'; + _out << nl << vs << "[] vrhs__ = new " << toArrayAlloc(vs + "[]", vrhsCount) << ';'; } else { - _out << nl << vs << "[] __vrhs = new " << vs << '[' << vrhsCount << "];"; + _out << nl << vs << "[] vrhs__ = new " << vs << '[' << vrhsCount << "];"; } - _out << nl << "((" << name << ")other).Values.CopyTo(__vrhs, 0);"; - _out << nl << "_System.Array.Sort(__vrhs);"; + _out << nl << "((" << name << ")other).Values.CopyTo(vrhs__, 0);"; + _out << nl << "_System.Array.Sort(vrhs__);"; _out << nl << "for(int i = 0; i < Count; ++i)"; _out << sb; if(!valueIsValue) { - _out << nl << "if(__vlhs[i] == null && __vrhs[i] != null)"; + _out << nl << "if(vlhs__[i] == null && vrhs__[i] != null)"; _out << sb; _out << nl << "return false;"; _out << eb; } - _out << nl << "if(!__vlhs[i].Equals(__vrhs[i]))"; + _out << nl << "if(!vlhs__[i].Equals(vrhs__[i]))"; _out << sb; _out << nl << "return false;"; _out << eb; @@ -2791,21 +2788,21 @@ Slice::Gen::TypesVisitor::visitDictionary(const DictionaryPtr& p) _out << sp << nl << "#region Comparison members"; - _out << sp << nl << "public static bool Equals(" << name << " __lhs, " << name << " __rhs)"; + _out << sp << nl << "public static bool Equals(" << name << " lhs__, " << name << " rhs__)"; _out << sb; - _out << nl << "return object.ReferenceEquals(__lhs, null)"; - _out << nl << " ? object.ReferenceEquals(__rhs, null)"; - _out << nl << " : __lhs.Equals(__rhs);"; + _out << nl << "return object.ReferenceEquals(lhs__, null)"; + _out << nl << " ? object.ReferenceEquals(rhs__, null)"; + _out << nl << " : lhs__.Equals(rhs__);"; _out << eb; - _out << sp << nl << "public static bool operator==(" << name << " __lhs, " << name << " __rhs)"; + _out << sp << nl << "public static bool operator==(" << name << " lhs__, " << name << " rhs__)"; _out << sb; - _out << nl << "return Equals(__lhs, __rhs);"; + _out << nl << "return Equals(lhs__, rhs__);"; _out << eb; - _out << sp << nl << "public static bool operator!=(" << name << " __lhs, " << name << " __rhs)"; + _out << sp << nl << "public static bool operator!=(" << name << " lhs__, " << name << " rhs__)"; _out << sb; - _out << nl << "return !Equals(__lhs, __rhs);"; + _out << nl << "return !Equals(lhs__, rhs__);"; _out << eb; _out << sp << nl << "#endregion"; // Comparison members @@ -2839,16 +2836,16 @@ Slice::Gen::TypesVisitor::visitEnum(const EnumPtr& p) _out << sp << nl << "public sealed class " << name << "Helper"; _out << sb; - _out << sp << nl << "public static void write(Ice.OutputStream __outS, " << scoped << " __v)"; + _out << sp << nl << "public static void write(Ice.OutputStream outS__, " << scoped << " v__)"; _out << sb; - writeMarshalUnmarshalCode(_out, p, "__v", true, true, false); + writeMarshalUnmarshalCode(_out, p, "v__", true, true, false); _out << eb; - _out << sp << nl << "public static " << scoped << " read(Ice.InputStream __inS)"; + _out << sp << nl << "public static " << scoped << " read(Ice.InputStream inS__)"; _out << sb; - _out << nl << scoped << " __v;"; - writeMarshalUnmarshalCode(_out, p, "__v", false, true, false); - _out << nl << "return __v;"; + _out << nl << scoped << " v__;"; + writeMarshalUnmarshalCode(_out, p, "v__", false, true, false); + _out << nl << "return v__;"; _out << eb; _out << eb; @@ -3024,7 +3021,7 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p) _out << sp << nl << typeToString(p->returnType()) << " " << name << spar << params << epar << ';'; _out << nl << typeToString(p->returnType()) << " " << name - << spar << params << "Ice.Context __context" << epar << ';'; + << spar << params << "Ice.Context context__" << epar << ';'; if(cl->hasMetaData("ami") || p->hasMetaData("ami")) { @@ -3036,7 +3033,7 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p) // _out << sp; _out << nl << "void " << p->name() << "_async" << spar << paramsAMI << epar << ';'; - _out << nl << "void " << p->name() << "_async" << spar << paramsAMI << "Ice.Context __ctx" << epar << ';'; + _out << nl << "void " << p->name() << "_async" << spar << paramsAMI << "Ice.Context ctx__" << epar << ';'; } } @@ -3096,7 +3093,7 @@ Slice::Gen::OpsVisitor::writeOperations(const ClassDefPtr& p, bool noCurrent) opIntfName += "NC"; } - _out << sp << nl << "public interface _" << name << opIntfName; + _out << sp << nl << "public interface " << name << opIntfName << '_'; if((bases.size() == 1 && bases.front()->isAbstract()) || bases.size() > 1) { _out << " : "; @@ -3115,15 +3112,12 @@ Slice::Gen::OpsVisitor::writeOperations(const ClassDefPtr& p, bool noCurrent) first = false; } string s = (*q)->scoped(); - string::size_type pos = s.rfind("::"); - assert(pos != string::npos); - s.insert(pos + 2, "_"); s += "Operations"; if(noCurrent) { s += "NC"; } - _out << fixId(s); + _out << fixId(s) << '_'; } ++q; } @@ -3159,7 +3153,7 @@ Slice::Gen::OpsVisitor::writeOperations(const ClassDefPtr& p, bool noCurrent) _out << retS << ' ' << name << spar << params; if(!noCurrent && !p->isLocal()) { - _out << "Ice.Current __current"; + _out << "Ice.Current current__"; } _out << epar << ';'; } @@ -3228,48 +3222,48 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p) { _out << "return "; } - _out << opName << spar << args << "__defaultContext()" << epar << ';'; + _out << opName << spar << args << "defaultContext__()" << epar << ';'; _out << eb; - _out << sp << nl << "public " << retS << " " << opName << spar << params << "Ice.Context __context" << epar; + _out << sp << nl << "public " << retS << " " << opName << spar << params << "Ice.Context context__" << epar; _out << sb; - _out << nl << "int __cnt = 0;"; + _out << nl << "int cnt__ = 0;"; _out << nl << "while(true)"; _out << sb; _out << nl << "try"; _out << sb; if(op->returnsData()) { - _out << nl << "__checkTwowayOnly(\"" << op->name() << "\");"; + _out << nl << "checkTwowayOnly__(\"" << op->name() << "\");"; } - _out << nl << "Ice._ObjectDel __delBase = __getDelegate();"; - _out << nl << '_' << name << "Del __del = (_" << name << "Del)__delBase;"; + _out << nl << "Ice.ObjectDel_ delBase__ = getDelegate__();"; + _out << nl << name << "Del_ del__ = (" << name << "Del_)delBase__;"; _out << nl; if(ret) { _out << "return "; } - _out << "__del." << opName << spar << args << "__context" << epar << ';'; + _out << "del__." << opName << spar << args << "context__" << epar << ';'; if(!ret) { _out << nl << "return;"; } _out << eb; - _out << nl << "catch(IceInternal.NonRepeatable __ex)"; + _out << nl << "catch(IceInternal.NonRepeatable ex__)"; _out << sb; if(op->mode() == Operation::Idempotent || op->mode() == Operation::Nonmutating) { - _out << nl << "__cnt = __handleException(__ex.get(), __cnt);"; + _out << nl << "cnt__ = handleException__(ex__.get(), cnt__);"; } else { - _out << nl << "__rethrowException(__ex.get());"; + _out << nl << "rethrowException__(ex__.get());"; } _out << eb; - _out << nl << "catch(Ice.LocalException __ex)"; + _out << nl << "catch(Ice.LocalException ex__)"; _out << sb; - _out << nl << "__cnt = __handleException(__ex, __cnt);"; + _out << nl << "cnt__ = handleException__(ex__, cnt__);"; _out << eb; _out << eb; @@ -3307,13 +3301,13 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p) _out << sp; _out << nl << "public void " << opName << "_async" << spar << paramsAMI << epar; _out << sb; - _out << nl << opName << "_async" << spar << argsAMI << "__defaultContext()" << epar << ';'; + _out << nl << opName << "_async" << spar << argsAMI << "defaultContext__()" << epar << ';'; _out << eb; - _out << nl << "public void " << opName << "_async" << spar << paramsAMI << "Ice.Context __ctx" << epar; + _out << nl << "public void " << opName << "_async" << spar << paramsAMI << "Ice.Context ctx__" << epar; _out << sb; - _out << nl << "__checkTwowayOnly(\"" << p->name() << "\");"; - _out << nl << "__cb.__invoke" << spar << "this" << argsAMI << "__ctx" << epar << ';'; + _out << nl << "checkTwowayOnly__(\"" << p->name() << "\");"; + _out << nl << "cb__.invoke__" << spar << "this" << argsAMI << "ctx__" << epar << ';'; _out << eb; } } @@ -3338,7 +3332,7 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p) _out << nl << "if(b.ice_isA(\"" << p->scoped() << "\"))"; _out << sb; _out << nl << name << "PrxHelper h = new " << name << "PrxHelper();"; - _out << nl << "h.__copyFrom(b);"; + _out << nl << "h.copyFrom__(b);"; _out << nl << "return h;"; _out << eb; _out << nl << "return null;"; @@ -3357,7 +3351,7 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p) _out << nl << "if(b.ice_isA(\"" << p->scoped() << "\", ctx))"; _out << sb; _out << nl << name << "PrxHelper h = new " << name << "PrxHelper();"; - _out << nl << "h.__copyFrom(b);"; + _out << nl << "h.copyFrom__(b);"; _out << nl << "return h;"; _out << eb; _out << nl << "return null;"; @@ -3375,7 +3369,7 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p) _out << nl << "if(bb.ice_isA(\"" << p->scoped() << "\"))"; _out << sb; _out << nl << name << "PrxHelper h = new " << name << "PrxHelper();"; - _out << nl << "h.__copyFrom(bb);"; + _out << nl << "h.copyFrom__(bb);"; _out << nl << "return h;"; _out << eb; _out << eb; @@ -3397,7 +3391,7 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p) _out << nl << "if(bb.ice_isA(\"" << p->scoped() << "\", ctx))"; _out << sb; _out << nl << name << "PrxHelper h = new " << name << "PrxHelper();"; - _out << nl << "h.__copyFrom(bb);"; + _out << nl << "h.copyFrom__(bb);"; _out << nl << "return h;"; _out << eb; _out << eb; @@ -3414,7 +3408,7 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p) _out << nl << "return null;"; _out << eb; _out << nl << name << "PrxHelper h = new " << name << "PrxHelper();"; - _out << nl << "h.__copyFrom(b);"; + _out << nl << "h.copyFrom__(b);"; _out << nl << "return h;"; _out << eb; @@ -3426,7 +3420,7 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p) _out << eb; _out << nl << "Ice.ObjectPrx bb = b.ice_newFacet(f);"; _out << nl << name << "PrxHelper h = new " << name << "PrxHelper();"; - _out << nl << "h.__copyFrom(bb);"; + _out << nl << "h.copyFrom__(bb);"; _out << nl << "return h;"; _out << eb; @@ -3434,28 +3428,28 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p) _out << sp << nl << "#region Marshaling support"; - _out << sp << nl << "protected override Ice._ObjectDelM __createDelegateM()"; + _out << sp << nl << "protected override Ice.ObjectDelM_ createDelegateM__()"; _out << sb; - _out << nl << "return new _" << name << "DelM();"; + _out << nl << "return new " << name << "DelM_();"; _out << eb; - _out << sp << nl << "protected override Ice._ObjectDelD __createDelegateD()"; + _out << sp << nl << "protected override Ice.ObjectDelD_ createDelegateD__()"; _out << sb; - _out << nl << "return new _" << name << "DelD();"; + _out << nl << "return new " << name << "DelD_();"; _out << eb; - _out << sp << nl << "public static void __write(IceInternal.BasicStream __os, " << name << "Prx __v)"; + _out << sp << nl << "public static void write__(IceInternal.BasicStream os__, " << name << "Prx v__)"; _out << sb; - _out << nl << "__os.writeProxy(__v);"; + _out << nl << "os__.writeProxy(v__);"; _out << eb; - _out << sp << nl << "public static " << name << "Prx __read(IceInternal.BasicStream __is)"; + _out << sp << nl << "public static " << name << "Prx read__(IceInternal.BasicStream is__)"; _out << sb; - _out << nl << "Ice.ObjectPrx proxy = __is.readProxy();"; + _out << nl << "Ice.ObjectPrx proxy = is__.readProxy();"; _out << nl << "if(proxy != null)"; _out << sb; _out << nl << name << "PrxHelper result = new " << name << "PrxHelper();"; - _out << nl << "result.__copyFrom(proxy);"; + _out << nl << "result.copyFrom__(proxy);"; _out << nl << "return result;"; _out << eb; _out << nl << "return null;"; @@ -3463,18 +3457,18 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p) if(_stream) { - _out << sp << nl << "public static void write(Ice.OutputStream __outS, " << name << "Prx __v)"; + _out << sp << nl << "public static void write(Ice.OutputStream outS__, " << name << "Prx v__)"; _out << sb; - _out << nl << "__outS.writeProxy(__v);"; + _out << nl << "outS__.writeProxy(v__);"; _out << eb; - _out << sp << nl << "public static " << name << "Prx read(Ice.InputStream __inS)"; + _out << sp << nl << "public static " << name << "Prx read(Ice.InputStream inS__)"; _out << sb; - _out << nl << "Ice.ObjectPrx proxy = __inS.readProxy();"; + _out << nl << "Ice.ObjectPrx proxy = inS__.readProxy();"; _out << nl << "if(proxy != null)"; _out << sb; _out << nl << name << "PrxHelper result = new " << name << "PrxHelper();"; - _out << nl << "result.__copyFrom(proxy);"; + _out << nl << "result.copyFrom__(proxy);"; _out << nl << "return result;"; _out << eb; _out << nl << "return null;"; @@ -3509,30 +3503,30 @@ Slice::Gen::HelperVisitor::visitSequence(const SequencePtr& p) _out << sp << nl << "public sealed class " << name << "Helper"; _out << sb; - _out << nl << "public static void write(IceInternal.BasicStream __os, " << typeS << " __v)"; + _out << nl << "public static void write(IceInternal.BasicStream os__, " << typeS << " v__)"; _out << sb; - writeSequenceMarshalUnmarshalCode(_out, p, "__v", true, false); + writeSequenceMarshalUnmarshalCode(_out, p, "v__", true, false); _out << eb; - _out << sp << nl << "public static " << typeS << " read(IceInternal.BasicStream __is)"; + _out << sp << nl << "public static " << typeS << " read(IceInternal.BasicStream is__)"; _out << sb; - _out << nl << typeS << " __v;"; - writeSequenceMarshalUnmarshalCode(_out, p, "__v", false, false); - _out << nl << "return __v;"; + _out << nl << typeS << " v__;"; + writeSequenceMarshalUnmarshalCode(_out, p, "v__", false, false); + _out << nl << "return v__;"; _out << eb; if(_stream) { - _out << sp << nl << "public static void write(Ice.OutputStream __outS, " << typeS << " __v)"; + _out << sp << nl << "public static void write(Ice.OutputStream outS__, " << typeS << " v__)"; _out << sb; - writeSequenceMarshalUnmarshalCode(_out, p, "__v", true, true); + writeSequenceMarshalUnmarshalCode(_out, p, "v__", true, true); _out << eb; - _out << sp << nl << "public static " << typeS << " read(Ice.InputStream __inS)"; + _out << sp << nl << "public static " << typeS << " read(Ice.InputStream inS__)"; _out << sb; - _out << nl << typeS << " __v;"; - writeSequenceMarshalUnmarshalCode(_out, p, "__v", false, true); - _out << nl << "return __v;"; + _out << nl << typeS << " v__;"; + writeSequenceMarshalUnmarshalCode(_out, p, "v__", false, true); + _out << nl << "return v__;"; _out << eb; } @@ -3560,20 +3554,20 @@ Slice::Gen::HelperVisitor::visitDictionary(const DictionaryPtr& p) _out << sp << nl << "public sealed class " << name << "Helper"; _out << sb; - _out << nl << "public static void write(IceInternal.BasicStream __os, " << name << " __v)"; + _out << nl << "public static void write(IceInternal.BasicStream os__, " << name << " v__)"; _out << sb; - _out << nl << "if(__v == null)"; + _out << nl << "if(v__ == null)"; _out << sb; - _out << nl << "__os.writeSize(0);"; + _out << nl << "os__.writeSize(0);"; _out << eb; _out << nl << "else"; _out << sb; - _out << nl << "__os.writeSize(__v.Count);"; - _out << nl << "foreach(_System.Collections.DictionaryEntry __e in __v)"; + _out << nl << "os__.writeSize(v__.Count);"; + _out << nl << "foreach(_System.Collections.DictionaryEntry e__ in v__)"; _out << sb; - string keyArg = "((" + keyS + ")__e.Key)"; + string keyArg = "((" + keyS + ")e__.Key)"; writeMarshalUnmarshalCode(_out, key, keyArg, true, false, false); - string valueArg = "((" + valueS + ")__e.Value)"; + string valueArg = "((" + valueS + ")e__.Value)"; writeMarshalUnmarshalCode(_out, value, valueArg, true, false, false); _out << eb; _out << eb; @@ -3583,9 +3577,9 @@ Slice::Gen::HelperVisitor::visitDictionary(const DictionaryPtr& p) bool hasClassValue = (builtin && builtin->kind() == Builtin::KindObject) || ClassDeclPtr::dynamicCast(value); if(hasClassValue) { - _out << sp << nl << "public sealed class __Patcher : IceInternal.Patcher"; + _out << sp << nl << "public sealed class Patcher__ : IceInternal.Patcher"; _out << sb; - _out << sp << nl << "internal __Patcher(" << name << " m, " << keyS << " key)"; + _out << sp << nl << "internal Patcher__(" << name << " m, " << keyS << " key)"; _out << sb; _out << nl << "_m = m;"; _out << nl << "_key = key;"; @@ -3593,7 +3587,7 @@ Slice::Gen::HelperVisitor::visitDictionary(const DictionaryPtr& p) _out << sp << nl << "public override void" << nl << "patch(Ice.Object v)"; _out << sb; - _out << nl << "_type = typeof(" << typeToString(p->valueType()) << ");"; + _out << nl << "type_ = typeof(" << typeToString(p->valueType()) << ");"; _out << nl << "_m[_key] = (" << valueS << ")v;"; _out << eb; @@ -3602,39 +3596,39 @@ Slice::Gen::HelperVisitor::visitDictionary(const DictionaryPtr& p) _out << eb; } - _out << sp << nl << "public static " << name << " read(IceInternal.BasicStream __is)"; + _out << sp << nl << "public static " << name << " read(IceInternal.BasicStream is__)"; _out << sb; - _out << nl << "int __sz = __is.readSize();"; - _out << nl << name << " __r = new " << name << "();"; - _out << nl << "for(int __i = 0; __i < __sz; ++__i)"; + _out << nl << "int sz__ = is__.readSize();"; + _out << nl << name << " r__ = new " << name << "();"; + _out << nl << "for(int i__ = 0; i__ < sz__; ++i__)"; _out << sb; - _out << nl << keyS << " __k;"; - writeMarshalUnmarshalCode(_out, key, "__k", false, false, false); + _out << nl << keyS << " k__;"; + writeMarshalUnmarshalCode(_out, key, "k__", false, false, false); if(!hasClassValue) { - _out << nl << valueS << " __v;"; + _out << nl << valueS << " v__;"; } - writeMarshalUnmarshalCode(_out, value, "__v", false, false, false, "__r, __k"); + writeMarshalUnmarshalCode(_out, value, "v__", false, false, false, "r__, k__"); if(!hasClassValue) { - _out << nl << "__r[__k] = __v;"; + _out << nl << "r__[k__] = v__;"; } _out << eb; - _out << nl << "return __r;"; + _out << nl << "return r__;"; _out << eb; if(_stream) { - _out << sp << nl << "public static void write(Ice.OutputStream __outS, " << name << " __v)"; + _out << sp << nl << "public static void write(Ice.OutputStream outS__, " << name << " v__)"; _out << sb; - _out << nl << "if(__v == null)"; + _out << nl << "if(v__ == null)"; _out << sb; - _out << nl << "__outS.writeSize(0);"; + _out << nl << "outS__.writeSize(0);"; _out << eb; _out << nl << "else"; _out << sb; - _out << nl << "__outS.writeSize(__v.Count);"; - _out << nl << "foreach(_System.Collections.DictionaryEntry __e in __v)"; + _out << nl << "outS__.writeSize(v__.Count);"; + _out << nl << "foreach(_System.Collections.DictionaryEntry e__ in v__)"; _out << sb; writeMarshalUnmarshalCode(_out, key, keyArg, true, true, false); writeMarshalUnmarshalCode(_out, value, valueArg, true, true, false); @@ -3642,25 +3636,25 @@ Slice::Gen::HelperVisitor::visitDictionary(const DictionaryPtr& p) _out << eb; _out << eb; - _out << sp << nl << "public static " << name << " read(Ice.InputStream __inS)"; + _out << sp << nl << "public static " << name << " read(Ice.InputStream inS__)"; _out << sb; - _out << nl << "int __sz = __inS.readSize();"; - _out << nl << name << " __r = new " << name << "();"; - _out << nl << "for(int __i = 0; __i < __sz; ++__i)"; + _out << nl << "int sz__ = inS__.readSize();"; + _out << nl << name << " r__ = new " << name << "();"; + _out << nl << "for(int i__ = 0; i__ < sz__; ++i__)"; _out << sb; - _out << nl << keyS << " __k;"; - writeMarshalUnmarshalCode(_out, key, "__k", false, true, false); + _out << nl << keyS << " k__;"; + writeMarshalUnmarshalCode(_out, key, "k__", false, true, false); if(!hasClassValue) { - _out << nl << valueS << " __v;"; + _out << nl << valueS << " v__;"; } - writeMarshalUnmarshalCode(_out, value, "__v", false, true, false, "__r, __k"); + writeMarshalUnmarshalCode(_out, value, "v__", false, true, false, "r__, k__"); if(!hasClassValue) { - _out << nl << "__r[__k] = __v;"; + _out << nl << "r__[k__] = v__;"; } _out << eb; - _out << nl << "return __r;"; + _out << nl << "return r__;"; _out << eb; } @@ -3702,10 +3696,10 @@ Slice::Gen::DelegateVisitor::visitClassDefStart(const ClassDefPtr& p) string name = p->name(); ClassList bases = p->bases(); - _out << sp << nl << "public interface _" << name << "Del : "; + _out << sp << nl << "public interface " << name << "Del_ : "; if(bases.empty()) { - _out << "Ice._ObjectDel"; + _out << "Ice.ObjectDel_"; } else { @@ -3713,10 +3707,7 @@ Slice::Gen::DelegateVisitor::visitClassDefStart(const ClassDefPtr& p) while(q != bases.end()) { string s = (*q)->scoped(); - string::size_type pos = s.rfind("::"); - assert(pos != string::npos); - s = s.insert(pos + 2, "_"); - s += "Del"; + s += "Del_"; _out << fixId(s); if(++q != bases.end()) { @@ -3738,7 +3729,7 @@ Slice::Gen::DelegateVisitor::visitClassDefStart(const ClassDefPtr& p) string retS = typeToString(ret); vector<string> params = getParams(op); - _out << sp << nl << retS << ' ' << opName << spar << params << "Ice.Context __context" << epar << ';'; + _out << sp << nl << retS << ' ' << opName << spar << params << "Ice.Context context__" << epar << ';'; } return true; @@ -3785,7 +3776,7 @@ Slice::Gen::DelegateMVisitor::visitClassDefStart(const ClassDefPtr& p) string name = p->name(); ClassList bases = p->bases(); - _out << sp << nl << "public sealed class _" << name << "DelM : Ice._ObjectDelM, _" << name << "Del"; + _out << sp << nl << "public sealed class " << name << "DelM_ : Ice.ObjectDelM_, " << name << "Del_"; _out << sb; OperationList ops = p->allOperations(); @@ -3833,37 +3824,37 @@ Slice::Gen::DelegateMVisitor::visitClassDefStart(const ClassDefPtr& p) vector<string> params = getParams(op); - _out << sp << nl << "public " << retS << ' ' << opName << spar << params << "Ice.Context __context" << epar; + _out << sp << nl << "public " << retS << ' ' << opName << spar << params << "Ice.Context context__" << epar; _out << sb; - _out << nl << "IceInternal.Outgoing __og = getOutgoing(\"" << op->name() << "\", " << sliceModeToIceMode(op) - << ", __context);"; + _out << nl << "IceInternal.Outgoing og__ = getOutgoing(\"" << op->name() << "\", " << sliceModeToIceMode(op) + << ", context__);"; _out << nl << "try"; _out << sb; if(!inParams.empty()) { _out << nl << "try"; _out << sb; - _out << nl << "IceInternal.BasicStream __os = __og.ostr();"; + _out << nl << "IceInternal.BasicStream os__ = og__.ostr();"; for(q = inParams.begin(); q != inParams.end(); ++q) { writeMarshalUnmarshalCode(_out, q->first, fixId(q->second), true, false, false); } if(op->sendsClasses()) { - _out << nl << "__os.writePendingObjects();"; + _out << nl << "os__.writePendingObjects();"; } _out << eb; - _out << nl << "catch(Ice.LocalException __ex)"; + _out << nl << "catch(Ice.LocalException ex__)"; _out << sb; - _out << nl << "__og.abort(__ex);"; + _out << nl << "og__.abort(ex__);"; _out << eb; } - _out << nl << "bool __ok = __og.invoke();"; + _out << nl << "bool ok__ = og__.invoke();"; _out << nl << "try"; _out << sb; - _out << nl << "IceInternal.BasicStream __is = __og.istr();"; - _out << nl << "if(!__ok)"; + _out << nl << "IceInternal.BasicStream is__ = og__.istr();"; + _out << nl << "if(!ok__)"; _out << sb; // // The try/catch block is necessary because throwException() @@ -3871,7 +3862,7 @@ Slice::Gen::DelegateMVisitor::visitClassDefStart(const ClassDefPtr& p) // _out << nl << "try"; _out << sb; - _out << nl << "__is.throwException();"; + _out << nl << "is__.throwException();"; _out << eb; for(ExceptionList::const_iterator t = throws.begin(); t != throws.end(); ++t) { @@ -3894,20 +3885,20 @@ Slice::Gen::DelegateMVisitor::visitClassDefStart(const ClassDefPtr& p) BuiltinPtr builtin = BuiltinPtr::dynamicCast(ret); if((builtin && builtin->kind() == Builtin::KindObject) || ClassDeclPtr::dynamicCast(ret)) { - _out << nl << retS << " __ret;"; - _out << nl << "IceInternal.ParamPatcher __ret_PP = new IceInternal.ParamPatcher(typeof(" + _out << nl << retS << " ret__;"; + _out << nl << "IceInternal.ParamPatcher ret___PP = new IceInternal.ParamPatcher(typeof(" << retS << "));"; - _out << nl << "__is.readObject(__ret_PP);"; + _out << nl << "is__.readObject(ret___PP);"; } else { - _out << nl << retS << " __ret;"; - writeMarshalUnmarshalCode(_out, ret, "__ret", false, false, true, ""); + _out << nl << retS << " ret__;"; + writeMarshalUnmarshalCode(_out, ret, "ret__", false, false, true, ""); } } if(op->returnsClasses()) { - _out << nl << "__is.readPendingObjects();"; + _out << nl << "is__.readPendingObjects();"; for(q = outParams.begin(); q != outParams.end(); ++q) { string param = fixId(q->second); @@ -3923,7 +3914,7 @@ Slice::Gen::DelegateMVisitor::visitClassDefStart(const ClassDefPtr& p) bool patchStruct = st && !st->hasMetaData("clr:class") && st->classDataMembers().size() != 0; if(patchStruct) { - _out << nl << param << ".__patch();"; + _out << nl << param << ".patch__();"; } } } @@ -3933,7 +3924,7 @@ Slice::Gen::DelegateMVisitor::visitClassDefStart(const ClassDefPtr& p) BuiltinPtr builtin = BuiltinPtr::dynamicCast(ret); if((builtin && builtin->kind() == Builtin::KindObject) || ClassDeclPtr::dynamicCast(ret)) { - _out << nl << "__ret = (" << retS << ")__ret_PP.value;"; + _out << nl << "ret__ = (" << retS << ")ret___PP.value;"; } else { @@ -3941,20 +3932,20 @@ Slice::Gen::DelegateMVisitor::visitClassDefStart(const ClassDefPtr& p) bool patchStruct = st && !st->hasMetaData("clr:class") && st->classDataMembers().size() != 0; if(patchStruct) { - _out << nl << "__ret.__patch();"; + _out << nl << "ret__.patch__();"; } } - _out << nl << "return __ret;"; + _out << nl << "return ret__;"; } _out << eb; - _out << nl << "catch(Ice.LocalException __ex)"; + _out << nl << "catch(Ice.LocalException ex__)"; _out << sb; - _out << nl << "throw new IceInternal.NonRepeatable(__ex);"; + _out << nl << "throw new IceInternal.NonRepeatable(ex__);"; _out << eb; _out << eb; _out << nl << "finally"; _out << sb; - _out << nl << "reclaimOutgoing(__og);"; + _out << nl << "reclaimOutgoing(og__);"; _out << eb; _out << eb; } @@ -4003,7 +3994,7 @@ Slice::Gen::DelegateDVisitor::visitClassDefStart(const ClassDefPtr& p) string name = p->name(); ClassList bases = p->bases(); - _out << sp << nl << "public sealed class _" << name << "DelD : Ice._ObjectDelD, _" << name << "Del"; + _out << sp << nl << "public sealed class " << name << "DelD_ : Ice.ObjectDelD_, " << name << "Del_"; _out << sb; OperationList ops = p->allOperations(); @@ -4021,7 +4012,7 @@ Slice::Gen::DelegateDVisitor::visitClassDefStart(const ClassDefPtr& p) vector<string> args = getArgs(op); _out << sp; - _out << nl << "public " << retS << ' ' << opName << spar << params << "Ice.Context __context" << epar; + _out << nl << "public " << retS << ' ' << opName << spar << params << "Ice.Context context__" << epar; _out << sb; if(containingClass->hasMetaData("amd") || op->hasMetaData("amd")) { @@ -4029,14 +4020,14 @@ Slice::Gen::DelegateDVisitor::visitClassDefStart(const ClassDefPtr& p) } else { - _out << nl << "Ice.Current __current = new Ice.Current();"; - _out << nl << "__initCurrent(ref __current, \"" << op->name() << "\", " << sliceModeToIceMode(op) - << ", __context);"; + _out << nl << "Ice.Current current__ = new Ice.Current();"; + _out << nl << "initCurrent__(ref current__, \"" << op->name() << "\", " << sliceModeToIceMode(op) + << ", context__);"; _out << nl << "while(true)"; _out << sb; - _out << nl << "IceInternal.Direct __direct = new IceInternal.Direct(__current);"; - _out << nl << "object __servant = __direct.servant();"; - _out << nl << "if(__servant is " << fixId(name) << ")"; + _out << nl << "IceInternal.Direct direct__ = new IceInternal.Direct(current__);"; + _out << nl << "object servant__ = direct__.servant();"; + _out << nl << "if(servant__ is " << fixId(name) << ")"; _out << sb; _out << nl << "try"; _out << sb; @@ -4045,30 +4036,30 @@ Slice::Gen::DelegateDVisitor::visitClassDefStart(const ClassDefPtr& p) { _out << "return "; } - _out << "((" << fixId(containingClass->scoped()) << ")__servant)." - << opName << spar << args << "__current" << epar << ';'; + _out << "((" << fixId(containingClass->scoped()) << ")servant__)." + << opName << spar << args << "current__" << epar << ';'; if(!ret) { _out << nl << "return;"; } _out << eb; - _out << nl << "catch(Ice.LocalException __ex)"; + _out << nl << "catch(Ice.LocalException ex__)"; _out << sb; - _out << nl << "throw new IceInternal.NonRepeatable(__ex);"; + _out << nl << "throw new IceInternal.NonRepeatable(ex__);"; _out << eb; _out << nl << "finally"; _out << sb; - _out << nl << "__direct.destroy();"; + _out << nl << "direct__.destroy();"; _out << eb; _out << eb; _out << nl << "else"; _out << sb; - _out << nl << "__direct.destroy();"; - _out << nl << "Ice.OperationNotExistException __opEx = new Ice.OperationNotExistException();"; - _out << nl << "__opEx.id = __current.id;"; - _out << nl << "__opEx.facet = __current.facet;"; - _out << nl << "__opEx.operation = __current.operation;"; - _out << nl << "throw __opEx;"; + _out << nl << "direct__.destroy();"; + _out << nl << "Ice.OperationNotExistException opEx__ = new Ice.OperationNotExistException();"; + _out << nl << "opEx__.id = current__.id;"; + _out << nl << "opEx__.facet = current__.facet;"; + _out << nl << "opEx__.operation = current__.operation;"; + _out << nl << "throw opEx__;"; _out << eb; _out << eb; } @@ -4118,7 +4109,7 @@ Slice::Gen::DispatcherVisitor::visitClassDefStart(const ClassDefPtr& p) string name = p->name(); - _out << sp << nl << "public abstract class _" << name << "Disp : Ice.ObjectImpl, " << fixId(name); + _out << sp << nl << "public abstract class " << name << "Disp_ : Ice.ObjectImpl, " << fixId(name); _out << sb; OperationList ops = p->operations(); @@ -4162,7 +4153,7 @@ Slice::Gen::DispatcherVisitor::visitClassDefStart(const ClassDefPtr& p) _out << sp << nl << "public abstract " << typeToString(ret) << " " << name << spar << params; if(!p->isLocal()) { - _out << "Ice.Current __current"; + _out << "Ice.Current current__"; } _out << epar << ';'; } @@ -4279,12 +4270,12 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p) _out << sp; _out << nl << "public abstract void ice_response" << spar << params << epar << ';'; - _out << sp << nl << "public void __invoke" << spar << "Ice.ObjectPrx __prx" - << paramsInvoke << "Ice.Context __ctx" << epar; + _out << sp << nl << "public void invoke__" << spar << "Ice.ObjectPrx prx__" + << paramsInvoke << "Ice.Context ctx__" << epar; _out << sb; _out << nl << "try"; _out << sb; - _out << nl << "__prepare(__prx, \"" << name << "\", " << sliceModeToIceMode(p) << ", __ctx);"; + _out << nl << "prepare__(prx__, \"" << name << "\", " << sliceModeToIceMode(p) << ", ctx__);"; for(q = inParams.begin(); q != inParams.end(); ++q) { string typeS = typeToString(q->first); @@ -4292,19 +4283,19 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p) } if(p->sendsClasses()) { - _out << nl << "__os.writePendingObjects();"; + _out << nl << "os__.writePendingObjects();"; } - _out << nl << "__os.endWriteEncaps();"; + _out << nl << "os__.endWriteEncaps();"; _out << eb; - _out << nl << "catch(Ice.LocalException __ex)"; + _out << nl << "catch(Ice.LocalException ex__)"; _out << sb; - _out << nl << "__finished(__ex);"; + _out << nl << "finished__(ex__);"; _out << nl << "return;"; _out << eb; - _out << nl << "__send();"; + _out << nl << "send__();"; _out << eb; - _out << sp << nl << "protected override void __response(bool __ok)"; + _out << sp << nl << "protected override void response__(bool ok__)"; _out << sb; for(q = outParams.begin(); q != outParams.end(); ++q) { @@ -4312,21 +4303,21 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p) } if(ret) { - _out << nl << retS << " __ret;"; + _out << nl << retS << " ret__;"; } _out << nl << "try"; _out << sb; - _out << nl << "if(!__ok)"; + _out << nl << "if(!ok__)"; _out << sb; _out << nl << "try"; _out << sb; - _out << nl << "__is.throwException();"; + _out << nl << "is__.throwException();"; _out << eb; for(ExceptionList::const_iterator r = throws.begin(); r != throws.end(); ++r) { - _out << nl << "catch(" << fixId((*r)->scoped()) << " __ex)"; + _out << nl << "catch(" << fixId((*r)->scoped()) << " ex__)"; _out << sb; - _out << nl << "throw __ex;"; + _out << nl << "throw ex__;"; _out << eb; } _out << nl << "catch(Ice.UserException)"; @@ -4340,11 +4331,11 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p) } if(ret) { - writeMarshalUnmarshalCode(_out, ret, "__ret", false, false, true); + writeMarshalUnmarshalCode(_out, ret, "ret__", false, false, true); } if(p->returnsClasses()) { - _out << nl << "__is.readPendingObjects();"; + _out << nl << "is__.readPendingObjects();"; } for(q = outParams.begin(); q != outParams.end(); ++q) { @@ -4361,7 +4352,7 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p) bool patchStruct = st && !st->hasMetaData("clr:class") && st->classDataMembers().size() != 0; if(patchStruct) { - _out << nl << param << ".__patch();"; + _out << nl << param << ".patch__();"; } } } @@ -4371,7 +4362,7 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p) if((builtin && builtin->kind() == Builtin::KindObject) || ClassDeclPtr::dynamicCast(ret)) { string type = typeToString(ret); - _out << nl << "__ret = (" << retS << ")__ret_PP.value;"; + _out << nl << "ret__ = (" << retS << ")ret___PP.value;"; } else { @@ -4379,21 +4370,21 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p) bool patchStruct = st && !st->hasMetaData("clr:class") && st->classDataMembers().size() != 0; if(patchStruct) { - _out << nl << "__ret.__patch();"; + _out << nl << "ret__.patch__();"; } } } _out << eb; - _out << nl << "catch(Ice.LocalException __ex)"; + _out << nl << "catch(Ice.LocalException ex__)"; _out << sb; - _out << nl << "__finished(__ex);"; + _out << nl << "finished__(ex__);"; _out << nl << "return;"; _out << eb; if(!throws.empty()) { - _out << nl << "catch(Ice.UserException __ex)"; + _out << nl << "catch(Ice.UserException ex__)"; _out << sb; - _out << nl << "ice_exception(__ex);"; + _out << nl << "ice_exception(ex__);"; _out << nl << "return;"; _out << eb; } @@ -4458,7 +4449,7 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p) { _out << nl << "try"; _out << sb; - _out << nl << "IceInternal.BasicStream __os = this.__os();"; + _out << nl << "IceInternal.BasicStream os__ = this.os__();"; for(q = outParams.begin(); q != outParams.end(); ++q) { string typeS = typeToString(q->first); @@ -4467,26 +4458,26 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p) if(ret) { string retS = typeToString(ret); - writeMarshalUnmarshalCode(_out, ret, "__ret", true, false, false); + writeMarshalUnmarshalCode(_out, ret, "ret__", true, false, false); } if(p->returnsClasses()) { - _out << nl << "__os.writePendingObjects();"; + _out << nl << "os__.writePendingObjects();"; } _out << eb; - _out << nl << "catch(Ice.LocalException __ex)"; + _out << nl << "catch(Ice.LocalException ex__)"; _out << sb; - _out << nl << "ice_exception(__ex);"; + _out << nl << "ice_exception(ex__);"; _out << eb; } - _out << nl << "__response(true);"; + _out << nl << "response__(true);"; _out << eb; _out << sp << nl << "public void ice_exception(_System.Exception ex)"; _out << sb; if(throws.empty()) { - _out << nl << "__exception(ex);"; + _out << nl << "exception__(ex);"; } else { @@ -4498,15 +4489,15 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p) for(r = throws.begin(); r != throws.end(); ++r) { string exS = fixId((*r)->scoped()); - _out << nl << "catch(" << exS << " __ex)"; + _out << nl << "catch(" << exS << " ex__)"; _out << sb; - _out << nl << "__os().writeUserException(__ex);"; - _out << nl << "__response(false);"; + _out << nl << "os__().writeUserException(ex__);"; + _out << nl << "response__(false);"; _out << eb; } - _out << nl << "catch(_System.Exception __ex)"; + _out << nl << "catch(_System.Exception ex__)"; _out << sb; - _out << nl << "__exception(__ex);"; + _out << nl << "exception__(ex__);"; _out << eb; } _out << eb; @@ -4555,7 +4546,7 @@ Slice::Gen::TieVisitor::visitClassDefStart(const ClassDefPtr& p) opIntfName += "NC"; } - _out << sp << nl << "public class _" << name << "Tie : "; + _out << sp << nl << "public class " << name << "Tie_ : "; if(p->isInterface()) { if(p->isLocal()) @@ -4564,7 +4555,7 @@ Slice::Gen::TieVisitor::visitClassDefStart(const ClassDefPtr& p) } else { - _out << '_' << name << "Disp, Ice.TieBase"; + _out << name << "Disp_, Ice.TieBase"; } } else @@ -4573,11 +4564,11 @@ Slice::Gen::TieVisitor::visitClassDefStart(const ClassDefPtr& p) } _out << sb; - _out << sp << nl << "public _" << name << "Tie()"; + _out << sp << nl << "public " << name << "Tie_()"; _out << sb; _out << eb; - _out << sp << nl << "public _" << name << "Tie(_" << name << opIntfName << " del)"; + _out << sp << nl << "public " << name << "Tie_(" << name << opIntfName << "_ del)"; _out << sb; _out << nl << "_ice_delegate = del;"; _out << eb; @@ -4589,7 +4580,7 @@ Slice::Gen::TieVisitor::visitClassDefStart(const ClassDefPtr& p) _out << sp << nl << "public void ice_delegate(object del)"; _out << sb; - _out << nl << "_ice_delegate = (_" << name << opIntfName << ")del;"; + _out << nl << "_ice_delegate = (" << name << opIntfName << "_)del;"; _out << eb; _out << sp << nl << "public "; @@ -4614,15 +4605,15 @@ Slice::Gen::TieVisitor::visitClassDefStart(const ClassDefPtr& p) _out << sb; _out << nl << "return true;"; _out << eb; - _out << nl << "if(!(rhs is _" << name << "Tie))"; + _out << nl << "if(!(rhs is " << name << "Tie_))"; _out << sb; _out << nl << "return false;"; _out << eb; _out << nl << "if(_ice_delegate == null)"; _out << sb; - _out << nl << "return ((_" << name << "Tie)rhs)._ice_delegate == null;"; + _out << nl << "return ((" << name << "Tie_)rhs)._ice_delegate == null;"; _out << eb; - _out << nl << "return _ice_delegate.Equals(((_" << name << "Tie)rhs)._ice_delegate);"; + _out << nl << "return _ice_delegate.Equals(((" << name << "Tie_)rhs)._ice_delegate);"; _out << eb; OperationList ops = p->operations(); @@ -4656,7 +4647,7 @@ Slice::Gen::TieVisitor::visitClassDefStart(const ClassDefPtr& p) _out << (hasAMD ? "void" : retS) << ' ' << opName << spar << params; if(!p->isLocal()) { - _out << "Ice.Current __current"; + _out << "Ice.Current current__"; } _out << epar; _out << sb; @@ -4668,7 +4659,7 @@ Slice::Gen::TieVisitor::visitClassDefStart(const ClassDefPtr& p) _out << "_ice_delegate." << opName << spar << args; if(!p->isLocal()) { - _out << "__current"; + _out << "current__"; } _out << epar << ';'; _out << eb; @@ -4681,7 +4672,7 @@ Slice::Gen::TieVisitor::visitClassDefStart(const ClassDefPtr& p) writeInheritedOperationsWithOpNames(*i, opNames); } - _out << sp << nl << "private _" << name << opIntfName << " _ice_delegate;"; + _out << sp << nl << "private " << name << opIntfName << "_ _ice_delegate;"; return true; } @@ -4731,7 +4722,7 @@ Slice::Gen::TieVisitor::writeInheritedOperationsWithOpNames(const ClassDefPtr& p _out << (hasAMD ? "void" : retS) << ' ' << opName << spar << params; if(!p->isLocal()) { - _out << "Ice.Current __current"; + _out << "Ice.Current current__"; } _out << epar; _out << sb; @@ -4743,7 +4734,7 @@ Slice::Gen::TieVisitor::writeInheritedOperationsWithOpNames(const ClassDefPtr& p _out << "_ice_delegate." << opName << spar << args; if(!p->isLocal()) { - _out << "__current"; + _out << "current__"; } _out << epar << ';'; _out << eb; @@ -4789,7 +4780,7 @@ Slice::Gen::BaseImplVisitor::writeOperation(const OperationPtr& op, bool comment { _out << "override "; } - _out << "void " << opName << "_async" << spar << pDecl << "Ice.Current __current" << epar; + _out << "void " << opName << "_async" << spar << pDecl << "Ice.Current current__" << epar; if(comment) { @@ -4800,7 +4791,7 @@ Slice::Gen::BaseImplVisitor::writeOperation(const OperationPtr& op, bool comment _out << sb; if(ret) { - _out << nl << typeToString(ret) << " __ret = " << writeValue(ret) << ';'; + _out << nl << typeToString(ret) << " ret__ = " << writeValue(ret) << ';'; } for(i = params.begin(); i != params.end(); ++i) { @@ -4811,10 +4802,10 @@ Slice::Gen::BaseImplVisitor::writeOperation(const OperationPtr& op, bool comment _out << nl << typeToString(type) << ' ' << name << " = " << writeValue(type) << ';'; } } - _out << nl << "__cb.ice_response" << spar; + _out << nl << "cb__.ice_response" << spar; if(ret) { - _out << "__ret"; + _out << "ret__"; } for(i = params.begin(); i != params.end(); ++i) { @@ -4838,7 +4829,7 @@ Slice::Gen::BaseImplVisitor::writeOperation(const OperationPtr& op, bool comment _out << retS << ' ' << fixId(opName, DotNet::ICloneable, true) << spar << pDecls; if(!cl->isLocal()) { - _out << "Ice.Current __current"; + _out << "Ice.Current current__"; } _out << epar; if(comment) @@ -4964,7 +4955,7 @@ Slice::Gen::ImplVisitor::visitClassDefStart(const ClassDefPtr& p) } else { - _out << " : _" << name << "Disp"; + _out << " : " << name << "Disp_"; } } else @@ -5046,11 +5037,12 @@ Slice::Gen::ImplTieVisitor::visitClassDefStart(const ClassDefPtr& p) } _out << ", "; } - _out << '_' << name << "Operations"; + _out << name << "Operations"; if(p->isLocal()) { _out << "NC"; } + _out << '_'; _out << sb; _out << nl << "public " << name << "I()"; diff --git a/cpp/src/slice2vb/Gen.cpp b/cpp/src/slice2vb/Gen.cpp index dac5a51e307..2bdd310e052 100755 --- a/cpp/src/slice2vb/Gen.cpp +++ b/cpp/src/slice2vb/Gen.cpp @@ -116,8 +116,8 @@ Slice::VbVisitor::writeInheritedOperations(const ClassDefPtr& p) { _out << " As " << retS; } - _out << " Implements " << fixId(containingClass->scope()) << "_" << containingClass->name() - << "OperationsNC." << fixId(name, DotNet::ICloneable, true); + _out << " Implements " << fixId(containingClass->scoped() + "OperationsNC_.") + << fixId(name, DotNet::ICloneable, true); _out.inc(); _out << nl; if((*op)->returnType()) @@ -133,15 +133,15 @@ Slice::VbVisitor::writeInheritedOperations(const ClassDefPtr& p) << spar << params; if(!containingClass->isLocal()) { - _out << "ByVal __current As Ice.Current"; + _out << "ByVal current__ As Ice.Current"; } _out << epar; if(ret) { _out << " As " << retS; } - _out << " Implements " << fixId(containingClass->scope()) << "_" << containingClass->name() - << "Operations." << fixId(name, DotNet::ICloneable, true); + _out << " Implements " << fixId(containingClass->scoped() + "Operations_.") + << fixId(name, DotNet::ICloneable, true); } else { @@ -149,17 +149,17 @@ Slice::VbVisitor::writeInheritedOperations(const ClassDefPtr& p) vector<string> args = getArgsAsync(*op); _out << sp << nl << "Public Sub " << ' ' << name << "_async" << spar << params << epar - << " Implements " << fixId(containingClass->scope()) << "_" << containingClass->name() - << "OperationsNC." << name << "_async"; + << " Implements " << fixId(containingClass->scoped() + "OperationsNC_.") + << name << "_async"; _out.inc(); _out << nl << name << "_async" << spar << args << epar; _out.dec(); _out << nl << "End Sub"; _out << sp << nl << "Public MustOverride Sub " << name << "_async" - << spar << params << "ByVal __current As Ice.Current" << epar - << " Implements " << fixId(containingClass->scope()) << "_" << containingClass->name() - << "Operations." << name << "_async"; + << spar << params << "ByVal current__ As Ice.Current" << epar + << " Implements " << fixId(containingClass->scoped() + "Operations_.") + << name << "_async"; } } @@ -214,7 +214,7 @@ Slice::VbVisitor::writeDispatch(const ClassDefPtr& p) _out << sp << nl << "#Region \"Slice type-related members\""; _out.restoreIndent(); - _out << sp << nl << "Public Shared Shadows __ids As String() = New String() _"; + _out << sp << nl << "Public Shared Shadows ids__ As String() = New String() _"; _out.inc(); _out << nl << "{ _"; _out.inc(); @@ -235,44 +235,44 @@ Slice::VbVisitor::writeDispatch(const ClassDefPtr& p) _out << sp << nl << "Public Overloads Overrides Function ice_isA(ByVal s As String) As Boolean"; _out.inc(); - _out << nl << "Return _System.Array.BinarySearch(__ids, s, _System.Collections.Comparer.DefaultInvariant) >= 0"; + _out << nl << "Return _System.Array.BinarySearch(ids__, s, _System.Collections.Comparer.DefaultInvariant) >= 0"; _out.dec(); _out << nl << "End Function"; - _out << sp << nl << "Public Overloads Overrides Function ice_isA(ByVal s As String, Byval __current As Ice.Current)" + _out << sp << nl << "Public Overloads Overrides Function ice_isA(ByVal s As String, Byval current__ As Ice.Current)" " As Boolean"; _out.inc(); - _out << nl << "Return _System.Array.BinarySearch(__ids, s, _System.Collections.Comparer.DefaultInvariant) >= 0"; + _out << nl << "Return _System.Array.BinarySearch(ids__, s, _System.Collections.Comparer.DefaultInvariant) >= 0"; _out.dec(); _out << nl << "End Function"; _out << sp << nl << "Public Overloads Overrides Function ice_ids() As String()"; _out.inc(); - _out << nl << "Return __ids"; + _out << nl << "Return ids__"; _out.dec(); _out << nl << "End Function"; - _out << sp << nl << "Public Overloads Overrides Function ice_ids(ByVal __current As Ice.Current) As String()"; + _out << sp << nl << "Public Overloads Overrides Function ice_ids(ByVal current__ As Ice.Current) As String()"; _out.inc(); - _out << nl << "Return __ids"; + _out << nl << "Return ids__"; _out.dec(); _out << nl << "End Function"; _out << sp << nl << "Public Overloads Overrides Function ice_id() As String"; _out.inc(); - _out << nl << "Return __ids(" << scopedPos << ")"; + _out << nl << "Return ids__(" << scopedPos << ")"; _out.dec(); _out << nl << "End Function"; - _out << sp << nl << "Public Overloads Overrides Function ice_id(ByVal __current As Ice.Current) As String"; + _out << sp << nl << "Public Overloads Overrides Function ice_id(ByVal current__ As Ice.Current) As String"; _out.inc(); - _out << nl << "Return __ids(" << scopedPos << ")"; + _out << nl << "Return ids__(" << scopedPos << ")"; _out.dec(); _out << nl << "End Function"; _out << sp << nl << "Public Overloads Shared Function ice_staticId() As String"; _out.inc(); - _out << nl << "Return __ids(" << scopedPos << ")"; + _out << nl << "Return ids__(" << scopedPos << ")"; _out.dec(); _out << nl << "End Function"; @@ -297,12 +297,12 @@ Slice::VbVisitor::writeDispatch(const ClassDefPtr& p) assert(cl); string opName = op->name(); - _out << sp << nl << "Public Shared Function ___" << opName << "( _"; + _out << sp << nl << "Public Shared Function "<< opName << "___( _"; _out.inc(); _out.inc(); - _out << nl << "ByVal __obj As _" << p->name() << "Operations, _"; - _out << nl << "ByVal __inS As IceInternal.Incoming, _"; - _out << nl << "ByVal __current As Ice.Current) As IceInternal.DispatchStatus"; + _out << nl << "ByVal obj__ As " << p->name() << "Operations_, _"; + _out << nl << "ByVal inS__ As IceInternal.Incoming, _"; + _out << nl << "ByVal current__ As Ice.Current) As IceInternal.DispatchStatus"; _out.dec(); bool amd = p->hasMetaData("amd") || op->hasMetaData("amd"); @@ -342,14 +342,14 @@ Slice::VbVisitor::writeDispatch(const ClassDefPtr& p) #endif TypeStringList::const_iterator q; - _out << nl << "__checkMode(" << sliceModeToIceMode(op) << ", __current.mode)";
+ _out << nl << "checkMode__(" << sliceModeToIceMode(op) << ", current__.mode)"; if(!inParams.empty()) { - _out << nl << "Dim __is As IceInternal.BasicStream = __inS.istr()"; + _out << nl << "Dim is__ As IceInternal.BasicStream = inS__.istr()"; } if(!outParams.empty() || ret || !throws.empty()) { - _out << nl << "Dim __os As IceInternal.BasicStream = __inS.ostr()"; + _out << nl << "Dim os__ As IceInternal.BasicStream = inS__.ostr()"; } // @@ -370,7 +370,7 @@ Slice::VbVisitor::writeDispatch(const ClassDefPtr& p) } if(op->sendsClasses()) { - _out << nl << "__is.readPendingObjects()"; + _out << nl << "is__.readPendingObjects()"; } for(q = inParams.begin(); q != inParams.end(); ++q) { @@ -378,7 +378,7 @@ Slice::VbVisitor::writeDispatch(const ClassDefPtr& p) bool patchStruct = st && !st->hasMetaData("clr:class") && st->classDataMembers().size() != 0; if(patchStruct) { - _out << nl << fixId(q->second) << ".__patch()"; + _out << nl << fixId(q->second) << ".patch__()"; } } @@ -400,9 +400,9 @@ Slice::VbVisitor::writeDispatch(const ClassDefPtr& p) if(ret) { string retS = typeToString(ret); - _out << "Dim __ret As " << retS << " = "; + _out << "Dim ret__ As " << retS << " = "; } - _out << "__obj." << fixId(opName, DotNet::ICloneable, true) << spar; + _out << "obj__." << fixId(opName, DotNet::ICloneable, true) << spar; for(q = inParams.begin(); q != inParams.end(); ++q) { BuiltinPtr builtin = BuiltinPtr::dynamicCast(q->first); @@ -422,7 +422,7 @@ Slice::VbVisitor::writeDispatch(const ClassDefPtr& p) { _out << fixId(q->second); } - _out << "__current" << epar; + _out << "current__" << epar; // // Marshal 'out' parameters and return value. @@ -433,11 +433,11 @@ Slice::VbVisitor::writeDispatch(const ClassDefPtr& p) } if(ret) { - writeMarshalUnmarshalCode(_out, ret, "__ret", true, false, true, ""); + writeMarshalUnmarshalCode(_out, ret, "ret__", true, false, true, ""); } if(op->returnsClasses()) { - _out << nl << "__os.writePendingObjects()"; + _out << nl << "os__.writePendingObjects()"; } _out << nl << "Return IceInternal.DispatchStatus.DispatchOK"; @@ -453,7 +453,7 @@ Slice::VbVisitor::writeDispatch(const ClassDefPtr& p) string exS = fixId((*t)->scoped()); _out << nl << "Catch ex As " << exS; _out.inc(); - _out << nl << "__os.writeUserException(ex)"; + _out << nl << "os__.writeUserException(ex)"; _out << nl << "Return IceInternal.DispatchStatus.DispatchUserException"; _out.dec(); _out << nl << "End Try"; @@ -476,9 +476,10 @@ Slice::VbVisitor::writeDispatch(const ClassDefPtr& p) } TypeStringList::const_iterator q; - _out << nl << "__checkMode(" << sliceModeToIceMode(op) << ", __current.mode)";
if(!inParams.empty()) + _out << nl << "checkMode__(" << sliceModeToIceMode(op) << ", current__.mode)"; + if(!inParams.empty()) { - _out << nl << "Dim __is As IceInternal.BasicStream = __inS.istr()"; + _out << nl << "Dim is__ As IceInternal.BasicStream = inS__.istr()"; } // @@ -497,7 +498,7 @@ Slice::VbVisitor::writeDispatch(const ClassDefPtr& p) } if(op->sendsClasses()) { - _out << nl << "__is.readPendingObjects()"; + _out << nl << "is__.readPendingObjects()"; } for(q = inParams.begin(); q != inParams.end(); ++q) { @@ -505,7 +506,7 @@ Slice::VbVisitor::writeDispatch(const ClassDefPtr& p) bool patchStruct = st && !st->hasMetaData("clr:class") && st->classDataMembers().size() != 0; if(patchStruct) { - _out << nl << fixId(q->second) << ".__patch()"; + _out << nl << fixId(q->second) << ".patch__()"; } } @@ -513,11 +514,11 @@ Slice::VbVisitor::writeDispatch(const ClassDefPtr& p) // Call on the servant. // string classNameAMD = "AMD_" + p->name(); - _out << nl << "Dim __cb As " << classNameAMD << '_' << op->name() << " = new _" - << classNameAMD << '_' << op->name() << "(__inS)"; + _out << nl << "Dim cb__ As " << classNameAMD << '_' << op->name() << " = new _" + << classNameAMD << '_' << op->name() << "(inS__)"; _out << nl << "Try"; _out.inc(); - _out << nl << "__obj."; + _out << nl << "obj__."; if(amd) { _out << opName << "_async"; @@ -529,7 +530,7 @@ Slice::VbVisitor::writeDispatch(const ClassDefPtr& p) _out << spar; if(amd) { - _out << "__cb"; + _out << "cb__"; } for(q = inParams.begin(); q != inParams.end(); ++q) { @@ -545,11 +546,11 @@ Slice::VbVisitor::writeDispatch(const ClassDefPtr& p) _out << fixId(q->second); } } - _out << "__current" << epar; + _out << "current__" << epar; _out.dec(); _out << nl << "Catch ex As _System.Exception"; _out.inc(); - _out << nl << "__cb.ice_exception(ex)"; + _out << nl << "cb__.ice_exception(ex)"; _out.dec(); _out << nl << "End Try"; _out << nl << "Return IceInternal.DispatchStatus.DispatchAsync"; @@ -590,7 +591,7 @@ Slice::VbVisitor::writeDispatch(const ClassDefPtr& p) StringList::const_iterator q; - _out << sp << nl << "Public Shared Shadows __all As String() = New String() _"; + _out << sp << nl << "Public Shared Shadows all__ As String() = New String() _"; _out.inc(); _out << nl << "{ _"; _out.inc(); @@ -609,14 +610,14 @@ Slice::VbVisitor::writeDispatch(const ClassDefPtr& p) _out << nl << '}'; _out.dec(); - _out << sp << nl << "Public Overloads Overrides Function __dispatch( _"; + _out << sp << nl << "Public Overloads Overrides Function dispatch__( _"; _out.inc(); _out.inc(); - _out << nl << "ByVal __inS As IceInternal.Incoming, _"; - _out << nl << "ByVal __current As Ice.Current) As IceInternal.DispatchStatus"; + _out << nl << "ByVal inS__ As IceInternal.Incoming, _"; + _out << nl << "ByVal current__ As Ice.Current) As IceInternal.DispatchStatus"; _out.dec(); _out << nl << "Dim pos As Integer"; - _out << nl << "pos = _System.Array.BinarySearch(__all, __current.operation, " + _out << nl << "pos = _System.Array.BinarySearch(all__, current__.operation, " << "_System.Collections.Comparer.DefaultInvariant)"; _out << nl << "If pos < 0 Then"; _out.inc(); @@ -634,19 +635,19 @@ Slice::VbVisitor::writeDispatch(const ClassDefPtr& p) _out.inc(); if(opName == "ice_id") { - _out << nl << "Return ___ice_id(Me, __inS, __current)"; + _out << nl << "Return ice_id___(Me, inS__, current__)"; } else if(opName == "ice_ids") { - _out << nl << "Return ___ice_ids(Me, __inS, __current)"; + _out << nl << "Return ice_ids___(Me, inS__, current__)"; } else if(opName == "ice_isA") { - _out << nl << "Return ___ice_isA(Me, __inS, __current)"; + _out << nl << "Return ice_isA___(Me, inS__, current__)"; } else if(opName == "ice_ping") { - _out << nl << "Return ___ice_ping(Me, __inS, __current)"; + _out << nl << "Return ice_ping___(Me, inS__, current__)"; } else { @@ -662,19 +663,16 @@ Slice::VbVisitor::writeDispatch(const ClassDefPtr& p) assert(cl); if(cl->scoped() == p->scoped()) { - _out << nl << "Return ___" << opName << "(Me, __inS, __current)"; + _out << nl << "Return " << opName << "___(Me, inS__, current__)"; } else { string base = cl->scoped(); if(cl->isInterface()) { - string::size_type pos = base.rfind("::"); - assert(pos != string::npos); - base = base.insert(pos + 2, "_"); - base += "Disp"; + base += "Disp_"; } - _out << nl << "Return " << fixId(base) << ".___" << opName << "(Me, __inS, __current)"; + _out << nl << "Return " << fixId(base) << "." << opName << "___(Me, inS__, current__)"; } break; } @@ -737,7 +735,7 @@ Slice::VbVisitor::getParamsAsync(const OperationPtr& op, bool amd) string name = op->name(); ContainerPtr container = op->container(); ClassDefPtr cl = ClassDefPtr::dynamicCast(container); // Get the class containing the op. - string param = "ByVal __cb As "; + string param = "ByVal cb__ As "; string scope = fixId(cl->scope()); param += scope + (amd ? "AMD_" : "AMI_") + cl->name() + "_" + op->name(); params.push_back(param); @@ -762,7 +760,7 @@ Slice::VbVisitor::getParamsAsyncCB(const OperationPtr& op) TypePtr ret = op->returnType(); if(ret) { - params.push_back("ByVal __ret As " + typeToString(ret)); + params.push_back("ByVal ret__ As " + typeToString(ret)); } ParamDeclList paramList = op->parameters(); @@ -796,7 +794,7 @@ Slice::VbVisitor::getArgsAsync(const OperationPtr& op) { vector<string> args; - args.push_back("__cb"); + args.push_back("cb__"); ParamDeclList paramList = op->parameters(); for(ParamDeclList::const_iterator q = paramList.begin(); q != paramList.end(); ++q) @@ -817,7 +815,7 @@ Slice::VbVisitor::getArgsAsyncCB(const OperationPtr& op) TypePtr ret = op->returnType(); if(ret) { - args.push_back("__ret"); + args.push_back("ret__"); } ParamDeclList paramList = op->parameters(); @@ -1139,17 +1137,17 @@ Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p) _out << sp << nl << "Public NotInheritable Class " << p->name() << "Helper"; _out.inc(); - _out << sp << nl << "Public Sub New(ByVal __inS As Ice.InputStream)"; + _out << sp << nl << "Public Sub New(ByVal inS__ As Ice.InputStream)"; _out.inc(); - _out << nl << "_in = __inS"; + _out << nl << "_in = inS__"; _out << nl << "_pp = New IceInternal.ParamPatcher(GetType(" << scoped << "))"; _out.dec(); _out << nl << "End Sub"; - _out << sp << nl << "Public Shared Sub write(ByVal __outS As Ice.OutputStream, ByVal __v As " + _out << sp << nl << "Public Shared Sub write(ByVal outS__ As Ice.OutputStream, ByVal v__ As " << fixId(name) << ')'; _out.inc(); - _out << nl << "__outS.writeObject(__v)"; + _out << nl << "outS__.writeObject(v__)"; _out.dec(); _out << nl << "End Sub"; @@ -1190,12 +1188,12 @@ Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p) { _out << nl << "Inherits Ice.Object"; } - _out << ", _" << p->name(); + _out << ", " << p->name(); if(!p->isLocal()) { - _out << "Operations, _" << p->name(); + _out << "Operations_, " << p->name(); } - _out << "OperationsNC"; + _out << "OperationsNC_"; if(!bases.empty()) { ClassList::const_iterator q = bases.begin(); @@ -1234,12 +1232,12 @@ Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p) } if(p->isAbstract()) { - _out << nl << "Implements _" << p->name(); + _out << nl << "Implements " << p->name(); if(!p->isLocal()) { - _out << "Operations, _" << p->name(); + _out << "Operations_, " << p->name(); } - _out << "OperationsNC"; + _out << "OperationsNC_"; } for(ClassList::const_iterator q = bases.begin(); q != bases.end(); ++q) { @@ -1365,24 +1363,24 @@ Slice::Gen::TypesVisitor::visitClassDefEnd(const ClassDefPtr& p) _out << sp << nl << "#Region \"Marshaling support\""; _out.restoreIndent(); - _out << sp << nl << "Public Overloads Overrides Sub __write(ByVal __os As IceInternal.BasicStream)"; + _out << sp << nl << "Public Overloads Overrides Sub write__(ByVal os__ As IceInternal.BasicStream)"; _out.inc(); - _out << nl << "__os.writeTypeId(ice_staticId())"; - _out << nl << "__os.startWriteSlice()"; + _out << nl << "os__.writeTypeId(ice_staticId())"; + _out << nl << "os__.startWriteSlice()"; for(d = members.begin(); d != members.end(); ++d) { StringList metaData = (*d)->getMetaData(); writeMarshalUnmarshalCode(_out, (*d)->type(), fixId((*d)->name(), DotNet::ICloneable, true), true, false, false); } - _out << nl << "__os.endWriteSlice()"; - _out << nl << "MyBase.__write(__os)"; + _out << nl << "os__.endWriteSlice()"; + _out << nl << "MyBase.write__(os__)"; _out.dec(); _out << nl << "End Sub"; DataMemberList allClassMembers = p->allClassDataMembers(); if(allClassMembers.size() != 0) { - _out << sp << nl << "Public NotInheritable Class __Patcher"; + _out << sp << nl << "Public NotInheritable Class Patcher__"; _out.inc(); _out << nl << "Inherits IceInternal.Patcher"; _out << sp << nl << "Friend Sub New(ByVal instance As Ice.ObjectImpl"; @@ -1417,7 +1415,7 @@ Slice::Gen::TypesVisitor::visitClassDefEnd(const ClassDefPtr& p) } string memberName = fixId((*d)->name(), DotNet::ICloneable, true); string memberType = typeToString((*d)->type()); - _out << nl << "_type = GetType(" << memberType << ')'; + _out << nl << "type_ = GetType(" << memberType << ')'; _out << nl << "_instance." << memberName << " = CType(v, " << memberType << ')'; if(allClassMembers.size() > 1) { @@ -1442,15 +1440,15 @@ Slice::Gen::TypesVisitor::visitClassDefEnd(const ClassDefPtr& p) _out << nl << "End Class"; } - _out << sp << nl << "Public Overloads Overrides Sub __read(ByVal __is As IceInternal.BasicStream, " - "ByVal __rid As Boolean)"; + _out << sp << nl << "Public Overloads Overrides Sub read__(ByVal is__ As IceInternal.BasicStream, " + "ByVal rid__ As Boolean)"; _out.inc(); - _out << nl << "If __rid Then"; + _out << nl << "If rid__ Then"; _out.inc(); - _out << nl << "Dim myId As String = __is.readTypeId()"; + _out << nl << "Dim myId As String = is__.readTypeId()"; _out.dec(); _out << nl << "End If"; - _out << nl << "__is.startReadSlice()"; + _out << nl << "is__.startReadSlice()"; DataMemberList classMembers = p->classDataMembers(); int classMemberCount = static_cast<int>(allClassMembers.size() - classMembers.size()); for(d = members.begin(); d != members.end(); ++d) @@ -1470,8 +1468,8 @@ Slice::Gen::TypesVisitor::visitClassDefEnd(const ClassDefPtr& p) fixId((*d)->name(), DotNet::ICloneable, true), false, false, false, patchParams.str()); } - _out << nl << "__is.endReadSlice()"; - _out << nl << "MyBase.__read(__is, true)"; + _out << nl << "is__.endReadSlice()"; + _out << nl << "MyBase.read__(is__, true)"; _out.dec(); _out << nl << "End Sub"; @@ -1480,10 +1478,10 @@ Slice::Gen::TypesVisitor::visitClassDefEnd(const ClassDefPtr& p) // if(_stream) { - _out << sp << nl << "Public Overloads Overrides Sub __write(ByVal __outS As Ice.OutputStream)"; + _out << sp << nl << "Public Overloads Overrides Sub write__(ByVal outS__ As Ice.OutputStream)"; _out.inc(); - _out << nl << "__outS.writeTypeId(ice_staticId())"; - _out << nl << "__outS.startSlice()"; + _out << nl << "outS__.writeTypeId(ice_staticId())"; + _out << nl << "outS__.startSlice()"; for(d = members.begin(); d != members.end(); ++d) { StringList metaData = (*d)->getMetaData(); @@ -1491,20 +1489,20 @@ Slice::Gen::TypesVisitor::visitClassDefEnd(const ClassDefPtr& p) fixId((*d)->name(), DotNet::ICloneable, true), true, true, false); } - _out << nl << "__outS.endSlice()"; - _out << nl << "MyBase.__write(__outS)"; + _out << nl << "outS__.endSlice()"; + _out << nl << "MyBase.write__(outS__)"; _out.dec(); _out << nl << "End Sub"; - _out << sp << nl << "Public Overloads Overrides Sub __read" - << "(ByVal __inS As Ice.InputStream, ByVal __rid As Boolean)"; + _out << sp << nl << "Public Overloads Overrides Sub read__" + << "(ByVal inS__ As Ice.InputStream, ByVal rid__ As Boolean)"; _out.inc(); - _out << nl << "If __rid Then"; + _out << nl << "If rid__ Then"; _out.inc(); - _out << nl << "Dim myId As String = __inS.readTypeId()"; + _out << nl << "Dim myId As String = inS__.readTypeId()"; _out.dec(); _out << nl << "End If"; - _out << nl << "__inS.startSlice()"; + _out << nl << "inS__.startSlice()"; for(d = members.begin(); d != members.end(); ++d) { StringList metaData = (*d)->getMetaData(); @@ -1522,8 +1520,8 @@ Slice::Gen::TypesVisitor::visitClassDefEnd(const ClassDefPtr& p) fixId((*d)->name(), DotNet::ICloneable, true), false, true, false, patchParams.str()); } - _out << nl << "__inS.endSlice()"; - _out << nl << "MyBase.__read(__inS, True)"; + _out << nl << "inS__.endSlice()"; + _out << nl << "MyBase.read__(inS__, True)"; _out.dec(); _out << nl << "End Sub"; } @@ -1533,7 +1531,7 @@ Slice::Gen::TypesVisitor::visitClassDefEnd(const ClassDefPtr& p) // Emit placeholder functions to catch errors. // string scoped = p->scoped(); - _out << sp << nl << "Public Overloads Overrides Sub __write(ByVal __outS As Ice.OutputStream)"; + _out << sp << nl << "Public Overloads Overrides Sub write__(ByVal outS__ As Ice.OutputStream)"; _out.inc(); _out << nl << "Dim ex As Ice.MarshalException = New Ice.MarshalException"; _out << nl << "ex.reason = \"type " << scoped.substr(2) << " was not generated with stream support\""; @@ -1541,8 +1539,8 @@ Slice::Gen::TypesVisitor::visitClassDefEnd(const ClassDefPtr& p) _out.dec(); _out << nl << "End Sub"; - _out << sp << nl << "Public Overloads Overrides Sub __read" - << "(ByVal __inS As Ice.InputStream, ByVal __rid As Boolean)"; + _out << sp << nl << "Public Overloads Overrides Sub read__" + << "(ByVal inS__ As Ice.InputStream, ByVal rid__ As Boolean)"; _out.inc(); _out << nl << "Dim ex As Ice.MarshalException = New Ice.MarshalException"; _out << nl << "ex.reason = \"type " << scoped.substr(2) << " was not generated with stream support\""; @@ -1609,7 +1607,7 @@ Slice::Gen::TypesVisitor::visitOperation(const OperationPtr& p) { _out << " As " << retS; } - _out << " Implements _" << classDef->name() << "OperationsNC." << name; + _out << " Implements " << classDef->name() << "OperationsNC_." << name; if(!isLocal) { _out.inc(); @@ -1626,12 +1624,12 @@ Slice::Gen::TypesVisitor::visitOperation(const OperationPtr& p) if(!isLocal) { _out << sp << nl << "Public MustOverride " << vbOp << ' ' << name - << spar << params << "ByVal __current As Ice.Current" << epar; + << spar << params << "ByVal current__ As Ice.Current" << epar; if(ret) { _out << " As " << retS; } - _out << " Implements _" << classDef->name() << "Operations." << name; + _out << " Implements " << classDef->name() << "Operations_." << name; } } @@ -1670,9 +1668,9 @@ Slice::Gen::TypesVisitor::visitSequence(const SequencePtr& p) _out.dec(); _out << nl << "End Sub"; - _out << sp << nl << "Public Sub New(ByVal __a As " << s << "())"; + _out << sp << nl << "Public Sub New(ByVal a__ As " << s << "())"; _out.inc(); - _out << nl << "InnerList.AddRange(__a)"; + _out << nl << "InnerList.AddRange(a__)"; _out.dec(); _out << nl << "End Sub"; @@ -1682,30 +1680,30 @@ Slice::Gen::TypesVisitor::visitSequence(const SequencePtr& p) _out << sp << nl << "#Region \"Array copy and conversion\""; _out.restoreIndent(); - _out << sp << nl << "Public Sub CopyTo(ByVal __a As " << s << "())"; + _out << sp << nl << "Public Sub CopyTo(ByVal a__ As " << s << "())"; _out.inc(); - _out << nl << "InnerList.CopyTo(__a)"; + _out << nl << "InnerList.CopyTo(a__)"; _out.dec(); _out << nl << "End Sub"; - _out << sp << nl << "Public Sub CopyTo(ByVal __a As " << s << "(), ByVal __i As Integer)"; + _out << sp << nl << "Public Sub CopyTo(ByVal a__ As " << s << "(), ByVal i__ As Integer)"; _out.inc(); - _out << nl << "InnerList.CopyTo(__a, __i)"; + _out << nl << "InnerList.CopyTo(a__, i__)"; _out.dec(); _out << nl << "End Sub"; - _out << sp << nl << "Public Sub CopyTo(ByVal __i As Integer, ByVal __a As " << s << "(), " - "ByVal __ai As Integer, ByVal __c As Integer)"; + _out << sp << nl << "Public Sub CopyTo(ByVal i__ As Integer, ByVal a__ As " << s << "(), " + "ByVal ai__ As Integer, ByVal c__ As Integer)"; _out.inc(); - _out << nl << "InnerList.CopyTo(__i, __a, __ai, __c)"; + _out << nl << "InnerList.CopyTo(i__, a__, ai__, c__)"; _out.dec(); _out << nl << "End Sub"; _out << sp << nl << "Public Function ToArray() As " << s << "()"; _out.inc(); - _out << nl << "Dim __a As " << s << "() = New " << toArrayAlloc(s + "()", "InnerList.Count - 1") << " {}"; - _out << nl << "InnerList.CopyTo(__a)"; - _out << nl << "Return __a"; + _out << nl << "Dim a__ As " << s << "() = New " << toArrayAlloc(s + "()", "InnerList.Count - 1") << " {}"; + _out << nl << "InnerList.CopyTo(a__)"; + _out << nl << "Return a__"; _out.dec(); _out << nl << "End Function"; @@ -1715,15 +1713,15 @@ Slice::Gen::TypesVisitor::visitSequence(const SequencePtr& p) _out << sp << nl << "#Region \"AddRange members\""; _out.restoreIndent(); - _out << sp << nl << "Public Sub AddRange(ByVal __s As " << name << ')'; + _out << sp << nl << "Public Sub AddRange(ByVal s__ As " << name << ')'; _out.inc(); - _out << nl << "InnerList.AddRange(__s)"; + _out << nl << "InnerList.AddRange(s__)"; _out.dec(); _out << nl << "End Sub"; - _out << sp << nl << "Public Sub AddRange(ByVal __a As " << s << "())"; + _out << sp << nl << "Public Sub AddRange(ByVal a__ As " << s << "())"; _out.inc(); - _out << nl << "InnerList.AddRange(__a)"; + _out << nl << "InnerList.AddRange(a__)"; _out.dec(); _out << nl << "End Sub"; @@ -1896,17 +1894,17 @@ Slice::Gen::TypesVisitor::visitSequence(const SequencePtr& p) _out << nl << "Return False"; _out.dec(); _out << nl << "End If"; - _out << nl << "For __i As Integer = 0 To Count - 1"; + _out << nl << "For i__ As Integer = 0 To Count - 1"; _out.inc(); if(!isValue) { - _out << nl << "If InnerList(__i) Is Nothing And Not CType(other, " << name << ")(__i) Is Nothing Then"; + _out << nl << "If InnerList(i__) Is Nothing And Not CType(other, " << name << ")(i__) Is Nothing Then"; _out.inc(); _out << nl << "Return False"; _out.dec(); _out << nl << "End If"; } - _out << nl << "If Not CType(InnerList(__i), Integer).Equals(CType(other, " << name << ")(__i)) Then"; + _out << nl << "If Not CType(InnerList(i__), Integer).Equals(CType(other, " << name << ")(i__)) Then"; _out.inc(); _out << nl << "Return False"; _out.dec(); @@ -1923,16 +1921,16 @@ Slice::Gen::TypesVisitor::visitSequence(const SequencePtr& p) _out << sp << nl << "#Region \"Shared Equals\""; _out.restoreIndent(); - _out << sp << nl << "Public Overloads Shared Function Equals(ByVal __lhs As " << name - << ", ByVal __rhs As " << name << ") As Boolean"; + _out << sp << nl << "Public Overloads Shared Function Equals(ByVal lhs__ As " << name + << ", ByVal rhs__ As " << name << ") As Boolean"; _out.inc(); - _out << nl << "If Object.ReferenceEquals(__rhs, Nothing) Then"; + _out << nl << "If Object.ReferenceEquals(rhs__, Nothing) Then"; _out.inc(); - _out << nl << "Return Object.ReferenceEquals(__rhs, Nothing)"; + _out << nl << "Return Object.ReferenceEquals(rhs__, Nothing)"; _out.dec(); _out << nl << "Else"; _out.inc(); - _out << nl << "Return __lhs.Equals(__rhs)"; + _out << nl << "Return lhs__.Equals(rhs__)"; _out.dec(); _out << nl << "End If"; _out.dec(); @@ -2002,21 +2000,21 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p) _out.dec(); _out << nl << "End Sub"; - _out << sp << nl << "Public Sub New(ByVal __m As String)"; + _out << sp << nl << "Public Sub New(ByVal m__ As String)"; _out.inc(); - _out << nl << "MyBase.New(__m)"; + _out << nl << "MyBase.New(m__)"; _out.dec(); _out << nl << "End Sub"; - _out << sp << nl << "Public Sub New(ByVal __ex As _System.Exception)"; + _out << sp << nl << "Public Sub New(ByVal ex__ As _System.Exception)"; _out.inc(); - _out << nl << "MyBase.New(_dflt, __ex)"; + _out << nl << "MyBase.New(_dflt, ex__)"; _out.dec(); _out << nl << "End Sub"; - _out << sp << nl << "Public Sub New(ByVal __m As String, ByVal __ex As _System.Exception)"; + _out << sp << nl << "Public Sub New(ByVal m__ As String, ByVal ex__ As _System.Exception)"; _out.inc(); - _out << nl << "MyBase.New(__m, __ex)"; + _out << nl << "MyBase.New(m__, ex__)"; _out.dec(); _out << nl << "End Sub"; @@ -2028,7 +2026,7 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p) _out << sp << nl << "Public Overrides Function GetHashCode() As Integer"; _out.inc(); - _out << nl << "Dim __h As Integer = 0"; + _out << nl << "Dim h__ As Integer = 0"; for(q = dataMembers.begin(); q != dataMembers.end(); ++q) { string memberName = fixId((*q)->name(), DotNet::ApplicationException); @@ -2042,17 +2040,17 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p) if(cl && cl->isInterface()) // Bug in VB 7.1: cast should not be necessary. { _out << nl << "' Bug in VB 7.1: cast to Object should not be necessary."; - _out << nl << "__h = 5 * __h + CType(" << memberName << ", Object).GetHashCode()"; + _out << nl << "h__ = 5 * h__ + CType(" << memberName << ", Object).GetHashCode()"; } else if(ProxyPtr::dynamicCast((*q)->type())) { _out << nl << "' Bug in VB 7.1: cast should not be necessary."; - _out << nl << "__h = 5 * __h + CType(" << memberName << ", " + _out << nl << "h__ = 5 * h__ + CType(" << memberName << ", " << typeToString((*q)->type()) << "Helper).GetHashCode()"; } else { - _out << nl << "__h = 5 * __h + " << memberName << ".GetHashCode()"; + _out << nl << "h__ = 5 * h__ + " << memberName << ".GetHashCode()"; } if(!isValue) { @@ -2060,26 +2058,26 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p) _out << nl << "End If"; } } - _out << nl << "Return __h"; + _out << nl << "Return h__"; _out.dec(); _out << nl << "End Function"; - _out << sp << nl << "Public Overloads Overrides Function Equals(ByVal __other As Object) As Boolean"; + _out << sp << nl << "Public Overloads Overrides Function Equals(ByVal other__ As Object) As Boolean"; _out.inc(); - _out << nl << "If __other Is Nothing Then"; + _out << nl << "If other__ Is Nothing Then"; _out.inc(); _out << nl << "Return False"; _out.dec(); _out << nl << "End If"; - _out << nl << "If Object.ReferenceEquals(Me, __other) Then"; + _out << nl << "If Object.ReferenceEquals(Me, other__) Then"; _out.inc(); _out << nl << "Return True"; _out.dec(); _out << nl << "End If"; - _out << nl << "If Not TypeOf __other Is " << name << " Then"; + _out << nl << "If Not TypeOf other__ Is " << name << " Then"; _out.inc(); _out << nl << "Throw New _System.ArgumentException(\"expected argument of type `" << p->name() - << "'\", \"__other\")"; + << "'\", \"other__\")"; _out.dec(); _out << nl << "End If"; for(q = dataMembers.begin(); q != dataMembers.end(); ++q) @@ -2090,18 +2088,18 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p) if(cl && cl->isInterface()) // Bug in VB 7.1: cast should not be necessary. { _out << nl << "' Bug in VB 7.1: cast to Object should not be necessary."; - _out << nl << "If Not CType(" << memberName << ", Object).Equals(CType(__other, " + _out << nl << "If Not CType(" << memberName << ", Object).Equals(CType(other__, " << name << ")." << memberName << ") Then"; } else if(ProxyPtr::dynamicCast((*q)->type())) { _out << nl << "' Bug in VB 7.1: cast should not be necessary."; _out << nl << "If Not CType(" << memberName << ", " << typeToString((*q)->type()) - << "Helper).Equals(CType(__other, " << name << ")." << memberName << ") Then"; + << "Helper).Equals(CType(other__, " << name << ")." << memberName << ") Then"; } else { - _out << nl << "If Not " << memberName << ".Equals(CType(__other, " << name << ")." + _out << nl << "If Not " << memberName << ".Equals(CType(other__, " << name << ")." << memberName << ") Then"; } _out.inc(); @@ -2119,17 +2117,17 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p) _out << sp << nl << "#Region \"Shared Equals\""; _out.restoreIndent(); - _out << sp << nl << "Public Overloads Shared Function Equals(ByVal __lhs As " << name - << ", ByVal __rhs As " << name << ") As Boolean"; + _out << sp << nl << "Public Overloads Shared Function Equals(ByVal lhs__ As " << name + << ", ByVal rhs__ As " << name << ") As Boolean"; _out.inc(); - _out << nl << "If Object.ReferenceEquals(__rhs, Nothing) Then"; + _out << nl << "If Object.ReferenceEquals(rhs__, Nothing) Then"; _out.inc(); - _out << nl << "Return Object.ReferenceEquals(__rhs, Nothing)"; + _out << nl << "Return Object.ReferenceEquals(rhs__, Nothing)"; _out.dec(); _out << nl << "Else"; _out.inc(); - _out << nl << "Return __lhs.Equals(__rhs)"; + _out << nl << "Return lhs__.Equals(rhs__)"; _out.dec(); _out << nl << "End If"; _out.dec(); @@ -2149,20 +2147,20 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p) ExceptionPtr base = p->base(); - _out << sp << nl << "Public Overloads Overrides Sub __write(ByVal __os As IceInternal.BasicStream)"; + _out << sp << nl << "Public Overloads Overrides Sub write__(ByVal os__ As IceInternal.BasicStream)"; _out.inc(); - _out << nl << "__os.writeString(\"" << scoped << "\")"; - _out << nl << "__os.startWriteSlice()"; + _out << nl << "os__.writeString(\"" << scoped << "\")"; + _out << nl << "os__.startWriteSlice()"; for(q = dataMembers.begin(); q != dataMembers.end(); ++q) { writeMarshalUnmarshalCode(_out, (*q)->type(), fixId((*q)->name(), DotNet::ApplicationException), true, false, false); } - _out << nl << "__os.endWriteSlice()"; + _out << nl << "os__.endWriteSlice()"; if(base) { - _out << nl << "MyBase.__write(__os)"; + _out << nl << "MyBase.write__(os__)"; } _out.dec(); _out << nl << "End Sub"; @@ -2170,7 +2168,7 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p) DataMemberList allClassMembers = p->allClassDataMembers(); if(allClassMembers.size() != 0) { - _out << sp << nl << "Public NotInheritable Class __Patcher"; + _out << sp << nl << "Public NotInheritable Class Patcher__"; _out.inc(); _out << nl << "Inherits IceInternal.Patcher"; _out << sp << nl << "Friend Sub New(ByVal instance As Ice.Exception"; @@ -2205,7 +2203,7 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p) } string memberName = fixId((*q)->name(), DotNet::ApplicationException); string memberType = typeToString((*q)->type()); - _out << nl << "_type = GetType(" << memberType << ')'; + _out << nl << "type_ = GetType(" << memberType << ')'; _out << nl << "_instance." << memberName << " = CType(v, " << memberType << ')'; if(allClassMembers.size() > 1) { @@ -2229,15 +2227,15 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p) _out.dec(); _out << nl << "End Class"; } - _out << sp << nl << "Public Overloads Overrides Sub __read(ByVal __is As IceInternal.BasicStream, " - "ByVal __rid As Boolean)"; + _out << sp << nl << "Public Overloads Overrides Sub read__(ByVal is__ As IceInternal.BasicStream, " + "ByVal rid__ As Boolean)"; _out.inc(); - _out << nl << "If __rid Then"; + _out << nl << "If rid__ Then"; _out.inc(); - _out << nl << "Dim myId As String = __is.readString()"; + _out << nl << "Dim myId As String = is__.readString()"; _out.dec(); _out << nl << "End If"; - _out << nl << "__is.startReadSlice()"; + _out << nl << "is__.startReadSlice()"; DataMemberList classMembers = p->classDataMembers(); int classMemberCount = static_cast<int>(allClassMembers.size() - classMembers.size()); for(q = dataMembers.begin(); q != dataMembers.end(); ++q) @@ -2256,43 +2254,43 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p) fixId((*q)->name(), DotNet::ApplicationException), false, false, false, patchParams.str()); } - _out << nl << "__is.endReadSlice()"; + _out << nl << "is__.endReadSlice()"; if(base) { - _out << nl << "MyBase.__read(__is, true)"; + _out << nl << "MyBase.read__(is__, true)"; } _out.dec(); _out << nl << "End Sub"; if(_stream) { - _out << sp << nl << "Public Overloads Overrides Sub __write(ByVal __outS As Ice.OutputStream)"; + _out << sp << nl << "Public Overloads Overrides Sub write__(ByVal outS__ As Ice.OutputStream)"; _out.inc(); - _out << nl << "__outS.writeString(\"" << scoped << "\")"; - _out << nl << "__outS.startSlice()"; + _out << nl << "outS__.writeString(\"" << scoped << "\")"; + _out << nl << "outS__.startSlice()"; for(q = dataMembers.begin(); q != dataMembers.end(); ++q) { writeMarshalUnmarshalCode(_out, (*q)->type(), fixId((*q)->name(), DotNet::ApplicationException), true, true, false); } - _out << nl << "__outS.endSlice()"; + _out << nl << "outS__.endSlice()"; if(base) { - _out << nl << "MyBase.__write(__outS)"; + _out << nl << "MyBase.write__(outS__)"; } _out.dec(); _out << nl << "End Sub"; - _out << sp << nl << "Public Overloads Overrides Sub __read(ByVal __inS As Ice.InputStream, " - << "ByVal __rid As Boolean)"; + _out << sp << nl << "Public Overloads Overrides Sub read__(ByVal inS__ As Ice.InputStream, " + << "ByVal rid__ As Boolean)"; _out.inc(); - _out << nl << "If __rid Then"; + _out << nl << "If rid__ Then"; _out.inc(); - _out << nl << "Dim myId As String = __inS.readString()"; + _out << nl << "Dim myId As String = inS__.readString()"; _out.dec(); _out << nl << "End If"; - _out << nl << "__inS.startSlice()"; + _out << nl << "inS__.startSlice()"; classMemberCount = static_cast<int>(allClassMembers.size() - classMembers.size()); for(q = dataMembers.begin(); q != dataMembers.end(); ++q) { @@ -2310,10 +2308,10 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p) fixId((*q)->name(), DotNet::ApplicationException), false, true, false, patchParams.str()); } - _out << nl << "__inS.endSlice()"; + _out << nl << "inS__.endSlice()"; if(base) { - _out << nl << "MyBase.__read(__inS, true)"; + _out << nl << "MyBase.read__(inS__, true)"; } _out.dec(); _out << nl << "End Sub"; @@ -2324,7 +2322,7 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p) // Emit placeholder functions to catch errors. // string scoped = p->scoped(); - _out << sp << nl << "Public Overloads Overrides Sub __write(ByVal __outS As Ice.OutputStream)"; + _out << sp << nl << "Public Overloads Overrides Sub write__(ByVal outS__ As Ice.OutputStream)"; _out.inc(); _out << nl << "Dim ex As Ice.MarshalException = New Ice.MarshalException"; _out << nl << "ex.reason = \"type " << scoped.substr(2) << " was not generated with stream support\""; @@ -2332,8 +2330,8 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p) _out.dec(); _out << nl << "End Sub"; - _out << sp << nl << "Public Overloads Overrides Sub __read" - << "(ByVal __inS As Ice.InputStream, ByVal __rid As Boolean)"; + _out << sp << nl << "Public Overloads Overrides Sub read__" + << "(ByVal inS__ As Ice.InputStream, ByVal rid__ As Boolean)"; _out.inc(); _out << nl << "Dim ex As Ice.MarshalException = New Ice.MarshalException"; _out << nl << "ex.reason = \"type " << scoped.substr(2) << " was not generated with stream support\""; @@ -2344,7 +2342,7 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p) if(!base || base && !base->usesClasses()) { - _out << sp << nl << "Public Overrides Function __usesClasses() As Boolean"; + _out << sp << nl << "Public Overrides Function usesClasses__() As Boolean"; _out.inc(); _out << nl << "Return True"; _out.dec(); @@ -2370,17 +2368,17 @@ Slice::Gen::TypesVisitor::visitStructStart(const StructPtr& p) _out << sp << nl << "Public NotInheritable Class " << p->name() << "Helper"; _out.inc(); - _out << sp << nl << "Public Shared Sub write(ByVal __outS As Ice.OutputStream, ByVal __v As " << name << ')'; + _out << sp << nl << "Public Shared Sub write(ByVal outS__ As Ice.OutputStream, ByVal v__ As " << name << ')'; _out.inc(); - _out << nl << "__v.__write(__outS)"; + _out << nl << "v__.write__(outS__)"; _out.dec(); _out << nl << "End Sub"; - _out << sp << nl << "Public Shared Function read(ByVal __inS As Ice.InputStream) As " << name; + _out << sp << nl << "Public Shared Function read(ByVal inS__ As Ice.InputStream) As " << name; _out.inc(); - _out << nl << "Dim __v As " << name << " = New " << name; - _out << nl << "__v.__read(__inS)"; - _out << nl << "Return __v"; + _out << nl << "Dim v__ As " << name << " = New " << name; + _out << nl << "v__.read__(inS__)"; + _out << nl << "Return v__"; _out.dec(); _out << nl << "End Function"; @@ -2454,7 +2452,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p) bool patchStruct = !isClass && classMembers.size() != 0; if(!p->isLocal() && patchStruct) { - _out << nl << "_pm = Nothing"; + _out << nl << "pm_ = Nothing"; } _out.dec(); _out << nl << "End Sub"; @@ -2486,7 +2484,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p) _out << sp << nl << "Public Overrides Function GetHashCode() As Integer"; _out.inc(); - _out << nl << "Dim __h As Integer = 0"; + _out << nl << "Dim h__ As Integer = 0"; for(q = dataMembers.begin(); q != dataMembers.end(); ++q) { string memberName = fixId((*q)->name(), isClass ? DotNet::ICloneable : 0); @@ -2500,17 +2498,17 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p) if(cl && cl->isInterface()) // Bug in VB 7.1: cast should not be necessary. { _out << nl << "' Bug in VB 7.1: cast to Object should not be necessary."; - _out << nl << "__h = 5 * __h + CType(" << memberName << ", Object).GetHashCode()"; + _out << nl << "h__ = 5 * h__ + CType(" << memberName << ", Object).GetHashCode()"; } else if(ProxyPtr::dynamicCast((*q)->type())) { _out << nl << "' Bug in VB 7.1: cast should not be necessary."; - _out << nl << "__h = 5 * __h + CType(" << memberName << ", " + _out << nl << "h__ = 5 * h__ + CType(" << memberName << ", " << typeToString((*q)->type()) << "Helper).GetHashCode()"; } else { - _out << nl << "__h = 5 * __h + " << memberName << ".GetHashCode()"; + _out << nl << "h__ = 5 * h__ + " << memberName << ".GetHashCode()"; } if(!isValue) { @@ -2518,18 +2516,18 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p) _out << nl << "End If"; } } - _out << nl << "Return __h"; + _out << nl << "Return h__"; _out.dec(); _out << nl << "End Function"; - _out << sp << nl << "Public Overloads Overrides Function Equals(ByVal __other As Object) As Boolean"; + _out << sp << nl << "Public Overloads Overrides Function Equals(ByVal other__ As Object) As Boolean"; _out.inc(); - _out << nl << "If Object.ReferenceEquals(Me, __other) Then"; + _out << nl << "If Object.ReferenceEquals(Me, other__) Then"; _out.inc(); _out << nl << "Return True"; _out.dec(); _out << nl << "End If"; - _out << nl << "If Not TypeOf __other Is " << name << " Then"; + _out << nl << "If Not TypeOf other__ Is " << name << " Then"; _out.inc(); _out << nl << "Return False"; _out.dec(); @@ -2541,7 +2539,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p) { _out << nl << "If " << memberName << " Is Nothing Then"; _out.inc(); - _out << nl << "If Not CType(__other, " << name << ")." << memberName << " Is Nothing Then"; + _out << nl << "If Not CType(other__, " << name << ")." << memberName << " Is Nothing Then"; _out.inc(); _out << nl << "Return False"; _out.dec(); @@ -2553,18 +2551,18 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p) if(cl && cl->isInterface()) // Bug in VB 7.1: cast should not be necessary. { _out << nl << "' Bug in VB 7.1: cast to Object should not be necessary."; - _out << nl << "If Not CType(" << memberName << ", Object).Equals(CType(__other, " + _out << nl << "If Not CType(" << memberName << ", Object).Equals(CType(other__, " << name << ")." << memberName << ") Then"; } else if(ProxyPtr::dynamicCast((*q)->type())) { _out << nl << "' Bug in VB 7.1: cast should not be necessary."; _out << nl << "If Not CType(" << memberName << ", " << typeToString((*q)->type()) - << "Helper).Equals(CType(__other, " << name << ")." << memberName << ") Then"; + << "Helper).Equals(CType(other__, " << name << ")." << memberName << ") Then"; } else { - _out << nl << "If Not " << memberName << ".Equals(CType(__other, " << name << ")." + _out << nl << "If Not " << memberName << ".Equals(CType(other__, " << name << ")." << memberName << ") Then"; } _out.inc(); @@ -2576,7 +2574,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p) } else { - _out << nl << "If Not " << memberName << ".Equals(CType(__other, " << name << ")." + _out << nl << "If Not " << memberName << ".Equals(CType(other__, " << name << ")." << memberName << ") Then"; _out.inc(); _out << nl << "Return False"; @@ -2594,17 +2592,17 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p) _out << sp << nl << "#Region \"Shared Equals\""; _out.restoreIndent(); - _out << sp << nl << "Public Overloads Shared Function Equals(ByVal __lhs As " << name - << ", ByVal __rhs As " << name << ") As Boolean"; + _out << sp << nl << "Public Overloads Shared Function Equals(ByVal lhs__ As " << name + << ", ByVal rhs__ As " << name << ") As Boolean"; _out.inc(); - _out << nl << "If Object.ReferenceEquals(__rhs, Nothing) Then"; + _out << nl << "If Object.ReferenceEquals(rhs__, Nothing) Then"; _out.inc(); - _out << nl << "Return Object.ReferenceEquals(__rhs, Nothing)"; + _out << nl << "Return Object.ReferenceEquals(rhs__, Nothing)"; _out.dec(); _out << nl << "Else"; _out.inc(); - _out << nl << "Return __lhs.Equals(__rhs)"; + _out << nl << "Return lhs__.Equals(rhs__)"; _out.dec(); _out << nl << "End If"; _out.dec(); @@ -2620,7 +2618,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p) _out << sp << nl << "#Region \"Marshalling support\""; _out.restoreIndent(); - _out << sp << nl << "Public Sub __write(ByVal __os As IceInternal.BasicStream)"; + _out << sp << nl << "Public Sub write__(ByVal os__ As IceInternal.BasicStream)"; _out.inc(); for(q = dataMembers.begin(); q != dataMembers.end(); ++q) { @@ -2634,13 +2632,13 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p) if(classMembers.size() != 0) { - _out << sp << nl << "Public NotInheritable Class __Patcher"; + _out << sp << nl << "Public NotInheritable Class Patcher__"; _out.inc(); _out << nl << "Inherits IceInternal.Patcher"; _out << sp << nl << "Friend Sub New(ByVal instance As " << name; if(patchStruct) { - _out << ".__PatchMembers"; + _out << ".PatchMembers__"; } if(classMembers.size() > 1) { @@ -2673,7 +2671,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p) } string memberType = typeToString((*q)->type()); string memberName = fixId((*q)->name(), isClass ? DotNet::ICloneable : 0); - _out << nl << "_type = GetType(" << memberType << ')'; + _out << nl << "type_ = GetType(" << memberType << ')'; _out << nl << "_instance." << memberName << " = CType(v, " << memberType << ')'; if(classMembers.size() > 1) { @@ -2692,7 +2690,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p) _out << sp << nl << "Private _instance As " << name; if(patchStruct) { - _out << ".__PatchMembers"; + _out << ".PatchMembers__"; } if(classMembers.size() > 1) { @@ -2703,7 +2701,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p) if(patchStruct) { - _out << sp << nl << "Friend Class __PatchMembers"; + _out << sp << nl << "Friend Class PatchMembers__"; _out.inc(); for(q = classMembers.begin(); q != classMembers.end(); ++q) { @@ -2714,27 +2712,27 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p) _out.dec(); _out << nl << "End Class"; - _out << sp << nl << "Private _pm As __PatchMembers"; + _out << sp << nl << "Private pm_ As PatchMembers__"; - _out << sp << nl << "Public Sub __patch()"; + _out << sp << nl << "Public Sub patch__()"; _out.inc(); for(q = classMembers.begin(); q != classMembers.end(); ++q) { string memberName = fixId((*q)->name(), isClass ? DotNet::ICloneable : 0); - _out << nl << memberName << " = _pm." << memberName; + _out << nl << memberName << " = pm_." << memberName; } _out.dec(); _out << nl << "End Sub"; } } - _out << sp << nl << "Public Sub __read(ByVal __is As IceInternal.BasicStream)"; + _out << sp << nl << "Public Sub read__(ByVal is__ As IceInternal.BasicStream)"; _out.inc(); if(patchStruct) { - _out << nl << "If _pm Is Nothing Then"; + _out << nl << "If pm_ Is Nothing Then"; _out.inc(); - _out << nl << "_pm = new __PatchMembers()"; + _out << nl << "pm_ = new PatchMembers__()"; _out.dec(); _out << nl << "End If"; } @@ -2742,7 +2740,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p) for(q = dataMembers.begin(); q != dataMembers.end(); ++q) { ostringstream patchParams; - patchParams << (patchStruct ? "_pm" : "Me"); + patchParams << (patchStruct ? "pm_" : "Me"); BuiltinPtr builtin = BuiltinPtr::dynamicCast((*q)->type()); if((builtin && builtin->kind() == Builtin::KindObject) || ClassDeclPtr::dynamicCast((*q)->type())) { @@ -2760,7 +2758,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p) if(_stream) { - _out << sp << nl << "Public Sub __write(ByVal __outS As Ice.OutputStream)"; + _out << sp << nl << "Public Sub write__(ByVal outS__ As Ice.OutputStream)"; _out.inc(); for(q = dataMembers.begin(); q != dataMembers.end(); ++q) { @@ -2771,13 +2769,13 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p) _out.dec(); _out << nl << "End Sub"; - _out << sp << nl << "Public Sub __read(ByVal __inS As Ice.InputStream)"; + _out << sp << nl << "Public Sub read__(ByVal inS__ As Ice.InputStream)"; _out.inc(); if(patchStruct) { - _out << nl << "If _pm Is Nothing"; + _out << nl << "If pm_ Is Nothing"; _out.inc(); - _out << nl << "_pm = New __PatchMembers"; + _out << nl << "pm_ = New PatchMembers__"; _out.dec(); _out << nl << "End If"; } @@ -2785,7 +2783,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p) for(q = dataMembers.begin(); q != dataMembers.end(); ++q) { ostringstream patchParams; - patchParams << (patchStruct ? "_pm" : "Me"); + patchParams << (patchStruct ? "pm_" : "Me"); BuiltinPtr builtin = BuiltinPtr::dynamicCast((*q)->type()); if((builtin && builtin->kind() == Builtin::KindObject) || ClassDeclPtr::dynamicCast((*q)->type())) { @@ -2830,9 +2828,9 @@ Slice::Gen::TypesVisitor::visitDictionary(const DictionaryPtr& p) _out << sp << nl << "#Region \"" << name << " members\""; _out.restoreIndent(); - _out << sp << nl << "Public Sub AddRange(ByVal __d As " << name << ')'; + _out << sp << nl << "Public Sub AddRange(ByVal d__ As " << name << ')'; _out.inc(); - _out << nl << "For Each e As _System.Collections.DictionaryEntry in __d"; + _out << nl << "For Each e As _System.Collections.DictionaryEntry in d__"; _out.inc(); _out << nl << "Try"; _out.inc(); @@ -3020,15 +3018,15 @@ Slice::Gen::TypesVisitor::visitDictionary(const DictionaryPtr& p) _out << nl << "Return False"; _out.dec(); _out << nl << "End If"; - _out << nl << "Dim __klhs() As " << ks << " = New " << ks << "(Count - 1) {}"; - _out << nl << "Keys.CopyTo(__klhs, 0)"; - _out << nl << "_System.Array.Sort(__klhs)"; - _out << nl << "Dim __krhs() As " << ks << " = New " << ks << "(CType(other, " << name << ").Count - 1) {}"; - _out << nl << "CType(other, " << name << ").Keys.CopyTo(__krhs, 0)"; - _out << nl << "_System.Array.Sort(__krhs)"; + _out << nl << "Dim klhs__() As " << ks << " = New " << ks << "(Count - 1) {}"; + _out << nl << "Keys.CopyTo(klhs__, 0)"; + _out << nl << "_System.Array.Sort(klhs__)"; + _out << nl << "Dim krsh__() As " << ks << " = New " << ks << "(CType(other, " << name << ").Count - 1) {}"; + _out << nl << "CType(other, " << name << ").Keys.CopyTo(krsh__, 0)"; + _out << nl << "_System.Array.Sort(krsh__)"; _out << nl << "For i As Integer = 0 To Count - 1"; _out.inc(); - _out << nl << "If Not __klhs(i).Equals(__krhs(i))"; + _out << nl << "If Not klhs__(i).Equals(krsh__(i))"; _out.inc(); _out << nl << "Return False"; _out.dec(); @@ -3039,30 +3037,30 @@ Slice::Gen::TypesVisitor::visitDictionary(const DictionaryPtr& p) bool valueIsArray = seq && !seq->hasMetaData("clr:collection"); if(valueIsArray) { - _out << nl << "Dim __vlhs As " << vs << "() = New " << toArrayAlloc(vs + "()", "Count - 1") << " {}"; + _out << nl << "Dim vlhs__ As " << vs << "() = New " << toArrayAlloc(vs + "()", "Count - 1") << " {}"; } else { - _out << nl << "Dim __vlhs As " << vs << "() = New " << vs << "(Count - 1) {}"; + _out << nl << "Dim vlhs__ As " << vs << "() = New " << vs << "(Count - 1) {}"; } - _out << nl << "Values.CopyTo(__vlhs, 0)"; - _out << nl << "_System.Array.Sort(__vlhs)"; + _out << nl << "Values.CopyTo(vlhs__, 0)"; + _out << nl << "_System.Array.Sort(vlhs__)"; string vrhsCount = "Ctype(other, " + name + ").Count - 1"; if(valueIsArray) { - _out << nl << "Dim __vrhs As " << vs << "() = New " << toArrayAlloc(vs + "()", vrhsCount) << " {}"; + _out << nl << "Dim vrhs__ As " << vs << "() = New " << toArrayAlloc(vs + "()", vrhsCount) << " {}"; } else { - _out << nl << "Dim __vrhs As " << vs << "() = New " << vs << '(' << vrhsCount << ") {}"; + _out << nl << "Dim vrhs__ As " << vs << "() = New " << vs << '(' << vrhsCount << ") {}"; } - _out << nl << "CType(other, " << name << ").Values.CopyTo(__vrhs, 0)"; - _out << nl << "_System.Array.Sort(__vrhs)"; + _out << nl << "CType(other, " << name << ").Values.CopyTo(vrhs__, 0)"; + _out << nl << "_System.Array.Sort(vrhs__)"; _out << nl << "For i As Integer = 0 To Count - 1"; _out.inc(); if(!valueIsValue) { - _out << nl << "If __vlhs(i) Is Nothing And Not __vrhs(i) Is Nothing"; + _out << nl << "If vlhs__(i) Is Nothing And Not vrhs__(i) Is Nothing"; _out.inc(); _out << nl << "Return False"; _out.dec(); @@ -3072,16 +3070,16 @@ Slice::Gen::TypesVisitor::visitDictionary(const DictionaryPtr& p) if(cl && cl->isInterface()) // Bug in VB 7.1: cast should not be necessary. { _out << nl << "' Bug in VB 7.1: cast to Object should not be necessary."; - _out << nl << "If Not CType(__vlhs(i), Object).Equals(__vrhs(i))"; + _out << nl << "If Not CType(vlhs__(i), Object).Equals(vrhs__(i))"; } else if(ProxyPtr::dynamicCast(p->valueType())) { _out << nl << "' Bug in VB 7.1: cast should not be necessary."; - _out << nl << "If Not CType(__vlhs(i), " << typeToString(p->valueType()) << "Helper).Equals(__vrhs(i))"; + _out << nl << "If Not CType(vlhs__(i), " << typeToString(p->valueType()) << "Helper).Equals(vrhs__(i))"; } else { - _out << nl << "If Not __vlhs(i).Equals(__vrhs(i))"; + _out << nl << "If Not vlhs__(i).Equals(vrhs__(i))"; } _out.inc(); _out << nl << "Return False"; @@ -3099,16 +3097,16 @@ Slice::Gen::TypesVisitor::visitDictionary(const DictionaryPtr& p) _out << sp << nl << "#Region \"Shared Equals\""; _out.restoreIndent(); - _out << sp << nl << "Public Overloads Shared Function Equals(ByVal __lhs As " << name - << ", ByVal __rhs As " << name << ") As Boolean"; + _out << sp << nl << "Public Overloads Shared Function Equals(ByVal lhs__ As " << name + << ", ByVal rhs__ As " << name << ") As Boolean"; _out.inc(); - _out << nl << "If Object.ReferenceEquals(__rhs, Nothing) Then"; + _out << nl << "If Object.ReferenceEquals(rhs__, Nothing) Then"; _out.inc(); - _out << nl << "Return Object.ReferenceEquals(__rhs, Nothing)"; + _out << nl << "Return Object.ReferenceEquals(rhs__, Nothing)"; _out.dec(); _out << nl << "Else"; _out.inc(); - _out << nl << "Return __lhs.Equals(__rhs)"; + _out << nl << "Return lhs__.Equals(rhs__)"; _out.dec(); _out << nl << "End If"; _out.dec(); @@ -3144,17 +3142,17 @@ Slice::Gen::TypesVisitor::visitEnum(const EnumPtr& p) _out << sp << nl << "Public NotInheritable Class " << name << "Helper"; _out.inc(); - _out << sp << nl << "Public Shared Sub write(ByVal __outS As Ice.OutputStream, ByVal __v As " << scoped << ')'; + _out << sp << nl << "Public Shared Sub write(ByVal outS__ As Ice.OutputStream, ByVal v__ As " << scoped << ')'; _out.inc(); - writeMarshalUnmarshalCode(_out, p, "__v", true, true, false); + writeMarshalUnmarshalCode(_out, p, "v__", true, true, false); _out.dec(); _out << nl << "End Sub"; - _out << sp << nl << "Public Shared Function read(ByVal __inS As Ice.InputStream) As " << scoped; + _out << sp << nl << "Public Shared Function read(ByVal inS__ As Ice.InputStream) As " << scoped; _out.inc(); - _out << nl << "Dim __v As " << scoped; - writeMarshalUnmarshalCode(_out, p, "__v", false, true, false); - _out << nl << "Return __v"; + _out << nl << "Dim v__ As " << scoped; + writeMarshalUnmarshalCode(_out, p, "v__", false, true, false); + _out << nl << "Return v__"; _out.dec(); _out << nl << "End Function"; @@ -3391,7 +3389,7 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p) _out << " As " << retS; } - _out << nl << vbOp << ' ' << name << spar << params << "ByVal __context As Ice.Context" << epar; + _out << nl << vbOp << ' ' << name << spar << params << "ByVal context__ As Ice.Context" << epar; if(ret) { _out << " As " << retS; @@ -3408,7 +3406,7 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p) // _out << sp; _out << nl << "Sub " << p->name() << "_async" << spar << paramsAMI << epar; - _out << nl << "Sub " << p->name() << "_async" << spar << paramsAMI << "ByVal __ctx As Ice.Context" << epar; + _out << nl << "Sub " << p->name() << "_async" << spar << paramsAMI << "ByVal ctx__ As Ice.Context" << epar; } } @@ -3469,7 +3467,7 @@ Slice::Gen::OpsVisitor::writeOperations(const ClassDefPtr& p, bool noCurrent) opIntfName += "NC"; } - _out << sp << nl << "Public Interface _" << name << opIntfName; + _out << sp << nl << "Public Interface " << name << opIntfName << '_'; _out.inc(); if((bases.size() == 1 && bases.front()->isAbstract()) || bases.size() > 1) { @@ -3489,14 +3487,12 @@ Slice::Gen::OpsVisitor::writeOperations(const ClassDefPtr& p, bool noCurrent) first = false; } string s = (*q)->scoped(); - string::size_type pos = s.rfind("::"); - assert(pos != string::npos); - s.insert(pos + 2, "_"); s += "Operations"; if(noCurrent) { s += "NC"; } + s += "_"; _out << fixId(s); } ++q; @@ -3531,7 +3527,7 @@ Slice::Gen::OpsVisitor::writeOperations(const ClassDefPtr& p, bool noCurrent) _out << vbOp << ' ' << name << spar << params; if(!noCurrent && !p->isLocal()) { - _out << "ByVal __current As Ice.Current"; + _out << "ByVal current__ As Ice.Current"; } _out << epar; if(ret) @@ -3617,54 +3613,54 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p) { _out << "Return "; } - _out << opName << spar << args << "__defaultContext()" << epar; + _out << opName << spar << args << "defaultContext__()" << epar; _out.dec(); _out << nl << "End " << vbOp; _out << sp << nl << "Public " << vbOp << ' ' << opName << spar << params - << "ByVal __context As Ice.Context" << epar; + << "ByVal context__ As Ice.Context" << epar; if(ret) { _out << " As " << retS; } _out << " Implements " << name << "Prx." << opName; // TODO: should be containing class? _out.inc(); - _out << nl << "Dim __cnt As Integer = 0"; + _out << nl << "Dim cnt__ As Integer = 0"; _out << nl << "While True"; _out.inc(); _out << nl << "Try"; _out.inc(); if(op->returnsData()) { - _out << nl << "__checkTwowayOnly(\"" << op->name() << "\")"; + _out << nl << "checkTwowayOnly__(\"" << op->name() << "\")"; } - _out << nl << "Dim __delBase As Ice._ObjectDel = __getDelegate()"; - _out << nl << "Dim __del As _" << name << "Del = CType(__delBase, _" << name << "Del)"; + _out << nl << "Dim delBase__ As Ice.ObjectDel_ = getDelegate__()"; + _out << nl << "Dim del__ As _" << name << "Del = CType(delBase__, _" << name << "Del)"; _out << nl; if(ret) { _out << "Return "; } - _out << "__del." << opName << spar << args << "__context" << epar; + _out << "del__." << opName << spar << args << "context__" << epar; if(!ret) { _out << nl << "Return"; } _out.dec(); - _out << nl << "Catch __ex As IceInternal.NonRepeatable"; + _out << nl << "Catch ex__ As IceInternal.NonRepeatable"; _out.inc(); if(op->mode() == Operation::Idempotent || op->mode() == Operation::Nonmutating) { - _out << nl << "__cnt = __handleException(__ex.get(), __cnt)"; + _out << nl << "cnt__ = handleException__(ex__.get(), cnt__)"; } else { - _out << nl << "__rethrowException(__ex.get())"; + _out << nl << "rethrowException__(ex__.get())"; } _out.dec(); - _out << nl << "Catch __ex As Ice.LocalException"; + _out << nl << "Catch ex__ As Ice.LocalException"; _out.inc(); - _out << nl << "__cnt = __handleException(__ex, __cnt)"; + _out << nl << "cnt__ = handleException__(ex__, cnt__)"; _out.dec(); _out << nl << "End Try"; _out.dec(); @@ -3709,16 +3705,16 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p) _out << sp << nl << "Public Sub " << opName << "_async" << spar << paramsAMI << epar << " Implements " << name << "Prx." << opName << "_async"; // TODO: should be containing class? _out.inc(); - _out << nl << opName << "_async" << spar << argsAMI << "__defaultContext()" << epar; + _out << nl << opName << "_async" << spar << argsAMI << "defaultContext__()" << epar; _out.dec(); _out << nl << "End Sub"; _out << sp << nl << "Public Sub " << opName << "_async" << spar << paramsAMI - << "ByVal __ctx As Ice.Context" << epar + << "ByVal ctx__ As Ice.Context" << epar << " Implements " << name << "Prx." << opName << "_async"; // TODO: should be containing class? _out.inc(); - _out << nl << "__checkTwowayOnly(\"" << p->name() << "\")"; - _out << nl << "__cb.__invoke" << spar << "Me" << argsAMI << "__ctx" << epar; + _out << nl << "checkTwowayOnly__(\"" << p->name() << "\")"; + _out << nl << "cb__.invoke__" << spar << "Me" << argsAMI << "ctx__" << epar; _out.dec(); _out << nl << "End Sub"; } @@ -3750,7 +3746,7 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p) _out << nl << "If b.ice_isA(\"" << p->scoped() << "\") Then"; _out.inc(); _out << nl << "Dim h As " << name << "PrxHelper = New " << name << "PrxHelper"; - _out << nl << "h.__copyFrom(b)"; + _out << nl << "h.copyFrom__(b)"; _out << nl << "Return h"; _out.dec(); _out << nl << "End If"; @@ -3774,7 +3770,7 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p) _out << nl << "If b.ice_isA(\"" << p->scoped() << "\", ctx) Then"; _out.inc(); _out << nl << "Dim h As " << name << "PrxHelper = New " << name << "PrxHelper"; - _out << nl << "h.__copyFrom(b)"; + _out << nl << "h.copyFrom__(b)"; _out << nl << "Return h"; _out.dec(); _out << nl << "End If"; @@ -3797,12 +3793,12 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p) _out << nl << "If bb.ice_isA(\"" << p->scoped() << "\") Then"; _out.inc(); _out << nl << "Dim h As " << name << "PrxHelper = new " << name << "PrxHelper()"; - _out << nl << "h.__copyFrom(bb)"; + _out << nl << "h.copyFrom__(bb)"; _out << nl << "Return h"; _out.dec(); _out << nl << "End If"; _out.dec(); - _out << nl << "Catch __ex As Ice.FacetNotExistException"; + _out << nl << "Catch ex__ As Ice.FacetNotExistException"; _out << nl << "End Try"; _out << nl << "Return Nothing"; _out.dec(); @@ -3822,12 +3818,12 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p) _out << nl << "If bb.ice_isA(\"" << p->scoped() << "\", ctx) Then"; _out.inc(); _out << nl << "Dim h As " << name << "PrxHelper = new " << name << "PrxHelper()"; - _out << nl << "h.__copyFrom(bb)"; + _out << nl << "h.copyFrom__(bb)"; _out << nl << "Return h"; _out.dec(); _out << nl << "End If"; _out.dec(); - _out << nl << "Catch __ex As Ice.FacetNotExistException"; + _out << nl << "Catch ex__ As Ice.FacetNotExistException"; _out << nl << "End Try"; _out << nl << "Return Nothing"; _out.dec(); @@ -3841,7 +3837,7 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p) _out.dec(); _out << nl << "End If"; _out << nl << "Dim h As " << name << "PrxHelper = new " << name << "PrxHelper()"; - _out << nl << "h.__copyFrom(b)"; + _out << nl << "h.copyFrom__(b)"; _out << nl << "Return h"; _out.dec(); _out << nl << "End Function"; @@ -3856,7 +3852,7 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p) _out << nl << "End If"; _out << nl << "Dim bb As Ice.ObjectPrx = b.ice_newFacet(f)"; _out << nl << "Dim h As " << name << "PrxHelper = new " << name << "PrxHelper()"; - _out << nl << "h.__copyFrom(bb)"; + _out << nl << "h.copyFrom__(bb)"; _out << nl << "Return h"; _out.dec(); _out << nl << "End Function"; @@ -3867,32 +3863,32 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p) _out << sp << nl << "#Region \"Marshaling support\""; _out.restoreIndent(); - _out << sp << nl << "Protected Overrides Function __createDelegateM() As Ice._ObjectDelM"; + _out << sp << nl << "Protected Overrides Function createDelegateM__() As Ice.ObjectDelM_"; _out.inc(); _out << nl << "Return New _" << name << "DelM()"; _out.dec(); _out << nl << "End Function"; - _out << sp << nl << "Protected Overrides Function __createDelegateD() As Ice._ObjectDelD"; + _out << sp << nl << "Protected Overrides Function createDelegateD__() As Ice.ObjectDelD_"; _out.inc(); _out << nl << "Return New _" << name << "DelD()"; _out.dec(); _out << nl << "End Function"; - _out << sp << nl << "Public Shared Sub __write(ByVal __os As IceInternal.BasicStream, ByVal __v As " + _out << sp << nl << "Public Shared Sub write__(ByVal os__ As IceInternal.BasicStream, ByVal v__ As " << name << "Prx)"; _out.inc(); - _out << nl << "__os.writeProxy(__v)"; + _out << nl << "os__.writeProxy(v__)"; _out.dec(); _out << nl << "End Sub"; - _out << sp << nl << "Public Shared Function __read(ByVal __is As IceInternal.BasicStream) As " << name << "Prx"; + _out << sp << nl << "Public Shared Function read__(ByVal is__ As IceInternal.BasicStream) As " << name << "Prx"; _out.inc(); - _out << nl << "Dim proxy As Ice.ObjectPrx = __is.readProxy()"; + _out << nl << "Dim proxy As Ice.ObjectPrx = is__.readProxy()"; _out << nl << "If Not proxy Is Nothing Then"; _out.inc(); _out << nl << "Dim result As " << name << "PrxHelper = New " << name << "PrxHelper"; - _out << nl << "result.__copyFrom(proxy)"; + _out << nl << "result.copyFrom__(proxy)"; _out << nl << "Return result"; _out.dec(); _out << nl << "End If"; @@ -3902,19 +3898,19 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p) if(_stream) { - _out << sp << nl << "Public Shared Sub write(ByVal __outS As Ice.OutputStream, ByVal __v As " << name << "Prx)"; + _out << sp << nl << "Public Shared Sub write(ByVal outS__ As Ice.OutputStream, ByVal v__ As " << name << "Prx)"; _out.inc(); - _out << nl << "__outS.writeProxy(__v)"; + _out << nl << "outS__.writeProxy(v__)"; _out.dec(); _out << nl << "End Sub"; - _out << sp << nl << "Public Shared Function read(ByVal __inS As Ice.InputStream) As " << name << "Prx"; + _out << sp << nl << "Public Shared Function read(ByVal inS__ As Ice.InputStream) As " << name << "Prx"; _out.inc(); - _out << nl << "Dim proxy As Ice.ObjectPrx = __inS.readProxy()"; + _out << nl << "Dim proxy As Ice.ObjectPrx = inS__.readProxy()"; _out << nl << "If Not proxy Is Nothing"; _out.inc(); _out << nl << "Dim result As " << name << "PrxHelper = New " << name << "PrxHelper"; - _out << nl << "result.__copyFrom(proxy)"; + _out << nl << "result.copyFrom__(proxy)"; _out << nl << "Return result"; _out.dec(); _out << nl << "End If"; @@ -3954,33 +3950,33 @@ Slice::Gen::HelperVisitor::visitSequence(const SequencePtr& p) _out << sp << nl << "Public NotInheritable Class " << p->name() << "Helper"; _out.inc(); - _out << sp << nl << "Public Shared Sub write(ByVal __os As IceInternal.BasicStream, ByVal __v As " << typeS << ')'; + _out << sp << nl << "Public Shared Sub write(ByVal os__ As IceInternal.BasicStream, ByVal v__ As " << typeS << ')'; _out.inc(); - writeSequenceMarshalUnmarshalCode(_out, p, "__v", true, false); + writeSequenceMarshalUnmarshalCode(_out, p, "v__", true, false); _out.dec(); _out << nl << "End Sub"; - _out << sp << nl << "Public Shared Function read(ByVal __is As IceInternal.BasicStream) As " << typeS; + _out << sp << nl << "Public Shared Function read(ByVal is__ As IceInternal.BasicStream) As " << typeS; _out.inc(); - _out << nl << "Dim __v As " << typeS; - writeSequenceMarshalUnmarshalCode(_out, p, "__v", false, false); - _out << nl << "Return __v"; + _out << nl << "Dim v__ As " << typeS; + writeSequenceMarshalUnmarshalCode(_out, p, "v__", false, false); + _out << nl << "Return v__"; _out.dec(); _out << nl << "End Function"; if(_stream) { - _out << sp << nl << "Public Shared Sub write(ByVal __outS As Ice.OutputStream, ByVal __v As " << typeS << ')'; + _out << sp << nl << "Public Shared Sub write(ByVal outS__ As Ice.OutputStream, ByVal v__ As " << typeS << ')'; _out.inc(); - writeSequenceMarshalUnmarshalCode(_out, p, "__v", true, true); + writeSequenceMarshalUnmarshalCode(_out, p, "v__", true, true); _out.dec(); _out << nl << "End Sub"; - _out << sp << nl << "Public Shared Function read(ByVal __inS As Ice.InputStream) As " << typeS; + _out << sp << nl << "Public Shared Function read(ByVal inS__ As Ice.InputStream) As " << typeS; _out.inc(); - _out << nl << "Dim __v As " << typeS; - writeSequenceMarshalUnmarshalCode(_out, p, "__v", false, true); - _out << nl << "Return __v"; + _out << nl << "Dim v__ As " << typeS; + writeSequenceMarshalUnmarshalCode(_out, p, "v__", false, true); + _out << nl << "Return v__"; _out.dec(); _out << nl << "End Function"; } @@ -4010,21 +4006,21 @@ Slice::Gen::HelperVisitor::visitDictionary(const DictionaryPtr& p) _out << sp << nl << "Public NotInheritable Class " << p->name() << "Helper"; _out.inc(); - _out << sp << nl << "Public Shared Sub write(ByVal __os As IceInternal.BasicStream, ByVal __v As " + _out << sp << nl << "Public Shared Sub write(ByVal os__ As IceInternal.BasicStream, ByVal v__ As " << name << ')'; _out.inc(); - _out << nl << "If __v Is Nothing Then"; + _out << nl << "If v__ Is Nothing Then"; _out.inc(); - _out << nl << "__os.writeSize(0)"; + _out << nl << "os__.writeSize(0)"; _out.dec(); _out << nl << "Else"; _out.inc(); - _out << nl << "__os.writeSize(__v.Count)"; - _out << nl << "For Each __e As _System.Collections.DictionaryEntry In __v"; + _out << nl << "os__.writeSize(v__.Count)"; + _out << nl << "For Each e__ As _System.Collections.DictionaryEntry In v__"; _out.inc(); - string keyArg = "CType(__e.Key, " + keyS + ")"; + string keyArg = "CType(e__.Key, " + keyS + ")"; writeMarshalUnmarshalCode(_out, key, keyArg, true, false, false); - string valueArg = "__e.Value"; + string valueArg = "e__.Value"; writeMarshalUnmarshalCode(_out, value, valueArg, true, false, false); _out.dec(); _out << nl << "Next"; @@ -4037,7 +4033,7 @@ Slice::Gen::HelperVisitor::visitDictionary(const DictionaryPtr& p) bool hasClassValue = (builtin && builtin->kind() == Builtin::KindObject) || ClassDeclPtr::dynamicCast(value); if(hasClassValue) { - _out << sp << nl << "Public NotInheritable Class __Patcher"; + _out << sp << nl << "Public NotInheritable Class Patcher__"; _out.inc(); _out << nl << "Inherits IceInternal.Patcher"; _out << sp << nl << "Friend Sub New(ByVal m As " << name << ", ByVal key As " << keyS << ')'; @@ -4049,7 +4045,7 @@ Slice::Gen::HelperVisitor::visitDictionary(const DictionaryPtr& p) _out << sp << nl << "Public Overrides Sub patch(ByVal v As Ice.Object)"; _out.inc(); - _out << nl << "_type = GetType(" << typeToString(p->valueType()) << ')'; + _out << nl << "type_ = GetType(" << typeToString(p->valueType()) << ')'; _out << nl << "_m(_key) = CType(v, " << valueS << ')'; _out.dec(); _out << nl << "End Sub"; @@ -4060,44 +4056,44 @@ Slice::Gen::HelperVisitor::visitDictionary(const DictionaryPtr& p) _out << sp << nl << "End Class"; } - _out << sp << nl << "Public Shared Function " << " read(ByVal __is As IceInternal.BasicStream) As " << name; + _out << sp << nl << "Public Shared Function " << " read(ByVal is__ As IceInternal.BasicStream) As " << name; _out.inc(); - _out << nl << "Dim __sz As Integer = __is.readSize()"; - _out << nl << "Dim __r As " << name << " = New " << name; - _out << nl << "For __i As Integer = 0 To __sz - 1"; + _out << nl << "Dim sz__ As Integer = is__.readSize()"; + _out << nl << "Dim r__ As " << name << " = New " << name; + _out << nl << "For i__ As Integer = 0 To sz__ - 1"; _out.inc(); - _out << nl << "Dim __k As " << keyS; - writeMarshalUnmarshalCode(_out, key, "__k", false, false, false); + _out << nl << "Dim k__ As " << keyS; + writeMarshalUnmarshalCode(_out, key, "k__", false, false, false); if(!hasClassValue) { - _out << nl << "Dim __v As " << valueS; + _out << nl << "Dim v__ As " << valueS; } - writeMarshalUnmarshalCode(_out, value, "__v", false, false, false, "__r, __k"); + writeMarshalUnmarshalCode(_out, value, "v__", false, false, false, "r__, k__"); if(!hasClassValue) { - _out << nl << "__r(__k) = __v"; + _out << nl << "r__(k__) = v__"; } _out.dec(); _out << nl << "Next"; - _out << nl << "Return __r"; + _out << nl << "Return r__"; _out.dec(); _out << nl << "End Function"; if(_stream) { - _out << nl << "Public Shared Sub write(ByVal __outS As Ice.OutputStream, ByVal __v As " << name << ')'; + _out << nl << "Public Shared Sub write(ByVal outS__ As Ice.OutputStream, ByVal v__ As " << name << ')'; _out.inc(); - _out << nl << "If __v Is Nothing Then"; + _out << nl << "If v__ Is Nothing Then"; _out.inc(); - _out << nl << "__outS.writeSize(0)"; + _out << nl << "outS__.writeSize(0)"; _out.dec(); _out << nl << "Else"; _out.inc(); - _out << nl << "__outS.writeSize(__v.Count)"; - _out << nl << "For Each __e As _System.Collections.DictionaryEntry In __v"; + _out << nl << "outS__.writeSize(v__.Count)"; + _out << nl << "For Each e__ As _System.Collections.DictionaryEntry In v__"; _out.inc(); writeMarshalUnmarshalCode(_out, key, keyArg, true, true, false); writeMarshalUnmarshalCode(_out, value, valueArg, true, true, false); @@ -4108,26 +4104,26 @@ Slice::Gen::HelperVisitor::visitDictionary(const DictionaryPtr& p) _out.dec(); _out << nl << "End Sub"; - _out << sp << nl << "Public Shared Function read(ByVal __inS As Ice.InputStream) As " << name; + _out << sp << nl << "Public Shared Function read(ByVal inS__ As Ice.InputStream) As " << name; _out.inc(); - _out << nl << "Dim __sz As Integer = __inS.readSize()"; - _out << nl << "Dim __r As " << name << " = New " << name; - _out << nl << "For __i As Integer = 0 To __sz - 1"; + _out << nl << "Dim sz__ As Integer = inS__.readSize()"; + _out << nl << "Dim r__ As " << name << " = New " << name; + _out << nl << "For i__ As Integer = 0 To sz__ - 1"; _out.inc(); - _out << nl << "Dim __k As " << keyS; - writeMarshalUnmarshalCode(_out, key, "__k", false, true, false); + _out << nl << "Dim k__ As " << keyS; + writeMarshalUnmarshalCode(_out, key, "k__", false, true, false); if(!hasClassValue) { - _out << nl << "Dim __v As " << valueS; + _out << nl << "Dim v__ As " << valueS; } - writeMarshalUnmarshalCode(_out, value, "__v", false, true, false, "__r, __k"); + writeMarshalUnmarshalCode(_out, value, "v__", false, true, false, "r__, k__"); if(!hasClassValue) { - _out << nl << "__r(__k) = __v"; + _out << nl << "r__(k__) = v__"; } _out.dec(); _out << nl << "Next"; - _out << nl << "Return __r"; + _out << nl << "Return r__"; _out.dec(); _out << nl << "End Function"; } @@ -4177,7 +4173,7 @@ Slice::Gen::DelegateVisitor::visitClassDefStart(const ClassDefPtr& p) _out << nl << "Inherits "; if(bases.empty()) { - _out << "Ice._ObjectDel"; + _out << "Ice.ObjectDel_"; } else { @@ -4209,7 +4205,7 @@ Slice::Gen::DelegateVisitor::visitClassDefStart(const ClassDefPtr& p) vector<string> params = getParams(op); string vbOp = ret ? "Function" : "Sub"; - _out << sp << nl << vbOp << ' ' << opName << spar << params << "ByVal __context As Ice.Context" << epar; + _out << sp << nl << vbOp << ' ' << opName << spar << params << "ByVal context__ As Ice.Context" << epar; if(ret) { _out << " As " << retS; @@ -4264,7 +4260,7 @@ Slice::Gen::DelegateMVisitor::visitClassDefStart(const ClassDefPtr& p) _out << sp << nl << "Public NotInheritable class _" << name << "DelM"; _out.inc(); - _out << nl << "Inherits Ice._ObjectDelM"; + _out << nl << "Inherits Ice.ObjectDelM_"; _out << nl << "Implements _" << name << "Del"; OperationList ops = p->allOperations(); @@ -4315,7 +4311,7 @@ Slice::Gen::DelegateMVisitor::visitClassDefStart(const ClassDefPtr& p) string vbOp = ret ? "Function" : "Sub"; _out << sp << nl << "Public " << vbOp << ' ' << opName << spar << params - << "ByVal __context As Ice.Context" << epar; + << "ByVal context__ As Ice.Context" << epar; if(ret) { _out << " As " << retS; @@ -4323,35 +4319,35 @@ Slice::Gen::DelegateMVisitor::visitClassDefStart(const ClassDefPtr& p) _out << " Implements _" << name << "Del." << opName; // TODO: should be containing class? _out.inc(); - _out << nl << "Dim __og As IceInternal.Outgoing = getOutgoing(\"" - << op->name() << "\", " << sliceModeToIceMode(op) << ", __context)"; + _out << nl << "Dim og__ As IceInternal.Outgoing = getOutgoing(\"" + << op->name() << "\", " << sliceModeToIceMode(op) << ", context__)"; _out << nl << "Try"; _out.inc(); if(!inParams.empty()) { _out << nl << "Try"; _out.inc(); - _out << nl << "Dim __os As IceInternal.BasicStream = __og.ostr()"; + _out << nl << "Dim os__ As IceInternal.BasicStream = og__.ostr()"; for(q = inParams.begin(); q != inParams.end(); ++q) { writeMarshalUnmarshalCode(_out, q->first, fixId(q->second), true, false, false); } if(op->sendsClasses()) { - _out << nl << "__os.writePendingObjects()"; + _out << nl << "os__.writePendingObjects()"; } _out.dec(); - _out << nl << "Catch __ex As Ice.LocalException"; + _out << nl << "Catch ex__ As Ice.LocalException"; _out.inc(); - _out << nl << "__og.abort(__ex)"; + _out << nl << "og__.abort(ex__)"; _out.dec(); _out << nl << "End Try"; } - _out << nl << "Dim __ok As Boolean = __og.invoke()"; + _out << nl << "Dim ok__ As Boolean = og__.invoke()"; _out << nl << "Try"; _out.inc(); - _out << nl << "Dim __is As IceInternal.BasicStream = __og.istr()"; - _out << nl << "If Not __ok Then"; + _out << nl << "Dim is__ As IceInternal.BasicStream = og__.istr()"; + _out << nl << "If Not ok__ Then"; _out.inc(); // // The try/catch block is necessary because throwException() @@ -4359,16 +4355,16 @@ Slice::Gen::DelegateMVisitor::visitClassDefStart(const ClassDefPtr& p) // _out << nl << "Try"; _out.inc(); - _out << nl << "__is.throwException()"; + _out << nl << "is__.throwException()"; _out.dec(); for(ExceptionList::const_iterator t = throws.begin(); t != throws.end(); ++t) { - _out << nl << "Catch __ex As " << fixId((*t)->scoped()); + _out << nl << "Catch ex__ As " << fixId((*t)->scoped()); _out.inc(); _out << nl << "Throw"; _out.dec(); } - _out << nl << "Catch __ex As Ice.UserException"; + _out << nl << "Catch ex__ As Ice.UserException"; _out.inc(); _out << nl << "Throw New Ice.UnknownUserException()"; _out.dec(); @@ -4384,20 +4380,20 @@ Slice::Gen::DelegateMVisitor::visitClassDefStart(const ClassDefPtr& p) BuiltinPtr builtin = BuiltinPtr::dynamicCast(ret); if((builtin && builtin->kind() == Builtin::KindObject) || ClassDeclPtr::dynamicCast(ret)) { - _out << nl << "Dim __ret As " << retS; - _out << nl << "Dim __ret_PP As IceInternal.ParamPatcher = New IceInternal.ParamPatcher(GetType(" + _out << nl << "Dim ret__ As " << retS; + _out << nl << "Dim ret___PP As IceInternal.ParamPatcher = New IceInternal.ParamPatcher(GetType(" << retS << "))"; - _out << nl << "__is.readObject(__ret_PP)"; + _out << nl << "is__.readObject(ret___PP)"; } else { - _out << nl << "Dim __ret As " << retS; - writeMarshalUnmarshalCode(_out, ret, "__ret", false, false, true, ""); + _out << nl << "Dim ret__ As " << retS; + writeMarshalUnmarshalCode(_out, ret, "ret__", false, false, true, ""); } } if(op->returnsClasses()) { - _out << nl << "__is.readPendingObjects()"; + _out << nl << "is__.readPendingObjects()"; for(q = outParams.begin(); q != outParams.end(); ++q) { string param = fixId(q->second); @@ -4413,7 +4409,7 @@ Slice::Gen::DelegateMVisitor::visitClassDefStart(const ClassDefPtr& p) bool patchStruct = st && !st->hasMetaData("clr:class") && st->classDataMembers().size() != 0; if(patchStruct) { - _out << nl << param << ".__patch()"; + _out << nl << param << ".patch__()"; } } } @@ -4423,7 +4419,7 @@ Slice::Gen::DelegateMVisitor::visitClassDefStart(const ClassDefPtr& p) BuiltinPtr builtin = BuiltinPtr::dynamicCast(ret); if((builtin && builtin->kind() == Builtin::KindObject) || ClassDeclPtr::dynamicCast(ret)) { - _out << nl << "__ret = CType(__ret_PP.value, " << retS << ')'; + _out << nl << "ret__ = CType(ret___PP.value, " << retS << ')'; } else { @@ -4431,21 +4427,21 @@ Slice::Gen::DelegateMVisitor::visitClassDefStart(const ClassDefPtr& p) bool patchStruct = st && !st->hasMetaData("clr:class") && st->classDataMembers().size() != 0; if(patchStruct) { - _out << nl << "__ret.__patch()"; + _out << nl << "ret__.patch__()"; } } - _out << nl << "Return __ret"; + _out << nl << "Return ret__"; } _out.dec(); - _out << nl << "Catch __ex As Ice.LocalException"; + _out << nl << "Catch ex__ As Ice.LocalException"; _out.inc(); - _out << nl << "throw New IceInternal.NonRepeatable(__ex)"; + _out << nl << "throw New IceInternal.NonRepeatable(ex__)"; _out.dec(); _out << nl << "End Try"; _out.dec(); _out << nl << "Finally"; _out.inc(); - _out << nl << "reclaimOutgoing(__og)"; + _out << nl << "reclaimOutgoing(og__)"; _out.dec(); _out << nl << "End Try"; @@ -4501,7 +4497,7 @@ Slice::Gen::DelegateDVisitor::visitClassDefStart(const ClassDefPtr& p) _out << sp << nl << "Public NotInheritable class _" << name << "DelD"; _out.inc(); - _out << nl << "Inherits Ice._ObjectDelD"; + _out << nl << "Inherits Ice.ObjectDelD_"; _out << nl << "Implements _" << name << "Del"; OperationList ops = p->allOperations(); @@ -4520,7 +4516,7 @@ Slice::Gen::DelegateDVisitor::visitClassDefStart(const ClassDefPtr& p) vector<string> args = getArgs(op); _out << sp; - _out << nl << "Public " << vbOp << ' ' << opName << spar << params << "ByVal __context As Ice.Context" << epar; + _out << nl << "Public " << vbOp << ' ' << opName << spar << params << "ByVal context__ As Ice.Context" << epar; if(ret) { _out << " As " << retS; @@ -4533,14 +4529,14 @@ Slice::Gen::DelegateDVisitor::visitClassDefStart(const ClassDefPtr& p) } else { - _out << nl << "Dim __current As Ice.Current = New Ice.Current"; - _out << nl << "__initCurrent(__current, \"" << op->name() << "\", " << sliceModeToIceMode(op) - << ", __context)"; + _out << nl << "Dim current__ As Ice.Current = New Ice.Current"; + _out << nl << "initCurrent__(current__, \"" << op->name() << "\", " << sliceModeToIceMode(op) + << ", context__)"; _out << nl << "While True"; _out.inc(); - _out << nl << "Dim __direct As IceInternal.Direct = New IceInternal.Direct(__current)"; - _out << nl << "Dim __servant As Object = __direct.servant()"; - _out << nl << "If TypeOf __servant Is " << fixId(name) << " Then"; + _out << nl << "Dim direct__ As IceInternal.Direct = New IceInternal.Direct(current__)"; + _out << nl << "Dim servant__ As Object = direct__.servant()"; + _out << nl << "If TypeOf servant__ Is " << fixId(name) << " Then"; _out.inc(); _out << nl << "Try"; _out.inc(); @@ -4549,32 +4545,31 @@ Slice::Gen::DelegateDVisitor::visitClassDefStart(const ClassDefPtr& p) { _out << "Return "; } - _out << "CType(__servant, " << fixId(containingClass->scope()) - << '_' << containingClass->name() << "Operations" << ")." - << opName << spar << args << "__current" << epar; + _out << "CType(servant__, " << fixId(containingClass->scoped() + "Operations_") + << ")." << opName << spar << args << "current__" << epar; if(!ret) { _out << nl << "Return"; } _out.dec(); - _out << nl << "Catch __ex As Ice.LocalException"; + _out << nl << "Catch ex__ As Ice.LocalException"; _out.inc(); - _out << nl << "Throw New IceInternal.NonRepeatable(__ex)"; + _out << nl << "Throw New IceInternal.NonRepeatable(ex__)"; _out.dec(); _out << nl << "Finally"; _out.inc(); - _out << nl << "__direct.destroy()"; + _out << nl << "direct__.destroy()"; _out.dec(); _out << nl << "End Try"; _out.dec(); _out << nl << "Else"; _out.inc(); - _out << nl << "__direct.destroy()"; - _out << nl << "Dim __opEx As Ice.OperationNotExistException = new Ice.OperationNotExistException()"; - _out << nl << "__opEx.id = __current.id"; - _out << nl << "__opEx.facet = __current.facet"; - _out << nl << "__opEx.operation = __current.operation"; - _out << nl << "Throw __opEx"; + _out << nl << "direct__.destroy()"; + _out << nl << "Dim opEx__ As Ice.OperationNotExistException = new Ice.OperationNotExistException()"; + _out << nl << "opEx__.id = current__.id"; + _out << nl << "opEx__.facet = current__.facet"; + _out << nl << "opEx__.operation = current__.operation"; + _out << nl << "Throw opEx__"; _out.dec(); _out << nl << "End If"; _out.dec(); @@ -4627,7 +4622,7 @@ Slice::Gen::DispatcherVisitor::visitClassDefStart(const ClassDefPtr& p) return false; } - _out << sp << nl << "Public MustInherit class _" << p->name() << "Disp"; + _out << sp << nl << "Public MustInherit Class " << p->name() << "Disp_"; _out.inc(); _out << nl << "Inherits Ice.ObjectImpl"; _out << nl << "Implements " << fixId(p->name()); @@ -4670,7 +4665,7 @@ Slice::Gen::DispatcherVisitor::visitClassDefStart(const ClassDefPtr& p) { _out << " As " << typeToString(ret); } - _out << " Implements _" << p->name() << "OperationsNC" << '.' << name; // TODO: should be containing class? + _out << " Implements " << p->name() << "OperationsNC_" << '.' << name; // TODO: should be containing class? _out.inc(); _out << nl; if(ret) @@ -4684,14 +4679,14 @@ Slice::Gen::DispatcherVisitor::visitClassDefStart(const ClassDefPtr& p) _out << sp << nl << "Public MustOverride " << vbOp << ' ' << name << spar << params; if(!p->isLocal()) { - _out << "ByVal __current As Ice.Current"; + _out << "ByVal current__ As Ice.Current"; } _out << epar; if(ret) { _out << " As " << typeToString(ret); } - _out << " Implements _" << p->name() << "Operations" << '.' << name; // TODO: should be containing class? + _out << " Implements " << p->name() << "Operations_" << '.' << name; // TODO: should be containing class? } if(!ops.empty()) @@ -4810,12 +4805,12 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p) _out << sp; _out << nl << "Public MustOverride Sub ice_response" << spar << params << epar; - _out << sp << nl << "Public Sub __invoke" << spar << "ByVal __prx As Ice.ObjectPrx" - << paramsInvoke << "ByVal __ctx As Ice.Context" << epar; + _out << sp << nl << "Public Sub invoke__" << spar << "ByVal prx__ As Ice.ObjectPrx" + << paramsInvoke << "ByVal ctx__ As Ice.Context" << epar; _out.inc(); _out << nl << "Try"; _out.inc(); - _out << nl << "__prepare(__prx, \"" << p->name() << "\", " << sliceModeToIceMode(p) << ", __ctx)"; + _out << nl << "prepare__(prx__, \"" << p->name() << "\", " << sliceModeToIceMode(p) << ", ctx__)"; for(q = inParams.begin(); q != inParams.end(); ++q) { string typeS = typeToString(q->first); @@ -4823,21 +4818,21 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p) } if(p->sendsClasses()) { - _out << nl << "__os.writePendingObjects()"; + _out << nl << "os__.writePendingObjects()"; } - _out << nl << "__os.endWriteEncaps()"; + _out << nl << "os__.endWriteEncaps()"; _out.dec(); - _out << nl << "Catch __ex As Ice.LocalException"; + _out << nl << "Catch ex__ As Ice.LocalException"; _out.inc(); - _out << nl << "__finished(__ex)"; + _out << nl << "finished__(ex__)"; _out << nl << "Return"; _out.dec(); _out << nl << "End Try"; - _out << nl << "__send()"; + _out << nl << "send__()"; _out.dec(); _out << nl << "End Sub"; - _out << sp << nl << "Protected Overrides Sub __response(__ok As Boolean) As Boolean"; + _out << sp << nl << "Protected Overrides Sub response__(ok__ As Boolean) As Boolean"; _out.inc(); for(q = outParams.begin(); q != outParams.end(); ++q) { @@ -4845,24 +4840,24 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p) } if(ret) { - _out << nl << "Dim __ret As " << retS; + _out << nl << "Dim ret__ As " << retS; } _out << nl << "Try"; _out.inc(); - _out << nl << "If Not __ok Then"; + _out << nl << "If Not ok__ Then"; _out.inc(); _out << nl << "Try"; _out.inc(); - _out << nl << "__is.throwException()"; + _out << nl << "is__.throwException()"; _out.dec(); for(ExceptionList::const_iterator r = throws.begin(); r != throws.end(); ++r) { - _out << nl << "Catch __ex As " << fixId((*r)->scoped()); + _out << nl << "Catch ex__ As " << fixId((*r)->scoped()); _out.inc(); - _out << nl << "Throw __ex"; + _out << nl << "Throw ex__"; _out.dec(); } - _out << nl << "Catch __ex As Ice.UserException"; + _out << nl << "Catch ex__ As Ice.UserException"; _out.inc(); _out << nl << "Throw New Ice.UnknownUserException()"; _out.dec(); @@ -4875,11 +4870,11 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p) } if(ret) { - writeMarshalUnmarshalCode(_out, ret, "__ret", false, false, true); + writeMarshalUnmarshalCode(_out, ret, "ret__", false, false, true); } if(p->returnsClasses()) { - _out << nl << "__is.readPendingObjects()"; + _out << nl << "is__.readPendingObjects()"; } for(q = outParams.begin(); q != outParams.end(); ++q) { @@ -4896,7 +4891,7 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p) bool patchStruct = st && !st->hasMetaData("clr:class") && st->classDataMembers().size() != 0; if(patchStruct) { - _out << nl << param << ".__patch()"; + _out << nl << param << ".patch__()"; } } } @@ -4906,7 +4901,7 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p) if((builtin && builtin->kind() == Builtin::KindObject) || ClassDeclPtr::dynamicCast(ret)) { string type = typeToString(ret); - _out << nl << "__ret = CType(__ret_PP.value, " << retS << ')'; + _out << nl << "ret__ = CType(ret___PP.value, " << retS << ')'; } else { @@ -4914,20 +4909,20 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p) bool patchStruct = st && !st->hasMetaData("clr:class") && st->classDataMembers().size() != 0; if(patchStruct) { - _out << nl << "__ret.__patch()"; + _out << nl << "ret__.patch__()"; } } } _out.dec(); - _out << nl << "Catch __ex As Ice.LocalException"; + _out << nl << "Catch ex__ As Ice.LocalException"; _out.inc(); - _out << nl << "Return __finished(__ex)"; + _out << nl << "Return finished__(ex__)"; _out.dec(); if(!throws.empty()) { - _out << nl << "Catch __ex As Ice.UserException"; + _out << nl << "Catch ex__ As Ice.UserException"; _out.inc(); - _out << nl << "ice_exception(__ex)"; + _out << nl << "ice_exception(ex__)"; _out << nl << "Return False"; _out.dec(); } @@ -5001,7 +4996,7 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p) { _out << nl << "Try"; _out.inc(); - _out << nl << "Dim __os As IceInternal.BasicStream = Me.__os()"; + _out << nl << "Dim os__ As IceInternal.BasicStream = Me.os__()"; for(q = outParams.begin(); q != outParams.end(); ++q) { string typeS = typeToString(q->first); @@ -5010,20 +5005,20 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p) if(ret) { string retS = typeToString(ret); - writeMarshalUnmarshalCode(_out, ret, "__ret", true, false, false); + writeMarshalUnmarshalCode(_out, ret, "ret__", true, false, false); } if(p->returnsClasses()) { - _out << nl << "__os.writePendingObjects()"; + _out << nl << "os__.writePendingObjects()"; } _out.dec(); - _out << nl << "Catch __ex As Ice.LocalException"; + _out << nl << "Catch ex__ As Ice.LocalException"; _out.inc(); - _out << nl << "ice_exception(__ex)"; + _out << nl << "ice_exception(ex__)"; _out.dec(); _out << nl << "End Try"; } - _out << nl << "__response(true)"; + _out << nl << "response__(true)"; _out.dec(); _out << nl << "End Sub"; @@ -5032,7 +5027,7 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p) _out.inc(); if(throws.empty()) { - _out << nl << "__exception(ex)"; + _out << nl << "exception__(ex)"; } else { @@ -5044,15 +5039,15 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p) for(r = throws.begin(); r != throws.end(); ++r) { string exS = fixId((*r)->scoped()); - _out << nl << "Catch __ex As " << exS; + _out << nl << "Catch ex__ As " << exS; _out.inc(); - _out << nl << "__os().writeUserException(__ex)"; - _out << nl << "__response(false)"; + _out << nl << "os__().writeUserException(ex__)"; + _out << nl << "response__(false)"; _out.dec(); } - _out << nl << "Catch __ex As _System.Exception"; + _out << nl << "Catch ex__ As _System.Exception"; _out.inc(); - _out << nl << "__exception(__ex)"; + _out << nl << "exception__(ex__)"; _out.dec(); _out << nl << "End Try"; } @@ -5105,7 +5100,7 @@ Slice::Gen::TieVisitor::visitClassDefStart(const ClassDefPtr& p) opIntfName += "NC"; } - _out << sp << nl << "Public Class _" << name << "Tie"; + _out << sp << nl << "Public Class " << name << "Tie_"; _out.inc(); _out << nl << "Inherits "; if(p->isInterface()) @@ -5116,7 +5111,7 @@ Slice::Gen::TieVisitor::visitClassDefStart(const ClassDefPtr& p) } else { - _out << '_' << name << "Disp"; + _out << name << "Disp_"; } } else @@ -5128,7 +5123,7 @@ Slice::Gen::TieVisitor::visitClassDefStart(const ClassDefPtr& p) _out << sp << nl << "Public Sub New()"; _out << nl << "End Sub"; - _out << sp << nl << "Public Sub New(ByVal del As _" << name << opIntfName << ")"; + _out << sp << nl << "Public Sub New(ByVal del As " << name << opIntfName << "_)"; _out.inc(); _out << nl << "_ice_delegate = del"; _out.dec(); @@ -5142,7 +5137,7 @@ Slice::Gen::TieVisitor::visitClassDefStart(const ClassDefPtr& p) _out << sp << nl << "Public Sub ice_delegate(ByVal del As Object) Implements Ice.TieBase.ice_delegate"; _out.inc(); - _out << nl << "_ice_delegate = CType(del, _" << name << opIntfName << ")"; + _out << nl << "_ice_delegate = CType(del, " << name << opIntfName << "_)"; _out.dec(); _out << nl << "End Sub"; @@ -5180,18 +5175,18 @@ Slice::Gen::TieVisitor::visitClassDefStart(const ClassDefPtr& p) _out << nl << "Return true"; _out.dec(); _out << nl << "End If"; - _out << nl << "If Not TypeOf rhs Is _" << name << "Tie Then"; + _out << nl << "If Not TypeOf rhs Is " << name << "Tie_ Then"; _out.inc(); _out << nl << "Return False"; _out.dec(); _out << nl << "End If"; _out << nl << "If _ice_delegate Is Nothing Then"; _out.inc(); - _out << nl << "Return CType(rhs, _" << name << "Tie)._ice_delegate Is Nothing"; + _out << nl << "Return CType(rhs, " << name << "Tie_)._ice_delegate Is Nothing"; _out.dec(); _out << nl << "End If"; _out << nl << "' Bug in VB 7.1: cast to Object should not be necessary."; - _out << nl << "Return CType(_ice_delegate, Object).Equals(CType(rhs, _" << name << "Tie)._ice_delegate)"; + _out << nl << "Return CType(_ice_delegate, Object).Equals(CType(rhs, " << name << "Tie_)._ice_delegate)"; _out.dec(); _out << nl << "End Function"; @@ -5227,7 +5222,7 @@ Slice::Gen::TieVisitor::visitClassDefStart(const ClassDefPtr& p) _out << vbOp << ' ' << opName << spar << params; if(!p->isLocal()) { - _out << "ByVal __current As Ice.Current"; + _out << "ByVal current__ As Ice.Current"; } _out << epar; if(ret && !hasAMD) @@ -5243,7 +5238,7 @@ Slice::Gen::TieVisitor::visitClassDefStart(const ClassDefPtr& p) _out << "_ice_delegate." << opName << spar << args; if(!p->isLocal()) { - _out << "__current"; + _out << "current__"; } _out << epar; _out.dec(); @@ -5257,7 +5252,7 @@ Slice::Gen::TieVisitor::visitClassDefStart(const ClassDefPtr& p) writeInheritedOperationsWithOpNames(*i, opNames); } - _out << sp << nl << "Private _ice_delegate As _" << name << opIntfName; + _out << sp << nl << "Private _ice_delegate As " << name << opIntfName << '_'; return true; } @@ -5309,7 +5304,7 @@ Slice::Gen::TieVisitor::writeInheritedOperationsWithOpNames(const ClassDefPtr& p _out << vbOp << ' ' << opName << spar << params; if(!p->isLocal()) { - _out << "ByVal __current As Ice.Current"; + _out << "ByVal current__ As Ice.Current"; } _out << epar; if(ret && !hasAMD) @@ -5325,7 +5320,7 @@ Slice::Gen::TieVisitor::writeInheritedOperationsWithOpNames(const ClassDefPtr& p _out << "_ice_delegate." << opName << spar << args; if(!p->isLocal()) { - _out << "__current"; + _out << "current__"; } _out << epar; _out.dec(); @@ -5372,7 +5367,7 @@ Slice::Gen::BaseImplVisitor::writeOperation(const OperationPtr& op, bool comment { _out << "Overrides "; } - _out << "Sub " << opName << "_async" << spar << pDecl << "ByVal __current As Ice.Current" << epar; + _out << "Sub " << opName << "_async" << spar << pDecl << "ByVal current__ As Ice.Current" << epar; if(comment) { @@ -5382,14 +5377,14 @@ Slice::Gen::BaseImplVisitor::writeOperation(const OperationPtr& op, bool comment { if(forTie) { - _out << " Implements _" << cl->name() << "Operations." << opName << "_async"; // TODO: should be containing class? + _out << " Implements " << cl->name() << "Operations_." << opName << "_async"; // TODO: should be containing class? } } _out.inc(); if(ret) { - _out << nl << "Dim __ret As " << typeToString(ret) << " = " << writeValue(ret); + _out << nl << "Dim ret__ As " << typeToString(ret) << " = " << writeValue(ret); } for(i = params.begin(); i != params.end(); ++i) { @@ -5400,10 +5395,10 @@ Slice::Gen::BaseImplVisitor::writeOperation(const OperationPtr& op, bool comment _out << nl << "Dim " << name << " As " << typeToString(type) << " = " << writeValue(type); } } - _out << nl << "__cb.ice_response" << spar; + _out << nl << "cb__.ice_response" << spar; if(ret) { - _out << "__ret"; + _out << "ret__"; } for(i = params.begin(); i != params.end(); ++i) { @@ -5429,7 +5424,7 @@ Slice::Gen::BaseImplVisitor::writeOperation(const OperationPtr& op, bool comment _out << vbOp << ' ' << fixId(opName, DotNet::ICloneable, true) << spar << pDecls; if(!cl->isLocal()) { - _out << "ByVal __current As Ice.Current"; + _out << "ByVal current__ As Ice.Current"; } _out << epar; if(ret) @@ -5444,7 +5439,7 @@ Slice::Gen::BaseImplVisitor::writeOperation(const OperationPtr& op, bool comment { if(forTie) { - _out << " Implements _" << cl->name() << "Operations." << fixId(opName, DotNet::ICloneable, true); // TODO: should be containing class? + _out << " Implements " << cl->name() << "Operations_." << fixId(opName, DotNet::ICloneable, true); // TODO: should be containing class? } } _out.inc(); @@ -5569,7 +5564,7 @@ Slice::Gen::ImplVisitor::visitClassDefStart(const ClassDefPtr& p) } else { - _out << "Inherits _" << name << "Disp"; + _out << "Inherits " << name << "Disp_"; } } else @@ -5654,7 +5649,7 @@ Slice::Gen::ImplTieVisitor::visitClassDefStart(const ClassDefPtr& p) _out << fixId(bases.front()->name()); } } - _out << nl << "Implements _" << name << "Operations"; + _out << nl << "Implements " << name << "Operations_"; _out << sp << nl << "Public Sub New()"; _out << nl << "End Sub"; diff --git a/cs/CHANGES b/cs/CHANGES index ca7b1e012a9..cb8ebb865bc 100644 --- a/cs/CHANGES +++ b/cs/CHANGES @@ -1,6 +1,28 @@ Changes since version 2.1.2 --------------------------- +- The Ice run-time libraries are now marked as CLS-compliant + assemblies. In addition, the generated code is now also + CLS-compliant. + + This involves one change to the C# language mapping: + + The skeleton class used be called _<interface-name>Disp but + is now called <interface-name>Disp_. + + For example, if you previously had: + + class MyIntfI : _MyIntfDisp { /* ... */ } + + you now have to write: + + class MyIntfI : MyIntfDisp_ { /* ... */ } + + Similarly, for the Tie mapping, the location of the underscore + has changed: + + _MyIntfTie -> MyIntfTie_ + - Added support for the thread-per-connection concurrency model. - Changed the way servant locators work if a server has a servant diff --git a/cs/demo/Glacier2/callback/CallbackI.cs b/cs/demo/Glacier2/callback/CallbackI.cs index ea467b982ae..ba39dbb7082 100644 --- a/cs/demo/Glacier2/callback/CallbackI.cs +++ b/cs/demo/Glacier2/callback/CallbackI.cs @@ -10,7 +10,7 @@ using Demo; using System; -public sealed class CallbackI : _CallbackDisp +public sealed class CallbackI : CallbackDisp_ { public override void initiateCallback(CallbackReceiverPrx proxy, Ice.Current current) { diff --git a/cs/demo/Glacier2/callback/CallbackReceiverI.cs b/cs/demo/Glacier2/callback/CallbackReceiverI.cs index 025d241d782..e72a62e564e 100644 --- a/cs/demo/Glacier2/callback/CallbackReceiverI.cs +++ b/cs/demo/Glacier2/callback/CallbackReceiverI.cs @@ -10,7 +10,7 @@ using Demo; using System; -public sealed class CallbackReceiverI : _CallbackReceiverDisp +public sealed class CallbackReceiverI : CallbackReceiverDisp_ { public override void callback(Ice.Current current) { diff --git a/cs/demo/Glacier2/callback/SessionI.cs b/cs/demo/Glacier2/callback/SessionI.cs index 34a0a0dacc5..3965bf92117 100644 --- a/cs/demo/Glacier2/callback/SessionI.cs +++ b/cs/demo/Glacier2/callback/SessionI.cs @@ -9,7 +9,7 @@ using System; -public sealed class SessionI : Glacier2._SessionDisp +public sealed class SessionI : Glacier2.SessionDisp_ { public SessionI(string userId) { diff --git a/cs/demo/Glacier2/callback/SessionManagerI.cs b/cs/demo/Glacier2/callback/SessionManagerI.cs index 8b61fb5d7b2..8b55b8169a8 100644 --- a/cs/demo/Glacier2/callback/SessionManagerI.cs +++ b/cs/demo/Glacier2/callback/SessionManagerI.cs @@ -9,7 +9,7 @@ using System; -public sealed class SessionManagerI : Glacier2._SessionManagerDisp +public sealed class SessionManagerI : Glacier2.SessionManagerDisp_ { public override Glacier2.SessionPrx create(string userId, Ice.Current current) { diff --git a/cs/demo/Glacier2/callback/SessionServer.cs b/cs/demo/Glacier2/callback/SessionServer.cs index f2b75fa9174..320741bfa27 100644 --- a/cs/demo/Glacier2/callback/SessionServer.cs +++ b/cs/demo/Glacier2/callback/SessionServer.cs @@ -11,7 +11,7 @@ using System; public class SessionServer : Ice.Application { - sealed class DummyPermissionVerifierI : Glacier2._PermissionsVerifierDisp + sealed class DummyPermissionVerifierI : Glacier2.PermissionsVerifierDisp_ { public override bool checkPermissions(String userId, String password, out string reason, Ice.Current current) { diff --git a/cs/demo/Ice/bidir/CallbackReceiverI.cs b/cs/demo/Ice/bidir/CallbackReceiverI.cs index 66cf2802177..58984a46c9c 100755 --- a/cs/demo/Ice/bidir/CallbackReceiverI.cs +++ b/cs/demo/Ice/bidir/CallbackReceiverI.cs @@ -6,13 +6,13 @@ // ICE_LICENSE file included in this distribution. // // ********************************************************************** -
-using Demo;
-
-public sealed class CallbackReceiverI : _CallbackReceiverDisp
-{
- public override void callback(int num, Ice.Current current)
- {
- System.Console.Out.WriteLine("received callback #" + num);
- }
-}
+ +using Demo; + +public sealed class CallbackReceiverI : CallbackReceiverDisp_ +{ + public override void callback(int num, Ice.Current current) + { + System.Console.Out.WriteLine("received callback #" + num); + } +} diff --git a/cs/demo/Ice/bidir/CallbackSenderI.cs b/cs/demo/Ice/bidir/CallbackSenderI.cs index 9917fe9ef43..d1df703e111 100755 --- a/cs/demo/Ice/bidir/CallbackSenderI.cs +++ b/cs/demo/Ice/bidir/CallbackSenderI.cs @@ -6,76 +6,76 @@ // ICE_LICENSE file included in this distribution. // // ********************************************************************** -
-using Demo;
-using System.Collections;
-
-class CallbackSenderI : _CallbackSenderDisp
-{
- public CallbackSenderI()
- {
- _destroy = false;
- _num = 0;
- _clients = new ArrayList();
- }
-
- public void destroy()
- {
- lock(this)
- {
- System.Console.Out.WriteLine("destroying callback sender");
- _destroy = true;
-
- System.Threading.Monitor.Pulse(this);
- }
- }
-
- public override void addClient(Ice.Identity ident, Ice.Current current)
- {
- lock(this)
- {
- System.Console.Out.WriteLine("adding client `" + Ice.Util.identityToString(ident) + "'");
-
- Ice.ObjectPrx @base = current.con.createProxy(ident);
- CallbackReceiverPrx client = CallbackReceiverPrxHelper.uncheckedCast(@base);
- _clients.Add(client);
- }
- }
-
- public void Run()
- {
- lock(this)
- {
- while(!_destroy)
- {
- System.Threading.Monitor.Wait(this, 2000);
-
- if(!_destroy && _clients.Count != 0)
- {
- ++_num;
-
- ArrayList toRemove = new ArrayList();
- foreach(CallbackReceiverPrx c in _clients)
- {
- try
- {
- c.callback(_num);
- }
- catch(Ice.LocalException)
- {
- toRemove.Add(c);
- }
- }
- foreach(CallbackReceiverPrx c in toRemove)
- {
- _clients.Remove(c);
- }
- }
- }
- }
- }
-
- private bool _destroy;
- private int _num;
- private ArrayList _clients;
-}
+ +using Demo; +using System.Collections; + +class CallbackSenderI : CallbackSenderDisp_ +{ + public CallbackSenderI() + { + _destroy = false; + _num = 0; + _clients = new ArrayList(); + } + + public void destroy() + { + lock(this) + { + System.Console.Out.WriteLine("destroying callback sender"); + _destroy = true; + + System.Threading.Monitor.Pulse(this); + } + } + + public override void addClient(Ice.Identity ident, Ice.Current current) + { + lock(this) + { + System.Console.Out.WriteLine("adding client `" + Ice.Util.identityToString(ident) + "'"); + + Ice.ObjectPrx @base = current.con.createProxy(ident); + CallbackReceiverPrx client = CallbackReceiverPrxHelper.uncheckedCast(@base); + _clients.Add(client); + } + } + + public void Run() + { + lock(this) + { + while(!_destroy) + { + System.Threading.Monitor.Wait(this, 2000); + + if(!_destroy && _clients.Count != 0) + { + ++_num; + + ArrayList toRemove = new ArrayList(); + foreach(CallbackReceiverPrx c in _clients) + { + try + { + c.callback(_num); + } + catch(Ice.LocalException) + { + toRemove.Add(c); + } + } + foreach(CallbackReceiverPrx c in toRemove) + { + _clients.Remove(c); + } + } + } + } + } + + private bool _destroy; + private int _num; + private ArrayList _clients; +} diff --git a/cs/demo/Ice/callback/CallbackReceiverI.cs b/cs/demo/Ice/callback/CallbackReceiverI.cs index f972a498786..a5b7f7f5698 100755 --- a/cs/demo/Ice/callback/CallbackReceiverI.cs +++ b/cs/demo/Ice/callback/CallbackReceiverI.cs @@ -9,7 +9,7 @@ using Demo; -public sealed class CallbackReceiverI : _CallbackReceiverDisp +public sealed class CallbackReceiverI : CallbackReceiverDisp_ { public override void callback(Ice.Current current) { diff --git a/cs/demo/Ice/callback/CallbackSenderI.cs b/cs/demo/Ice/callback/CallbackSenderI.cs index c912ea97b2c..3ef6186f867 100755 --- a/cs/demo/Ice/callback/CallbackSenderI.cs +++ b/cs/demo/Ice/callback/CallbackSenderI.cs @@ -9,7 +9,7 @@ using Demo; -public sealed class CallbackSenderI : _CallbackSenderDisp +public sealed class CallbackSenderI : CallbackSenderDisp_ { public override void initiateCallback(CallbackReceiverPrx proxy, Ice.Current current) { diff --git a/cs/demo/Ice/hello/HelloI.cs b/cs/demo/Ice/hello/HelloI.cs index 5deea72e89a..1129912cc3e 100755 --- a/cs/demo/Ice/hello/HelloI.cs +++ b/cs/demo/Ice/hello/HelloI.cs @@ -9,7 +9,7 @@ using Demo; -public class HelloI : _HelloDisp +public class HelloI : HelloDisp_ { public override void sayHello(Ice.Current current) { diff --git a/cs/demo/Ice/invoke/Client.cs b/cs/demo/Ice/invoke/Client.cs index 95542b0f217..2493a2bbd78 100644 --- a/cs/demo/Ice/invoke/Client.cs +++ b/cs/demo/Ice/invoke/Client.cs @@ -146,7 +146,7 @@ public class Client : Ice.Application Demo.Structure s = new Demo.Structure(); s.name = "red"; s.value = Demo.Color.red; - s.__write(outStream); + s.write__(outStream); // // Invoke operation. diff --git a/cs/demo/Ice/invoke/PrinterI.cs b/cs/demo/Ice/invoke/PrinterI.cs index b9c2ab56055..726cb22d7d8 100644 --- a/cs/demo/Ice/invoke/PrinterI.cs +++ b/cs/demo/Ice/invoke/PrinterI.cs @@ -75,7 +75,7 @@ public class PrinterI : Ice.Blobject else if(current.operation.Equals("printStruct")) { Demo.Structure s = new Demo.Structure(); - s.__read(inStream); + s.read__(inStream); inStream.destroy(); Console.WriteLine("Printing struct: name=" + s.name + ", value=" + s.value); return true; diff --git a/cs/demo/Ice/minimal/HelloI.cs b/cs/demo/Ice/minimal/HelloI.cs index 6e65c0287c9..9a6425247ee 100755 --- a/cs/demo/Ice/minimal/HelloI.cs +++ b/cs/demo/Ice/minimal/HelloI.cs @@ -9,7 +9,7 @@ using Demo; -public class HelloI : _HelloDisp +public class HelloI : HelloDisp_ { public override void sayHello(Ice.Current current) { diff --git a/cs/demo/Ice/nested/NestedI.cs b/cs/demo/Ice/nested/NestedI.cs index 8206ce955a6..07daa8edf64 100755 --- a/cs/demo/Ice/nested/NestedI.cs +++ b/cs/demo/Ice/nested/NestedI.cs @@ -9,7 +9,7 @@ using Demo; -class NestedI : _NestedDisp +class NestedI : NestedDisp_ { internal NestedI(NestedPrx self) { diff --git a/cs/demo/Ice/session/HelloI.cs b/cs/demo/Ice/session/HelloI.cs index e91e6e82aaf..f9f0f8225c9 100755 --- a/cs/demo/Ice/session/HelloI.cs +++ b/cs/demo/Ice/session/HelloI.cs @@ -10,7 +10,7 @@ using Demo; using System; -public class HelloI : _HelloDisp +public class HelloI : HelloDisp_ { public HelloI(string name, int id) { diff --git a/cs/demo/Ice/session/SessionFactoryI.cs b/cs/demo/Ice/session/SessionFactoryI.cs index 8c02151fcc2..2b8f09dd1b4 100755 --- a/cs/demo/Ice/session/SessionFactoryI.cs +++ b/cs/demo/Ice/session/SessionFactoryI.cs @@ -10,7 +10,7 @@ using Demo; using System; -public class SessionFactoryI : _SessionFactoryDisp +public class SessionFactoryI : SessionFactoryDisp_ { public SessionFactoryI(ReapThread reapThread) { diff --git a/cs/demo/Ice/session/SessionI.cs b/cs/demo/Ice/session/SessionI.cs index a83bf11d576..6a71ddcc7e9 100755 --- a/cs/demo/Ice/session/SessionI.cs +++ b/cs/demo/Ice/session/SessionI.cs @@ -11,7 +11,7 @@ using Demo; using System; using System.Collections; -public class SessionI : _SessionDisp +public class SessionI : SessionDisp_ { public SessionI(string name) { diff --git a/cs/demo/Ice/throughput/ThroughputI.cs b/cs/demo/Ice/throughput/ThroughputI.cs index 864dd0e821e..1eff6bd1d7a 100755 --- a/cs/demo/Ice/throughput/ThroughputI.cs +++ b/cs/demo/Ice/throughput/ThroughputI.cs @@ -9,7 +9,7 @@ using Demo; -public sealed class ThroughputI : _ThroughputDisp +public sealed class ThroughputI : ThroughputDisp_ { public ThroughputI() { diff --git a/cs/demo/IcePack/hello/HelloFactoryI.cs b/cs/demo/IcePack/hello/HelloFactoryI.cs index a5afe2c8ecb..ec2a02bb015 100644 --- a/cs/demo/IcePack/hello/HelloFactoryI.cs +++ b/cs/demo/IcePack/hello/HelloFactoryI.cs @@ -11,7 +11,7 @@ using System; using System.Diagnostics; using Demo; -public class HelloFactoryI : _HelloFactoryDisp +public class HelloFactoryI : HelloFactoryDisp_ { public override HelloPrx create(string name, Ice.Current current) { diff --git a/cs/demo/IcePack/simple/HelloI.cs b/cs/demo/IcePack/simple/HelloI.cs index 68a80201bb5..800ec2fabb1 100644 --- a/cs/demo/IcePack/simple/HelloI.cs +++ b/cs/demo/IcePack/simple/HelloI.cs @@ -10,7 +10,7 @@ using System; using Demo; -public class HelloI : _HelloDisp +public class HelloI : HelloDisp_ { public override void sayHello(Ice.Current current) { diff --git a/cs/demo/book/printer/Server.cs b/cs/demo/book/printer/Server.cs index a49354532f2..a3e6f102d47 100755 --- a/cs/demo/book/printer/Server.cs +++ b/cs/demo/book/printer/Server.cs @@ -9,7 +9,7 @@ using System; -public class PrinterI : Demo._PrinterDisp +public class PrinterI : Demo.PrinterDisp_ { public override void printString(string s, Ice.Current current) { diff --git a/cs/demo/book/simple_filesystem/DirectoryI.cs b/cs/demo/book/simple_filesystem/DirectoryI.cs index 0405ba1da94..a1e273db317 100755 --- a/cs/demo/book/simple_filesystem/DirectoryI.cs +++ b/cs/demo/book/simple_filesystem/DirectoryI.cs @@ -10,7 +10,7 @@ using Filesystem; using System.Collections; -public class DirectoryI : _DirectoryDisp +public class DirectoryI : DirectoryDisp_ { // DirectoryI constructor diff --git a/cs/demo/book/simple_filesystem/FileI.cs b/cs/demo/book/simple_filesystem/FileI.cs index 8e7efda4656..d2be01fce22 100755 --- a/cs/demo/book/simple_filesystem/FileI.cs +++ b/cs/demo/book/simple_filesystem/FileI.cs @@ -10,7 +10,7 @@ using Filesystem; using System.Diagnostics; -public class FileI : _FileDisp +public class FileI : FileDisp_ { // FileI constructor diff --git a/cs/generate/AssemblyInfo.cs b/cs/generate/AssemblyInfo.cs index 035c993d8dd..1609df894d2 100755 --- a/cs/generate/AssemblyInfo.cs +++ b/cs/generate/AssemblyInfo.cs @@ -1,6 +1,9 @@ +using System; using System.Reflection; using System.Runtime.CompilerServices; +[assembly: CLSCompliant(true)] + [assembly: AssemblyTitle("generatecs")] [assembly: AssemblyDescription("Make-like program to compile Slice files")] [assembly: AssemblyConfiguration("")] diff --git a/cs/src/Glacier2/AssemblyInfo.cs b/cs/src/Glacier2/AssemblyInfo.cs index 8457b92a01d..beeca9fc6d5 100755 --- a/cs/src/Glacier2/AssemblyInfo.cs +++ b/cs/src/Glacier2/AssemblyInfo.cs @@ -7,9 +7,12 @@ // // ********************************************************************** +using System; using System.Reflection; using System.Runtime.CompilerServices; +[assembly: CLSCompliant(true)] + [assembly: AssemblyTitle("glacier2cs")] [assembly: AssemblyDescription("Glacier2 run-time support")] [assembly: AssemblyCompany("ZeroC, Inc.")] diff --git a/cs/src/Ice/AssemblyInfo.cs b/cs/src/Ice/AssemblyInfo.cs index 11f3f2e7b1e..f9d9b55f098 100755 --- a/cs/src/Ice/AssemblyInfo.cs +++ b/cs/src/Ice/AssemblyInfo.cs @@ -7,9 +7,12 @@ // // ********************************************************************** +using System; using System.Reflection; using System.Runtime.CompilerServices; +[assembly: CLSCompliant(true)] + [assembly: AssemblyTitle("icecs")] [assembly: AssemblyDescription("Ice core run-time support")] [assembly: AssemblyCompany("ZeroC, Inc.")] diff --git a/cs/src/Ice/AssemblyUtil.cs b/cs/src/Ice/AssemblyUtil.cs index e1cc414b6f2..43d7fa44a17 100755 --- a/cs/src/Ice/AssemblyUtil.cs +++ b/cs/src/Ice/AssemblyUtil.cs @@ -29,26 +29,26 @@ namespace IceInternal || id == PlatformID.Win32Windows || id == PlatformID.WinCE) { - _platform = Platform.Windows; + platform_ = Platform.Windows; } else { - _platform = Platform.NonWindows; + platform_ = Platform.NonWindows; } if(System.Type.GetType("Mono.Runtime") != null) { - _runtime = Runtime.Mono; + runtime_ = Runtime.Mono; } else { - _runtime = Runtime.DotNET; + runtime_ = Runtime.DotNET; } System.Version v = System.Environment.Version; - _runtimeMajor = v.Major; - _runtimeMinor = v.Minor; - _runtimeBuild = v.Build; - _runtimeRevision = v.Revision; + runtimeMajor_ = v.Major; + runtimeMinor_ = v.Minor; + runtimeBuild_ = v.Build; + runtimeRevision_ = v.Revision; } public static Type findType(string csharpId) @@ -172,17 +172,17 @@ namespace IceInternal private static Hashtable _typeTable = new Hashtable(); // <type name, Type> pairs. private static Mutex _mutex = new Mutex(); - public readonly static Runtime _runtime; // Either DotNET or Mono + public readonly static Runtime runtime_; // Either DotNET or Mono // // Versioning is: Major.Minor.Build.Revision. (Yes, really. It is not Major.Minor.Revision.Build, as // one might expect.) If a part of a version number (such as revision) is not defined, it is -1. // - public readonly static int _runtimeMajor; - public readonly static int _runtimeMinor; - public readonly static int _runtimeBuild; - public readonly static int _runtimeRevision; + public readonly static int runtimeMajor_; + public readonly static int runtimeMinor_; + public readonly static int runtimeBuild_; + public readonly static int runtimeRevision_; - public readonly static Platform _platform; + public readonly static Platform platform_; } } diff --git a/cs/src/Ice/BasicInputStream.cs b/cs/src/Ice/BasicInputStream.cs index 642a9137d04..e9e7ae0013a 100644 --- a/cs/src/Ice/BasicInputStream.cs +++ b/cs/src/Ice/BasicInputStream.cs @@ -14,9 +14,9 @@ namespace IceInternal public BasicInputStream(Instance instance, Ice.InputStream inStream) : base(instance) { - _in = inStream; + in_ = inStream; } - public Ice.InputStream _in; + public Ice.InputStream in_; } } diff --git a/cs/src/Ice/BasicOutputStream.cs b/cs/src/Ice/BasicOutputStream.cs index 2e48ef8e9c1..26e24f4bbf6 100644 --- a/cs/src/Ice/BasicOutputStream.cs +++ b/cs/src/Ice/BasicOutputStream.cs @@ -15,9 +15,9 @@ namespace IceInternal public BasicOutputStream(Instance instance, Ice.OutputStream outStream) : base(instance) { - _out = outStream; + out_ = outStream; } - public Ice.OutputStream _out; + public Ice.OutputStream out_; } } diff --git a/cs/src/Ice/BasicStream.cs b/cs/src/Ice/BasicStream.cs index 250eede2ba3..07153de15f2 100755 --- a/cs/src/Ice/BasicStream.cs +++ b/cs/src/Ice/BasicStream.cs @@ -47,7 +47,7 @@ namespace IceInternal public BasicStream(IceInternal.Instance instance) { - _instance = instance; + instance_ = instance; allocate(1500); _capacity = _buf.capacity(); _limit = 0; @@ -62,7 +62,7 @@ namespace IceInternal _sliceObjects = true; - _messageSizeMax = _instance.messageSizeMax(); // Cached for efficiency. + _messageSizeMax = instance_.messageSizeMax(); // Cached for efficiency. _seqDataStack = null; _objectList = null; @@ -95,12 +95,12 @@ namespace IceInternal public virtual IceInternal.Instance instance() { - return _instance; + return instance_; } public virtual void swap(BasicStream other) { - Debug.Assert(_instance == other._instance); + Debug.Assert(instance_ == other.instance_); ByteBuffer tmpBuf = other._buf; other._buf = _buf; @@ -1078,12 +1078,12 @@ namespace IceInternal public virtual void writeProxy(Ice.ObjectPrx v) { - _instance.proxyFactory().proxyToStream(v, this); + instance_.proxyFactory().proxyToStream(v, this); } public virtual Ice.ObjectPrx readProxy() { - return _instance.proxyFactory().streamToProxy(this); + return instance_.proxyFactory().streamToProxy(this); } public virtual void writeObject(Ice.Object v) @@ -1216,7 +1216,7 @@ namespace IceInternal // Try to find a factory registered for the specific // type. // - Ice.ObjectFactory userFactory = _instance.servantFactoryManager().find(id); + Ice.ObjectFactory userFactory = instance_.servantFactoryManager().find(id); if(userFactory != null) { v = userFactory.create(id); @@ -1228,7 +1228,7 @@ namespace IceInternal // if(v == null) { - userFactory = _instance.servantFactoryManager().find(""); + userFactory = instance_.servantFactoryManager().find(""); if(userFactory != null) { v = userFactory.create(id); @@ -1259,12 +1259,12 @@ namespace IceInternal // if(_traceSlicing == -1) { - _traceSlicing = _instance.traceLevels().slicing; - _slicingCat = _instance.traceLevels().slicingCat; + _traceSlicing = instance_.traceLevels().slicing; + _slicingCat = instance_.traceLevels().slicingCat; } if(_traceSlicing > 0) { - TraceUtil.traceSlicing("class", id, _slicingCat, _instance.logger()); + TraceUtil.traceSlicing("class", id, _slicingCat, instance_.logger()); } skipSlice(); // Slice off this derived part -- we don't understand it. id = readTypeId(); // Read next id for next iteration. @@ -1292,7 +1292,7 @@ namespace IceInternal } _objectList.Add(v); - v.__read(this, false); + v.read__(this, false); patchReferences(i, null); return; } @@ -1300,9 +1300,9 @@ namespace IceInternal public virtual void writeUserException(Ice.UserException v) { - writeBool(v.__usesClasses()); - v.__write(this); - if(v.__usesClasses()) + writeBool(v.usesClasses__()); + v.write__(this); + if(v.usesClasses__()) { writePendingObjects(); } @@ -1334,7 +1334,7 @@ namespace IceInternal } catch(Ice.UserException ex) { - ex.__read(this, false); + ex.read__(this, false); if(usesClasses) { readPendingObjects(); @@ -1350,12 +1350,12 @@ namespace IceInternal // if(_traceSlicing == -1) { - _traceSlicing = _instance.traceLevels().slicing; - _slicingCat = _instance.traceLevels().slicingCat; + _traceSlicing = instance_.traceLevels().slicing; + _slicingCat = instance_.traceLevels().slicingCat; } if(_traceSlicing > 0) { - TraceUtil.traceSlicing("exception", id, _slicingCat, _instance.logger()); + TraceUtil.traceSlicing("exception", id, _slicingCat, instance_.logger()); } skipSlice(); // Slice off what we don't understand. id = readString(); // Read type id for next slice. @@ -1438,7 +1438,7 @@ namespace IceInternal } catch(System.Exception ex) { - _instance.logger().warning("exception raised by ice_postUnmarshal::\n" + ex); + instance_.logger().warning("exception raised by ice_postUnmarshal::\n" + ex); } } } @@ -1459,9 +1459,9 @@ namespace IceInternal } catch(System.Exception ex) { - _instance.logger().warning("exception raised by ice_preMarshal::\n" + ex); + instance_.logger().warning("exception raised by ice_preMarshal::\n" + ex); } - v.__write(this); + v.write__(this); } internal virtual void patchReferences(object instanceIndex, object patchIndex) @@ -1654,7 +1654,7 @@ namespace IceInternal return false; } - cstream = new BasicStream(_instance); + cstream = new BasicStream(instance_); cstream.resize(headerSize + 4 + compressedLen, false); cstream.pos(0); @@ -1711,7 +1711,7 @@ namespace IceInternal ex.reason = getBZ2Error(rc); throw ex; } - BasicStream ucStream = new BasicStream(_instance); + BasicStream ucStream = new BasicStream(instance_); ucStream.resize(uncompressedSize, false); ucStream.pos(0); ucStream._buf.put(_buf.rawBytes(0, headerSize)); @@ -1814,7 +1814,7 @@ namespace IceInternal { try { - _instance.servantFactoryManager().add(dynamicFactory, id); + instance_.servantFactoryManager().add(dynamicFactory, id); factory = dynamicFactory; } catch(Ice.AlreadyRegisteredException) @@ -1828,7 +1828,7 @@ namespace IceInternal // null and the while loop will attempt to // install the dynamic factory again. // - factory = _instance.servantFactoryManager().find(id); + factory = instance_.servantFactoryManager().find(id); } } } @@ -1943,7 +1943,7 @@ namespace IceInternal _buf.put(old); } - private IceInternal.Instance _instance; + private IceInternal.Instance instance_; private ByteBuffer _buf; private int _capacity; // Cache capacity to avoid excessive method calls. private int _limit; // Cache limit to avoid excessive method calls. diff --git a/cs/src/Ice/CommunicatorI.cs b/cs/src/Ice/CommunicatorI.cs index 22128e75313..4de986fc397 100755 --- a/cs/src/Ice/CommunicatorI.cs +++ b/cs/src/Ice/CommunicatorI.cs @@ -14,27 +14,27 @@ namespace Ice { public void destroy() { - _instance.destroy(); + instance_.destroy(); } public void shutdown() { - _instance.objectAdapterFactory().shutdown(); + instance_.objectAdapterFactory().shutdown(); } public void waitForShutdown() { - _instance.objectAdapterFactory().waitForShutdown(); + instance_.objectAdapterFactory().waitForShutdown(); } public Ice.ObjectPrx stringToProxy(string s) { - return _instance.proxyFactory().stringToProxy(s); + return instance_.proxyFactory().stringToProxy(s); } public string proxyToString(Ice.ObjectPrx proxy) { - return _instance.proxyFactory().proxyToString(proxy); + return instance_.proxyFactory().proxyToString(proxy); } public ObjectAdapter createObjectAdapter(string name) @@ -44,77 +44,77 @@ namespace Ice public ObjectAdapter createObjectAdapterWithEndpoints(string name, string endpoints) { - return _instance.objectAdapterFactory().createObjectAdapter(name, endpoints); + return instance_.objectAdapterFactory().createObjectAdapter(name, endpoints); } public void addObjectFactory(ObjectFactory factory, string id) { - _instance.servantFactoryManager().add(factory, id); + instance_.servantFactoryManager().add(factory, id); } public void removeObjectFactory(string id) { - _instance.servantFactoryManager().remove(id); + instance_.servantFactoryManager().remove(id); } public ObjectFactory findObjectFactory(string id) { - return _instance.servantFactoryManager().find(id); + return instance_.servantFactoryManager().find(id); } public Properties getProperties() { - return _instance.properties(); + return instance_.properties(); } public Logger getLogger() { - return _instance.logger(); + return instance_.logger(); } public void setLogger(Logger logger) { - _instance.logger(logger); + instance_.logger(logger); } public Stats getStats() { - return _instance.stats(); + return instance_.stats(); } public void setStats(Stats stats) { - _instance.stats(stats); + instance_.stats(stats); } public RouterPrx getDefaultRouter() { - return _instance.referenceFactory().getDefaultRouter(); + return instance_.referenceFactory().getDefaultRouter(); } public void setDefaultRouter(RouterPrx router) { - _instance.referenceFactory().setDefaultRouter(router); + instance_.referenceFactory().setDefaultRouter(router); } public LocatorPrx getDefaultLocator() { - return _instance.referenceFactory().getDefaultLocator(); + return instance_.referenceFactory().getDefaultLocator(); } public void setDefaultLocator(LocatorPrx locator) { - _instance.referenceFactory().setDefaultLocator(locator); + instance_.referenceFactory().setDefaultLocator(locator); } public Ice.Context getDefaultContext() { - return _instance.getDefaultContext(); + return instance_.getDefaultContext(); } public void setDefaultContext(Ice.Context ctx) { - _instance.setDefaultContext(ctx); + instance_.setDefaultContext(ctx); } public PluginManager getPluginManager() @@ -124,12 +124,12 @@ namespace Ice public void flushBatchRequests() { - _instance.flushBatchRequests(); + instance_.flushBatchRequests(); } internal CommunicatorI(Properties properties) { - _instance = new IceInternal.Instance(this, properties); + instance_ = new IceInternal.Instance(this, properties); } #if DEBUG @@ -137,11 +137,11 @@ namespace Ice { lock(this) { - if(!_instance.destroyed()) + if(!instance_.destroyed()) { if(!System.Environment.HasShutdownStarted) { - _instance.logger().warning("Ice::Communicator::destroy() has not been called"); + instance_.logger().warning("Ice::Communicator::destroy() has not been called"); } else { @@ -160,11 +160,11 @@ namespace Ice { try { - _instance.finishSetup(ref args); + instance_.finishSetup(ref args); } catch(System.Exception) { - _instance.destroy(); + instance_.destroy(); throw; } } @@ -174,11 +174,11 @@ namespace Ice // internal IceInternal.Instance getInstance() { - return _instance; + return instance_; } - private IceInternal.Instance _instance; + private IceInternal.Instance instance_; } } diff --git a/cs/src/Ice/ConnectionFactory.cs b/cs/src/Ice/ConnectionFactory.cs index 39dafc41a64..0d9a4d3a130 100644 --- a/cs/src/Ice/ConnectionFactory.cs +++ b/cs/src/Ice/ConnectionFactory.cs @@ -121,7 +121,7 @@ namespace IceInternal // // Modify endpoints with overrides. // - DefaultsAndOverrides defaultsAndOverrides = _instance.defaultsAndOverrides(); + DefaultsAndOverrides defaultsAndOverrides = instance_.defaultsAndOverrides(); for(int j = 0; j < endpoints.Length; j++) { if(defaultsAndOverrides.overrideTimeout) @@ -151,9 +151,9 @@ namespace IceInternal // if(!connection.isDestroyed()) { - if(_instance.defaultsAndOverrides().overrideCompress) + if(instance_.defaultsAndOverrides().overrideCompress) { - compress = _instance.defaultsAndOverrides().overrideCompressValue; + compress = instance_.defaultsAndOverrides().overrideCompressValue; } else { @@ -217,9 +217,9 @@ namespace IceInternal // if(!connection.isDestroyed()) { - if(_instance.defaultsAndOverrides().overrideCompress) + if(instance_.defaultsAndOverrides().overrideCompress) { - compress = _instance.defaultsAndOverrides().overrideCompressValue; + compress = instance_.defaultsAndOverrides().overrideCompressValue; } else { @@ -260,7 +260,7 @@ namespace IceInternal Debug.Assert(connector != null); int timeout; - DefaultsAndOverrides defaultsAndOverrides = _instance.defaultsAndOverrides(); + DefaultsAndOverrides defaultsAndOverrides = instance_.defaultsAndOverrides(); if(defaultsAndOverrides.overrideConnectTimeout) { timeout = defaultsAndOverrides.overrideConnectTimeoutValue; @@ -276,11 +276,11 @@ namespace IceInternal transceiver = connector.connect(timeout); Debug.Assert(transceiver != null); } - newConnection = new Ice.ConnectionI(_instance, transceiver, endpoint, null); + newConnection = new Ice.ConnectionI(instance_, transceiver, endpoint, null); newConnection.validate(); - if(_instance.defaultsAndOverrides().overrideCompress) + if(instance_.defaultsAndOverrides().overrideCompress) { - compress = _instance.defaultsAndOverrides().overrideCompressValue; + compress = instance_.defaultsAndOverrides().overrideCompressValue; } else { @@ -303,7 +303,7 @@ namespace IceInternal } } - TraceLevels traceLevels = _instance.traceLevels(); + TraceLevels traceLevels = instance_.traceLevels(); if(traceLevels.retry >= 2) { System.Text.StringBuilder s = new System.Text.StringBuilder(); @@ -317,7 +317,7 @@ namespace IceInternal s.Append(" and no more endpoints to try\n"); } s.Append(exception); - _instance.logger().trace(traceLevels.retryCat, s.ToString()); + instance_.logger().trace(traceLevels.retryCat, s.ToString()); } } @@ -382,8 +382,8 @@ namespace IceInternal // Ice.ObjectPrx proxy = routerInfo.getClientProxy(); Ice.ObjectAdapter adapter = routerInfo.getAdapter(); - DefaultsAndOverrides defaultsAndOverrides = _instance.defaultsAndOverrides(); - EndpointI[] endpoints = ((Ice.ObjectPrxHelperBase)proxy).__reference().getEndpoints(); + DefaultsAndOverrides defaultsAndOverrides = instance_.defaultsAndOverrides(); + EndpointI[] endpoints = ((Ice.ObjectPrxHelperBase)proxy).reference__().getEndpoints(); for(int i = 0; i < endpoints.Length; i++) { EndpointI endpoint = endpoints[i]; @@ -492,7 +492,7 @@ namespace IceInternal // internal OutgoingConnectionFactory(Instance instance) { - _instance = instance; + instance_ = instance; _destroyed = false; _connections = new Hashtable(); _pending = new Set(); @@ -509,7 +509,7 @@ namespace IceInternal } #endif - private readonly Instance _instance; + private readonly Instance instance_; private bool _destroyed; private Hashtable _connections; private Set _pending; @@ -673,25 +673,25 @@ namespace IceInternal public override bool datagram() { - Debug.Assert(!_instance.threadPerConnection()); // Only for use with a thread pool. + Debug.Assert(!instance_.threadPerConnection()); // Only for use with a thread pool. return _endpoint.datagram(); } public override bool readable() { - Debug.Assert(!_instance.threadPerConnection()); // Only for use with a thread pool. + Debug.Assert(!instance_.threadPerConnection()); // Only for use with a thread pool. return false; } public override void read(BasicStream unused) { - Debug.Assert(!_instance.threadPerConnection()); // Only for use with a thread pool. + Debug.Assert(!instance_.threadPerConnection()); // Only for use with a thread pool. Debug.Assert(false); // Must not be called. } public override void message(BasicStream unused, ThreadPool threadPool) { - Debug.Assert(!_instance.threadPerConnection()); // Only for use with a thread pool. + Debug.Assert(!instance_.threadPerConnection()); // Only for use with a thread pool. Ice.ConnectionI connection = null; @@ -745,7 +745,7 @@ namespace IceInternal try { - connection = new Ice.ConnectionI(_instance, transceiver, _endpoint, _adapter); + connection = new Ice.ConnectionI(instance_, transceiver, _endpoint, _adapter); } catch(Ice.LocalException) { @@ -798,7 +798,7 @@ namespace IceInternal public override void finished(ThreadPool threadPool) { - Debug.Assert(!_instance.threadPerConnection()); // Only for use with a thread pool. + Debug.Assert(!instance_.threadPerConnection()); // Only for use with a thread pool. lock(this) { @@ -839,11 +839,11 @@ namespace IceInternal _endpoint = endpoint; _adapter = adapter; _registeredWithPool = false; - _warn = _instance.properties().getPropertyAsInt("Ice.Warn.Connections") > 0 ? true : false; + _warn = instance_.properties().getPropertyAsInt("Ice.Warn.Connections") > 0 ? true : false; _connections = new LinkedList(); _state = StateHolding; - DefaultsAndOverrides defaultsAndOverrides = _instance.defaultsAndOverrides(); + DefaultsAndOverrides defaultsAndOverrides = instance_.defaultsAndOverrides(); if(defaultsAndOverrides.overrideTimeout) { @@ -865,7 +865,7 @@ namespace IceInternal try { - connection = new Ice.ConnectionI(_instance, _transceiver, _endpoint, _adapter); + connection = new Ice.ConnectionI(instance_, _transceiver, _endpoint, _adapter); connection.validate(); } catch(Ice.LocalException) @@ -921,7 +921,7 @@ namespace IceInternal throw; } - if(_instance.threadPerConnection()) + if(instance_.threadPerConnection()) { try { @@ -936,7 +936,7 @@ namespace IceInternal } catch(System.Exception ex) { - _instance.logger().error("cannot create thread for incoming connection factory:\n" + ex); + instance_.logger().error("cannot create thread for incoming connection factory:\n" + ex); try { @@ -984,7 +984,7 @@ namespace IceInternal { return; } - if(!_instance.threadPerConnection()) + if(!instance_.threadPerConnection()) { registerWithPool(); } @@ -1002,7 +1002,7 @@ namespace IceInternal { return; } - if(!_instance.threadPerConnection()) + if(!instance_.threadPerConnection()) { unregisterWithPool(); } @@ -1016,7 +1016,7 @@ namespace IceInternal case StateClosed: { - if(_instance.threadPerConnection()) + if(instance_.threadPerConnection()) { if(_acceptor != null) { @@ -1054,7 +1054,7 @@ namespace IceInternal private void registerWithPool() { - Debug.Assert(!_instance.threadPerConnection()); // Only for use with a thread pool. + Debug.Assert(!instance_.threadPerConnection()); // Only for use with a thread pool. if(_acceptor != null && !_registeredWithPool) { @@ -1065,7 +1065,7 @@ namespace IceInternal private void unregisterWithPool() { - Debug.Assert(!_instance.threadPerConnection()); // Only for use with a thread pool. + Debug.Assert(!instance_.threadPerConnection()); // Only for use with a thread pool. if(_acceptor != null && _registeredWithPool) { @@ -1076,7 +1076,7 @@ namespace IceInternal private void warning(Ice.LocalException ex) { - _instance.logger().warning("connection exception:\n" + ex + '\n' + _acceptor.ToString()); + instance_.logger().warning("connection exception:\n" + ex + '\n' + _acceptor.ToString()); } private void run() @@ -1168,7 +1168,7 @@ namespace IceInternal { try { - connection = new Ice.ConnectionI(_instance, transceiver, _endpoint, _adapter); + connection = new Ice.ConnectionI(instance_, transceiver, _endpoint, _adapter); } catch(Ice.LocalException) { @@ -1201,12 +1201,12 @@ namespace IceInternal } catch(Ice.Exception ex) { - _instance.logger().error("exception in thread per incoming connection factory:\n" + ToString() + + instance_.logger().error("exception in thread per incoming connection factory:\n" + ToString() + ex.ToString()); } catch(System.Exception ex) { - _instance.logger().error("system exception in thread per incoming connection factory:\n" + ToString() + + instance_.logger().error("system exception in thread per incoming connection factory:\n" + ToString() + ex.ToString()); } } diff --git a/cs/src/Ice/ConnectionI.cs b/cs/src/Ice/ConnectionI.cs index e4a28fa2c25..d38351c848b 100755 --- a/cs/src/Ice/ConnectionI.cs +++ b/cs/src/Ice/ConnectionI.cs @@ -34,7 +34,7 @@ namespace Ice lock(this) { - if(_instance.threadPerConnection() && _threadPerConnection != Thread.CurrentThread) + if(instance_.threadPerConnection() && _threadPerConnection != Thread.CurrentThread) { // // In thread per connection mode, this connection's thread @@ -71,7 +71,7 @@ namespace Ice try { int timeout; - IceInternal.DefaultsAndOverrides defaultsAndOverrides = _instance.defaultsAndOverrides(); + IceInternal.DefaultsAndOverrides defaultsAndOverrides = instance_.defaultsAndOverrides(); if(defaultsAndOverrides.overrideConnectTimeout) { timeout = defaultsAndOverrides.overrideConnectTimeoutValue; @@ -91,7 +91,7 @@ namespace Ice throw _exception; // The exception is immutable at this point. } - IceInternal.BasicStream os = new IceInternal.BasicStream(_instance); + IceInternal.BasicStream os = new IceInternal.BasicStream(instance_); os.writeBlob(IceInternal.Protocol.magic); os.writeByte(IceInternal.Protocol.protocolMajor); os.writeByte(IceInternal.Protocol.protocolMinor); @@ -113,7 +113,7 @@ namespace Ice } else { - IceInternal.BasicStream ins = new IceInternal.BasicStream(_instance); + IceInternal.BasicStream ins = new IceInternal.BasicStream(instance_); ins.resize(IceInternal.Protocol.headerSize, true); ins.pos(0); try @@ -402,7 +402,7 @@ namespace Ice // foreach(IceInternal.OutgoingAsync og in _asyncRequests.Values) { - if(og.__timedOut()) + if(og.timedOut__()) { setState(StateClosed, new TimeoutException()); return; @@ -704,10 +704,10 @@ namespace Ice // async request map, we are out of luck. It would // mean that finished() has been called already, and // therefore the exception has been set using the - // OutgoingAsync::__finished() callback. In this case, + // OutgoingAsync::finished__() callback. In this case, // we cannot throw the exception here, because we must // not both raise an exception and have - // OutgoingAsync::__finished() called with an + // OutgoingAsync::finished__() called with an // exception. This means that in some rare cases, a // request will not be retried even though it // could. But I honestly don't know how I could avoid @@ -819,7 +819,7 @@ namespace Ice // stream, as they might be corrupted due to // incomplete marshaling. // - _batchStream = new IceInternal.BasicStream(_instance); + _batchStream = new IceInternal.BasicStream(instance_); _batchRequestNum = 0; _batchRequestCompress = false; @@ -920,7 +920,7 @@ namespace Ice // // Reset the batch stream, and notify that flushing is over. // - _batchStream = new IceInternal.BasicStream(_instance); + _batchStream = new IceInternal.BasicStream(instance_); _batchRequestNum = 0; _batchRequestCompress = false; _batchStreamInUse = false; @@ -1083,9 +1083,9 @@ namespace Ice // ConnectionI[] connections = new ConnectionI[1]; connections[0] = this; - IceInternal.Reference @ref = _instance.referenceFactory().create( - ident, _instance.getDefaultContext(), "", IceInternal.Reference.Mode.ModeTwoway, connections); - return _instance.proxyFactory().referenceToProxy(@ref); + IceInternal.Reference @ref = instance_.referenceFactory().create( + ident, instance_.getDefaultContext(), "", IceInternal.Reference.Mode.ModeTwoway, connections); + return instance_.proxyFactory().referenceToProxy(@ref); } // @@ -1094,19 +1094,19 @@ namespace Ice public override bool datagram() { - Debug.Assert(!_instance.threadPerConnection()); // Only for use with a thread pool. + Debug.Assert(!instance_.threadPerConnection()); // Only for use with a thread pool. return _endpoint.datagram(); // No mutex protection necessary, _endpoint is immutable. } public override bool readable() { - Debug.Assert(!_instance.threadPerConnection()); // Only for use with a thread pool. + Debug.Assert(!instance_.threadPerConnection()); // Only for use with a thread pool. return true; } public override void read(IceInternal.BasicStream stream) { - Debug.Assert(!_instance.threadPerConnection()); // Only for use with a thread pool. + Debug.Assert(!instance_.threadPerConnection()); // Only for use with a thread pool. _transceiver.read(stream, 0); @@ -1131,7 +1131,7 @@ namespace Ice public override void message(IceInternal.BasicStream stream, IceInternal.ThreadPool threadPool) { - Debug.Assert(!_instance.threadPerConnection()); // Only for use with a thread pool. + Debug.Assert(!instance_.threadPerConnection()); // Only for use with a thread pool. byte compress = 0; int requestId = 0; @@ -1171,7 +1171,7 @@ namespace Ice // if(outAsync != null) { - outAsync.__finished(stream); + outAsync.finished__(stream); } // @@ -1184,7 +1184,7 @@ namespace Ice public override void finished(IceInternal.ThreadPool threadPool) { - Debug.Assert(!_instance.threadPerConnection()); // Only for use with a thread pool. + Debug.Assert(!instance_.threadPerConnection()); // Only for use with a thread pool. threadPool.promoteFollower(); @@ -1243,7 +1243,7 @@ namespace Ice { foreach(IceInternal.OutgoingAsync og in asyncRequests.Values) { - og.__finished(_exception); // The exception is immutable at this point. + og.finished__(_exception); // The exception is immutable at this point. } } @@ -1271,7 +1271,7 @@ namespace Ice return _endpoint.timeout(); // No mutex protection necessary, _endpoint is immutable. } - public string _Ice_toString() + public string ice_toString_() { return ToString(); } @@ -1298,7 +1298,7 @@ namespace Ice _logger = instance.logger(); // Cached for better performance. _traceLevels = instance.traceLevels(); // Cached for better performance. _registeredWithPool = false; - _warn = _instance.properties().getPropertyAsInt("Ice.Warn.Connections") > 0; + _warn = instance_.properties().getPropertyAsInt("Ice.Warn.Connections") > 0; _acmAbsoluteTimeoutMillis = 0; _nextRequestId = 1; _batchStream = new IceInternal.BasicStream(instance); @@ -1317,15 +1317,15 @@ namespace Ice { if(_adapter != null) { - _acmTimeout = _instance.serverACM(); + _acmTimeout = instance_.serverACM(); } else { - _acmTimeout = _instance.clientACM(); + _acmTimeout = instance_.clientACM(); } } - _compressionLevel = _instance.properties().getPropertyAsIntWithDefault("Ice.Compression.Level", 1); + _compressionLevel = instance_.properties().getPropertyAsIntWithDefault("Ice.Compression.Level", 1); if(_compressionLevel < 1) { _compressionLevel = 1; @@ -1343,7 +1343,7 @@ namespace Ice try { - if(!_instance.threadPerConnection()) + if(!instance_.threadPerConnection()) { // // Only set _threadPool if we really need it, i.e., if we are @@ -1372,13 +1372,13 @@ namespace Ice } catch(System.Exception ex) { - if(_instance.threadPerConnection()) + if(instance_.threadPerConnection()) { - _instance.logger().error("cannot create thread for connection:\n" + ex); + instance_.logger().error("cannot create thread for connection:\n" + ex); } else { - _instance.logger().error("cannot create thread pool for connection:\n" + ex); + instance_.logger().error("cannot create thread pool for connection:\n" + ex); } try @@ -1393,8 +1393,8 @@ namespace Ice throw new Ice.SyscallException(ex); } - _overrideCompress = _instance.defaultsAndOverrides().overrideCompress; - _overrideCompressValue = _instance.defaultsAndOverrides().overrideCompressValue; + _overrideCompress = instance_.defaultsAndOverrides().overrideCompress; + _overrideCompressValue = instance_.defaultsAndOverrides().overrideCompressValue; } @@ -1512,7 +1512,7 @@ namespace Ice { return; } - if(!_instance.threadPerConnection()) + if(!instance_.threadPerConnection()) { registerWithPool(); } @@ -1529,7 +1529,7 @@ namespace Ice { return; } - if(!_instance.threadPerConnection()) + if(!instance_.threadPerConnection()) { unregisterWithPool(); } @@ -1545,7 +1545,7 @@ namespace Ice { return; } - if(!_instance.threadPerConnection()) + if(!instance_.threadPerConnection()) { registerWithPool(); // We need to continue to read in closing state. } @@ -1554,7 +1554,7 @@ namespace Ice case StateClosed: { - if(_instance.threadPerConnection()) + if(instance_.threadPerConnection()) { // // If we are in thread per connection mode, we @@ -1620,7 +1620,7 @@ namespace Ice // monitor, but only if we were registered before, i.e., if our // old state was StateActive. // - IceInternal.ConnectionMonitor connectionMonitor = _instance.connectionMonitor(); + IceInternal.ConnectionMonitor connectionMonitor = instance_.connectionMonitor(); if(connectionMonitor != null) { if(state == StateActive) @@ -1664,7 +1664,7 @@ namespace Ice // Before we shut down, we send a close connection // message. // - IceInternal.BasicStream os = new IceInternal.BasicStream(_instance); + IceInternal.BasicStream os = new IceInternal.BasicStream(instance_); os.writeBlob(IceInternal.Protocol.magic); os.writeByte(IceInternal.Protocol.protocolMajor); os.writeByte(IceInternal.Protocol.protocolMinor); @@ -1694,7 +1694,7 @@ namespace Ice private void registerWithPool() { - Debug.Assert(!_instance.threadPerConnection()); // Only for use with a thread pool. + Debug.Assert(!instance_.threadPerConnection()); // Only for use with a thread pool. if(!_registeredWithPool) { @@ -1705,7 +1705,7 @@ namespace Ice private void unregisterWithPool() { - Debug.Assert(!_instance.threadPerConnection()); // Only for use with a thread pool. + Debug.Assert(!instance_.threadPerConnection()); // Only for use with a thread pool. if(_registeredWithPool) { @@ -2022,11 +2022,11 @@ namespace Ice activate(); } - bool warnUdp = _instance.properties().getPropertyAsInt("Ice.Warn.Datagrams") > 0; + bool warnUdp = instance_.properties().getPropertyAsInt("Ice.Warn.Datagrams") > 0; bool closed = false; - IceInternal.BasicStream stream = new IceInternal.BasicStream(_instance); + IceInternal.BasicStream stream = new IceInternal.BasicStream(instance_); while(!closed) { @@ -2083,7 +2083,7 @@ namespace Ice { throw new IllegalMessageSizeException(); } - if(size > _instance.messageSizeMax()) + if(size > instance_.messageSizeMax()) { throw new MemoryLimitException(); } @@ -2208,7 +2208,7 @@ namespace Ice // if(outAsync != null) { - outAsync.__finished(stream); + outAsync.finished__(stream); } // @@ -2230,7 +2230,7 @@ namespace Ice { foreach(IceInternal.OutgoingAsync og in asyncRequests.Values) { - og.__finished(_exception); // The exception is immutable at this point. + og.finished__(_exception); // The exception is immutable at this point. } } @@ -2255,11 +2255,11 @@ namespace Ice } catch(Exception ex) { - _instance.logger().error("exception in thread per connection:\n" + ToString() + ex.ToString()); + instance_.logger().error("exception in thread per connection:\n" + ToString() + ex.ToString()); } catch(System.Exception ex) { - _instance.logger().error("system exception in thread per connection:\n" + ToString() + ex.ToString()); + instance_.logger().error("system exception in thread per connection:\n" + ToString() + ex.ToString()); } } @@ -2271,13 +2271,13 @@ namespace Ice { if(_incomingCache == null) { - inc = new IceInternal.Incoming(_instance, this, adapter, response, compress); + inc = new IceInternal.Incoming(instance_, this, adapter, response, compress); } else { inc = _incomingCache; _incomingCache = _incomingCache.next; - inc.reset(_instance, this, adapter, response, compress); + inc.reset(instance_, this, adapter, response, compress); inc.next = null; } } diff --git a/cs/src/Ice/ConnectionMonitor.cs b/cs/src/Ice/ConnectionMonitor.cs index 0f522d331da..819b046d34c 100755 --- a/cs/src/Ice/ConnectionMonitor.cs +++ b/cs/src/Ice/ConnectionMonitor.cs @@ -20,9 +20,9 @@ namespace IceInternal { lock(this) { - Debug.Assert(_instance != null); + Debug.Assert(instance_ != null); - _instance = null; + instance_ = null; _connections = null; System.Threading.Monitor.Pulse(this); @@ -39,7 +39,7 @@ namespace IceInternal { lock(this) { - Debug.Assert(_instance != null); + Debug.Assert(instance_ != null); _connections.Add(connection); } } @@ -48,7 +48,7 @@ namespace IceInternal { lock(this) { - Debug.Assert(_instance != null); + Debug.Assert(instance_ != null); _connections.Remove(connection); } } @@ -58,11 +58,11 @@ namespace IceInternal // internal ConnectionMonitor(Instance instance, int interval) { - _instance = instance; + instance_ = instance; _interval = interval; _connections = new Set(); - string threadName = _instance.properties().getProperty("Ice.ProgramName"); + string threadName = instance_.properties().getProperty("Ice.ProgramName"); if(threadName.Length > 0) { threadName += "-"; @@ -80,7 +80,7 @@ namespace IceInternal { lock(this) { - IceUtil.Assert.FinalizerAssert(_instance == null); + IceUtil.Assert.FinalizerAssert(instance_ == null); IceUtil.Assert.FinalizerAssert(_connections == null); } } @@ -94,14 +94,14 @@ namespace IceInternal { lock(this) { - if(_instance == null) + if(instance_ == null) { return; } System.Threading.Monitor.Wait(this, System.TimeSpan.FromMilliseconds(_interval * 1000)); - if(_instance == null) + if(instance_ == null) { return; } @@ -128,21 +128,21 @@ namespace IceInternal { lock(this) { - _instance.logger().error("exception in connection monitor thread " + _thread.Name + "::\n" + ex); + instance_.logger().error("exception in connection monitor thread " + _thread.Name + "::\n" + ex); } } catch(System.Exception ex) { lock(this) { - _instance.logger().error("unknown exception in connection monitor thread " + _thread.Name + ":\n" + ex); + instance_.logger().error("unknown exception in connection monitor thread " + _thread.Name + ":\n" + ex); } } } } } - private Instance _instance; + private Instance instance_; private readonly int _interval; private Set _connections; private Thread _thread; diff --git a/cs/src/Ice/EndpointFactoryManager.cs b/cs/src/Ice/EndpointFactoryManager.cs index 79901a4ff9a..661083429e0 100755 --- a/cs/src/Ice/EndpointFactoryManager.cs +++ b/cs/src/Ice/EndpointFactoryManager.cs @@ -18,7 +18,7 @@ namespace IceInternal { internal EndpointFactoryManager(Instance instance) { - _instance = instance; + instance_ = instance; _factories = new ArrayList(); } @@ -74,7 +74,7 @@ namespace IceInternal if(protocol.Equals("default")) { - protocol = _instance.defaultsAndOverrides().defaultProtocol; + protocol = instance_.defaultsAndOverrides().defaultProtocol; } for(int i = 0; i < _factories.Count; i++) @@ -119,7 +119,7 @@ namespace IceInternal _factories.Clear(); } - private readonly Instance _instance; + private readonly Instance instance_; private readonly ArrayList _factories; } diff --git a/cs/src/Ice/EndpointI.cs b/cs/src/Ice/EndpointI.cs index 660f3b085ff..bc7af6ec90c 100755 --- a/cs/src/Ice/EndpointI.cs +++ b/cs/src/Ice/EndpointI.cs @@ -24,10 +24,10 @@ namespace IceInternal public override string ToString() { - return _Ice_toString(); + return ice_toString_(); } - public abstract string _Ice_toString(); + public abstract string ice_toString_(); public abstract int CompareTo(object obj); // diff --git a/cs/src/Ice/EventHandler.cs b/cs/src/Ice/EventHandler.cs index cb31872905b..8eac290c29d 100755 --- a/cs/src/Ice/EventHandler.cs +++ b/cs/src/Ice/EventHandler.cs @@ -54,21 +54,21 @@ namespace IceInternal public Instance instance() { - return _instance; + return instance_; } protected internal EventHandler(Instance instance) { - _instance = instance; - _stream = new BasicStream(instance); + instance_ = instance; + stream_ = new BasicStream(instance); } - protected internal Instance _instance; + protected internal Instance instance_; // - // The _stream data member is for use by ThreadPool only. + // The stream_ data member is for use by ThreadPool only. // - internal BasicStream _stream; + internal BasicStream stream_; } } diff --git a/cs/src/Ice/Exception.cs b/cs/src/Ice/Exception.cs index 4ce741906c4..f78c21b91a9 100755 --- a/cs/src/Ice/Exception.cs +++ b/cs/src/Ice/Exception.cs @@ -37,20 +37,20 @@ namespace Ice public UserException(System.Exception ex) : base(_dflt, ex) {} public UserException(string msg, System.Exception ex) : base(msg, ex) {} private static readonly string _dflt = "Ice.UserException"; - public abstract void __write(IceInternal.BasicStream __os); - public abstract void __read(IceInternal.BasicStream __is, bool __rid); + public abstract void write__(IceInternal.BasicStream os__); + public abstract void read__(IceInternal.BasicStream is__, bool rid__); - public virtual void __write(Ice.OutputStream __outS) + public virtual void write__(Ice.OutputStream outS__) { Debug.Assert(false); } - public virtual void __read(Ice.InputStream __inS, bool __rid) + public virtual void read__(Ice.InputStream inS__, bool rid__) { Debug.Assert(false); } - public virtual bool __usesClasses() + public virtual bool usesClasses__() { return false; } diff --git a/cs/src/Ice/Incoming.cs b/cs/src/Ice/Incoming.cs index 1ba6b8165d2..3d44a0b276e 100755 --- a/cs/src/Ice/Incoming.cs +++ b/cs/src/Ice/Incoming.cs @@ -19,43 +19,43 @@ namespace IceInternal protected internal IncomingBase(Instance instance, Ice.ConnectionI connection, Ice.ObjectAdapter adapter, bool response, byte compress) { - _response = response; - _compress = compress; - _os = new BasicStream(instance); - _connection = connection; - - _current = new Ice.Current(); - _current.id = new Ice.Identity(); - _current.adapter = adapter; - _current.con = connection; + response_ = response; + compress_ = compress; + os_ = new BasicStream(instance); + connection_ = connection; + + current_ = new Ice.Current(); + current_.id = new Ice.Identity(); + current_.adapter = adapter; + current_.con = connection; - _cookie = null; + cookie_ = null; } protected internal IncomingBase(IncomingBase inc) // Adopts the argument. It must not be used afterwards. { - _current = inc._current; + current_ = inc.current_; - _servant = inc._servant; - inc._servant = null; + servant_ = inc.servant_; + inc.servant_ = null; - _locator = inc._locator; - inc._locator = null; + locator_ = inc.locator_; + inc.locator_ = null; - _cookie = inc._cookie; - inc._cookie = null; + cookie_ = inc.cookie_; + inc.cookie_ = null; - _response = inc._response; - inc._response = false; + response_ = inc.response_; + inc.response_ = false; - _compress = inc._compress; - inc._compress = 0; + compress_ = inc.compress_; + inc.compress_ = 0; - _os = inc._os; - inc._os = null; + os_ = inc.os_; + inc.os_ = null; - _connection = inc._connection; - inc._connection = null; + connection_ = inc.connection_; + inc.connection_ = null; } // @@ -67,68 +67,68 @@ namespace IceInternal // // Don't recycle the Current object, because servants may keep a reference to it. // - _current = new Ice.Current(); - _current.id = new Ice.Identity(); - _current.adapter = adapter; - _current.con = connection; + current_ = new Ice.Current(); + current_.id = new Ice.Identity(); + current_.adapter = adapter; + current_.con = connection; - Debug.Assert(_cookie == null); + Debug.Assert(cookie_ == null); - _response = response; + response_ = response; - _compress = compress; + compress_ = compress; - if(_os == null) + if(os_ == null) { - _os = new BasicStream(instance); + os_ = new BasicStream(instance); } - _connection = connection; + connection_ = connection; } public virtual void reclaim() { - _servant = null; + servant_ = null; - _locator = null; + locator_ = null; - _cookie = null; + cookie_ = null; - if(_os != null) + if(os_ != null) { - _os.reset(); + os_.reset(); } } - protected internal void __warning(System.Exception ex) + protected internal void warning__(System.Exception ex) { - Debug.Assert(_os != null); + Debug.Assert(os_ != null); using(StringWriter sw = new StringWriter()) { IceUtil.OutputBase output = new IceUtil.OutputBase(sw); output.setUseTab(false); output.print("dispatch exception:"); - output.print("\nidentity: " + Ice.Util.identityToString(_current.id)); - output.print("\nfacet: " + IceUtil.StringUtil.escapeString(_current.facet, "")); - output.print("\noperation: " + _current.operation); + output.print("\nidentity: " + Ice.Util.identityToString(current_.id)); + output.print("\nfacet: " + IceUtil.StringUtil.escapeString(current_.facet, "")); + output.print("\noperation: " + current_.operation); output.print("\n"); output.print(ex.ToString()); - _os.instance().logger().warning(sw.ToString()); + os_.instance().logger().warning(sw.ToString()); } } - protected internal Ice.Current _current; - protected internal Ice.Object _servant; - protected internal Ice.ServantLocator _locator; - protected internal Ice.LocalObject _cookie; + protected internal Ice.Current current_; + protected internal Ice.Object servant_; + protected internal Ice.ServantLocator locator_; + protected internal Ice.LocalObject cookie_; - protected internal bool _response; - protected internal byte _compress; + protected internal bool response_; + protected internal byte compress_; - protected internal BasicStream _os; + protected internal BasicStream os_; - protected Ice.ConnectionI _connection; + protected Ice.ConnectionI connection_; } sealed public class Incoming : IncomingBase @@ -169,7 +169,7 @@ namespace IceInternal // // Read the current. // - _current.id.__read(_is); + current_.id.read__(_is); // // For compatibility with the old FacetPath. @@ -181,34 +181,34 @@ namespace IceInternal { throw new Ice.MarshalException(); } - _current.facet = facetPath[0]; + current_.facet = facetPath[0]; } else { - _current.facet = ""; + current_.facet = ""; } - _current.operation = _is.readString(); - _current.mode = (Ice.OperationMode)(int)_is.readByte(); + current_.operation = _is.readString(); + current_.mode = (Ice.OperationMode)(int)_is.readByte(); int sz = _is.readSize(); while(sz-- > 0) { string first = _is.readString(); string second = _is.readString(); - if(_current.ctx == null) + if(current_.ctx == null) { - _current.ctx = new Ice.Context(); + current_.ctx = new Ice.Context(); } - _current.ctx[first] = second; + current_.ctx[first] = second; } _is.startReadEncaps(); - if(_response) + if(response_) { - Debug.Assert(_os.size() == Protocol.headerSize + 4); // Dispatch status position. - _os.writeByte((byte)0); - _os.startWriteEncaps(); + Debug.Assert(os_.size() == Protocol.headerSize + 4); // Dispatch status position. + os_.writeByte((byte)0); + os_.startWriteEncaps(); } // Initialize status to some value, to keep the compiler happy. @@ -226,23 +226,23 @@ namespace IceInternal { if(servantManager != null) { - _servant = servantManager.findServant(_current.id, _current.facet); - if(_servant == null) + servant_ = servantManager.findServant(current_.id, current_.facet); + if(servant_ == null) { - _locator = servantManager.findServantLocator(_current.id.category); - if(_locator == null && _current.id.category.Length > 0) + locator_ = servantManager.findServantLocator(current_.id.category); + if(locator_ == null && current_.id.category.Length > 0) { - _locator = servantManager.findServantLocator(""); + locator_ = servantManager.findServantLocator(""); } - if(_locator != null) + if(locator_ != null) { - _servant = _locator.locate(_current, out _cookie); + servant_ = locator_.locate(current_, out cookie_); } } } - if(_servant == null) + if(servant_ == null) { - if(servantManager != null && servantManager.hasServant(_current.id)) + if(servantManager != null && servantManager.hasServant(current_.id)) { status = DispatchStatus.DispatchFacetNotExist; } @@ -253,14 +253,14 @@ namespace IceInternal } else { - status = _servant.__dispatch(this, _current); + status = servant_.dispatch__(this, current_); } } finally { - if(_locator != null && _servant != null && status != DispatchStatus.DispatchAsync) + if(locator_ != null && servant_ != null && status != DispatchStatus.DispatchAsync) { - _locator.finished(_current, _servant, _cookie); + locator_.finished(current_, servant_, cookie_); } } } @@ -270,66 +270,66 @@ namespace IceInternal if(ex.id.name == null) { - ex.id = _current.id; + ex.id = current_.id; } if(ex.facet == null) { - ex.facet = _current.facet; + ex.facet = current_.facet; } if(ex.operation == null || ex.operation.Length == 0) { - ex.operation = _current.operation; + ex.operation = current_.operation; } - if(_os.instance().properties().getPropertyAsIntWithDefault("Ice.Warn.Dispatch", 1) > 1) + if(os_.instance().properties().getPropertyAsIntWithDefault("Ice.Warn.Dispatch", 1) > 1) { - __warning(ex); + warning__(ex); } - if(_response) + if(response_) { - _os.endWriteEncaps(); - _os.resize(Protocol.headerSize + 4, false); // Dispatch status position. + os_.endWriteEncaps(); + os_.resize(Protocol.headerSize + 4, false); // Dispatch status position. if(ex is Ice.ObjectNotExistException) { - _os.writeByte((byte)DispatchStatus.DispatchObjectNotExist); + os_.writeByte((byte)DispatchStatus.DispatchObjectNotExist); } else if(ex is Ice.FacetNotExistException) { - _os.writeByte((byte)DispatchStatus.DispatchFacetNotExist); + os_.writeByte((byte)DispatchStatus.DispatchFacetNotExist); } else if(ex is Ice.OperationNotExistException) { - _os.writeByte((byte)DispatchStatus.DispatchOperationNotExist); + os_.writeByte((byte)DispatchStatus.DispatchOperationNotExist); } else { Debug.Assert(false); } - ex.id.__write(_os); + ex.id.write__(os_); // // For compatibility with the old FacetPath. // if(ex.facet == null || ex.facet.Length == 0) { - _os.writeStringSeq(null); + os_.writeStringSeq(null); } else { string[] facetPath2 = { ex.facet }; - _os.writeStringSeq(facetPath2); + os_.writeStringSeq(facetPath2); } - _os.writeString(ex.operation); + os_.writeString(ex.operation); - _connection.sendResponse(_os, _compress); + connection_.sendResponse(os_, compress_); } else { - _connection.sendNoResponse(); + connection_.sendNoResponse(); } return; @@ -338,22 +338,22 @@ namespace IceInternal { _is.endReadEncaps(); - if(_os.instance().properties().getPropertyAsIntWithDefault("Ice.Warn.Dispatch", 1) > 0) + if(os_.instance().properties().getPropertyAsIntWithDefault("Ice.Warn.Dispatch", 1) > 0) { - __warning(ex); + warning__(ex); } - if(_response) + if(response_) { - _os.endWriteEncaps(); - _os.resize(Protocol.headerSize + 4, false); // Dispatch status position. - _os.writeByte((byte)DispatchStatus.DispatchUnknownLocalException); - _os.writeString(ex.unknown); - _connection.sendResponse(_os, _compress); + os_.endWriteEncaps(); + os_.resize(Protocol.headerSize + 4, false); // Dispatch status position. + os_.writeByte((byte)DispatchStatus.DispatchUnknownLocalException); + os_.writeString(ex.unknown); + connection_.sendResponse(os_, compress_); } else { - _connection.sendNoResponse(); + connection_.sendNoResponse(); } return; @@ -362,22 +362,22 @@ namespace IceInternal { _is.endReadEncaps(); - if(_os.instance().properties().getPropertyAsIntWithDefault("Ice.Warn.Dispatch", 1) > 0) + if(os_.instance().properties().getPropertyAsIntWithDefault("Ice.Warn.Dispatch", 1) > 0) { - __warning(ex); + warning__(ex); } - if(_response) + if(response_) { - _os.endWriteEncaps(); - _os.resize(Protocol.headerSize + 4, false); // Dispatch status position. - _os.writeByte((byte)DispatchStatus.DispatchUnknownUserException); - _os.writeString(ex.unknown); - _connection.sendResponse(_os, _compress); + os_.endWriteEncaps(); + os_.resize(Protocol.headerSize + 4, false); // Dispatch status position. + os_.writeByte((byte)DispatchStatus.DispatchUnknownUserException); + os_.writeString(ex.unknown); + connection_.sendResponse(os_, compress_); } else { - _connection.sendNoResponse(); + connection_.sendNoResponse(); } return; @@ -386,22 +386,22 @@ namespace IceInternal { _is.endReadEncaps(); - if(_os.instance().properties().getPropertyAsIntWithDefault("Ice.Warn.Dispatch", 1) > 0) + if(os_.instance().properties().getPropertyAsIntWithDefault("Ice.Warn.Dispatch", 1) > 0) { - __warning(ex); + warning__(ex); } - if(_response) + if(response_) { - _os.endWriteEncaps(); - _os.resize(Protocol.headerSize + 4, false); // Dispatch status position. - _os.writeByte((byte)DispatchStatus.DispatchUnknownException); - _os.writeString(ex.unknown); - _connection.sendResponse(_os, _compress); + os_.endWriteEncaps(); + os_.resize(Protocol.headerSize + 4, false); // Dispatch status position. + os_.writeByte((byte)DispatchStatus.DispatchUnknownException); + os_.writeString(ex.unknown); + connection_.sendResponse(os_, compress_); } else { - _connection.sendNoResponse(); + connection_.sendNoResponse(); } return; @@ -410,22 +410,22 @@ namespace IceInternal { _is.endReadEncaps(); - if(_os.instance().properties().getPropertyAsIntWithDefault("Ice.Warn.Dispatch", 1) > 0) + if(os_.instance().properties().getPropertyAsIntWithDefault("Ice.Warn.Dispatch", 1) > 0) { - __warning(ex); + warning__(ex); } - if(_response) + if(response_) { - _os.endWriteEncaps(); - _os.resize(Protocol.headerSize + 4, false); // Dispatch status position. - _os.writeByte((byte)DispatchStatus.DispatchUnknownLocalException); - _os.writeString(ex.ToString()); - _connection.sendResponse(_os, _compress); + os_.endWriteEncaps(); + os_.resize(Protocol.headerSize + 4, false); // Dispatch status position. + os_.writeByte((byte)DispatchStatus.DispatchUnknownLocalException); + os_.writeString(ex.ToString()); + connection_.sendResponse(os_, compress_); } else { - _connection.sendNoResponse(); + connection_.sendNoResponse(); } return; @@ -435,22 +435,22 @@ namespace IceInternal { _is.endReadEncaps(); - if(_os.instance().properties().getPropertyAsIntWithDefault("Ice.Warn.Dispatch", 1) > 0) + if(os_.instance().properties().getPropertyAsIntWithDefault("Ice.Warn.Dispatch", 1) > 0) { - __warning(ex); + warning__(ex); } - if(_response) + if(response_) { - _os.endWriteEncaps(); - _os.resize(Protocol.headerSize + 4, false); // Dispatch status position. - _os.writeByte((byte)DispatchStatus.DispatchUnknownUserException); - _os.writeString(ex.ToString()); - _connection.sendResponse(_os, _compress); + os_.endWriteEncaps(); + os_.resize(Protocol.headerSize + 4, false); // Dispatch status position. + os_.writeByte((byte)DispatchStatus.DispatchUnknownUserException); + os_.writeString(ex.ToString()); + connection_.sendResponse(os_, compress_); } else { - _connection.sendNoResponse(); + connection_.sendNoResponse(); } return; @@ -460,22 +460,22 @@ namespace IceInternal { _is.endReadEncaps(); - if(_os.instance().properties().getPropertyAsIntWithDefault("Ice.Warn.Dispatch", 1) > 0) + if(os_.instance().properties().getPropertyAsIntWithDefault("Ice.Warn.Dispatch", 1) > 0) { - __warning(ex); + warning__(ex); } - if(_response) + if(response_) { - _os.endWriteEncaps(); - _os.resize(Protocol.headerSize + 4, false); // Dispatch status position. - _os.writeByte((byte) DispatchStatus.DispatchUnknownException); - _os.writeString(ex.ToString()); - _connection.sendResponse(_os, _compress); + os_.endWriteEncaps(); + os_.resize(Protocol.headerSize + 4, false); // Dispatch status position. + os_.writeByte((byte) DispatchStatus.DispatchUnknownException); + os_.writeString(ex.ToString()); + connection_.sendResponse(os_, compress_); } else { - _connection.sendNoResponse(); + connection_.sendNoResponse(); } return; @@ -502,9 +502,9 @@ namespace IceInternal return; } - if(_response) + if(response_) { - _os.endWriteEncaps(); + os_.endWriteEncaps(); if(status != DispatchStatus.DispatchOK && status != DispatchStatus.DispatchUserException) { @@ -512,39 +512,39 @@ namespace IceInternal status == DispatchStatus.DispatchFacetNotExist || status == DispatchStatus.DispatchOperationNotExist); - _os.resize(Protocol.headerSize + 4, false); // Dispatch status position. - _os.writeByte((byte)status); + os_.resize(Protocol.headerSize + 4, false); // Dispatch status position. + os_.writeByte((byte)status); - _current.id.__write(_os); + current_.id.write__(os_); // // For compatibility with the old FacetPath. // - if(_current.facet == null || _current.facet.Length == 0) + if(current_.facet == null || current_.facet.Length == 0) { - _os.writeStringSeq(null); + os_.writeStringSeq(null); } else { - string[] facetPath2 = { _current.facet }; - _os.writeStringSeq(facetPath2); + string[] facetPath2 = { current_.facet }; + os_.writeStringSeq(facetPath2); } - _os.writeString(_current.operation); + os_.writeString(current_.operation); } else { - int save = _os.pos(); - _os.pos(Protocol.headerSize + 4); // Dispatch status position. - _os.writeByte((byte)status); - _os.pos(save); + int save = os_.pos(); + os_.pos(Protocol.headerSize + 4); // Dispatch status position. + os_.writeByte((byte)status); + os_.pos(save); } - _connection.sendResponse(_os, _compress); + connection_.sendResponse(os_, compress_); } else { - _connection.sendNoResponse(); + connection_.sendNoResponse(); } } @@ -555,7 +555,7 @@ namespace IceInternal public BasicStream ostr() { - return _os; + return os_; } public Incoming next; // For use by Connection. diff --git a/cs/src/Ice/IncomingAsync.cs b/cs/src/Ice/IncomingAsync.cs index 9da576c7015..6cd9607a468 100755 --- a/cs/src/Ice/IncomingAsync.cs +++ b/cs/src/Ice/IncomingAsync.cs @@ -19,59 +19,59 @@ namespace IceInternal { } - protected void __response(bool ok) + protected void response__(bool ok) { try { - if(_locator != null && _servant != null) + if(locator_ != null && servant_ != null) { - _locator.finished(_current, _servant, _cookie); + locator_.finished(current_, servant_, cookie_); } - if(_response) + if(response_) { - _os.endWriteEncaps(); + os_.endWriteEncaps(); - int save = _os.pos(); - _os.pos(Protocol.headerSize + 4); // Dispatch status position. + int save = os_.pos(); + os_.pos(Protocol.headerSize + 4); // Dispatch status position. if(ok) { - _os.writeByte((byte)DispatchStatus.DispatchOK); + os_.writeByte((byte)DispatchStatus.DispatchOK); } else { - _os.writeByte((byte)DispatchStatus.DispatchUserException); + os_.writeByte((byte)DispatchStatus.DispatchUserException); } - _os.pos(save); + os_.pos(save); - _connection.sendResponse(_os, _compress); + connection_.sendResponse(os_, compress_); } else { - _connection.sendNoResponse(); + connection_.sendNoResponse(); } } catch(Ice.LocalException ex) { - _connection.exception(ex); + connection_.exception(ex); } catch(System.Exception ex) { Ice.UnknownException uex = new Ice.UnknownException(); uex.unknown = ex.ToString(); - _connection.exception(uex); + connection_.exception(uex); } } - protected internal void __exception(System.Exception exc) + protected internal void exception__(System.Exception exc) { try { - if(_locator != null && _servant != null) + if(locator_ != null && servant_ != null) { - _locator.finished(_current, _servant, _cookie); + locator_.finished(current_, servant_, cookie_); } try @@ -82,204 +82,204 @@ namespace IceInternal { if(ex.id.name == null) { - ex.id = _current.id; + ex.id = current_.id; } if(ex.facet == null) { - ex.facet = _current.facet; + ex.facet = current_.facet; } if(ex.operation == null || ex.operation.Length == 0) { - ex.operation = _current.operation; + ex.operation = current_.operation; } - if(_os.instance().properties().getPropertyAsIntWithDefault("Ice.Warn.Dispatch", 1) > 1) + if(os_.instance().properties().getPropertyAsIntWithDefault("Ice.Warn.Dispatch", 1) > 1) { - __warning(ex); + warning__(ex); } - if(_response) + if(response_) { - _os.endWriteEncaps(); - _os.resize(Protocol.headerSize + 4, false); // Dispatch status position. + os_.endWriteEncaps(); + os_.resize(Protocol.headerSize + 4, false); // Dispatch status position. if(ex is Ice.ObjectNotExistException) { - _os.writeByte((byte)DispatchStatus.DispatchObjectNotExist); + os_.writeByte((byte)DispatchStatus.DispatchObjectNotExist); } else if(ex is Ice.FacetNotExistException) { - _os.writeByte((byte)DispatchStatus.DispatchFacetNotExist); + os_.writeByte((byte)DispatchStatus.DispatchFacetNotExist); } else if(ex is Ice.OperationNotExistException) { - _os.writeByte((byte)DispatchStatus.DispatchOperationNotExist); + os_.writeByte((byte)DispatchStatus.DispatchOperationNotExist); } else { Debug.Assert(false); } - ex.id.__write(_os); + ex.id.write__(os_); // // For compatibility with the old FacetPath. // if(ex.facet == null || ex.facet.Length == 0) { - _os.writeStringSeq(null); + os_.writeStringSeq(null); } else { string[] facetPath = { ex.facet }; - _os.writeStringSeq(facetPath); + os_.writeStringSeq(facetPath); } - _os.writeString(ex.operation); + os_.writeString(ex.operation); - _connection.sendResponse(_os, _compress); + connection_.sendResponse(os_, compress_); } else { - _connection.sendNoResponse(); + connection_.sendNoResponse(); } } catch(Ice.UnknownLocalException ex) { - if(_os.instance().properties().getPropertyAsIntWithDefault("Ice.Warn.Dispatch", 1) > 0) + if(os_.instance().properties().getPropertyAsIntWithDefault("Ice.Warn.Dispatch", 1) > 0) { - __warning(ex); + warning__(ex); } - if(_response) + if(response_) { - _os.endWriteEncaps(); - _os.resize(Protocol.headerSize + 4, false); // Dispatch status position. - _os.writeByte((byte)DispatchStatus.DispatchUnknownLocalException); - _os.writeString(ex.unknown); - _connection.sendResponse(_os, _compress); + os_.endWriteEncaps(); + os_.resize(Protocol.headerSize + 4, false); // Dispatch status position. + os_.writeByte((byte)DispatchStatus.DispatchUnknownLocalException); + os_.writeString(ex.unknown); + connection_.sendResponse(os_, compress_); } else { - _connection.sendNoResponse(); + connection_.sendNoResponse(); } } catch(Ice.UnknownUserException ex) { - if(_os.instance().properties().getPropertyAsIntWithDefault("Ice.Warn.Dispatch", 1) > 0) + if(os_.instance().properties().getPropertyAsIntWithDefault("Ice.Warn.Dispatch", 1) > 0) { - __warning(ex); + warning__(ex); } - if(_response) + if(response_) { - _os.endWriteEncaps(); - _os.resize(Protocol.headerSize + 4, false); // Dispatch status position. - _os.writeByte((byte)DispatchStatus.DispatchUnknownUserException); - _os.writeString(ex.unknown); - _connection.sendResponse(_os, _compress); + os_.endWriteEncaps(); + os_.resize(Protocol.headerSize + 4, false); // Dispatch status position. + os_.writeByte((byte)DispatchStatus.DispatchUnknownUserException); + os_.writeString(ex.unknown); + connection_.sendResponse(os_, compress_); } else { - _connection.sendNoResponse(); + connection_.sendNoResponse(); } } catch(Ice.UnknownException ex) { - if(_os.instance().properties().getPropertyAsIntWithDefault("Ice.Warn.Dispatch", 1) > 0) + if(os_.instance().properties().getPropertyAsIntWithDefault("Ice.Warn.Dispatch", 1) > 0) { - __warning(ex); + warning__(ex); } - if(_response) + if(response_) { - _os.endWriteEncaps(); - _os.resize(Protocol.headerSize + 4, false); // Dispatch status position. - _os.writeByte((byte)DispatchStatus.DispatchUnknownException); - _os.writeString(ex.unknown); - _connection.sendResponse(_os, _compress); + os_.endWriteEncaps(); + os_.resize(Protocol.headerSize + 4, false); // Dispatch status position. + os_.writeByte((byte)DispatchStatus.DispatchUnknownException); + os_.writeString(ex.unknown); + connection_.sendResponse(os_, compress_); } else { - _connection.sendNoResponse(); + connection_.sendNoResponse(); } } catch(Ice.LocalException ex) { - if(_os.instance().properties().getPropertyAsIntWithDefault("Ice.Warn.Dispatch", 1) > 0) + if(os_.instance().properties().getPropertyAsIntWithDefault("Ice.Warn.Dispatch", 1) > 0) { - __warning(ex); + warning__(ex); } - if(_response) + if(response_) { - _os.endWriteEncaps(); - _os.resize(Protocol.headerSize + 4, false); // Dispatch status position. - _os.writeByte((byte)DispatchStatus.DispatchUnknownLocalException); - _os.writeString(ex.ToString()); - _connection.sendResponse(_os, _compress); + os_.endWriteEncaps(); + os_.resize(Protocol.headerSize + 4, false); // Dispatch status position. + os_.writeByte((byte)DispatchStatus.DispatchUnknownLocalException); + os_.writeString(ex.ToString()); + connection_.sendResponse(os_, compress_); } else { - _connection.sendNoResponse(); + connection_.sendNoResponse(); } } catch(Ice.UserException ex) { - if(_os.instance().properties().getPropertyAsIntWithDefault("Ice.Warn.Dispatch", 1) > 0) + if(os_.instance().properties().getPropertyAsIntWithDefault("Ice.Warn.Dispatch", 1) > 0) { - __warning(ex); + warning__(ex); } - if(_response) + if(response_) { - _os.endWriteEncaps(); - _os.resize(Protocol.headerSize + 4, false); // Dispatch status position. - _os.writeByte((byte)DispatchStatus.DispatchUnknownUserException); - _os.writeString(ex.ToString()); - _connection.sendResponse(_os, _compress); + os_.endWriteEncaps(); + os_.resize(Protocol.headerSize + 4, false); // Dispatch status position. + os_.writeByte((byte)DispatchStatus.DispatchUnknownUserException); + os_.writeString(ex.ToString()); + connection_.sendResponse(os_, compress_); } else { - _connection.sendNoResponse(); + connection_.sendNoResponse(); } } catch(System.Exception ex) { - if(_os.instance().properties().getPropertyAsIntWithDefault("Ice.Warn.Dispatch", 1) > 0) + if(os_.instance().properties().getPropertyAsIntWithDefault("Ice.Warn.Dispatch", 1) > 0) { - __warning(ex); + warning__(ex); } - if(_response) + if(response_) { - _os.endWriteEncaps(); - _os.resize(Protocol.headerSize + 4, false); // Dispatch status position. - _os.writeByte((byte)DispatchStatus.DispatchUnknownException); - _os.writeString(ex.ToString()); - _connection.sendResponse(_os, _compress); + os_.endWriteEncaps(); + os_.resize(Protocol.headerSize + 4, false); // Dispatch status position. + os_.writeByte((byte)DispatchStatus.DispatchUnknownException); + os_.writeString(ex.ToString()); + connection_.sendResponse(os_, compress_); } else { - _connection.sendNoResponse(); + connection_.sendNoResponse(); } } } catch(Ice.LocalException ex) { - _connection.exception(ex); + connection_.exception(ex); } catch(System.Exception ex) { Ice.UnknownException uex = new Ice.UnknownException(); uex.unknown = ex.ToString(); - _connection.exception(uex); + connection_.exception(uex); } } - protected internal BasicStream __os() + protected internal BasicStream os__() { - return _os; + return os_; } } } @@ -289,7 +289,7 @@ namespace Ice public interface AMD_Object_ice_invoke { - void ice_response(bool ok, byte[] outParams); + void iceresponse_(bool ok, byte[] outParams); void ice_exception(System.Exception ex); } @@ -300,23 +300,23 @@ namespace Ice { } - public void ice_response(bool ok, byte[] outParams) + public void iceresponse_(bool ok, byte[] outParams) { try { - __os().writeBlob(outParams); + os__().writeBlob(outParams); } catch(Ice.LocalException ex) { - __exception(ex); + exception__(ex); return; } - __response(ok); + response__(ok); } public void ice_exception(System.Exception ex) { - __exception(ex); + exception__(ex); } } } diff --git a/cs/src/Ice/LocatorInfo.cs b/cs/src/Ice/LocatorInfo.cs index 68ff2c41270..9715e31f7c7 100755 --- a/cs/src/Ice/LocatorInfo.cs +++ b/cs/src/Ice/LocatorInfo.cs @@ -93,7 +93,7 @@ namespace IceInternal obj = _locator.findAdapterById(adapterId); if(obj != null) { - endpoints = ((Ice.ObjectPrxHelperBase)obj).__reference().getEndpoints(); + endpoints = ((Ice.ObjectPrxHelperBase)obj).reference__().getEndpoints(); if(endpoints != null && endpoints.Length > 0) { @@ -116,7 +116,7 @@ namespace IceInternal bool endpointsCached = true; if(obj != null) { - Reference r = ((Ice.ObjectPrxHelperBase)obj).__reference(); + Reference r = ((Ice.ObjectPrxHelperBase)obj).reference__(); if(r is DirectReference) { DirectReference odr = (DirectReference)r; @@ -200,9 +200,9 @@ namespace IceInternal Ice.ObjectPrx obj = _table.removeProxy(rf.getIdentity()); if(obj != null) { - if(((Ice.ObjectPrxHelperBase)obj).__reference() is IndirectReference) + if(((Ice.ObjectPrxHelperBase)obj).reference__() is IndirectReference) { - IndirectReference oir = (IndirectReference)((Ice.ObjectPrxHelperBase)obj).__reference(); + IndirectReference oir = (IndirectReference)((Ice.ObjectPrxHelperBase)obj).reference__(); if(oir.getAdapterId().Length > 0) { clearCache(oir); @@ -213,7 +213,7 @@ namespace IceInternal if(rf.getInstance().traceLevels().location >= 2) { trace("removed endpoints from locator table", - rf, ((Ice.ObjectPrxHelperBase)obj).__reference().getEndpoints()); + rf, ((Ice.ObjectPrxHelperBase)obj).reference__().getEndpoints()); } } } @@ -236,9 +236,9 @@ namespace IceInternal Ice.ObjectPrx obj = _table.removeProxy(rf.getIdentity()); if(obj != null) { - if(((Ice.ObjectPrxHelperBase)obj).__reference() is IndirectReference) + if(((Ice.ObjectPrxHelperBase)obj).reference__() is IndirectReference) { - IndirectReference oir = (IndirectReference)((Ice.ObjectPrxHelperBase)obj).__reference(); + IndirectReference oir = (IndirectReference)((Ice.ObjectPrxHelperBase)obj).reference__(); if(oir.getAdapterId().Length > 0) { clearCache(oir); @@ -249,7 +249,7 @@ namespace IceInternal if(rf.getInstance().traceLevels().location >= 2) { trace("removed endpoints from locator table", - rf, ((Ice.ObjectPrxHelperBase)obj).__reference().getEndpoints()); + rf, ((Ice.ObjectPrxHelperBase)obj).reference__().getEndpoints()); } } } diff --git a/cs/src/Ice/Network.cs b/cs/src/Ice/Network.cs index 00d2d863382..e34225d91f9 100755 --- a/cs/src/Ice/Network.cs +++ b/cs/src/Ice/Network.cs @@ -325,7 +325,7 @@ namespace IceInternal // Set larger send buffer size to avoid performance problems on // WIN32. // - if(AssemblyUtil._platform == AssemblyUtil.Platform.Windows) + if(AssemblyUtil.platform_ == AssemblyUtil.Platform.Windows) { setSendBufferSize(socket, 64 * 1024); } @@ -373,7 +373,7 @@ namespace IceInternal // The only fix appears to be to restart the call to Connect() -- the second attempt // works and establishes the connection. // - if(ready && AssemblyUtil._runtime == AssemblyUtil.Runtime.Mono && !socket.Connected) + if(ready && AssemblyUtil.runtime_ == AssemblyUtil.Runtime.Mono && !socket.Connected) { goto repeatConnect; } @@ -745,7 +745,7 @@ namespace IceInternal // IPEndPoint localEndpoint; IPEndPoint remoteEndpoint; - if(AssemblyUtil._platform == AssemblyUtil.Platform.Windows) + if(AssemblyUtil.platform_ == AssemblyUtil.Platform.Windows) { sockaddr addr = new sockaddr(); int addrLen = 16; diff --git a/cs/src/Ice/Object.cs b/cs/src/Ice/Object.cs index a225192b719..251fadf0777 100755 --- a/cs/src/Ice/Object.cs +++ b/cs/src/Ice/Object.cs @@ -50,13 +50,13 @@ namespace Ice void ice_preMarshal(); void ice_postUnmarshal(); - IceInternal.DispatchStatus __dispatch(IceInternal.Incoming inc, Current current); + IceInternal.DispatchStatus dispatch__(IceInternal.Incoming inc, Current current); - void __write(IceInternal.BasicStream __os); - void __read(IceInternal.BasicStream __is, bool __rid); + void write__(IceInternal.BasicStream os__); + void read__(IceInternal.BasicStream is__, bool rid__); - void __write(OutputStream __outS); - void __read(InputStream __inS, bool __rid); + void write__(OutputStream outS__); + void read__(InputStream inS__, bool rid__); } public abstract class ObjectImpl : Object @@ -75,26 +75,26 @@ namespace Ice return MemberwiseClone(); } - public static readonly string[] __ids = new string[] { "::Ice::Object" }; + public static readonly string[] ids__ = new string[] { "::Ice::Object" }; public virtual bool ice_isA(string s) { - return s.Equals(__ids[0]); + return s.Equals(ids__[0]); } public virtual bool ice_isA(string s, Current current) { - return s.Equals(__ids[0]); + return s.Equals(ids__[0]); } - public static IceInternal.DispatchStatus ___ice_isA(Ice.Object __obj, IceInternal.Incoming __inS, + public static IceInternal.DispatchStatus ice_isA___(Ice.Object __obj, IceInternal.Incoming inS__, Current __current) { - IceInternal.BasicStream __is = __inS.istr(); - IceInternal.BasicStream __os = __inS.ostr(); - string __id = __is.readString(); + IceInternal.BasicStream is__ = inS__.istr(); + IceInternal.BasicStream os__ = inS__.ostr(); + string __id = is__.readString(); bool __ret = __obj.ice_isA(__id, __current); - __os.writeBool(__ret); + os__.writeBool(__ret); return IceInternal.DispatchStatus.DispatchOK; } @@ -108,7 +108,7 @@ namespace Ice // Nothing to do. } - public static IceInternal.DispatchStatus ___ice_ping(Ice.Object __obj, IceInternal.Incoming __inS, + public static IceInternal.DispatchStatus ice_ping___(Ice.Object __obj, IceInternal.Incoming inS__, Current __current) { __obj.ice_ping(__current); @@ -117,44 +117,44 @@ namespace Ice public virtual string[] ice_ids() { - return __ids; + return ids__; } public virtual string[] ice_ids(Current current) { - return __ids; + return ids__; } - public static IceInternal.DispatchStatus ___ice_ids(Ice.Object __obj, IceInternal.Incoming __inS, + public static IceInternal.DispatchStatus ice_ids___(Ice.Object __obj, IceInternal.Incoming inS__, Current __current) { - IceInternal.BasicStream __os = __inS.ostr(); - __os.writeStringSeq(__obj.ice_ids(__current)); + IceInternal.BasicStream os__ = inS__.ostr(); + os__.writeStringSeq(__obj.ice_ids(__current)); return IceInternal.DispatchStatus.DispatchOK; } public virtual string ice_id() { - return __ids[0]; + return ids__[0]; } public virtual string ice_id(Current current) { - return __ids[0]; + return ids__[0]; } - public static IceInternal.DispatchStatus ___ice_id(Ice.Object __obj, IceInternal.Incoming __inS, + public static IceInternal.DispatchStatus ice_id___(Ice.Object __obj, IceInternal.Incoming inS__, Current __current) { - IceInternal.BasicStream __os = __inS.ostr(); + IceInternal.BasicStream os__ = inS__.ostr(); string __ret = __obj.ice_id(__current); - __os.writeString(__ret); + os__.writeString(__ret); return IceInternal.DispatchStatus.DispatchOK; } public static string ice_staticId() { - return __ids[0]; + return ids__[0]; } public virtual void ice_preMarshal() @@ -165,14 +165,14 @@ namespace Ice { } - private static readonly string[] __all = new string[] + private static readonly string[] all__ = new string[] { "ice_id", "ice_ids", "ice_isA", "ice_ping" }; - public virtual IceInternal.DispatchStatus __dispatch(IceInternal.Incoming inc, Current current) + public virtual IceInternal.DispatchStatus dispatch__(IceInternal.Incoming inc, Current current) { - int pos = System.Array.BinarySearch(__all, current.operation); + int pos = System.Array.BinarySearch(all__, current.operation); if(pos < 0) { return IceInternal.DispatchStatus.DispatchOperationNotExist; @@ -182,19 +182,19 @@ namespace Ice { case 0: { - return ___ice_id(this, inc, current); + return ice_id___(this, inc, current); } case 1: { - return ___ice_ids(this, inc, current); + return ice_ids___(this, inc, current); } case 2: { - return ___ice_isA(this, inc, current); + return ice_isA___(this, inc, current); } case 3: { - return ___ice_ping(this, inc, current); + return ice_ping___(this, inc, current); } } @@ -202,92 +202,92 @@ namespace Ice return IceInternal.DispatchStatus.DispatchOperationNotExist; } - public virtual void __write(IceInternal.BasicStream __os) + public virtual void write__(IceInternal.BasicStream os__) { - __os.writeTypeId(ice_staticId()); - __os.startWriteSlice(); - __os.writeSize(0); // For compatibility with the old AFM. - __os.endWriteSlice(); + os__.writeTypeId(ice_staticId()); + os__.startWriteSlice(); + os__.writeSize(0); // For compatibility with the old AFM. + os__.endWriteSlice(); } - public virtual void __read(IceInternal.BasicStream __is, bool __rid) + public virtual void read__(IceInternal.BasicStream is__, bool rid__) { - if(__rid) + if(rid__) { - /* string myId = */ __is.readTypeId(); + /* string myId = */ is__.readTypeId(); } - __is.startReadSlice(); + is__.startReadSlice(); // For compatibility with the old AFM. - int sz = __is.readSize(); + int sz = is__.readSize(); if(sz != 0) { throw new MarshalException(); } - __is.endReadSlice(); + is__.endReadSlice(); } - public virtual void __write(OutputStream __outS) + public virtual void write__(OutputStream outS__) { - __outS.writeTypeId(ice_staticId()); - __outS.startSlice(); - __outS.writeSize(0); // For compatibility with the old AFM. - __outS.endSlice(); + outS__.writeTypeId(ice_staticId()); + outS__.startSlice(); + outS__.writeSize(0); // For compatibility with the old AFM. + outS__.endSlice(); } - public virtual void __read(InputStream __inS, bool __rid) + public virtual void read__(InputStream inS__, bool rid__) { - if(__rid) + if(rid__) { - /* string myId = */ __inS.readTypeId(); + /* string myId = */ inS__.readTypeId(); } - __inS.startSlice(); + inS__.startSlice(); // For compatibility with the old AFM. - int sz = __inS.readSize(); + int sz = inS__.readSize(); if(sz != 0) { throw new MarshalException(); } - __inS.endSlice(); + inS__.endSlice(); } - private static string
- operationModeToString(OperationMode mode)
- {
- if(mode == Ice.OperationMode.Normal)
- {
- return "::Ice::Normal";
- }
- if(mode == Ice.OperationMode.Nonmutating)
- {
- return "::Ice::Nonmutating";
- }
-
- if(mode == Ice.OperationMode.Idempotent)
- {
- return "::Ice::Idempotent";
- }
-
- return "???";
- }
-
- protected static void
- __checkMode(OperationMode expected, OperationMode received)
- {
- if(expected != received)
- {
- Ice.MarshalException ex = new Ice.MarshalException();
- ex.reason = "unexpected operation mode. expected = "
- + operationModeToString(expected) + " received = "
- + operationModeToString(received);
- throw ex;
- }
+ private static string + operationModeToString(OperationMode mode) + { + if(mode == Ice.OperationMode.Normal) + { + return "::Ice::Normal"; + } + if(mode == Ice.OperationMode.Nonmutating) + { + return "::Ice::Nonmutating"; + } + + if(mode == Ice.OperationMode.Idempotent) + { + return "::Ice::Idempotent"; + } + + return "???"; + } + + protected static void + checkMode__(OperationMode expected, OperationMode received) + { + if(expected != received) + { + Ice.MarshalException ex = new Ice.MarshalException(); + ex.reason = "unexpected operation mode. expected = " + + operationModeToString(expected) + " received = " + + operationModeToString(received); + throw ex; + } } public static Ice.Current defaultCurrent = new Ice.Current(); } @@ -297,7 +297,7 @@ namespace Ice // Returns true if ok, false if user exception. public abstract bool ice_invoke(byte[] inParams, out byte[] outParams, Current current); - public override IceInternal.DispatchStatus __dispatch(IceInternal.Incoming inc, Current current) + public override IceInternal.DispatchStatus dispatch__(IceInternal.Incoming inc, Current current) { byte[] inParams; byte[] outParams; @@ -323,7 +323,7 @@ namespace Ice { public abstract void ice_invoke_async(AMD_Object_ice_invoke cb, byte[] inParams, Current current); - public override IceInternal.DispatchStatus __dispatch(IceInternal.Incoming inc, Current current) + public override IceInternal.DispatchStatus dispatch__(IceInternal.Incoming inc, Current current) { byte[] inParams; int sz = inc.istr().getReadEncapsSize(); diff --git a/cs/src/Ice/ObjectAdapterFactory.cs b/cs/src/Ice/ObjectAdapterFactory.cs index 0b5a4418474..2f211024659 100755 --- a/cs/src/Ice/ObjectAdapterFactory.cs +++ b/cs/src/Ice/ObjectAdapterFactory.cs @@ -26,14 +26,14 @@ namespace IceInternal // Ignore shutdown requests if the object adapter factory has // already been shut down. // - if(_instance == null) + if(instance_ == null) { return; } adapters = _adapters; - _instance = null; + instance_ = null; _communicator = null; System.Threading.Monitor.PulseAll(this); @@ -56,7 +56,7 @@ namespace IceInternal // // First we wait for the shutdown of the factory itself. // - while(_instance != null) + while(instance_ != null) { System.Threading.Monitor.Wait(this); } @@ -105,7 +105,7 @@ namespace IceInternal { lock(this) { - if(_instance == null) + if(instance_ == null) { throw new Ice.ObjectAdapterDeactivatedException(); } @@ -119,7 +119,7 @@ namespace IceInternal throw ex; } - adapter = new Ice.ObjectAdapterI(_instance, _communicator, name, endpoints); + adapter = new Ice.ObjectAdapterI(instance_, _communicator, name, endpoints); _adapters[name] = adapter; return adapter; } @@ -129,7 +129,7 @@ namespace IceInternal { lock(this) { - if(_instance == null) + if(instance_ == null) { return null; } @@ -176,7 +176,7 @@ namespace IceInternal // internal ObjectAdapterFactory(Instance instance, Ice.Communicator communicator) { - _instance = instance; + instance_ = instance; _communicator = communicator; _adapters = new Hashtable(); _waitForShutdown = false; @@ -187,7 +187,7 @@ namespace IceInternal { lock(this) { - IceUtil.Assert.FinalizerAssert(_instance == null); + IceUtil.Assert.FinalizerAssert(instance_ == null); IceUtil.Assert.FinalizerAssert(_communicator == null); IceUtil.Assert.FinalizerAssert(_adapters == null); IceUtil.Assert.FinalizerAssert(!_waitForShutdown); @@ -195,7 +195,7 @@ namespace IceInternal } #endif - private Instance _instance; + private Instance instance_; private Ice.Communicator _communicator; private Hashtable _adapters; private bool _waitForShutdown; diff --git a/cs/src/Ice/ObjectAdapterI.cs b/cs/src/Ice/ObjectAdapterI.cs index 5624a3e2efa..ae4b05d0e1f 100755 --- a/cs/src/Ice/ObjectAdapterI.cs +++ b/cs/src/Ice/ObjectAdapterI.cs @@ -52,19 +52,19 @@ namespace Ice locatorRegistry = _locatorInfo.getLocatorRegistry(); } - registerProcess = _instance.properties().getPropertyAsInt(_name + ".RegisterProcess") > 0; - serverId = _instance.properties().getProperty("Ice.ServerId"); - printAdapterReady = _instance.properties().getPropertyAsInt("Ice.PrintAdapterReady") > 0; + registerProcess = instance_.properties().getPropertyAsInt(_name + ".RegisterProcess") > 0; + serverId = instance_.properties().getProperty("Ice.ServerId"); + printAdapterReady = instance_.properties().getPropertyAsInt("Ice.PrintAdapterReady") > 0; if(registerProcess && locatorRegistry == null) { - _instance.logger().warning("object adapter `" + _name + "' cannot register the process " + + instance_.logger().warning("object adapter `" + _name + "' cannot register the process " + "without alocator registry"); registerProcess = false; } else if(registerProcess && serverId.Length == 0) { - _instance.logger().warning("object adapter `" + _name + "' cannot register the process " + + instance_.logger().warning("object adapter `" + _name + "' cannot register the process " + "without a value for Ice.ServerId"); registerProcess = false; } @@ -200,7 +200,7 @@ namespace Ice } incomingConnectionFactories = new ArrayList(_incomingConnectionFactories); - outgoingConnectionFactory = _instance.outgoingConnectionFactory(); + outgoingConnectionFactory = instance_.outgoingConnectionFactory(); _deactivated = true; @@ -307,7 +307,7 @@ namespace Ice // // Remove object references (some of them cyclic). // - _instance = null; + instance_ = null; _threadPool = null; _servantManager = null; _communicator = null; @@ -414,7 +414,7 @@ namespace Ice { checkForDeactivation(); - IceInternal.Reference @ref = ((ObjectPrxHelperBase)proxy).__reference(); + IceInternal.Reference @ref = ((ObjectPrxHelperBase)proxy).reference__(); return findFacet(@ref.getIdentity(), @ref.getFacet()); } } @@ -493,9 +493,9 @@ namespace Ice { connections.CopyTo(arr, 0); } - IceInternal.Reference @ref = _instance.referenceFactory().create( + IceInternal.Reference @ref = instance_.referenceFactory().create( ident, new Ice.Context(), "", IceInternal.Reference.Mode.ModeTwoway, arr); - return _instance.proxyFactory().referenceToProxy(@ref); + return instance_.proxyFactory().referenceToProxy(@ref); } } @@ -505,7 +505,7 @@ namespace Ice { checkForDeactivation(); - IceInternal.RouterInfo routerInfo = _instance.routerManager().get(router); + IceInternal.RouterInfo routerInfo = instance_.routerManager().get(router); if(routerInfo != null) { _routerInfos.Add(routerInfo); @@ -515,7 +515,7 @@ namespace Ice // adapter. // ObjectPrxHelperBase proxy = (ObjectPrxHelperBase)routerInfo.getServerProxy(); - IceInternal.EndpointI[] endpoints = proxy.__reference().getEndpoints(); + IceInternal.EndpointI[] endpoints = proxy.reference__().getEndpoints(); for(int i = 0; i < endpoints.Length; ++i) { _routerEndpoints.Add(endpoints[i]); @@ -551,7 +551,7 @@ namespace Ice // router's client proxy to use this object adapter for // callbacks. // - _instance.outgoingConnectionFactory().setRouterInfo(routerInfo); + instance_.outgoingConnectionFactory().setRouterInfo(routerInfo); } } } @@ -562,7 +562,7 @@ namespace Ice { checkForDeactivation(); - IceInternal.RouterInfo routerInfo = _instance.routerManager().erase(router); + IceInternal.RouterInfo routerInfo = instance_.routerManager().erase(router); if(routerInfo != null) { // @@ -577,7 +577,7 @@ namespace Ice continue; } ObjectPrxHelperBase proxy = (ObjectPrxHelperBase)routerInfo.getServerProxy(); - IceInternal.EndpointI[] endpoints = proxy.__reference().getEndpoints(); + IceInternal.EndpointI[] endpoints = proxy.reference__().getEndpoints(); for(int i = 0; i < endpoints.Length; ++i) { _routerEndpoints.Add(endpoints[i]); @@ -613,7 +613,7 @@ namespace Ice // router's client proxy to use this object adapter for // callbacks. // - _instance.outgoingConnectionFactory().setRouterInfo(routerInfo); + instance_.outgoingConnectionFactory().setRouterInfo(routerInfo); } } } @@ -624,7 +624,7 @@ namespace Ice { checkForDeactivation(); - _locatorInfo = _instance.locatorManager().get(locator); + _locatorInfo = instance_.locatorManager().get(locator); } } @@ -651,7 +651,7 @@ namespace Ice { checkForDeactivation(); - IceInternal.Reference r = ((ObjectPrxHelperBase)proxy).__reference(); + IceInternal.Reference r = ((ObjectPrxHelperBase)proxy).reference__(); IceInternal.EndpointI[] endpoints = r.getEndpoints(); try @@ -737,7 +737,7 @@ namespace Ice { // Not check for deactivation here! - Debug.Assert(_instance != null); // Must not be called after waitForDeactivate(). + Debug.Assert(instance_ != null); // Must not be called after waitForDeactivate(). Debug.Assert(_directCount > 0); if(--_directCount == 0) @@ -749,13 +749,13 @@ namespace Ice public IceInternal.ThreadPool getThreadPool() { - // No mutex lock necessary, _threadPool and _instance are + // No mutex lock necessary, _threadPool and instance_ are // immutable after creation until they are removed in // waitForDeactivate(). // Not check for deactivation here! - Debug.Assert(_instance != null); // Must not be called after waitForDeactivate(). + Debug.Assert(instance_ != null); // Must not be called after waitForDeactivate(). if(_threadPool != null) { @@ -763,20 +763,20 @@ namespace Ice } else { - return _instance.serverThreadPool(); + return instance_.serverThreadPool(); } } public IceInternal.ServantManager getServantManager() { - // No mutex lock necessary, _threadPool and _instance are + // No mutex lock necessary, _threadPool and instance_ are // immutable after creation until they are removed in // waitForDeactivate(). // Not check for deactivation here! - Debug.Assert(_instance != null); // Must not be called after waitForDeactivate(). + Debug.Assert(instance_ != null); // Must not be called after waitForDeactivate(). return _servantManager; } @@ -788,7 +788,7 @@ namespace Ice string endpointInfo) { _deactivated = false; - _instance = instance; + instance_ = instance; _communicator = communicator; _servantManager = new IceInternal.ServantManager(instance, name); _printAdapterReadyDone = false; @@ -818,32 +818,32 @@ namespace Ice // Parse published endpoints. These are used in proxies // instead of the connection factory endpoints. // - string endpts = _instance.properties().getProperty(name + ".PublishedEndpoints"); + string endpts = instance_.properties().getProperty(name + ".PublishedEndpoints"); _publishedEndpoints = parseEndpoints(endpts); - string router = _instance.properties().getProperty(name + ".Router"); + string router = instance_.properties().getProperty(name + ".Router"); if(router.Length > 0) { - addRouter(RouterPrxHelper.uncheckedCast(_instance.proxyFactory().stringToProxy(router))); + addRouter(RouterPrxHelper.uncheckedCast(instance_.proxyFactory().stringToProxy(router))); } - string locator = _instance.properties().getProperty(name + ".Locator"); + string locator = instance_.properties().getProperty(name + ".Locator"); if(locator.Length > 0) { - setLocator(LocatorPrxHelper.uncheckedCast(_instance.proxyFactory().stringToProxy(locator))); + setLocator(LocatorPrxHelper.uncheckedCast(instance_.proxyFactory().stringToProxy(locator))); } else { - setLocator(_instance.referenceFactory().getDefaultLocator()); + setLocator(instance_.referenceFactory().getDefaultLocator()); } - if(!_instance.threadPerConnection()) + if(!instance_.threadPerConnection()) { - int size = _instance.properties().getPropertyAsInt(_name + ".ThreadPool.Size"); - int sizeMax = _instance.properties().getPropertyAsInt(_name + ".ThreadPool.SizeMax"); + int size = instance_.properties().getPropertyAsInt(_name + ".ThreadPool.Size"); + int sizeMax = instance_.properties().getPropertyAsInt(_name + ".ThreadPool.SizeMax"); if(size > 0 || sizeMax > 0) { - _threadPool = new IceInternal.ThreadPool(_instance, _name + ".ThreadPool", 0); + _threadPool = new IceInternal.ThreadPool(instance_, _name + ".ThreadPool", 0); } } } @@ -864,18 +864,18 @@ namespace Ice { if(!Environment.HasShutdownStarted) { - _instance.logger().warning("object adapter `" + _name + "' has not been deactivated"); + instance_.logger().warning("object adapter `" + _name + "' has not been deactivated"); } else { Console.Error.WriteLine("object adapter `" + _name + "' has not been deactivated"); } } - else if(_instance != null) + else if(instance_ != null) { if(!Environment.HasShutdownStarted) { - _instance.logger().warning("object adapter `" + _name + + instance_.logger().warning("object adapter `" + _name + "' deactivation had not been waited for"); } else @@ -909,12 +909,12 @@ namespace Ice // proxy for the reference. // IceInternal.Reference reference = - _instance.referenceFactory().create(ident, _instance.getDefaultContext(), facet, + instance_.referenceFactory().create(ident, instance_.getDefaultContext(), facet, IceInternal.Reference.Mode.ModeTwoway, false, _id, null, _locatorInfo, - _instance.defaultsAndOverrides(). + instance_.defaultsAndOverrides(). defaultCollocationOptimization); - return _instance.proxyFactory().referenceToProxy(reference); + return instance_.proxyFactory().referenceToProxy(reference); } } @@ -961,11 +961,11 @@ namespace Ice // Create a reference and return a proxy for this reference. // IceInternal.Reference reference = - _instance.referenceFactory().create(ident, _instance.getDefaultContext(), facet, + instance_.referenceFactory().create(ident, instance_.getDefaultContext(), facet, IceInternal.Reference.Mode.ModeTwoway, false, endpoints, - null, _instance.defaultsAndOverrides(). + null, instance_.defaultsAndOverrides(). defaultCollocationOptimization); - return _instance.proxyFactory().referenceToProxy(reference); + return instance_.proxyFactory().referenceToProxy(reference); } private void checkForDeactivation() @@ -1024,7 +1024,7 @@ namespace Ice } string s = endpts.Substring(beg, (end) - (beg)); - IceInternal.EndpointI endp = _instance.endpointFactoryManager().create(s); + IceInternal.EndpointI endp = instance_.endpointFactoryManager().create(s); if(endp == null) { Ice.EndpointParseException e2 = new Ice.EndpointParseException(); @@ -1039,7 +1039,7 @@ namespace Ice return endpoints; } - private sealed class ProcessI : _ProcessDisp + private sealed class ProcessI : ProcessDisp_ { public ProcessI(Communicator communicator) { @@ -1073,7 +1073,7 @@ namespace Ice } private bool _deactivated; - private IceInternal.Instance _instance; + private IceInternal.Instance instance_; private Communicator _communicator; private IceInternal.ThreadPool _threadPool; private IceInternal.ServantManager _servantManager; diff --git a/cs/src/Ice/ObjectReader.cs b/cs/src/Ice/ObjectReader.cs index 412dfc73e1a..1b0bbfce58c 100644 --- a/cs/src/Ice/ObjectReader.cs +++ b/cs/src/Ice/ObjectReader.cs @@ -15,15 +15,15 @@ namespace Ice { public abstract void read(InputStream inStream, bool rid); - public override void __write(IceInternal.BasicStream os) + public override void write__(IceInternal.BasicStream os) { Debug.Assert(false); } - public override void __read(IceInternal.BasicStream istr, bool rid) + public override void read__(IceInternal.BasicStream istr, bool rid) { IceInternal.BasicInputStream bis = (IceInternal.BasicInputStream)istr; - read(bis._in, rid); + read(bis.in_, rid); } } } diff --git a/cs/src/Ice/ObjectWriter.cs b/cs/src/Ice/ObjectWriter.cs index 2a37dc556ff..420d72be7e4 100644 --- a/cs/src/Ice/ObjectWriter.cs +++ b/cs/src/Ice/ObjectWriter.cs @@ -15,13 +15,13 @@ namespace Ice { { public abstract void write(OutputStream outStream); - public override void __write(IceInternal.BasicStream os) + public override void write__(IceInternal.BasicStream os) { IceInternal.BasicOutputStream bos = (IceInternal.BasicOutputStream)os; - write(bos._out); + write(bos.out_); } - public override void __read(IceInternal.BasicStream istr, bool rid) + public override void read__(IceInternal.BasicStream istr, bool rid) { Debug.Assert(false); } diff --git a/cs/src/Ice/Outgoing.cs b/cs/src/Ice/Outgoing.cs index 2bc2550a270..96e184c7c36 100755 --- a/cs/src/Ice/Outgoing.cs +++ b/cs/src/Ice/Outgoing.cs @@ -293,7 +293,7 @@ namespace IceInternal } ex.id = new Ice.Identity(); - ex.id.__read(_is); + ex.id.read__(_is); // // For compatibility with the old FacetPath. @@ -416,7 +416,7 @@ namespace IceInternal try { - _reference.getIdentity().__write(_os); + _reference.getIdentity().write__(_os); // // For compatibility with the old FacetPath. @@ -483,7 +483,7 @@ namespace IceInternal private bool _compress; // Immutable after construction - public Outgoing next; // For use by Ice._ObjectDelM + public Outgoing next; // For use by Ice.ObjectDelM_ } } diff --git a/cs/src/Ice/OutgoingAsync.cs b/cs/src/Ice/OutgoingAsync.cs index 1a502c3f783..8541ed575c7 100755 --- a/cs/src/Ice/OutgoingAsync.cs +++ b/cs/src/Ice/OutgoingAsync.cs @@ -19,7 +19,7 @@ namespace IceInternal { public abstract void ice_exception(Ice.Exception ex); - public void __finished(BasicStream istr) + public void finished__(BasicStream istr) { lock(_monitor) { @@ -27,16 +27,16 @@ namespace IceInternal try { - __is.swap(istr); + is__.swap(istr); - status = (DispatchStatus)__is.readByte(); + status = (DispatchStatus)is__.readByte(); switch(status) { case DispatchStatus.DispatchOK: case DispatchStatus.DispatchUserException: { - __is.startReadEncaps(); + is__.startReadEncaps(); break; } @@ -45,12 +45,12 @@ namespace IceInternal case DispatchStatus.DispatchOperationNotExist: { Ice.Identity id = new Ice.Identity(); - id.__read(__is); + id.read__(is__); // // For compatibility with the old FacetPath. // - string[] facetPath = __is.readStringSeq(); + string[] facetPath = is__.readStringSeq(); string facet; if(facetPath.Length > 0) { @@ -65,7 +65,7 @@ namespace IceInternal facet = ""; } - string operation = __is.readString(); + string operation = is__.readString(); Ice.RequestFailedException ex = null; switch(status) @@ -105,7 +105,7 @@ namespace IceInternal case DispatchStatus.DispatchUnknownLocalException: case DispatchStatus.DispatchUnknownUserException: { - string unknown = __is.readString(); + string unknown = is__.readString(); Ice.UnknownException ex = null; switch(status) @@ -143,7 +143,7 @@ namespace IceInternal } catch(Ice.LocalException ex) { - __finished(ex); + finished__(ex); return; } @@ -151,7 +151,7 @@ namespace IceInternal try { - __response(status == DispatchStatus.DispatchOK); + response__(status == DispatchStatus.DispatchOK); } catch(System.Exception ex) { @@ -164,7 +164,7 @@ namespace IceInternal } } - public void __finished(Ice.LocalException exc) + public void finished__(Ice.LocalException exc) { lock(_monitor) { @@ -210,7 +210,7 @@ namespace IceInternal if(doRetry) { _connection = null; - __send(); + send__(); return; } } @@ -230,7 +230,7 @@ namespace IceInternal } } - public bool __timedOut() + public bool timedOut__() { long absoluteTimeoutMillis; @@ -249,7 +249,7 @@ namespace IceInternal } } - protected void __prepare(Ice.ObjectPrx prx, string operation, Ice.OperationMode mode, Ice.Context context) + protected void prepare__(Ice.ObjectPrx prx, string operation, Ice.OperationMode mode, Ice.Context context) { lock(_monitor) { @@ -264,15 +264,15 @@ namespace IceInternal Monitor.Wait(_monitor); } - _reference = ((Ice.ObjectPrxHelperBase)prx).__reference();; + _reference = ((Ice.ObjectPrxHelperBase)prx).reference__();; Debug.Assert(_connection == null); _connection = _reference.getConnection(out _compress); _cnt = 0; _mode = mode; - Debug.Assert(__is == null); - __is = new BasicStream(_reference.getInstance()); - Debug.Assert(__os == null); - __os = new BasicStream(_reference.getInstance()); + Debug.Assert(is__ == null); + is__ = new BasicStream(_reference.getInstance()); + Debug.Assert(os__ == null); + os__ = new BasicStream(_reference.getInstance()); // // If we are using a router, then add the proxy to the router info object. @@ -290,9 +290,9 @@ namespace IceInternal { } - _connection.prepareRequest(__os); + _connection.prepareRequest(os__); - _reference.getIdentity().__write(__os); + _reference.getIdentity().write__(os__); // // For compatibility with the old FacetPath. @@ -300,37 +300,37 @@ namespace IceInternal string facet = _reference.getFacet(); if(facet == null || facet.Length == 0) { - __os.writeStringSeq(null); + os__.writeStringSeq(null); } else { string[] facetPath = { facet }; - __os.writeStringSeq(facetPath); + os__.writeStringSeq(facetPath); } - __os.writeString(operation); + os__.writeString(operation); - __os.writeByte((byte)mode); + os__.writeByte((byte)mode); if(context == null) { - __os.writeSize(0); + os__.writeSize(0); } else { int sz = context.Count; - __os.writeSize(sz); + os__.writeSize(sz); if(sz > 0) { foreach(DictionaryEntry e in context) { - __os.writeString((string)e.Key); - __os.writeString((string)e.Value); + os__.writeString((string)e.Key); + os__.writeString((string)e.Value); } } } - __os.startWriteEncaps(); + os__.startWriteEncaps(); } catch(Ice.LocalException ex) { @@ -340,7 +340,7 @@ namespace IceInternal } } - protected void __send() + protected void send__() { lock(_monitor) { @@ -367,12 +367,12 @@ namespace IceInternal try { - _connection.sendAsyncRequest(__os, this, _compress); + _connection.sendAsyncRequest(os__, this, _compress); // // Don't do anything after sendAsyncRequest() returned // without an exception. I such case, there will be - // callbacks, i.e., calls to the __finished() + // callbacks, i.e., calls to the finished__() // functions. Since there is no mutex protection, we // cannot modify state here and in such callbacks. // @@ -396,12 +396,12 @@ namespace IceInternal } catch(Ice.LocalException ex) { - __finished(ex); + finished__(ex); } } } - protected abstract void __response(bool ok); + protected abstract void response__(bool ok); private void warning(System.Exception ex) { @@ -418,14 +418,14 @@ namespace IceInternal { _reference = null; _connection = null; - __is = null; - __os = null; + is__ = null; + os__ = null; Monitor.Pulse(_monitor); } - protected BasicStream __is; - protected BasicStream __os; + protected BasicStream is__; + protected BasicStream os__; private Reference _reference; private Ice.ConnectionI _connection; @@ -449,34 +449,34 @@ namespace Ice public abstract void ice_response(bool ok, byte[] outParams); public abstract override void ice_exception(Ice.Exception ex); - public void __invoke(Ice.ObjectPrx prx, string operation, OperationMode mode, + public void invoke__(Ice.ObjectPrx prx, string operation, OperationMode mode, byte[] inParams, Ice.Context context) { try { - __prepare(prx, operation, mode, context); - __os.writeBlob(inParams); - __os.endWriteEncaps(); + prepare__(prx, operation, mode, context); + os__.writeBlob(inParams); + os__.endWriteEncaps(); } catch(LocalException ex) { - __finished(ex); + finished__(ex); return; } - __send(); + send__(); } - protected override void __response(bool ok) // ok == true means no user exception. + protected override void response__(bool ok) // ok == true means no user exception. { byte[] outParams; try { - int sz = __is.getReadEncapsSize(); - outParams = __is.readBlob(sz); + int sz = is__.getReadEncapsSize(); + outParams = is__.readBlob(sz); } catch(LocalException ex) { - __finished(ex); + finished__(ex); return; } ice_response(ok, outParams); diff --git a/cs/src/Ice/OutputBase.cs b/cs/src/Ice/OutputBase.cs index 6aab0fedabe..40a59981356 100755 --- a/cs/src/Ice/OutputBase.cs +++ b/cs/src/Ice/OutputBase.cs @@ -19,49 +19,49 @@ public class OutputBase public OutputBase() { - _out = null; - _pos = 0; - _indent = 0; - _indentSize = 4; - _useTab = true; - _indentSave = new Stack(); - _separator = true; + out_ = null; + pos_ = 0; + indent_ = 0; + indentSize_ = 4; + useTab_ = true; + indentSave_ = new Stack(); + separator_ = true; } public OutputBase(TextWriter writer) { - _out = writer; - _pos = 0; - _indent = 0; - _indentSize = 4; - _useTab = true; - _indentSave = new Stack(); - _separator = true; + out_ = writer; + pos_ = 0; + indent_ = 0; + indentSize_ = 4; + useTab_ = true; + indentSave_ = new Stack(); + separator_ = true; } public OutputBase(string s) { - _out = new StreamWriter(s); - _pos = 0; - _indent = 0; - _indentSize = 4; - _useTab = true; - _indentSave = new Stack(); - _separator = true; + out_ = new StreamWriter(s); + pos_ = 0; + indent_ = 0; + indentSize_ = 4; + useTab_ = true; + indentSave_ = new Stack(); + separator_ = true; } virtual public void setIndent(int indentSize) { - _indentSize = indentSize; + indentSize_ = indentSize; } virtual public void setUseTab(bool useTab) { - _useTab = useTab; + useTab_ = useTab; } public virtual void @@ -69,7 +69,7 @@ public class OutputBase { try { - _out = new StreamWriter(s); + out_ = new StreamWriter(s); } catch(IOException) { @@ -84,110 +84,110 @@ public class OutputBase { if(arr[i] == '\n') { - _pos = 0; + pos_ = 0; } else { } } - _out.Write(s); + out_.Write(s); } public virtual void inc() { - _indent += _indentSize; + indent_ += indentSize_; } public virtual void dec() { - Debug.Assert(_indent >= _indentSize); - _indent -= _indentSize; + Debug.Assert(indent_ >= indentSize_); + indent_ -= indentSize_; } public virtual void useCurrentPosAsIndent() { - _indentSave.Push(_indent); - _indent = _pos; + indentSave_.Push(indent_); + indent_ = pos_; } public virtual void zeroIndent() { - _indentSave.Push(_indent); - _indent = 0; + indentSave_.Push(indent_); + indent_ = 0; } public virtual void restoreIndent() { - Debug.Assert(_indentSave.Count != 0); - _indent = (int)_indentSave.Pop(); + Debug.Assert(indentSave_.Count != 0); + indent_ = (int)indentSave_.Pop(); } public virtual void nl() { - _out.WriteLine(); - _pos = 0; - _separator = true; + out_.WriteLine(); + pos_ = 0; + separator_ = true; - int indent = _indent; + int indent = indent_; - if(_useTab) + if(useTab_) { while(indent >= 8) { indent -= 8; - _out.Write('\t'); - _pos += 8; + out_.Write('\t'); + pos_ += 8; } } else { - while(indent >= _indentSize) + while(indent >= indentSize_) { - indent -= _indentSize; - _out.Write(" "); - _pos += _indentSize; + indent -= indentSize_; + out_.Write(" "); + pos_ += indentSize_; } } while(indent > 0) { --indent; - _out.Write(" "); - ++_pos; + out_.Write(" "); + ++pos_; } - _out.Flush(); + out_.Flush(); } public virtual void sp() { - if(_separator) + if(separator_) { - _out.WriteLine(); + out_.WriteLine(); } } public virtual bool valid() { - return _out != null; + return out_ != null; } - protected internal TextWriter _out; - protected internal int _pos; - protected internal int _indent; - protected internal int _indentSize; - protected internal Stack _indentSave; - protected internal bool _useTab; - protected internal bool _separator; + protected internal TextWriter out_; + protected internal int pos_; + protected internal int indent_; + protected internal int indentSize_; + protected internal Stack indentSave_; + protected internal bool useTab_; + protected internal bool separator_; } } diff --git a/cs/src/Ice/Patcher.cs b/cs/src/Ice/Patcher.cs index 030488b6f3f..93dc4dc8b8e 100755 --- a/cs/src/Ice/Patcher.cs +++ b/cs/src/Ice/Patcher.cs @@ -21,15 +21,15 @@ namespace IceInternal public Patcher(System.Type type) { - _type = type; + type_ = type; } public abstract void patch(Ice.Object v); public virtual string type() { - Debug.Assert(_type != null); - return _type.FullName; + Debug.Assert(type_ != null); + return type_.FullName; } public virtual void invoke(Ice.Object v) @@ -37,7 +37,7 @@ namespace IceInternal patch(v); } - protected System.Type _type; + protected System.Type type_; } public sealed class ParamPatcher : Patcher @@ -48,8 +48,8 @@ namespace IceInternal public override void patch(Ice.Object v) { - Debug.Assert(_type != null); - if(!_type.IsInstanceOfType(v)) + Debug.Assert(type_ != null); + if(!type_.IsInstanceOfType(v)) { throw new System.InvalidCastException("expected element of type " + type() + " but received " + v.GetType().FullName); diff --git a/cs/src/Ice/PropertiesI.cs b/cs/src/Ice/PropertiesI.cs index 7d3f216e550..6c4b2735165 100755 --- a/cs/src/Ice/PropertiesI.cs +++ b/cs/src/Ice/PropertiesI.cs @@ -229,7 +229,7 @@ namespace Ice } } - public Properties _Ice_clone() + public Properties ice_clone_() { lock(this) { diff --git a/cs/src/Ice/Proxy.cs b/cs/src/Ice/Proxy.cs index 46daa7a8c4b..874fee916d6 100644 --- a/cs/src/Ice/Proxy.cs +++ b/cs/src/Ice/Proxy.cs @@ -22,22 +22,22 @@ namespace Ice string ice_toString(); - bool ice_isA(string __id); - bool ice_isA(string __id, Context __context); + bool ice_isA(string id__); + bool ice_isA(string id__, Context context__); void ice_ping(); - void ice_ping(Context __context); + void ice_ping(Context context__); string[] ice_ids(); - string[] ice_ids(Context __context); + string[] ice_ids(Context context__); string ice_id(); - string ice_id(Context __context); + string ice_id(Context context__); // Returns true if ok, false if user exception. bool ice_invoke(string operation, OperationMode mode, byte[] inParams, out byte[] outParams); bool ice_invoke(string operation, OperationMode mode, byte[] inParams, out byte[] outParams, - Context __context); + Context context__); void ice_invoke_async(AMI_Object_ice_invoke cb, string operation, OperationMode mode, byte[] inParams); void ice_invoke_async(AMI_Object_ice_invoke cb, string operation, OperationMode mode, byte[] inParams, @@ -108,29 +108,29 @@ namespace Ice return ToString(); } - public bool ice_isA(string __id) + public bool ice_isA(string id__) { - return ice_isA(__id, _reference.getContext()); + return ice_isA(id__, _reference.getContext()); } - public bool ice_isA(string __id, Context __context) + public bool ice_isA(string id__, Context context__) { - int __cnt = 0; + int cnt__ = 0; while(true) { try { - __checkTwowayOnly("ice_isA"); - _ObjectDel __del = __getDelegate(); - return __del.ice_isA(__id, __context); + checkTwowayOnly__("ice_isA"); + ObjectDel_ del__ = getDelegate__(); + return del__.ice_isA(id__, context__); } - catch(IceInternal.NonRepeatable __ex) + catch(IceInternal.NonRepeatable ex__) { - __cnt = __handleException(__ex.get(), __cnt); + cnt__ = handleException__(ex__.get(), cnt__); } - catch(LocalException __ex) + catch(LocalException ex__) { - __cnt = __handleException(__ex, __cnt); + cnt__ = handleException__(ex__, cnt__); } } } @@ -140,25 +140,25 @@ namespace Ice ice_ping(_reference.getContext()); } - public void ice_ping(Context __context) + public void ice_ping(Context context__) { - int __cnt = 0; + int cnt__ = 0; while(true) { try { - __checkTwowayOnly("ice_ping"); - _ObjectDel __del = __getDelegate(); - __del.ice_ping(__context); + checkTwowayOnly__("ice_ping"); + ObjectDel_ del__ = getDelegate__(); + del__.ice_ping(context__); return; } - catch(IceInternal.NonRepeatable __ex) + catch(IceInternal.NonRepeatable ex__) { - __cnt = __handleException(__ex.get(), __cnt); + cnt__ = handleException__(ex__.get(), cnt__); } - catch(LocalException __ex) + catch(LocalException ex__) { - __cnt = __handleException(__ex, __cnt); + cnt__ = handleException__(ex__, cnt__); } } } @@ -168,24 +168,24 @@ namespace Ice return ice_ids(_reference.getContext()); } - public string[] ice_ids(Context __context) + public string[] ice_ids(Context context__) { - int __cnt = 0; + int cnt__ = 0; while(true) { try { - __checkTwowayOnly("ice_ids"); - _ObjectDel __del = __getDelegate(); - return __del.ice_ids(__context); + checkTwowayOnly__("ice_ids"); + ObjectDel_ del__ = getDelegate__(); + return del__.ice_ids(context__); } - catch(IceInternal.NonRepeatable __ex) + catch(IceInternal.NonRepeatable ex__) { - __cnt = __handleException(__ex.get(), __cnt); + cnt__ = handleException__(ex__.get(), cnt__); } - catch(LocalException __ex) + catch(LocalException ex__) { - __cnt = __handleException(__ex, __cnt); + cnt__ = handleException__(ex__, cnt__); } } } @@ -195,24 +195,24 @@ namespace Ice return ice_id(_reference.getContext()); } - public string ice_id(Context __context) + public string ice_id(Context context__) { - int __cnt = 0; + int cnt__ = 0; while(true) { try { - __checkTwowayOnly("ice_id"); - _ObjectDel __del = __getDelegate(); - return __del.ice_id(__context); + checkTwowayOnly__("ice_id"); + ObjectDel_ del__ = getDelegate__(); + return del__.ice_id(context__); } - catch(IceInternal.NonRepeatable __ex) + catch(IceInternal.NonRepeatable ex__) { - __cnt = __handleException(__ex.get(), __cnt); + cnt__ = handleException__(ex__.get(), cnt__); } - catch(LocalException __ex) + catch(LocalException ex__) { - __cnt = __handleException(__ex, __cnt); + cnt__ = handleException__(ex__, cnt__); } } } @@ -225,28 +225,28 @@ namespace Ice public bool ice_invoke(string operation, OperationMode mode, byte[] inParams, out byte[] outParams, Context context) { - int __cnt = 0; + int cnt__ = 0; while(true) { try { - _ObjectDel __del = __getDelegate(); - return __del.ice_invoke(operation, mode, inParams, out outParams, context); + ObjectDel_ del__ = getDelegate__(); + return del__.ice_invoke(operation, mode, inParams, out outParams, context); } - catch(IceInternal.NonRepeatable __ex) + catch(IceInternal.NonRepeatable ex__) { if(mode == OperationMode.Nonmutating || mode == OperationMode.Idempotent) { - __cnt = __handleException(__ex.get(), __cnt); + cnt__ = handleException__(ex__.get(), cnt__); } else { - __rethrowException(__ex.get()); + rethrowException__(ex__.get()); } } - catch(LocalException __ex) + catch(LocalException ex__) { - __cnt = __handleException(__ex, __cnt); + cnt__ = handleException__(ex__, cnt__); } } } @@ -259,8 +259,8 @@ namespace Ice public void ice_invoke_async(AMI_Object_ice_invoke cb, string operation, OperationMode mode, byte[] inParams, Context context) { - __checkTwowayOnly("ice_invoke_async"); - cb.__invoke(this, operation, mode, inParams, context); + checkTwowayOnly__("ice_invoke_async"); + cb.invoke__(this, operation, mode, inParams, context); } public Identity ice_getIdentity() @@ -575,17 +575,17 @@ namespace Ice public Connection ice_connection() { - int __cnt = 0; + int cnt__ = 0; while(true) { try { - _ObjectDel __del = __getDelegate(); - return __del.ice_connection(); + ObjectDel_ del__ = getDelegate__(); + return del__.ice_connection(); } - catch(LocalException __ex) + catch(LocalException ex__) { - __cnt = __handleException(__ex, __cnt); + cnt__ = handleException__(ex__, cnt__); } } } @@ -611,23 +611,23 @@ namespace Ice return !Equals(lhs, rhs); } - public IceInternal.Reference __reference() + public IceInternal.Reference reference__() { return _reference; } - public void __copyFrom(ObjectPrx from) + public void copyFrom__(ObjectPrx from) { ObjectPrxHelperBase h = (ObjectPrxHelperBase)from; IceInternal.Reference @ref = null; - _ObjectDelM delegateM = null; - _ObjectDelD delegateD = null; + ObjectDelM_ delegateM = null; + ObjectDelD_ delegateD = null; lock(from) { @ref = h._reference; - delegateM = h._delegate as _ObjectDelM; - delegateD = h._delegate as _ObjectDelD; + delegateM = h._delegate as ObjectDelM_; + delegateD = h._delegate as ObjectDelD_; } // @@ -642,19 +642,19 @@ namespace Ice if(delegateD != null) { - _ObjectDelD @delegate = __createDelegateD(); - @delegate.__copyFrom(delegateD); + ObjectDelD_ @delegate = createDelegateD__(); + @delegate.copyFrom__(delegateD); _delegate = @delegate; } else if(delegateM != null) { - _ObjectDelM @delegate = __createDelegateM(); - @delegate.__copyFrom(delegateM); + ObjectDelM_ @delegate = createDelegateM__(); + @delegate.copyFrom__(delegateM); _delegate = @delegate; } } - public int __handleException(LocalException ex, int cnt) + public int handleException__(LocalException ex, int cnt) { // // Only _delegate needs to be mutex protected here. @@ -679,7 +679,7 @@ namespace Ice } } - public void __rethrowException(LocalException ex) + public void rethrowException__(LocalException ex) { lock(this) { @@ -688,7 +688,7 @@ namespace Ice } } - public void __checkTwowayOnly(string name) + public void checkTwowayOnly__(string name) { // // No mutex lock necessary, there is nothing mutable in this @@ -703,7 +703,7 @@ namespace Ice } } - public _ObjectDel __getDelegate() + public ObjectDel_ getDelegate__() { lock(this) { @@ -714,7 +714,7 @@ namespace Ice ObjectAdapter adapter = _reference.getInstance().objectAdapterFactory().findObjectAdapter(this); if(adapter != null) { - _ObjectDelD @delegate = __createDelegateD(); + ObjectDelD_ @delegate = createDelegateD__(); @delegate.setup(_reference, adapter); _delegate = @delegate; } @@ -722,7 +722,7 @@ namespace Ice if(_delegate == null) { - _ObjectDelM @delegate = __createDelegateM(); + ObjectDelM_ @delegate = createDelegateM__(); @delegate.setup(_reference); _delegate = @delegate; @@ -749,17 +749,17 @@ namespace Ice } } - protected virtual _ObjectDelM __createDelegateM() + protected virtual ObjectDelM_ createDelegateM__() { - return new _ObjectDelM(); + return new ObjectDelM_(); } - protected virtual _ObjectDelD __createDelegateD() + protected virtual ObjectDelD_ createDelegateD__() { - return new _ObjectDelD(); + return new ObjectDelD_(); } - protected Context __defaultContext() + protected Context defaultContext__() { return _reference.getContext(); } @@ -781,7 +781,7 @@ namespace Ice } private IceInternal.Reference _reference; - private _ObjectDel _delegate; + private ObjectDel_ _delegate; } public class ObjectPrxHelper : ObjectPrxHelperBase @@ -807,7 +807,7 @@ namespace Ice bool ok = bb.ice_isA("::Object"); Debug.Assert(ok); ObjectPrxHelper h = new ObjectPrxHelper(); - h.__copyFrom(bb); + h.copyFrom__(bb); d = h; } catch(Ice.FacetNotExistException) @@ -828,7 +828,7 @@ namespace Ice bool ok = bb.ice_isA("::Object", ctx); Debug.Assert(ok); ObjectPrxHelper h = new ObjectPrxHelper(); - h.__copyFrom(bb); + h.copyFrom__(bb); d = h; } catch(Ice.FacetNotExistException) @@ -850,14 +850,14 @@ namespace Ice { Ice.ObjectPrx bb = b.ice_newFacet(f); ObjectPrxHelper h = new ObjectPrxHelper(); - h.__copyFrom(bb); + h.copyFrom__(bb); d = h; } return d; } } - public interface _ObjectDel + public interface ObjectDel_ { bool ice_isA(string id, Ice.Context context); void ice_ping(Ice.Context context); @@ -868,77 +868,77 @@ namespace Ice Connection ice_connection(); } - public class _ObjectDelD : _ObjectDel + public class ObjectDelD_ : ObjectDel_ { - public virtual bool ice_isA(string __id, Ice.Context __context) + public virtual bool ice_isA(string id__, Ice.Context context__) { - Current __current = new Current(); - __initCurrent(ref __current, "ice_isA", OperationMode.Nonmutating, __context); + Current current__ = new Current(); + initCurrent__(ref current__, "ice_isA", OperationMode.Nonmutating, context__); while(true) { - IceInternal.Direct __direct = new IceInternal.Direct(__current); + IceInternal.Direct direct__ = new IceInternal.Direct(current__); try { - return __direct.servant().ice_isA(__id, __current); + return direct__.servant().ice_isA(id__, current__); } finally { - __direct.destroy(); + direct__.destroy(); } } } - public virtual void ice_ping(Ice.Context __context) + public virtual void ice_ping(Ice.Context context__) { - Current __current = new Current(); - __initCurrent(ref __current, "ice_ping", OperationMode.Nonmutating, __context); + Current current__ = new Current(); + initCurrent__(ref current__, "ice_ping", OperationMode.Nonmutating, context__); while(true) { - IceInternal.Direct __direct = new IceInternal.Direct(__current); + IceInternal.Direct direct__ = new IceInternal.Direct(current__); try { - __direct.servant().ice_ping(__current); + direct__.servant().ice_ping(current__); return; } finally { - __direct.destroy(); + direct__.destroy(); } } } - public virtual string[] ice_ids(Ice.Context __context) + public virtual string[] ice_ids(Ice.Context context__) { - Current __current = new Current(); - __initCurrent(ref __current, "ice_ids", OperationMode.Nonmutating, __context); + Current current__ = new Current(); + initCurrent__(ref current__, "ice_ids", OperationMode.Nonmutating, context__); while(true) { - IceInternal.Direct __direct = new IceInternal.Direct(__current); + IceInternal.Direct direct__ = new IceInternal.Direct(current__); try { - return __direct.servant().ice_ids(__current); + return direct__.servant().ice_ids(current__); } finally { - __direct.destroy(); + direct__.destroy(); } } } - public virtual string ice_id(Ice.Context __context) + public virtual string ice_id(Ice.Context context__) { - Current __current = new Current(); - __initCurrent(ref __current, "ice_id", OperationMode.Nonmutating, __context); + Current current__ = new Current(); + initCurrent__(ref current__, "ice_id", OperationMode.Nonmutating, context__); while(true) { - IceInternal.Direct __direct = new IceInternal.Direct(__current); + IceInternal.Direct direct__ = new IceInternal.Direct(current__); try { - return __direct.servant().ice_id(__current); + return direct__.servant().ice_id(current__); } finally { - __direct.destroy(); + direct__.destroy(); } } } @@ -957,7 +957,7 @@ namespace Ice // // Only for use by ObjectPrx. // - internal void __copyFrom(_ObjectDelD from) + internal void copyFrom__(ObjectDelD_ from) { // // No need to synchronize "from", as the delegate is immutable @@ -969,22 +969,22 @@ namespace Ice // upon initialization. // - Debug.Assert(__reference == null); - Debug.Assert(__adapter == null); + Debug.Assert(reference__ == null); + Debug.Assert(adapter__ == null); - __reference = from.__reference; - __adapter = from.__adapter; + reference__ = from.reference__; + adapter__ = from.adapter__; } - protected internal IceInternal.Reference __reference; - protected internal Ice.ObjectAdapter __adapter; + protected internal IceInternal.Reference reference__; + protected internal Ice.ObjectAdapter adapter__; - protected internal void __initCurrent(ref Current current, string op, Ice.OperationMode mode, + protected internal void initCurrent__(ref Current current, string op, Ice.OperationMode mode, Ice.Context context) { - current.adapter = __adapter; - current.id = __reference.getIdentity(); - current.facet = __reference.getFacet(); + current.adapter = adapter__; + current.id = reference__.getIdentity(); + current.facet = reference__.getFacet(); current.operation = op; current.mode = mode; current.ctx = context; @@ -997,72 +997,72 @@ namespace Ice // upon initialization. // - Debug.Assert(__reference == null); - Debug.Assert(__adapter == null); + Debug.Assert(reference__ == null); + Debug.Assert(adapter__ == null); - __reference = rf; - __adapter = adapter; + reference__ = rf; + adapter__ = adapter; } } - public class _ObjectDelM : _ObjectDel + public class ObjectDelM_ : ObjectDel_ { - public virtual bool ice_isA(string __id, Ice.Context __context) + public virtual bool ice_isA(string id__, Ice.Context context__) { - IceInternal.Outgoing __og = getOutgoing("ice_isA", OperationMode.Nonmutating, __context); + IceInternal.Outgoing og__ = getOutgoing("ice_isA", OperationMode.Nonmutating, context__); try { try { - IceInternal.BasicStream __os = __og.ostr(); - __os.writeString(__id); + IceInternal.BasicStream os__ = og__.ostr(); + os__.writeString(id__); } - catch(LocalException __ex) + catch(LocalException ex__) { - __og.abort(__ex); + og__.abort(ex__); } - bool __ok = __og.invoke(); + bool ok__ = og__.invoke(); try { - IceInternal.BasicStream __is = __og.istr(); - if(!__ok) + IceInternal.BasicStream is__ = og__.istr(); + if(!ok__) { try { - __is.throwException(); + is__.throwException(); } catch(UserException) { throw new UnknownUserException(); } } - return __is.readBool(); + return is__.readBool(); } - catch(LocalException __ex) + catch(LocalException ex__) { - throw new IceInternal.NonRepeatable(__ex); + throw new IceInternal.NonRepeatable(ex__); } } finally { - reclaimOutgoing(__og); + reclaimOutgoing(og__); } } - public virtual void ice_ping(Ice.Context __context) + public virtual void ice_ping(Ice.Context context__) { - IceInternal.Outgoing __og = getOutgoing("ice_ping", OperationMode.Nonmutating, __context); + IceInternal.Outgoing og__ = getOutgoing("ice_ping", OperationMode.Nonmutating, context__); try { - bool __ok = __og.invoke(); + bool ok__ = og__.invoke(); try { - IceInternal.BasicStream __is = __og.istr(); - if(!__ok) + IceInternal.BasicStream is__ = og__.istr(); + if(!ok__) { try { - __is.throwException(); + is__.throwException(); } catch(UserException) { @@ -1070,130 +1070,130 @@ namespace Ice } } } - catch(LocalException __ex) + catch(LocalException ex__) { - throw new IceInternal.NonRepeatable(__ex); + throw new IceInternal.NonRepeatable(ex__); } } finally { - reclaimOutgoing(__og); + reclaimOutgoing(og__); } } - public virtual string[] ice_ids(Ice.Context __context) + public virtual string[] ice_ids(Ice.Context context__) { - IceInternal.Outgoing __og = getOutgoing("ice_ids", OperationMode.Nonmutating, __context); + IceInternal.Outgoing og__ = getOutgoing("ice_ids", OperationMode.Nonmutating, context__); try { - bool __ok = __og.invoke(); + bool ok__ = og__.invoke(); try { - IceInternal.BasicStream __is = __og.istr(); - if(!__ok) + IceInternal.BasicStream is__ = og__.istr(); + if(!ok__) { try { - __is.throwException(); + is__.throwException(); } catch(UserException) { throw new UnknownUserException(); } } - return __is.readStringSeq(); + return is__.readStringSeq(); } - catch(LocalException __ex) + catch(LocalException ex__) { - throw new IceInternal.NonRepeatable(__ex); + throw new IceInternal.NonRepeatable(ex__); } } finally { - reclaimOutgoing(__og); + reclaimOutgoing(og__); } } - public virtual string ice_id(Ice.Context __context) + public virtual string ice_id(Ice.Context context__) { - IceInternal.Outgoing __og = getOutgoing("ice_id", OperationMode.Nonmutating, __context); + IceInternal.Outgoing og__ = getOutgoing("ice_id", OperationMode.Nonmutating, context__); try { - bool __ok = __og.invoke(); + bool ok__ = og__.invoke(); try { - IceInternal.BasicStream __is = __og.istr(); - if(!__ok) + IceInternal.BasicStream is__ = og__.istr(); + if(!ok__) { try { - __is.throwException(); + is__.throwException(); } catch(UserException) { throw new UnknownUserException(); } } - return __is.readString(); + return is__.readString(); } - catch(LocalException __ex) + catch(LocalException ex__) { - throw new IceInternal.NonRepeatable(__ex); + throw new IceInternal.NonRepeatable(ex__); } } finally { - reclaimOutgoing(__og); + reclaimOutgoing(og__); } } public virtual bool ice_invoke(string operation, OperationMode mode, byte[] inParams, out byte[] outParams, - Ice.Context __context) + Ice.Context context__) { - IceInternal.Outgoing __og = getOutgoing(operation, mode, __context); + IceInternal.Outgoing og__ = getOutgoing(operation, mode, context__); try { try { - IceInternal.BasicStream __os = __og.ostr(); - __os.writeBlob(inParams); + IceInternal.BasicStream os__ = og__.ostr(); + os__.writeBlob(inParams); } - catch(LocalException __ex) + catch(LocalException ex__) { - __og.abort(__ex); + og__.abort(ex__); } - bool ok = __og.invoke(); + bool ok = og__.invoke(); outParams = null; - if(__reference.getMode() == IceInternal.Reference.Mode.ModeTwoway) + if(reference__.getMode() == IceInternal.Reference.Mode.ModeTwoway) { try { - IceInternal.BasicStream __is = __og.istr(); - int sz = __is.getReadEncapsSize(); - outParams = __is.readBlob(sz); + IceInternal.BasicStream is__ = og__.istr(); + int sz = is__.getReadEncapsSize(); + outParams = is__.readBlob(sz); } - catch(LocalException __ex) + catch(LocalException ex__) { - throw new IceInternal.NonRepeatable(__ex); + throw new IceInternal.NonRepeatable(ex__); } } return ok; } finally { - reclaimOutgoing(__og); + reclaimOutgoing(og__); } } public virtual Connection ice_connection() { - return __connection; + return connection__; } // // Only for use by ObjectPrx // - internal void __copyFrom(_ObjectDelM from) + internal void copyFrom__(ObjectDelM_ from) { // // No need to synchronize "from", as the delegate is immutable @@ -1205,17 +1205,17 @@ namespace Ice // upon initialization. // - Debug.Assert(__reference == null); - Debug.Assert(__connection == null); + Debug.Assert(reference__ == null); + Debug.Assert(connection__ == null); - __reference = from.__reference; - __connection = from.__connection; - __compress = from.__compress; + reference__ = from.reference__; + connection__ = from.connection__; + compress__ = from.compress__; } - protected IceInternal.Reference __reference; - protected ConnectionI __connection; - protected bool __compress; + protected IceInternal.Reference reference__; + protected ConnectionI connection__; + protected bool compress__; public virtual void setup(IceInternal.Reference rf) { @@ -1224,21 +1224,21 @@ namespace Ice // upon initialization. // - Debug.Assert(__reference == null); - Debug.Assert(__connection == null); + Debug.Assert(reference__ == null); + Debug.Assert(connection__ == null); - __reference = rf; - __connection = __reference.getConnection(out __compress); + reference__ = rf; + connection__ = reference__.getConnection(out compress__); } protected IceInternal.Outgoing getOutgoing(string operation, OperationMode mode, Ice.Context context) { - return __connection.getOutgoing(__reference, operation, mode, context, __compress); + return connection__.getOutgoing(reference__, operation, mode, context, compress__); } protected void reclaimOutgoing(IceInternal.Outgoing outg) { - __connection.reclaimOutgoing(outg); + connection__.reclaimOutgoing(outg); } } } diff --git a/cs/src/Ice/ProxyFactory.cs b/cs/src/Ice/ProxyFactory.cs index a64408ff4f7..6c3e9a41415 100755 --- a/cs/src/Ice/ProxyFactory.cs +++ b/cs/src/Ice/ProxyFactory.cs @@ -14,7 +14,7 @@ namespace IceInternal { public Ice.ObjectPrx stringToProxy(string str) { - Reference r = _instance.referenceFactory().create(str); + Reference r = instance_.referenceFactory().create(str); return referenceToProxy(r); } @@ -23,7 +23,7 @@ namespace IceInternal if(proxy != null) { Ice.ObjectPrxHelperBase h = (Ice.ObjectPrxHelperBase) proxy; - return h.__reference().ToString(); + return h.reference__().ToString(); } else { @@ -34,9 +34,9 @@ namespace IceInternal public Ice.ObjectPrx streamToProxy(BasicStream s) { Ice.Identity ident = new Ice.Identity(); - ident.__read(s); + ident.read__(s); - Reference r = _instance.referenceFactory().create(ident, s); + Reference r = instance_.referenceFactory().create(ident, s); return referenceToProxy(r); } @@ -59,8 +59,8 @@ namespace IceInternal if(proxy != null) { Ice.ObjectPrxHelperBase h = (Ice.ObjectPrxHelperBase)proxy; - Reference r = h.__reference(); - r.getIdentity().__write(s); + Reference r = h.reference__(); + r.getIdentity().write__(s); r.streamWrite(s); } else @@ -68,7 +68,7 @@ namespace IceInternal Ice.Identity ident = new Ice.Identity(); ident.name = ""; ident.category = ""; - ident.__write(s); + ident.write__(s); } } @@ -128,8 +128,8 @@ namespace IceInternal ++cnt; - TraceLevels traceLevels = _instance.traceLevels(); - Ice.Logger logger = _instance.logger(); + TraceLevels traceLevels = instance_.traceLevels(); + Ice.Logger logger = instance_.logger(); // // Instance components may be null if Communicator has been destroyed. @@ -181,9 +181,9 @@ namespace IceInternal // internal ProxyFactory(Instance instance) { - _instance = instance; + instance_ = instance; - string str = _instance.properties().getPropertyWithDefault("Ice.RetryIntervals", "0"); + string str = instance_.properties().getPropertyWithDefault("Ice.RetryIntervals", "0"); char[] separators = { ' ', '\t', '\n', '\r' }; string[] arr = str.Trim().Split(separators); @@ -224,7 +224,7 @@ namespace IceInternal } } - private Instance _instance; + private Instance instance_; private int[] _retryIntervals; } diff --git a/cs/src/Ice/Reference.cs b/cs/src/Ice/Reference.cs index 94dc2a8a757..097effea588 100755 --- a/cs/src/Ice/Reference.cs +++ b/cs/src/Ice/Reference.cs @@ -27,39 +27,39 @@ namespace IceInternal public Mode getMode() { - return _mode; + return mode_; } public Ice.Identity getIdentity() { - return _identity; + return identity_; } public string getFacet() { - return _facet; + return facet_; } public Instance getInstance() { - return _instance; + return instance_; } public Ice.Context getContext() { - return _context; + return context_; } public Reference defaultContext() { - Reference r = _instance.referenceFactory().copy(this); - r._context = _instance.getDefaultContext(); + Reference r = instance_.referenceFactory().copy(this); + r.context_ = instance_.getDefaultContext(); return r; } public Ice.Communicator getCommunicator() { - return _communicator; + return communicator_; } public abstract bool getSecure(); public abstract string getAdapterId(); @@ -77,57 +77,57 @@ namespace IceInternal { newContext = _emptyContext; } - Reference r = _instance.referenceFactory().copy(this); + Reference r = instance_.referenceFactory().copy(this); if(newContext.Count == 0) { - r._context = _emptyContext; + r.context_ = _emptyContext; } else { - r._context = (Ice.Context)newContext.Clone(); + r.context_ = (Ice.Context)newContext.Clone(); } return r; } public Reference changeMode(Mode newMode) { - if(newMode == _mode) + if(newMode == mode_) { return this; } - Reference r = _instance.referenceFactory().copy(this); - r._mode = newMode; + Reference r = instance_.referenceFactory().copy(this); + r.mode_ = newMode; return r; } public Reference changeIdentity(Ice.Identity newIdentity) { - if(newIdentity.Equals(_identity)) + if(newIdentity.Equals(identity_)) { return this; } - Reference r = _instance.referenceFactory().copy(this); - r._identity = newIdentity; // Identity is a value type, therefore a copy of newIdentity is made. + Reference r = instance_.referenceFactory().copy(this); + r.identity_ = newIdentity; // Identity is a value type, therefore a copy of newIdentity is made. return r; } public Reference changeFacet(string newFacet) { - if(newFacet.Equals(_facet)) + if(newFacet.Equals(facet_)) { return this; } - Reference r = _instance.referenceFactory().copy(this); - r._facet = newFacet; + Reference r = instance_.referenceFactory().copy(this); + r.facet_ = newFacet; return r; } public virtual Reference changeDefault() { - Reference r = _instance.referenceFactory().copy(this); - r._mode = Mode.ModeTwoway; - r._context = _instance.getDefaultContext(); - r._facet = ""; + Reference r = instance_.referenceFactory().copy(this); + r.mode_ = Mode.ModeTwoway; + r.context_ = instance_.getDefaultContext(); + r.facet_ = ""; return r; } @@ -144,37 +144,37 @@ namespace IceInternal { lock(this) { - if(_hashInitialized) + if(hashInitialized_) { - return _hashValue; + return hashValue_; } - int h = (int)_mode; + int h = (int)mode_; - int sz = _identity.name.Length; + int sz = identity_.name.Length; for(int i = 0; i < sz; i++) { - h = 5 * h + (int)_identity.name[i]; + h = 5 * h + (int)identity_.name[i]; } - sz = _identity.category.Length; + sz = identity_.category.Length; for(int i = 0; i < sz; i++) { - h = 5 * h + (int)_identity.category[i]; + h = 5 * h + (int)identity_.category[i]; } - h = 5 * h + _context.GetHashCode(); + h = 5 * h + context_.GetHashCode(); - sz = _facet.Length; + sz = facet_.Length; for(int i = 0; i < sz; i++) { - h = 5 * h + (int)_facet[i]; + h = 5 * h + (int)facet_[i]; } h = 5 * h + (getSecure() ? 1 : 0); - _hashValue = h; - _hashInitialized = true; + hashValue_ = h; + hashInitialized_ = true; return h; } @@ -193,17 +193,17 @@ namespace IceInternal // // For compatibility with the old FacetPath. // - if(_facet.Length == 0) + if(facet_.Length == 0) { s.writeStringSeq(null); } else { - string[] facetPath = { _facet }; + string[] facetPath = { facet_ }; s.writeStringSeq(facetPath); } - s.writeByte((byte)_mode); + s.writeByte((byte)mode_); s.writeBool(getSecure()); @@ -222,7 +222,7 @@ namespace IceInternal // the reference parser uses as separators, then we enclose // the identity string in quotes. // - string id = Ice.Util.identityToString(_identity); + string id = Ice.Util.identityToString(identity_); if(IceUtil.StringUtil.findFirstOf(id, " \t\n\r:@") != -1) { s.Append('"'); @@ -234,7 +234,7 @@ namespace IceInternal s.Append(id); } - if(_facet.Length > 0) + if(facet_.Length > 0) { // // If the encoded facet string contains characters which @@ -242,7 +242,7 @@ namespace IceInternal // the facet string in quotes. // s.Append(" -f "); - string fs = IceUtil.StringUtil.escapeString(_facet, ""); + string fs = IceUtil.StringUtil.escapeString(facet_, ""); if(IceUtil.StringUtil.findFirstOf(fs, " \t\n\r:@") != -1) { s.Append('"'); @@ -255,7 +255,7 @@ namespace IceInternal } } - switch(_mode) + switch(mode_) { case Mode.ModeTwoway: { @@ -308,22 +308,22 @@ namespace IceInternal Reference r = (Reference)obj; // Guaranteed to succeed. - if(_mode != r._mode) + if(mode_ != r.mode_) { return false; } - if(!_identity.Equals(r._identity)) + if(!identity_.Equals(r.identity_)) { return false; } - if(!_context.Equals(r._context)) + if(!context_.Equals(r.context_)) { return false; } - if(!_facet.Equals(r._facet)) + if(!facet_.Equals(r.facet_)) { return false; } @@ -339,16 +339,16 @@ namespace IceInternal return MemberwiseClone(); } - private Instance _instance; - private Ice.Communicator _communicator; - private Mode _mode; - private Ice.Identity _identity; - private Ice.Context _context; + private Instance instance_; + private Ice.Communicator communicator_; + private Mode mode_; + private Ice.Identity identity_; + private Ice.Context context_; private static Ice.Context _emptyContext = new Ice.Context(); - private string _facet; + private string facet_; - protected int _hashValue; - protected bool _hashInitialized; + protected int hashValue_; + protected bool hashInitialized_; protected Reference(Instance inst, Ice.Communicator com, @@ -364,13 +364,13 @@ namespace IceInternal Debug.Assert(ident.category != null); Debug.Assert(fac != null); - _instance = inst; - _communicator = com; - _mode = md; - _identity = ident; - _context = ctx == null ? _emptyContext : ctx; - _facet = fac; - _hashInitialized = false; + instance_ = inst; + communicator_ = com; + mode_ = md; + identity_ = ident; + context_ = ctx == null ? _emptyContext : ctx; + facet_ = fac; + hashInitialized_ = false; } // @@ -391,7 +391,7 @@ namespace IceInternal } } - switch(_mode) + switch(mode_) { case Reference.Mode.ModeTwoway: case Reference.Mode.ModeOneway: @@ -510,7 +510,7 @@ namespace IceInternal { ArrayList connections = new ArrayList(); - switch(_mode) + switch(mode_) { case Reference.Mode.ModeTwoway: case Reference.Mode.ModeOneway: @@ -781,7 +781,7 @@ namespace IceInternal // proxy endpoints. // Ice.ObjectPrx clientProxy = _routerInfo.getClientProxy(); - return ((Ice.ObjectPrxHelperBase)clientProxy).__reference().getEndpoints(); + return ((Ice.ObjectPrxHelperBase)clientProxy).reference__().getEndpoints(); } return new EndpointI[0]; } @@ -1111,18 +1111,18 @@ namespace IceInternal bool collocationOpt) : base(inst, com, ident, ctx, fs, md, sec, rtrInfo, collocationOpt) { - _adapterId = adptid; - _locatorInfo = locInfo; + adapterId_ = adptid; + locatorInfo_ = locInfo; } public LocatorInfo getLocatorInfo() { - return _locatorInfo; + return locatorInfo_; } public override string getAdapterId() { - return _adapterId; + return adapterId_; } public override EndpointI[] getEndpoints() @@ -1145,7 +1145,7 @@ namespace IceInternal else { IndirectReference r = (IndirectReference)base.changeDefault(); - r._locatorInfo = getInstance().locatorManager().get(loc); + r.locatorInfo_ = getInstance().locatorManager().get(loc); return r; } } @@ -1165,13 +1165,13 @@ namespace IceInternal { LocatorInfo newLocatorInfo = getInstance().locatorManager().get(newLocator); - if(object.ReferenceEquals(newLocatorInfo, _locatorInfo) || - (_locatorInfo != null && newLocatorInfo != null && newLocatorInfo.Equals(_locatorInfo))) + if(object.ReferenceEquals(newLocatorInfo, locatorInfo_) || + (locatorInfo_ != null && newLocatorInfo != null && newLocatorInfo.Equals(locatorInfo_))) { return this; } IndirectReference r = (IndirectReference)getInstance().referenceFactory().copy(this); - r._locatorInfo = newLocatorInfo; + r.locatorInfo_ = newLocatorInfo; return this; } } @@ -1179,11 +1179,11 @@ namespace IceInternal public override Reference changeCompress(bool newCompress) { IndirectReference r = (IndirectReference)getInstance().referenceFactory().copy(this); - if(_locatorInfo != null) + if(locatorInfo_ != null) { Ice.LocatorPrx newLocator = Ice.LocatorPrxHelper.uncheckedCast( - _locatorInfo.getLocator().ice_compress(newCompress)); - r._locatorInfo = getInstance().locatorManager().get(newLocator); + locatorInfo_.getLocator().ice_compress(newCompress)); + r.locatorInfo_ = getInstance().locatorManager().get(newLocator); } return r; } @@ -1191,23 +1191,23 @@ namespace IceInternal public override Reference changeTimeout(int newTimeout) { IndirectReference r = (IndirectReference)getInstance().referenceFactory().copy(this); - if(_locatorInfo != null) + if(locatorInfo_ != null) { Ice.LocatorPrx newLocator = Ice.LocatorPrxHelper.uncheckedCast( - _locatorInfo.getLocator().ice_timeout(newTimeout)); - r._locatorInfo = getInstance().locatorManager().get(newLocator); + locatorInfo_.getLocator().ice_timeout(newTimeout)); + r.locatorInfo_ = getInstance().locatorManager().get(newLocator); } return r; } public override Reference changeAdapterId(string newAdapterId) { - if(_adapterId.Equals(newAdapterId)) + if(adapterId_.Equals(newAdapterId)) { return this; } IndirectReference r = (IndirectReference)getInstance().referenceFactory().copy(this); - r._adapterId = newAdapterId; + r.adapterId_ = newAdapterId; return r; } @@ -1227,14 +1227,14 @@ namespace IceInternal base.streamWrite(s); s.writeSize(0); - s.writeString(_adapterId); + s.writeString(adapterId_); } public override string ToString() { string result = base.ToString(); - if(_adapterId.Length == 0) + if(adapterId_.Length == 0) { return result; } @@ -1248,7 +1248,7 @@ namespace IceInternal // the reference parser uses as separators, then we enclose // the adapter id string in quotes. // - string a = IceUtil.StringUtil.escapeString(_adapterId, null); + string a = IceUtil.StringUtil.escapeString(adapterId_, null); if(IceUtil.StringUtil.findFirstOf(a, " \t\n\r") != -1) { s.Append('"'); @@ -1270,9 +1270,9 @@ namespace IceInternal { EndpointI[] endpts = base.getRoutedEndpoints(); bool cached = false; - if(endpts.Length == 0 && _locatorInfo != null) + if(endpts.Length == 0 && locatorInfo_ != null) { - endpts = _locatorInfo.getEndpoints(this, out cached); + endpts = locatorInfo_.getEndpoints(this, out cached); } EndpointI[] filteredEndpoints = filterEndpoints(endpts); if(filteredEndpoints.Length == 0) @@ -1292,8 +1292,8 @@ namespace IceInternal { if(getRouterInfo() == null) { - Debug.Assert(_locatorInfo != null); - _locatorInfo.clearCache(this); + Debug.Assert(locatorInfo_ != null); + locatorInfo_.clearCache(this); if(cached) { @@ -1346,12 +1346,12 @@ namespace IceInternal { return false; } - if(!_adapterId.Equals(rhs._adapterId)) + if(!adapterId_.Equals(rhs.adapterId_)) { return false; } - return object.ReferenceEquals(_locatorInfo, rhs._locatorInfo) || - (_locatorInfo != null && rhs._locatorInfo != null && rhs._locatorInfo.Equals(_locatorInfo)); + return object.ReferenceEquals(locatorInfo_, rhs.locatorInfo_) || + (locatorInfo_ != null && rhs.locatorInfo_ != null && rhs.locatorInfo_.Equals(locatorInfo_)); } // @@ -1362,7 +1362,7 @@ namespace IceInternal return base.GetHashCode(); } - private string _adapterId; - private LocatorInfo _locatorInfo; + private string adapterId_; + private LocatorInfo locatorInfo_; } } diff --git a/cs/src/Ice/ReferenceFactory.cs b/cs/src/Ice/ReferenceFactory.cs index 70e729409d7..7c009401e54 100755 --- a/cs/src/Ice/ReferenceFactory.cs +++ b/cs/src/Ice/ReferenceFactory.cs @@ -28,7 +28,7 @@ namespace IceInternal lock(this) { - if(_instance == null) + if(instance_ == null) { throw new Ice.CommunicatorDestroyedException(); } @@ -41,7 +41,7 @@ namespace IceInternal // // Create new reference // - DirectReference @ref = new DirectReference(_instance, _communicator, ident, context, facet, mode, + DirectReference @ref = new DirectReference(instance_, _communicator, ident, context, facet, mode, secure, endpoints, routerInfo, collocationOptimization); return updateCache(@ref); } @@ -59,7 +59,7 @@ namespace IceInternal { lock(this) { - if(_instance == null) + if(instance_ == null) { throw new Ice.CommunicatorDestroyedException(); } @@ -72,7 +72,7 @@ namespace IceInternal // // Create new reference // - IndirectReference @ref = new IndirectReference(_instance, _communicator, ident, context, facet, mode, + IndirectReference @ref = new IndirectReference(instance_, _communicator, ident, context, facet, mode, secure, adapterId, routerInfo, locatorInfo, collocationOptimization); return updateCache(@ref); @@ -87,7 +87,7 @@ namespace IceInternal { lock(this) { - if(_instance == null) + if(instance_ == null) { throw new Ice.CommunicatorDestroyedException(); } @@ -100,7 +100,7 @@ namespace IceInternal // // Create new reference // - FixedReference @ref = new FixedReference(_instance, _communicator, ident, context, facet, mode, fixedConnections); + FixedReference @ref = new FixedReference(instance_, _communicator, ident, context, facet, mode, fixedConnections); return updateCache(@ref); } } @@ -109,7 +109,7 @@ namespace IceInternal { lock(this) { - if(_instance == null) + if(instance_ == null) { throw new Ice.CommunicatorDestroyedException(); } @@ -395,13 +395,13 @@ namespace IceInternal } } - RouterInfo routerInfo = _instance.routerManager().get(getDefaultRouter()); - LocatorInfo locatorInfo = _instance.locatorManager().get(getDefaultLocator()); + RouterInfo routerInfo = instance_.routerManager().get(getDefaultRouter()); + LocatorInfo locatorInfo = instance_.locatorManager().get(getDefaultLocator()); if(beg == -1) { return create(ident, new Ice.Context(), facet, mode, secure, "", routerInfo, locatorInfo, - _instance.defaultsAndOverrides().defaultCollocationOptimization); + instance_.defaultsAndOverrides().defaultCollocationOptimization); } ArrayList endpoints = new ArrayList(); @@ -422,7 +422,7 @@ namespace IceInternal } string es = s.Substring(beg, end - beg); - EndpointI endp = _instance.endpointFactoryManager().create(es); + EndpointI endp = instance_.endpointFactoryManager().create(es); if(endp != null) { endpoints.Add(endp); @@ -439,7 +439,7 @@ namespace IceInternal throw e2; } else if(unknownEndpoints.Count != 0 && - _instance.properties().getPropertyAsIntWithDefault("Ice.Warn.Endpoints", 1) > 0) + instance_.properties().getPropertyAsIntWithDefault("Ice.Warn.Endpoints", 1) > 0) { string msg = "Proxy contains unknown endpoints:"; int sz = unknownEndpoints.Count; @@ -447,12 +447,12 @@ namespace IceInternal { msg += " `" + (string)unknownEndpoints[idx] + "'"; } - _instance.logger().warning(msg); + instance_.logger().warning(msg); } EndpointI[] ep = (EndpointI[])endpoints.ToArray(typeof(EndpointI)); return create(ident, new Ice.Context(), facet, mode, secure, ep, routerInfo, - _instance.defaultsAndOverrides().defaultCollocationOptimization); + instance_.defaultsAndOverrides().defaultCollocationOptimization); } else if(s[beg] == '@') { @@ -491,7 +491,7 @@ namespace IceInternal throw e; } return create(ident, new Ice.Context(), facet, mode, secure, adapter, routerInfo, locatorInfo, - _instance.defaultsAndOverrides().defaultCollocationOptimization); + instance_.defaultsAndOverrides().defaultCollocationOptimization); } Ice.ProxyParseException ex = new Ice.ProxyParseException(); @@ -540,8 +540,8 @@ namespace IceInternal EndpointI[] endpoints; string adapterId = ""; - RouterInfo routerInfo = _instance.routerManager().get(getDefaultRouter()); - LocatorInfo locatorInfo = _instance.locatorManager().get(getDefaultLocator()); + RouterInfo routerInfo = instance_.routerManager().get(getDefaultRouter()); + LocatorInfo locatorInfo = instance_.locatorManager().get(getDefaultLocator()); int sz = s.readSize(); if(sz > 0) @@ -549,17 +549,17 @@ namespace IceInternal endpoints = new EndpointI[sz]; for(int i = 0; i < sz; i++) { - endpoints[i] = _instance.endpointFactoryManager().read(s); + endpoints[i] = instance_.endpointFactoryManager().read(s); } return create(ident, new Ice.Context(), facet, (Reference.Mode)mode, secure, endpoints, routerInfo, - _instance.defaultsAndOverrides().defaultCollocationOptimization); + instance_.defaultsAndOverrides().defaultCollocationOptimization); } else { endpoints = new EndpointI[0]; adapterId = s.readString(); return create(ident, new Ice.Context(), facet, (Reference.Mode)mode, secure, adapterId, routerInfo, - locatorInfo, _instance.defaultsAndOverrides().defaultCollocationOptimization); + locatorInfo, instance_.defaultsAndOverrides().defaultCollocationOptimization); } } @@ -600,7 +600,7 @@ namespace IceInternal // internal ReferenceFactory(Instance instance, Ice.Communicator communicator) { - _instance = instance; + instance_ = instance; _communicator = communicator; } @@ -608,12 +608,12 @@ namespace IceInternal { lock(this) { - if(_instance == null) + if(instance_ == null) { throw new Ice.CommunicatorDestroyedException(); } - _instance = null; + instance_ = null; _defaultRouter = null; _defaultLocator = null; _references.Clear(); @@ -642,7 +642,7 @@ namespace IceInternal return @ref; } - private Instance _instance; + private Instance instance_; private Ice.Communicator _communicator; private Ice.RouterPrx _defaultRouter; private Ice.LocatorPrx _defaultLocator; diff --git a/cs/src/Ice/ServantManager.cs b/cs/src/Ice/ServantManager.cs index e1155ee49d5..e7976710954 100755 --- a/cs/src/Ice/ServantManager.cs +++ b/cs/src/Ice/ServantManager.cs @@ -19,7 +19,7 @@ public sealed class ServantManager { lock(this) { - Debug.Assert(_instance != null); // Must not be called after destruction. + Debug.Assert(instance_ != null); // Must not be called after destruction. if(facet == null) { @@ -54,7 +54,7 @@ public sealed class ServantManager { lock(this) { - Debug.Assert(_instance != null); // Must not be called after destruction. + Debug.Assert(instance_ != null); // Must not be called after destruction. if(facet == null) { @@ -89,7 +89,7 @@ public sealed class ServantManager { lock(this) { - Debug.Assert(_instance != null); + Debug.Assert(instance_ != null); Ice.FacetMap m = (Ice.FacetMap)_servantMapMap[ident]; if(m == null) @@ -109,7 +109,7 @@ public sealed class ServantManager { lock(this) { - Debug.Assert(_instance != null); // Must not be called after destruction. + Debug.Assert(instance_ != null); // Must not be called after destruction. if(facet == null) { @@ -131,7 +131,7 @@ public sealed class ServantManager { lock(this) { - Debug.Assert(_instance != null); // Must not be called after destruction. + Debug.Assert(instance_ != null); // Must not be called after destruction. Ice.FacetMap m = (Ice.FacetMap)_servantMapMap[ident]; if(m != null) @@ -147,7 +147,7 @@ public sealed class ServantManager { lock(this) { - Debug.Assert(_instance != null); // Must not be called after destruction. + Debug.Assert(instance_ != null); // Must not be called after destruction. Ice.FacetMap m = (Ice.FacetMap)_servantMapMap[ident]; if(m == null) @@ -166,7 +166,7 @@ public sealed class ServantManager { lock(this) { - Debug.Assert(_instance != null); // Must not be called after destruction. + Debug.Assert(instance_ != null); // Must not be called after destruction. Ice.ServantLocator l = (Ice.ServantLocator)_locatorMap[category]; if(l != null) @@ -185,7 +185,7 @@ public sealed class ServantManager { lock(this) { - Debug.Assert(_instance != null); // Must not be called after destruction. + Debug.Assert(instance_ != null); // Must not be called after destruction. return (Ice.ServantLocator)_locatorMap[category]; } @@ -196,7 +196,7 @@ public sealed class ServantManager // public ServantManager(Instance instance, string adapterName) { - _instance = instance; + instance_ = instance; _adapterName = adapterName; } @@ -210,7 +210,7 @@ public sealed class ServantManager // //lock(this) //{ - //IceUtil.Assert.FinalizerAssert(_instance == null); + //IceUtil.Assert.FinalizerAssert(instance_ == null); //} } #endif @@ -222,7 +222,7 @@ public sealed class ServantManager { lock(this) { - Debug.Assert(_instance != null); // Must not be called after destruction. + Debug.Assert(instance_ != null); // Must not be called after destruction. _servantMapMap.Clear(); @@ -237,17 +237,17 @@ public sealed class ServantManager { string s = "exception during locator deactivation:\n" + "object adapter: `" + _adapterName + "'\n" + "locator category: `" + p.Key + "'\n" + ex; - _instance.logger().error(s); + instance_.logger().error(s); } } _locatorMap.Clear(); - _instance = null; + instance_ = null; } } - private Instance _instance; + private Instance instance_; private readonly string _adapterName; private Hashtable _servantMapMap = new Hashtable(); private Hashtable _locatorMap = new Hashtable(); diff --git a/cs/src/Ice/TcpAcceptor.cs b/cs/src/Ice/TcpAcceptor.cs index a15c8c7e565..bdbbeb53d8f 100755 --- a/cs/src/Ice/TcpAcceptor.cs +++ b/cs/src/Ice/TcpAcceptor.cs @@ -71,7 +71,7 @@ namespace IceInternal _logger.trace(_traceLevels.networkCat, s); } - return new TcpTransceiver(_instance, fd); + return new TcpTransceiver(instance_, fd); } public virtual void connectToSelf() @@ -101,7 +101,7 @@ namespace IceInternal internal TcpAcceptor(Instance instance, string host, int port) { - _instance = instance; + instance_ = instance; _traceLevels = instance.traceLevels(); _logger = instance.logger(); _backlog = 0; @@ -140,7 +140,7 @@ namespace IceInternal } #endif - private Instance _instance; + private Instance instance_; private TraceLevels _traceLevels; private Ice.Logger _logger; private Socket _fd; diff --git a/cs/src/Ice/TcpConnector.cs b/cs/src/Ice/TcpConnector.cs index b54e9f69e2d..34d73c6f19e 100755 --- a/cs/src/Ice/TcpConnector.cs +++ b/cs/src/Ice/TcpConnector.cs @@ -33,7 +33,7 @@ namespace IceInternal _logger.trace(_traceLevels.networkCat, s); } - return new TcpTransceiver(_instance, fd); + return new TcpTransceiver(instance_, fd); } public override string ToString() @@ -46,14 +46,14 @@ namespace IceInternal // internal TcpConnector(Instance instance, string host, int port) { - _instance = instance; + instance_ = instance; _traceLevels = instance.traceLevels(); _logger = instance.logger(); _addr = Network.getAddress(host, port); } - private Instance _instance; + private Instance instance_; private TraceLevels _traceLevels; private Ice.Logger _logger; private IPEndPoint _addr; diff --git a/cs/src/Ice/TcpEndpointI.cs b/cs/src/Ice/TcpEndpointI.cs index e54b2bb01fd..0036c2f3f6e 100755 --- a/cs/src/Ice/TcpEndpointI.cs +++ b/cs/src/Ice/TcpEndpointI.cs @@ -18,7 +18,7 @@ namespace IceInternal public TcpEndpointI(Instance instance, string ho, int po, int ti, bool co) { - _instance = instance; + instance_ = instance; _host = ho; _port = po; _timeout = ti; @@ -28,7 +28,7 @@ namespace IceInternal public TcpEndpointI(Instance instance, string str) { - _instance = instance; + instance_ = instance; _host = null; _port = 0; _timeout = -1; @@ -145,7 +145,7 @@ namespace IceInternal if(_host == null) { - _host = _instance.defaultsAndOverrides().defaultHost; + _host = instance_.defaultsAndOverrides().defaultHost; } calcHashValue(); @@ -153,7 +153,7 @@ namespace IceInternal public TcpEndpointI(BasicStream s) { - _instance = s.instance(); + instance_ = s.instance(); s.startReadEncaps(); _host = s.readString(); _port = s.readInt(); @@ -180,7 +180,7 @@ namespace IceInternal // // Convert the endpoint to its string form // - public override string _Ice_toString() + public override string ice_toString_() { string s = "tcp -h " + _host + " -p " + _port; if(_timeout != -1) @@ -224,7 +224,7 @@ namespace IceInternal } else { - return new TcpEndpointI(_instance, _host, _port, timeout, _compress); + return new TcpEndpointI(instance_, _host, _port, timeout, _compress); } } @@ -250,7 +250,7 @@ namespace IceInternal } else { - return new TcpEndpointI(_instance, _host, _port, _timeout, compress); + return new TcpEndpointI(instance_, _host, _port, _timeout, compress); } } @@ -306,7 +306,7 @@ namespace IceInternal // public override Connector connector() { - return new TcpConnector(_instance, _host, _port); + return new TcpConnector(instance_, _host, _port); } // @@ -318,8 +318,8 @@ namespace IceInternal // public override Acceptor acceptor(ref EndpointI endpoint) { - TcpAcceptor p = new TcpAcceptor(_instance, _host, _port); - endpoint = new TcpEndpointI(_instance, _host, p.effectivePort(), _timeout, _compress); + TcpAcceptor p = new TcpAcceptor(instance_, _host, _port); + endpoint = new TcpEndpointI(instance_, _host, p.effectivePort(), _timeout, _compress); return p; } @@ -465,7 +465,7 @@ namespace IceInternal _hashCode = 5 * _hashCode + (_compress? 1 : 0); } - private Instance _instance; + private Instance instance_; private string _host; private int _port; private int _timeout; @@ -477,7 +477,7 @@ namespace IceInternal { internal TcpEndpointFactory(Instance instance) { - _instance = instance; + instance_ = instance; } public short type() @@ -492,7 +492,7 @@ namespace IceInternal public EndpointI create(string str) { - return new TcpEndpointI(_instance, str); + return new TcpEndpointI(instance_, str); } public EndpointI read(BasicStream s) @@ -502,10 +502,10 @@ namespace IceInternal public void destroy() { - _instance = null; + instance_ = null; } - private Instance _instance; + private Instance instance_; } } diff --git a/cs/src/Ice/ThreadPool.cs b/cs/src/Ice/ThreadPool.cs index f772363a8c4..e9fcfdcc7d2 100755 --- a/cs/src/Ice/ThreadPool.cs +++ b/cs/src/Ice/ThreadPool.cs @@ -33,27 +33,27 @@ namespace IceInternal { public ThreadPool(Instance instance, string prefix, int timeout) { - _instance = instance; + instance_ = instance; _destroyed = false; _prefix = prefix; _timeout = timeout; - _size = 0; - _sizeMax = 0; - _sizeWarn = 0; - _threadIndex = 0; - _running = 0; - _inUse = 0; - _load = 1.0; - _promote = true; - _warnUdp = _instance.properties().getPropertyAsInt("Ice.Warn.Datagrams") > 0; + size_ = 0; + sizeMax_ = 0; + sizeWarn_ = 0; + threadIndex_ = 0; + running_ = 0; + inUse_ = 0; + load_ = 1.0; + promote_ = true; + warnUdp_ = instance_.properties().getPropertyAsInt("Ice.Warn.Datagrams") > 0; // // If we are in thread per connection mode, no thread pool should // ever be created. // - Debug.Assert(!_instance.threadPerConnection()); + Debug.Assert(!instance_.threadPerConnection()); - string programName = _instance.properties().getProperty("Ice.ProgramName"); + string programName = instance_.properties().getProperty("Ice.ProgramName"); if(programName.Length > 0) { _programNamePrefix = programName + "-"; @@ -73,40 +73,40 @@ namespace IceInternal // possible setting, still allows one level of nesting, and // doesn't require to make the servants thread safe. // - int size = _instance.properties().getPropertyAsIntWithDefault(_prefix + ".Size", 1); + int size = instance_.properties().getPropertyAsIntWithDefault(_prefix + ".Size", 1); if(size < 1) { size = 1; } - int sizeMax = _instance.properties().getPropertyAsIntWithDefault(_prefix + ".SizeMax", size); + int sizeMax = instance_.properties().getPropertyAsIntWithDefault(_prefix + ".SizeMax", size); if(sizeMax < size) { sizeMax = size; } - int sizeWarn = _instance.properties().getPropertyAsIntWithDefault(_prefix + ".SizeWarn", + int sizeWarn = instance_.properties().getPropertyAsIntWithDefault(_prefix + ".SizeWarn", sizeMax * 80 / 100); - _size = size; - _sizeMax = sizeMax; - _sizeWarn = sizeWarn; + size_ = size; + sizeMax_ = sizeMax; + sizeWarn_ = sizeWarn; try { - _threads = new ArrayList(); - for(int i = 0; i < _size; ++i) + threads_ = new ArrayList(); + for(int i = 0; i < size_; ++i) { EventHandlerThread thread = new EventHandlerThread(this, _programNamePrefix + _prefix + "-" + - _threadIndex++); - _threads.Add(thread); + threadIndex_++); + threads_.Add(thread); thread.Start(); - ++_running; + ++running_; } } catch(System.Exception ex) { string s = "cannot create thread for `" + _prefix + "':\n" + ex; - _instance.logger().error(s); + instance_.logger().error(s); destroy(); joinWithAllThreads(); @@ -180,42 +180,42 @@ namespace IceInternal public void promoteFollower() { - if(_sizeMax > 1) + if(sizeMax_ > 1) { lock(this) { - Debug.Assert(!_promote); - _promote = true; + Debug.Assert(!promote_); + promote_ = true; System.Threading.Monitor.Pulse(this); if(!_destroyed) { - Debug.Assert(_inUse >= 0); - ++_inUse; + Debug.Assert(inUse_ >= 0); + ++inUse_; - if(_inUse == _sizeWarn) + if(inUse_ == sizeWarn_) { string s = "thread pool `" + _prefix + "' is running low on threads\n" - + "Size=" + _size + ", " + "SizeMax=" + _sizeMax + ", " - + "SizeWarn=" + _sizeWarn; - _instance.logger().warning(s); + + "Size=" + size_ + ", " + "SizeMax=" + sizeMax_ + ", " + + "SizeWarn=" + sizeWarn_; + instance_.logger().warning(s); } - Debug.Assert(_inUse <= _running); - if(_inUse < _sizeMax && _inUse == _running) + Debug.Assert(inUse_ <= running_); + if(inUse_ < sizeMax_ && inUse_ == running_) { try { EventHandlerThread thread = new EventHandlerThread(this, _programNamePrefix + - _prefix + "-" + _threadIndex++); - _threads.Add(thread); + _prefix + "-" + threadIndex_++); + threads_.Add(thread); thread.Start(); - ++_running; + ++running_; } catch(System.Exception ex) { string s = "cannot create thread for `" + _prefix + "':\n" + ex; - _instance.logger().error(s); + instance_.logger().error(s); } } } @@ -226,13 +226,13 @@ namespace IceInternal public void joinWithAllThreads() { // - // _threads is immutable after destroy() has been called, + // threads_ is immutable after destroy() has been called, // therefore no synchronization is needed. (Synchronization // wouldn't be possible here anyway, because otherwise the // other threads would never terminate.) // Debug.Assert(_destroyed); - foreach(EventHandlerThread thread in _threads) + foreach(EventHandlerThread thread in threads_) { while(true) { @@ -334,16 +334,16 @@ namespace IceInternal // private bool run(BasicStream stream) { - if(_sizeMax > 1) + if(sizeMax_ > 1) { lock(this) { - while(!_promote) + while(!promote_) { System.Threading.Monitor.Wait(this); } - _promote = false; + promote_ = false; } #if TRACE_THREAD @@ -497,7 +497,7 @@ namespace IceInternal ObjectAdapterFactory factory; try { - factory = _instance.objectAdapterFactory(); + factory = instance_.objectAdapterFactory(); } catch(Ice.CommunicatorDestroyedException) { @@ -531,7 +531,7 @@ namespace IceInternal { string s = "exception in `" + _prefix + "' while calling finished():\n" + ex + "\n" + handler.ToString(); - _instance.logger().error(s); + instance_.logger().error(s); } // @@ -577,9 +577,9 @@ namespace IceInternal { if(handler.datagram()) { - if(_instance.properties().getPropertyAsInt("Ice.Warn.Connections") > 0) + if(instance_.properties().getPropertyAsInt("Ice.Warn.Connections") > 0) { - _instance.logger().warning("datagram connection exception:\n" + ex + + instance_.logger().warning("datagram connection exception:\n" + ex + handler.ToString()); } } @@ -595,7 +595,7 @@ namespace IceInternal continue; } - stream.swap(handler._stream); + stream.swap(handler.stream_); Debug.Assert(stream.pos() == stream.size()); } @@ -609,7 +609,7 @@ namespace IceInternal catch(Ice.LocalException ex) { string s = "exception in `" + _prefix + "' while calling message():\n" + ex; - _instance.logger().error(s); + instance_.logger().error(s); } // @@ -626,7 +626,7 @@ namespace IceInternal } } - if(_sizeMax > 1) + if(sizeMax_ > 1) { lock(this) { @@ -636,12 +636,12 @@ namespace IceInternal // First we reap threads that have been // destroyed before. // - int sz = _threads.Count; - Debug.Assert(_running <= sz); - if(_running < sz) + int sz = threads_.Count; + Debug.Assert(running_ <= sz); + if(running_ < sz) { ArrayList liveThreads = new ArrayList(); - foreach(EventHandlerThread thread in _threads) + foreach(EventHandlerThread thread in threads_) { if(!thread.IsAlive()) { @@ -652,7 +652,7 @@ namespace IceInternal liveThreads.Add(thread); } } - _threads = liveThreads; + threads_ = liveThreads; } // @@ -669,48 +669,48 @@ namespace IceInternal // but want the number of threads to slowly decline to // the configured minimum. // - double inUse = (double)_inUse; - if(_load < inUse) + double inUse = (double)inUse_; + if(load_ < inUse) { - _load = inUse; + load_ = inUse; } else { double loadFactor = 0.05; // TODO: Configurable? double oneMinusLoadFactor = 1 - loadFactor; - _load = _load * oneMinusLoadFactor + inUse * loadFactor; + load_ = load_ * oneMinusLoadFactor + inUse * loadFactor; } - if(_running > _size) + if(running_ > size_) { - int load = (int)(_load + 0.5); + int load = (int)(load_ + 0.5); // // We add one to the load factor because on // additional thread is needed for select(). // - if(load + 1 < _running) + if(load + 1 < running_) { - Debug.Assert(_inUse > 0); - --_inUse; + Debug.Assert(inUse_ > 0); + --inUse_; - Debug.Assert(_running > 0); - --_running; + Debug.Assert(running_ > 0); + --running_; return false; } } - Debug.Assert(_inUse > 0); - --_inUse; + Debug.Assert(inUse_ > 0); + --inUse_; } - while(!_promote) + while(!promote_) { System.Threading.Monitor.Wait(this); } - _promote = false; + promote_ = false; } #if TRACE_THREAD @@ -722,7 +722,7 @@ namespace IceInternal private void read(EventHandler handler) { - BasicStream stream = handler._stream; + BasicStream stream = handler.stream_; if(stream.size() == 0) { @@ -783,7 +783,7 @@ namespace IceInternal { throw new Ice.IllegalMessageSizeException(); } - if(size > _instance.messageSizeMax()) + if(size > instance_.messageSizeMax()) { throw new Ice.MemoryLimitException(); } @@ -797,9 +797,9 @@ namespace IceInternal { if(handler.datagram()) { - if(_warnUdp) + if(warnUdp_) { - _instance.logger().warning("DatagramLimitException: maximum size of " + stream.pos() + + instance_.logger().warning("DatagramLimitException: maximum size of " + stream.pos() + " exceeded"); } stream.pos(0); @@ -868,7 +868,7 @@ namespace IceInternal } } - private Instance _instance; + private Instance instance_; private bool _destroyed; private readonly string _prefix; private readonly string _programNamePrefix; @@ -884,91 +884,91 @@ namespace IceInternal private sealed class EventHandlerThread { - private ThreadPool _threadPool; + private ThreadPool thread_Pool; internal EventHandlerThread(ThreadPool threadPool, string name) : base() { - _threadPool = threadPool; - _name = name; + thread_Pool = threadPool; + name_ = name; } public bool IsAlive() { - return _thread.IsAlive; + return thread_.IsAlive; } public void Join() { - _thread.Join(); + thread_.Join(); } public void Start() { - _thread = new Thread(new ThreadStart(Run)); - _thread.Name = _name; - _thread.Start(); + thread_ = new Thread(new ThreadStart(Run)); + thread_.Name = name_; + thread_.Start(); } public void Run() { - BasicStream stream = new BasicStream(_threadPool._instance); + BasicStream stream = new BasicStream(thread_Pool.instance_); bool promote; try { - promote = _threadPool.run(stream); + promote = thread_Pool.run(stream); } catch(Ice.LocalException ex) { - string s = "exception in `" + _threadPool._prefix + "' thread " + _thread.Name + ":\n" + ex; - _threadPool._instance.logger().error(s); + string s = "exception in `" + thread_Pool._prefix + "' thread " + thread_.Name + ":\n" + ex; + thread_Pool.instance_.logger().error(s); promote = true; } catch(System.Exception ex) { - string s = "unknown exception in `" + _threadPool._prefix + "' thread " + _thread.Name + ":\n" + ex; - _threadPool._instance.logger().error(s); + string s = "unknown exception in `" + thread_Pool._prefix + "' thread " + thread_.Name + ":\n" + ex; + thread_Pool.instance_.logger().error(s); promote = true; } - if(promote && _threadPool._sizeMax > 1) + if(promote && thread_Pool.sizeMax_ > 1) { // - // Promote a follower, but w/o modifying _inUse or + // Promote a follower, but w/o modifying inUse_ or // creating new threads. // - lock(_threadPool) + lock(thread_Pool) { - Debug.Assert(!_threadPool._promote); - _threadPool._promote = true; - System.Threading.Monitor.Pulse(_threadPool); + Debug.Assert(!thread_Pool.promote_); + thread_Pool.promote_ = true; + System.Threading.Monitor.Pulse(thread_Pool); } } #if TRACE_THREAD - _threadPool.trace("run() terminated"); + thread_Pool.trace("run() terminated"); #endif } - private string _name; - private Thread _thread; + private string name_; + private Thread thread_; } - private readonly int _size; // Number of threads that are pre-created. - private readonly int _sizeMax; // Maximum number of threads. - private readonly int _sizeWarn; // If _inUse reaches _sizeWarn, a "low on threads" warning will be printed. + private readonly int size_; // Number of threads that are pre-created. + private readonly int sizeMax_; // Maximum number of threads. + private readonly int sizeWarn_; // If inUse_ reaches sizeWarn_, a "low on threads" warning will be printed. - private ArrayList _threads; // All threads, running or not. - private int _threadIndex; // For assigning thread names. - private int _running; // Number of running threads. - private int _inUse; // Number of threads that are currently in use. - private double _load; // Current load in number of threads. + private ArrayList threads_; // All threads, running or not. + private int threadIndex_; // For assigning thread names. + private int running_; // Number of running threads. + private int inUse_; // Number of threads that are currently in use. + private double load_; // Current load in number of threads. - private bool _promote; + private bool promote_; - private readonly bool _warnUdp; + private readonly bool warnUdp_; } } diff --git a/cs/src/Ice/TraceUtil.cs b/cs/src/Ice/TraceUtil.cs index 3b51e45c426..8d420c32982 100755 --- a/cs/src/Ice/TraceUtil.cs +++ b/cs/src/Ice/TraceUtil.cs @@ -295,7 +295,7 @@ namespace IceInternal try { Ice.Identity identity = new Ice.Identity(); - identity.__read(stream); + identity.read__(stream); o.Write("\nidentity = " + Ice.Util.identityToString(identity)); string[] facet = stream.readStringSeq(); diff --git a/cs/src/Ice/UdpEndpointI.cs b/cs/src/Ice/UdpEndpointI.cs index 7a862dee93d..d72af1410c6 100755 --- a/cs/src/Ice/UdpEndpointI.cs +++ b/cs/src/Ice/UdpEndpointI.cs @@ -18,7 +18,7 @@ namespace IceInternal public UdpEndpointI(Instance instance, string ho, int po, bool co) { - _instance = instance; + instance_ = instance; _host = ho; _port = po; _protocolMajor = Protocol.protocolMajor; @@ -32,7 +32,7 @@ namespace IceInternal public UdpEndpointI(Instance instance, string str) { - _instance = instance; + instance_ = instance; _host = null; _port = 0; _protocolMajor = Protocol.protocolMajor; @@ -263,7 +263,7 @@ namespace IceInternal public UdpEndpointI(BasicStream s) { - _instance = s.instance(); + instance_ = s.instance(); s.startReadEncaps(); _host = s.readString(); _port = s.readInt(); @@ -319,7 +319,7 @@ namespace IceInternal // // Convert the endpoint to its string form // - public override string _Ice_toString() + public override string ice_toString_() { string s = "udp"; @@ -389,7 +389,7 @@ namespace IceInternal } else { - return new UdpEndpointI(_instance, _host, _port, compress); + return new UdpEndpointI(instance_, _host, _port, compress); } } @@ -433,7 +433,7 @@ namespace IceInternal // public override Transceiver clientTransceiver() { - return new UdpTransceiver(_instance, _host, _port); + return new UdpTransceiver(instance_, _host, _port); } // @@ -445,8 +445,8 @@ namespace IceInternal // public override Transceiver serverTransceiver(ref EndpointI endpoint) { - UdpTransceiver p = new UdpTransceiver(_instance, _host, _port, _connect); - endpoint = new UdpEndpointI(_instance, _host, p.effectivePort(), _compress); + UdpTransceiver p = new UdpTransceiver(instance_, _host, _port, _connect); + endpoint = new UdpEndpointI(instance_, _host, p.effectivePort(), _compress); return p; } @@ -650,7 +650,7 @@ namespace IceInternal _hashCode = 5 * _hashCode + (_compress?1:0); } - private Instance _instance; + private Instance instance_; private string _host; private int _port; private byte _protocolMajor; @@ -666,7 +666,7 @@ namespace IceInternal { internal UdpEndpointFactory(Instance instance) { - _instance = instance; + instance_ = instance; } public short type() @@ -681,7 +681,7 @@ namespace IceInternal public EndpointI create(string str) { - return new UdpEndpointI(_instance, str); + return new UdpEndpointI(instance_, str); } public EndpointI read(BasicStream s) @@ -691,10 +691,10 @@ namespace IceInternal public void destroy() { - _instance = null; + instance_ = null; } - private Instance _instance; + private Instance instance_; } } diff --git a/cs/src/Ice/UnknownEndpointI.cs b/cs/src/Ice/UnknownEndpointI.cs index 7c151f7d361..72f7bf04213 100755 --- a/cs/src/Ice/UnknownEndpointI.cs +++ b/cs/src/Ice/UnknownEndpointI.cs @@ -37,7 +37,7 @@ namespace IceInternal // // Convert the endpoint to its string form // - public override string _Ice_toString() + public override string ice_toString_() { return ""; } diff --git a/cs/src/Ice/Util.cs b/cs/src/Ice/Util.cs index 55615bbcde6..5f37c876d6c 100755 --- a/cs/src/Ice/Util.cs +++ b/cs/src/Ice/Util.cs @@ -175,7 +175,7 @@ namespace Ice public static string generateUUID() { - if(AssemblyUtil._platform == AssemblyUtil.Platform.Windows) + if(AssemblyUtil.platform_ == AssemblyUtil.Platform.Windows) { // // Under Windows, with both .NET and Mono, there is no /dev/urandom. diff --git a/cs/src/Ice/ValueWriter.cs b/cs/src/Ice/ValueWriter.cs index de78b61d617..0f808dea93a 100755 --- a/cs/src/Ice/ValueWriter.cs +++ b/cs/src/Ice/ValueWriter.cs @@ -71,7 +71,7 @@ namespace IceInternal { writeName(name, output); Ice.ObjectPrxHelperBase proxy = (Ice.ObjectPrxHelperBase)val; - output.print(proxy.__reference().ToString()); + output.print(proxy.reference__().ToString()); } else if(val is Ice.Object) { diff --git a/cs/src/Ice/XMLOutput.cs b/cs/src/Ice/XMLOutput.cs index 5cb48caa1df..3ddbab581f7 100755 --- a/cs/src/Ice/XMLOutput.cs +++ b/cs/src/Ice/XMLOutput.cs @@ -19,50 +19,50 @@ public class XMLOutput : OutputBase public XMLOutput() : base() { - _elementStack = new Stack(); - _se = false; - _text = false; - _sgml = false; - _escape = false; + elementStack_ = new Stack(); + se_ = false; + text_ = false; + sgml_ = false; + escape_ = false; } public XMLOutput(StreamWriter writer) : base(writer) { - _elementStack = new Stack(); - _se = false; - _text = false; - _sgml = false; - _escape = false; + elementStack_ = new Stack(); + se_ = false; + text_ = false; + sgml_ = false; + escape_ = false; } public XMLOutput(string s) : base(s) { - _elementStack = new Stack(); - _se = false; - _text = false; - _sgml = false; - _escape = false; + elementStack_ = new Stack(); + se_ = false; + text_ = false; + sgml_ = false; + escape_ = false; } virtual public void setSGML(bool sgml) { - _sgml = true; + sgml_ = true; } public override void print(string s) { - if(_se) + if(se_) { - _out.Write(">"); - _se = false; + out_.Write(">"); + se_ = false; } - _text = true; + text_ = true; - if(_escape) + if(escape_) { string escaped = escape(s); base.print(escaped); @@ -83,10 +83,10 @@ public class XMLOutput : OutputBase public override void nl() { - if(_se) + if(se_) { - _se = false; - _out.Write(">"); + se_ = false; + out_.Write(">"); } base.nl(); } @@ -101,18 +101,18 @@ public class XMLOutput : OutputBase // deferred until either the end-element (in which case a /> is // emitted) or until something is displayed. // - if(_escape) + if(escape_) { - _out.Write('<'); - _out.Write(escape(element)); + out_.Write('<'); + out_.Write(escape(element)); } else { - _out.Write('<'); - _out.Write(element); + out_.Write('<'); + out_.Write(element); } - _se = true; - _text = false; + se_ = true; + text_ = false; int pos = element.IndexOf(' '); if (pos == - 1) @@ -121,55 +121,55 @@ public class XMLOutput : OutputBase } if (pos == - 1) { - _elementStack.Push(element); + elementStack_.Push(element); } else { - _elementStack.Push(element.Substring(0, pos - 1)); + elementStack_.Push(element.Substring(0, pos - 1)); } - ++_pos; // TODO: ??? + ++pos_; // TODO: ??? inc(); - _separator = false; + separator_ = false; return this; } public virtual XMLOutput ee() { - string element = (string)_elementStack.Pop(); + string element = (string)elementStack_.Pop(); dec(); - if(_se) + if(se_) { // // SGML (docbook) doesn't support <foo/> // - if(_sgml) + if(sgml_) { - _out.Write("></"); - _out.Write(element); - _out.Write(">"); + out_.Write("></"); + out_.Write(element); + out_.Write(">"); } else { - _out.Write("/>"); + out_.Write("/>"); } } else { - if(!_text) + if(!text_) { nl(); } - _out.Write("</"); - _out.Write(element); - _out.Write(">"); + out_.Write("</"); + out_.Write(element); + out_.Write(">"); } - --_pos; // TODO: ??? + --pos_; // TODO: ??? - _se = false; - _text = false; + se_ = false; + text_ = false; return this; } @@ -179,35 +179,35 @@ public class XMLOutput : OutputBase // // Precondition: Attributes can only be attached to elements. // - Debug.Assert(_se); - _out.Write(" "); - _out.Write(name); - _out.Write("=\""); - _out.Write(escape(val)); - _out.Write("\""); + Debug.Assert(se_); + out_.Write(" "); + out_.Write(name); + out_.Write("=\""); + out_.Write(escape(val)); + out_.Write("\""); return this; } public virtual XMLOutput startEscapes() { - _escape = true; + escape_ = true; return this; } public virtual XMLOutput endEscapes() { - _escape = false; + escape_ = false; return this; } public virtual string currentElement() { - if(_elementStack.Count > 0) + if(elementStack_.Count > 0) { - return (string)_elementStack.Peek(); + return (string)elementStack_.Peek(); } else { @@ -286,13 +286,13 @@ public class XMLOutput : OutputBase return v; } - private Stack _elementStack; + private Stack elementStack_; - internal bool _se; - internal bool _text; + internal bool se_; + internal bool text_; - private bool _sgml; - private bool _escape; + private bool sgml_; + private bool escape_; } } diff --git a/cs/src/IcePack/AssemblyInfo.cs b/cs/src/IcePack/AssemblyInfo.cs index 2b485c60270..a8b4d0fd6f0 100755 --- a/cs/src/IcePack/AssemblyInfo.cs +++ b/cs/src/IcePack/AssemblyInfo.cs @@ -7,9 +7,12 @@ // // ********************************************************************** +using System; using System.Reflection; using System.Runtime.CompilerServices; +[assembly: CLSCompliant(true)] + [assembly: AssemblyTitle("icepackcs")] [assembly: AssemblyDescription("IcePack run-time support")] [assembly: AssemblyCompany("ZeroC, Inc.")] diff --git a/cs/src/IcePatch2/AssemblyInfo.cs b/cs/src/IcePatch2/AssemblyInfo.cs index cf3a01faebe..6142ca03343 100755 --- a/cs/src/IcePatch2/AssemblyInfo.cs +++ b/cs/src/IcePatch2/AssemblyInfo.cs @@ -7,9 +7,12 @@ // // ********************************************************************** +using System; using System.Reflection; using System.Runtime.CompilerServices; +[assembly: CLSCompliant(true)] + [assembly: AssemblyTitle("icepatch2cs")] [assembly: AssemblyDescription("IcePatch2 run-time support")] [assembly: AssemblyCompany("ZeroC, Inc.")] diff --git a/cs/src/IceStorm/AssemblyInfo.cs b/cs/src/IceStorm/AssemblyInfo.cs index 657a5d3f8b4..752d8a65929 100755 --- a/cs/src/IceStorm/AssemblyInfo.cs +++ b/cs/src/IceStorm/AssemblyInfo.cs @@ -7,9 +7,12 @@ // // ********************************************************************** +using System; using System.Reflection; using System.Runtime.CompilerServices; +[assembly: CLSCompliant(true)] + [assembly: AssemblyTitle("icestormcs")] [assembly: AssemblyDescription("IceStorm run-time support")] [assembly: AssemblyCompany("ZeroC, Inc.")] diff --git a/cs/test/Ice/adapterDeactivation/TestI.cs b/cs/test/Ice/adapterDeactivation/TestI.cs index 242698b8628..42a74efbf9d 100755 --- a/cs/test/Ice/adapterDeactivation/TestI.cs +++ b/cs/test/Ice/adapterDeactivation/TestI.cs @@ -9,7 +9,7 @@ using Test; -public sealed class TestI : _TestIntfDisp +public sealed class TestI : TestIntfDisp_ { public override void transient(Ice.Current current) { diff --git a/cs/test/Ice/checksum/server/TestI.cs b/cs/test/Ice/checksum/server/TestI.cs index 855a89b035c..195fa2e19d0 100755 --- a/cs/test/Ice/checksum/server/TestI.cs +++ b/cs/test/Ice/checksum/server/TestI.cs @@ -9,7 +9,7 @@ namespace Test { - public sealed class ChecksumI : _ChecksumDisp + public sealed class ChecksumI : ChecksumDisp_ { public ChecksumI(Ice.ObjectAdapter adapter) { diff --git a/cs/test/Ice/exceptions/EmptyI.cs b/cs/test/Ice/exceptions/EmptyI.cs index 8ef13ebdc7c..bf63e1216c0 100755 --- a/cs/test/Ice/exceptions/EmptyI.cs +++ b/cs/test/Ice/exceptions/EmptyI.cs @@ -7,6 +7,6 @@ // // ********************************************************************** -public sealed class EmptyI : Test._EmptyDisp +public sealed class EmptyI : Test.EmptyDisp_ { } diff --git a/cs/test/Ice/exceptions/ThrowerAMDI.cs b/cs/test/Ice/exceptions/ThrowerAMDI.cs index be152029e9e..376363a0f0f 100644 --- a/cs/test/Ice/exceptions/ThrowerAMDI.cs +++ b/cs/test/Ice/exceptions/ThrowerAMDI.cs @@ -10,7 +10,7 @@ using System.Diagnostics; using Test; -public class ThrowerI : _ThrowerDisp +public class ThrowerI : ThrowerDisp_ { public ThrowerI(Ice.ObjectAdapter adapter) { diff --git a/cs/test/Ice/exceptions/ThrowerI.cs b/cs/test/Ice/exceptions/ThrowerI.cs index 9043bce9b53..c0f6fa6264b 100755 --- a/cs/test/Ice/exceptions/ThrowerI.cs +++ b/cs/test/Ice/exceptions/ThrowerI.cs @@ -11,7 +11,7 @@ using System; using System.Diagnostics; using Test; -public sealed class ThrowerI : _ThrowerDisp +public sealed class ThrowerI : ThrowerDisp_ { public ThrowerI(Ice.ObjectAdapter adapter) { diff --git a/cs/test/Ice/facets/AI.cs b/cs/test/Ice/facets/AI.cs index cfdd9527d46..25110378376 100755 --- a/cs/test/Ice/facets/AI.cs +++ b/cs/test/Ice/facets/AI.cs @@ -9,7 +9,7 @@ using Test; -public sealed class AI : _ADisp +public sealed class AI : ADisp_ { public AI() { diff --git a/cs/test/Ice/facets/BI.cs b/cs/test/Ice/facets/BI.cs index eb1a8f1c4ae..d83182b84c8 100755 --- a/cs/test/Ice/facets/BI.cs +++ b/cs/test/Ice/facets/BI.cs @@ -9,7 +9,7 @@ using Test; -public sealed class BI : _BDisp +public sealed class BI : BDisp_ { public BI() { diff --git a/cs/test/Ice/facets/CI.cs b/cs/test/Ice/facets/CI.cs index 8b4e0f54085..fb6fa4f4bb9 100755 --- a/cs/test/Ice/facets/CI.cs +++ b/cs/test/Ice/facets/CI.cs @@ -9,7 +9,7 @@ using Test; -public sealed class CI : _CDisp +public sealed class CI : CDisp_ { public CI() { diff --git a/cs/test/Ice/facets/DI.cs b/cs/test/Ice/facets/DI.cs index 68fdd981abe..75d9f61bd87 100755 --- a/cs/test/Ice/facets/DI.cs +++ b/cs/test/Ice/facets/DI.cs @@ -9,7 +9,7 @@ using Test; -public sealed class DI : _DDisp +public sealed class DI : DDisp_ { public DI() { diff --git a/cs/test/Ice/facets/EI.cs b/cs/test/Ice/facets/EI.cs index 773a7de4461..7187baa405b 100755 --- a/cs/test/Ice/facets/EI.cs +++ b/cs/test/Ice/facets/EI.cs @@ -9,7 +9,7 @@ using Test; -public sealed class EI : _EDisp +public sealed class EI : EDisp_ { public EI() { diff --git a/cs/test/Ice/facets/EmptyI.cs b/cs/test/Ice/facets/EmptyI.cs index 8ef13ebdc7c..bf63e1216c0 100755 --- a/cs/test/Ice/facets/EmptyI.cs +++ b/cs/test/Ice/facets/EmptyI.cs @@ -7,6 +7,6 @@ // // ********************************************************************** -public sealed class EmptyI : Test._EmptyDisp +public sealed class EmptyI : Test.EmptyDisp_ { } diff --git a/cs/test/Ice/facets/FI.cs b/cs/test/Ice/facets/FI.cs index dc0b75d2c95..3385430e436 100755 --- a/cs/test/Ice/facets/FI.cs +++ b/cs/test/Ice/facets/FI.cs @@ -9,7 +9,7 @@ using Test; -public sealed class FI : _FDisp +public sealed class FI : FDisp_ { public FI() { diff --git a/cs/test/Ice/facets/GI.cs b/cs/test/Ice/facets/GI.cs index 29d545588e1..9c1d16b2e7e 100755 --- a/cs/test/Ice/facets/GI.cs +++ b/cs/test/Ice/facets/GI.cs @@ -9,7 +9,7 @@ using Test; -public sealed class GI : _GDisp +public sealed class GI : GDisp_ { public GI(Ice.Communicator communicator) { diff --git a/cs/test/Ice/facets/HI.cs b/cs/test/Ice/facets/HI.cs index 7460b0c73b3..192ebf6dd1b 100755 --- a/cs/test/Ice/facets/HI.cs +++ b/cs/test/Ice/facets/HI.cs @@ -9,7 +9,7 @@ using Test; -public sealed class HI : _HDisp +public sealed class HI : HDisp_ { public HI(Ice.Communicator communicator) { diff --git a/cs/test/Ice/faultTolerance/TestI.cs b/cs/test/Ice/faultTolerance/TestI.cs index e418caa818f..383df70f32c 100755 --- a/cs/test/Ice/faultTolerance/TestI.cs +++ b/cs/test/Ice/faultTolerance/TestI.cs @@ -13,7 +13,7 @@ using System.Threading; using IceInternal; using Test; -public sealed class TestI : _TestIntfDisp +public sealed class TestI : TestIntfDisp_ { public TestI(Ice.ObjectAdapter adapter) { @@ -32,8 +32,8 @@ public sealed class TestI : _TestIntfDisp // process, which causes it to hang around for a bit cleaning // up. We want the process to die immmediately. // - if(AssemblyUtil._platform == AssemblyUtil.Platform.NonWindows - && AssemblyUtil._runtime == AssemblyUtil.Runtime.Mono) + if(AssemblyUtil.platform_ == AssemblyUtil.Platform.NonWindows + && AssemblyUtil.runtime_ == AssemblyUtil.Runtime.Mono) { #if __MonoCS__ Mono.Unix.Syscall.kill(_pid, Mono.Unix.Signum.SIGKILL); diff --git a/cs/test/Ice/inheritance/IAI.cs b/cs/test/Ice/inheritance/IAI.cs index 2fe0945a314..371735c43fa 100755 --- a/cs/test/Ice/inheritance/IAI.cs +++ b/cs/test/Ice/inheritance/IAI.cs @@ -7,7 +7,7 @@ // // ********************************************************************** -public sealed class IAI : Test.MA._IADisp +public sealed class IAI : Test.MA.IADisp_ { public IAI() { diff --git a/cs/test/Ice/inheritance/IB1I.cs b/cs/test/Ice/inheritance/IB1I.cs index 0cb596c03a9..40e6b454df1 100755 --- a/cs/test/Ice/inheritance/IB1I.cs +++ b/cs/test/Ice/inheritance/IB1I.cs @@ -7,7 +7,7 @@ // // ********************************************************************** -public sealed class IB1I : Test.MB._IB1Disp +public sealed class IB1I : Test.MB.IB1Disp_ { public IB1I() { diff --git a/cs/test/Ice/inheritance/IB2I.cs b/cs/test/Ice/inheritance/IB2I.cs index 016e2362f1b..3e2169e5b6c 100755 --- a/cs/test/Ice/inheritance/IB2I.cs +++ b/cs/test/Ice/inheritance/IB2I.cs @@ -7,7 +7,7 @@ // // ********************************************************************** -public sealed class IB2I : Test.MB._IB2Disp +public sealed class IB2I : Test.MB.IB2Disp_ { public IB2I() { diff --git a/cs/test/Ice/inheritance/ICI.cs b/cs/test/Ice/inheritance/ICI.cs index 90543a27b30..82fd8f96f73 100755 --- a/cs/test/Ice/inheritance/ICI.cs +++ b/cs/test/Ice/inheritance/ICI.cs @@ -7,7 +7,7 @@ // // ********************************************************************** -public sealed class ICI : Test.MA._ICDisp +public sealed class ICI : Test.MA.ICDisp_ { public ICI() { diff --git a/cs/test/Ice/inheritance/InitialI.cs b/cs/test/Ice/inheritance/InitialI.cs index 83336f26d15..698a0db8b5d 100755 --- a/cs/test/Ice/inheritance/InitialI.cs +++ b/cs/test/Ice/inheritance/InitialI.cs @@ -7,7 +7,7 @@ // // ********************************************************************** -public sealed class InitialI : Test._InitialDisp +public sealed class InitialI : Test.InitialDisp_ { public InitialI(Ice.ObjectAdapter adapter) { diff --git a/cs/test/Ice/location/HelloI.cs b/cs/test/Ice/location/HelloI.cs index ce2d36dc78e..fc17cf27903 100755 --- a/cs/test/Ice/location/HelloI.cs +++ b/cs/test/Ice/location/HelloI.cs @@ -9,7 +9,7 @@ using Test; -public class HelloI : _HelloDisp +public class HelloI : HelloDisp_ { public override void sayHello(Ice.Current current) { diff --git a/cs/test/Ice/location/ServerLocator.cs b/cs/test/Ice/location/ServerLocator.cs index 19cc7e63921..fc899897a47 100755 --- a/cs/test/Ice/location/ServerLocator.cs +++ b/cs/test/Ice/location/ServerLocator.cs @@ -7,7 +7,7 @@ // // ********************************************************************** -public class ServerLocator : Ice._LocatorDisp +public class ServerLocator : Ice.LocatorDisp_ { public ServerLocator(ServerLocatorRegistry registry, Ice.LocatorRegistryPrx registryPrx) { diff --git a/cs/test/Ice/location/ServerLocatorRegistry.cs b/cs/test/Ice/location/ServerLocatorRegistry.cs index 59f3260a171..2d6d1d87ff9 100755 --- a/cs/test/Ice/location/ServerLocatorRegistry.cs +++ b/cs/test/Ice/location/ServerLocatorRegistry.cs @@ -9,7 +9,7 @@ using System.Collections; -public class ServerLocatorRegistry : Ice._LocatorRegistryDisp +public class ServerLocatorRegistry : Ice.LocatorRegistryDisp_ { public ServerLocatorRegistry() { diff --git a/cs/test/Ice/location/ServerManagerI.cs b/cs/test/Ice/location/ServerManagerI.cs index d14643e285b..dc6a16ee8b6 100755 --- a/cs/test/Ice/location/ServerManagerI.cs +++ b/cs/test/Ice/location/ServerManagerI.cs @@ -10,7 +10,7 @@ using System.Collections; using Test; -public class ServerManagerI : _ServerManagerDisp +public class ServerManagerI : ServerManagerDisp_ { internal ServerManagerI(Ice.ObjectAdapter adapter, ServerLocatorRegistry registry) { diff --git a/cs/test/Ice/location/TestI.cs b/cs/test/Ice/location/TestI.cs index 1d8d492cd0d..1ae6f2d8c62 100755 --- a/cs/test/Ice/location/TestI.cs +++ b/cs/test/Ice/location/TestI.cs @@ -9,7 +9,7 @@ using Test; -public class TestI : _TestIntfDisp +public class TestI : TestIntfDisp_ { internal TestI(Ice.ObjectAdapter adapter1, Ice.ObjectAdapter adapter2, ServerLocatorRegistry registry) { diff --git a/cs/test/Ice/operations/TestCheckedCastAMDI.cs b/cs/test/Ice/operations/TestCheckedCastAMDI.cs index 7e8a2b980f0..afe6b6f1b12 100644 --- a/cs/test/Ice/operations/TestCheckedCastAMDI.cs +++ b/cs/test/Ice/operations/TestCheckedCastAMDI.cs @@ -7,7 +7,7 @@ // // ********************************************************************** -public sealed class TestCheckedCastI : Test._TestCheckedCastDisp +public sealed class TestCheckedCastI : Test.TestCheckedCastDisp_ { public override void getContext_async(Test.AMD_TestCheckedCast_getContext cb, Ice.Current current) diff --git a/cs/test/Ice/operations/TestCheckedCastI.cs b/cs/test/Ice/operations/TestCheckedCastI.cs index de34fa824f4..9c76fc28e5e 100644 --- a/cs/test/Ice/operations/TestCheckedCastI.cs +++ b/cs/test/Ice/operations/TestCheckedCastI.cs @@ -7,7 +7,7 @@ // // ********************************************************************** -public sealed class TestCheckedCastI : Test._TestCheckedCastDisp +public sealed class TestCheckedCastI : Test.TestCheckedCastDisp_ { public override Ice.Context getContext(Ice.Current current) diff --git a/cs/test/Ice/slicing/exceptions/TestAMDI.cs b/cs/test/Ice/slicing/exceptions/TestAMDI.cs index 51c973ddb05..41c757e05a1 100755 --- a/cs/test/Ice/slicing/exceptions/TestAMDI.cs +++ b/cs/test/Ice/slicing/exceptions/TestAMDI.cs @@ -10,7 +10,7 @@ using System; using Test; -public sealed class TestI : _TestIntfDisp +public sealed class TestI : TestIntfDisp_ { public TestI(Ice.ObjectAdapter adapter) { diff --git a/cs/test/Ice/slicing/exceptions/TestI.cs b/cs/test/Ice/slicing/exceptions/TestI.cs index d83b833fb88..600aad60db5 100755 --- a/cs/test/Ice/slicing/exceptions/TestI.cs +++ b/cs/test/Ice/slicing/exceptions/TestI.cs @@ -9,7 +9,7 @@ using Test; -public sealed class TestI : _TestIntfDisp +public sealed class TestI : TestIntfDisp_ { public TestI(Ice.ObjectAdapter adapter) { diff --git a/cs/test/Ice/slicing/objects/TestAMDI.cs b/cs/test/Ice/slicing/objects/TestAMDI.cs index 078949f02b3..6a261f5486f 100755 --- a/cs/test/Ice/slicing/objects/TestAMDI.cs +++ b/cs/test/Ice/slicing/objects/TestAMDI.cs @@ -10,7 +10,7 @@ using System; using Test; -public sealed class TestI : _TestIntfDisp +public sealed class TestI : TestIntfDisp_ { public TestI(Ice.ObjectAdapter adapter) { diff --git a/cs/test/Ice/slicing/objects/TestI.cs b/cs/test/Ice/slicing/objects/TestI.cs index 2be2268c7f3..b03df7b6d4b 100755 --- a/cs/test/Ice/slicing/objects/TestI.cs +++ b/cs/test/Ice/slicing/objects/TestI.cs @@ -10,7 +10,7 @@ using System; using Test; -public sealed class TestI : _TestIntfDisp +public sealed class TestI : TestIntfDisp_ { public TestI(Ice.ObjectAdapter adapter) { diff --git a/cs/test/Ice/stream/Client.cs b/cs/test/Ice/stream/Client.cs index 5fed7e90873..c2366bdf08e 100644 --- a/cs/test/Ice/stream/Client.cs +++ b/cs/test/Ice/stream/Client.cs @@ -68,7 +68,7 @@ public class Client public override void write(Ice.OutputStream @out) { - obj.__write(@out); + obj.write__(@out); called = true; } @@ -81,7 +81,7 @@ public class Client public override void read(Ice.InputStream @in, bool rid) { obj = new Test.MyClass(); - obj.__read(@in, rid); + obj.read__(@in, rid); called = true; } @@ -228,11 +228,11 @@ public class Client s.str = "7"; s.e = Test.MyEnum.enum2; s.p = Test.MyClassPrxHelper.uncheckedCast(communicator.stringToProxy("test:default")); - s.__write(@out); + s.write__(@out); byte[] data = @out.finished(); @in = Ice.Util.createInputStream(communicator, data); Test.SmallStruct s2 = new Test.SmallStruct(); - s2.__read(@in); + s2.read__(@in); test(s2.Equals(s)); @out.destroy(); @in.destroy(); diff --git a/vb/CHANGES b/vb/CHANGES index 443f50bc1a2..058cec943b3 100644 --- a/vb/CHANGES +++ b/vb/CHANGES @@ -1,6 +1,34 @@ Changes since version 2.1.2 --------------------------- +- The Ice run-time libraries are now marked as CLS-compliant + assemblies. In addition, the generated code is now also + CLS-compliant. + + This involves one change to the VB language mapping: + + The skeleton class used be called _<interface-name>Disp but + is now called <interface-name>Disp_. + + For example, if you previously had: + + Public Class MyIntfI + Inherits _MyIntfDisp + ' ... + End Class + + you now have to write: + + Public Class MyIntfI + Inherits MyIntfDisp_ + ' ... + End Class + + Similarly, for the Tie mapping, the location of the underscore + has changed: + + _MyIntfTie -> MyIntfTie_ + - Added support for the thread-per-connection concurrency model. - Changed the way servant locators work if a server has a servant diff --git a/vb/demo/Glacier2/callback/CallbackI.vb b/vb/demo/Glacier2/callback/CallbackI.vb index 3938c59d52a..c4d6a2fee20 100644 --- a/vb/demo/Glacier2/callback/CallbackI.vb +++ b/vb/demo/Glacier2/callback/CallbackI.vb @@ -11,7 +11,7 @@ Imports glacier2demo.Demo Imports System Public NotInheritable Class CallbackI - Inherits _CallbackDisp + Inherits CallbackDisp_ Public Overloads Overrides Sub initiateCallback(ByVal proxy As CallbackReceiverPrx, ByVal current As Ice.Current) Console.WriteLine("initiating callback") diff --git a/vb/demo/Glacier2/callback/CallbackReceiverI.vb b/vb/demo/Glacier2/callback/CallbackReceiverI.vb index 7e71a3cad6c..edbd97ae510 100644 --- a/vb/demo/Glacier2/callback/CallbackReceiverI.vb +++ b/vb/demo/Glacier2/callback/CallbackReceiverI.vb @@ -11,7 +11,7 @@ Imports glacier2demo.Demo Imports System Public NotInheritable Class CallbackReceiverI - Inherits _CallbackReceiverDisp + Inherits CallbackReceiverDisp_ Public Overloads Overrides Sub callback(ByVal current As Ice.Current) Console.WriteLine("received callback") diff --git a/vb/demo/Glacier2/callback/SessionI.vb b/vb/demo/Glacier2/callback/SessionI.vb index 47370bec446..029b2d28fcb 100644 --- a/vb/demo/Glacier2/callback/SessionI.vb +++ b/vb/demo/Glacier2/callback/SessionI.vb @@ -10,7 +10,7 @@ Imports System Public NotInheritable Class SessionI - Inherits Glacier2._SessionDisp + Inherits Glacier2.SessionDisp_ Public Sub New(ByVal userId As String) _userId = userId diff --git a/vb/demo/Glacier2/callback/SessionManagerI.vb b/vb/demo/Glacier2/callback/SessionManagerI.vb index 688dbc5e979..217e8825217 100644 --- a/vb/demo/Glacier2/callback/SessionManagerI.vb +++ b/vb/demo/Glacier2/callback/SessionManagerI.vb @@ -10,7 +10,7 @@ Imports System Public NotInheritable Class SessionManagerI - Inherits Glacier2._SessionManagerDisp + Inherits Glacier2.SessionManagerDisp_ Public Overloads Overrides Function create(ByVal userId As String, ByVal current As Ice.Current) As Glacier2.SessionPrx Console.WriteLine("creating session for user `" & userId & "'") diff --git a/vb/demo/Glacier2/callback/SessionServer.vb b/vb/demo/Glacier2/callback/SessionServer.vb index dc26170da08..dfb61f4ef59 100644 --- a/vb/demo/Glacier2/callback/SessionServer.vb +++ b/vb/demo/Glacier2/callback/SessionServer.vb @@ -12,7 +12,7 @@ Imports System Module Glacier2callbackSS NotInheritable Class DummyPermissionVerifierI - Inherits Glacier2._PermissionsVerifierDisp + Inherits Glacier2.PermissionsVerifierDisp_ Public Overloads Overrides Function checkPermissions(ByVal userId As String, ByVal password As String, ByRef reason As String, ByVal current As Ice.Current) As Boolean reason = Nothing diff --git a/vb/demo/Ice/bidir/CallbackReceiverI.vb b/vb/demo/Ice/bidir/CallbackReceiverI.vb index 441b342e83a..46341dba3c6 100755 --- a/vb/demo/Ice/bidir/CallbackReceiverI.vb +++ b/vb/demo/Ice/bidir/CallbackReceiverI.vb @@ -10,7 +10,7 @@ Imports BidirDemo
Public NotInheritable Class CallbackReceiverI
- Inherits _CallbackReceiverDisp
+ Inherits CallbackReceiverDisp_
Public Overloads Overrides Sub callback(ByVal num As Integer, ByVal current As Ice.Current)
System.Console.Out.WriteLine("received callback #" & num)
diff --git a/vb/demo/Ice/bidir/CallbackSenderI.vb b/vb/demo/Ice/bidir/CallbackSenderI.vb index c579abb56c3..f4602839128 100755 --- a/vb/demo/Ice/bidir/CallbackSenderI.vb +++ b/vb/demo/Ice/bidir/CallbackSenderI.vb @@ -11,7 +11,7 @@ Imports BidirDemo Imports System.Collections
Class CallbackSenderI
- Inherits _CallbackSenderDisp
+ Inherits CallbackSenderDisp_
Public Sub New()
_destroy = False
diff --git a/vb/demo/Ice/callback/CallbackReceiverI.vb b/vb/demo/Ice/callback/CallbackReceiverI.vb index 474cc159363..ab101b62641 100755 --- a/vb/demo/Ice/callback/CallbackReceiverI.vb +++ b/vb/demo/Ice/callback/CallbackReceiverI.vb @@ -10,7 +10,7 @@ Imports Demo Public NotInheritable Class CallbackReceiverI - Inherits _CallbackReceiverDisp + Inherits CallbackReceiverDisp_ Public Overloads Overrides Sub callback(ByVal current As Ice.Current) System.Console.Out.WriteLine("received callback") diff --git a/vb/demo/Ice/callback/CallbackSenderI.vb b/vb/demo/Ice/callback/CallbackSenderI.vb index d035d4d3494..7aeaab9b549 100755 --- a/vb/demo/Ice/callback/CallbackSenderI.vb +++ b/vb/demo/Ice/callback/CallbackSenderI.vb @@ -10,7 +10,7 @@ Imports Demo Public NotInheritable Class CallbackSenderI - Inherits _CallbackSenderDisp + Inherits CallbackSenderDisp_ Public Overloads Overrides Sub initiateCallback(ByVal proxy As CallbackReceiverPrx, ByVal current As Ice.Current) System.Console.Out.WriteLine("initiating callback") diff --git a/vb/demo/Ice/hello/HelloI.vb b/vb/demo/Ice/hello/HelloI.vb index 4074d22b57f..a8dbba07254 100755 --- a/vb/demo/Ice/hello/HelloI.vb +++ b/vb/demo/Ice/hello/HelloI.vb @@ -10,7 +10,7 @@ Imports Demo Public Class HelloI - Inherits _HelloDisp + Inherits HelloDisp_ Public Overloads Overrides Sub sayHello(ByVal current As Ice.Current) System.Console.Out.WriteLine("Hello World!") diff --git a/vb/demo/Ice/invoke/Client.vb b/vb/demo/Ice/invoke/Client.vb index 7592a730c13..8198fe107fb 100644 --- a/vb/demo/Ice/invoke/Client.vb +++ b/vb/demo/Ice/invoke/Client.vb @@ -128,7 +128,7 @@ Module InvokeC Dim s As [Structure] = New [Structure] s.name = "red" s.value = Color.red - s.__write(outStream) + s.write__(outStream) ' ' Invoke operation. diff --git a/vb/demo/Ice/invoke/PrinterI.vb b/vb/demo/Ice/invoke/PrinterI.vb index 780b081bbcb..86f05b9ddf4 100644 --- a/vb/demo/Ice/invoke/PrinterI.vb +++ b/vb/demo/Ice/invoke/PrinterI.vb @@ -63,7 +63,7 @@ Public Class PrinterI Return True ElseIf current.operation.Equals("printStruct") Then Dim s As [Structure] = New [Structure] - s.__read(inStream) + s.read__(inStream) inStream.destroy() Console.WriteLine("Printing struct: name=" & s.name & ", value=" & s.value) Return True diff --git a/vb/demo/Ice/minimal/HelloI.vb b/vb/demo/Ice/minimal/HelloI.vb index cac253b26df..da73efc98f5 100755 --- a/vb/demo/Ice/minimal/HelloI.vb +++ b/vb/demo/Ice/minimal/HelloI.vb @@ -9,7 +9,7 @@ Imports minimal.Demo
Public NotInheritable Class HelloI - Inherits _HelloDisp + Inherits HelloDisp_ Public Overloads Overrides sub sayHello(ByVal current As Ice.Current) System.Console.Out.WriteLine("Hello World!") diff --git a/vb/demo/Ice/nested/NestedI.vb b/vb/demo/Ice/nested/NestedI.vb index 737f8a14952..4eaea6d0414 100755 --- a/vb/demo/Ice/nested/NestedI.vb +++ b/vb/demo/Ice/nested/NestedI.vb @@ -10,7 +10,7 @@ Imports Demo Public Class NestedI - Inherits _NestedDisp + Inherits NestedDisp_ Public Sub New(ByVal self As NestedPrx) _self = self diff --git a/vb/demo/Ice/session/HelloI.vb b/vb/demo/Ice/session/HelloI.vb index 76ce14c116f..d12d20cf421 100755 --- a/vb/demo/Ice/session/HelloI.vb +++ b/vb/demo/Ice/session/HelloI.vb @@ -11,7 +11,7 @@ Imports sessionDemo.Demo Imports System Class HelloI - Inherits _HelloDisp
+ Inherits HelloDisp_
Public Sub New(ByVal name As String, ByVal id As Integer) _name = name diff --git a/vb/demo/Ice/session/SessionFactoryI.vb b/vb/demo/Ice/session/SessionFactoryI.vb index c31aac661bc..c5abcec7950 100755 --- a/vb/demo/Ice/session/SessionFactoryI.vb +++ b/vb/demo/Ice/session/SessionFactoryI.vb @@ -11,7 +11,7 @@ Imports sessionDemo.Demo Imports System Public Class SessionFactoryI - Inherits _SessionFactoryDisp + Inherits SessionFactoryDisp_ Public Sub New(ByVal reapThread As ReapThread) _reaper = reapThread diff --git a/vb/demo/Ice/session/SessionI.vb b/vb/demo/Ice/session/SessionI.vb index bda0c547289..805f3381805 100755 --- a/vb/demo/Ice/session/SessionI.vb +++ b/vb/demo/Ice/session/SessionI.vb @@ -12,7 +12,7 @@ Imports System Imports System.Collections Public Class SessionI - Inherits _SessionDisp + Inherits SessionDisp_ Public Sub New(ByVal name As String) diff --git a/vb/demo/Ice/throughput/ThroughputI.vb b/vb/demo/Ice/throughput/ThroughputI.vb index 5d298c3047d..e1859521280 100755 --- a/vb/demo/Ice/throughput/ThroughputI.vb +++ b/vb/demo/Ice/throughput/ThroughputI.vb @@ -10,7 +10,7 @@ Imports Demo Public NotInheritable Class ThroughputI - Inherits _ThroughputDisp + Inherits ThroughputDisp_ Public Sub New() _byteSeq = New Byte(ByteSeqSize.value) {} diff --git a/vb/demo/IcePack/hello/HelloFactoryI.vb b/vb/demo/IcePack/hello/HelloFactoryI.vb index 696da2d4393..b3652ab4488 100644 --- a/vb/demo/IcePack/hello/HelloFactoryI.vb +++ b/vb/demo/IcePack/hello/HelloFactoryI.vb @@ -12,7 +12,7 @@ Imports System.Diagnostics Imports IcePackHelloDemo Public Class HelloFactoryI - Inherits _HelloFactoryDisp + Inherits HelloFactoryDisp_ Public Overloads Overrides Function create(ByVal name As String, ByVal current As Ice.Current) As IcePackHelloDemo.HelloPrx Dim adapter As Ice.ObjectAdapter = current.adapter diff --git a/vb/demo/IcePack/simple/HelloI.vb b/vb/demo/IcePack/simple/HelloI.vb index 3c7c5e09052..9699399ffc8 100644 --- a/vb/demo/IcePack/simple/HelloI.vb +++ b/vb/demo/IcePack/simple/HelloI.vb @@ -11,7 +11,7 @@ Imports System Imports IcePackSimpleDemo Public Class IcePackSimpleI - Inherits _HelloDisp + Inherits HelloDisp_ Public Overloads Overrides Sub sayHello(ByVal current As Ice.Current) Console.WriteLine("Hello World!") diff --git a/vb/demo/book/evictor/EvictorBase.vb b/vb/demo/book/evictor/EvictorBase.vb index 4d8f39c8982..1f1f92f1260 100755 --- a/vb/demo/book/evictor/EvictorBase.vb +++ b/vb/demo/book/evictor/EvictorBase.vb @@ -12,7 +12,7 @@ Imports System.Runtime.InteropServices Namespace Evictor Public MustInherit Class EvictorBase - Inherits Ice.LocalObjectImpl
+ Inherits Ice.LocalObjectImpl Implements Ice.ServantLocator Public Sub New() @@ -21,9 +21,9 @@ Namespace Evictor Public Sub New(ByVal size As Integer) If size < 0 Then - _size = 1000
- Else
- _size = size
+ _size = 1000 + Else + _size = size End If End Sub diff --git a/vb/demo/book/evictor/LinkedList.vb b/vb/demo/book/evictor/LinkedList.vb index 1b1d0f52960..ca7927c7244 100755 --- a/vb/demo/book/evictor/LinkedList.vb +++ b/vb/demo/book/evictor/LinkedList.vb @@ -6,229 +6,229 @@ ' ICE_LICENSE file included in this distribution. ' ' ********************************************************************** -Imports System
-Imports System.Collections
-Imports System.Diagnostics
-
-Namespace Evictor
-
- Public Class LinkedList
- Implements ICollection, ICloneable
-
- Public Sub New()
- _head = Nothing
- _tail = Nothing
- _count = Nothing
- End Sub
-
- Public ReadOnly Property Count() As Integer Implements ICollection.Count
- Get
- Return _count
- End Get
- End Property
-
- Public ReadOnly Property IsSynchronized() As Boolean Implements ICollection.IsSynchronized
- Get
- Return False
- End Get
- End Property
-
- Public ReadOnly Property SyncRoot() As Object Implements ICollection.SyncRoot
- Get
- Return Me
- End Get
- End Property
-
- Public Sub CopyTo(ByVal array As System.Array, ByVal index As Integer) Implements ICollection.CopyTo
- '
- ' Check preconditions.
- '
- If array Is Nothing Then
- Throw New ArgumentNullException("array", "array parameter must not be null")
- End If
- If index < 0 Then
- Throw New ArgumentOutOfRangeException("index", _count, "index must not be less than zero")
- End If
- If index >= array.Length Then
- Throw New ArgumentException("index out of bounds for array", "index")
- End If
- If array.Length - index > _count Then
- Throw New ArgumentException("insufficient room in array", "array")
- End If
- If array.Rank <> 1 Then
- Throw New ArgumentException("array must be one-dimensional", "array")
- End If
-
- '
- ' Copy the elements.
- '
- Dim n As Node = _head
- While Not n Is Nothing
- array.SetValue(n.val, index)
- index += 1
- n = CType(n.next, Node)
- End While
- End Sub
-
- Public Function GetEnumerator() As IEnumerator Implements IEnumerable.GetEnumerator
- Return New Enumerator(Me)
- End Function
-
- Public Function Clone() As Object Implements ICloneable.Clone
- Dim l As LinkedList = New LinkedList
- Dim cursor As Node = _head
- While Not cursor Is Nothing
- l.Add(cursor.val)
- cursor = cursor.next
- End While
- Return l
- End Function
-
- Public Sub Add(ByVal value As Object)
- Dim n As Node = New Node
- n.val = value
- If _tail Is Nothing Then
- n.prev = Nothing
- n.next = Nothing
- _head = n
- _tail = n
- Else
- n.prev = _tail
- n.next = Nothing
- _tail.next = n
- _tail = n
- End If
- _count += 1
- End Sub
-
- Public Sub AddFirst(ByVal value As Object)
- Dim n As Node = New Node
- n.val = value
- If _head Is Nothing Then
- n.prev = Nothing
- n.next = Nothing
- _head = n
- _tail = n
- Else
- n.prev = Nothing
- n.next = _head
- _head.prev = n
- _head = n
- End If
- _count += 1
- End Sub
-
- Private Sub Remove(ByVal n As Node)
- Debug.Assert(Not n Is Nothing)
- Debug.Assert(_count <> 0)
-
- If Not n.prev Is Nothing Then
- n.prev.next = n.next
- Else
- _head = n.next
- End If
- If Not n.next Is Nothing Then
- n.next.prev = n.prev
- Else
- _tail = n.prev
- End If
- _count -= 1
- End Sub
-
- Friend Class Node
- Friend [next] As Node
- Friend prev As Node
- Friend val As Object
- End Class
-
- Private _head As Node
- Private _tail As Node
- Private _count As Integer
-
- Public Class Enumerator
- Implements IEnumerator
-
- Friend Sub New(ByVal list As LinkedList)
- _list = list
- _current = Nothing
- _movePrev = Nothing
- _moveNext = Nothing
- _removed = False
- End Sub
-
- Public Sub Reset() Implements IEnumerator.Reset
- _current = Nothing
- _movePrev = Nothing
- _moveNext = Nothing
- _removed = False
- End Sub
-
- Public ReadOnly Property Current() As Object Implements IEnumerator.Current
- Get
- If _current Is Nothing Then
- Throw New InvalidOperationException("iterator not positioned on an element")
- End If
- Return _current.val
- End Get
- End Property
-
- Public Function MoveNext() As Boolean Implements IEnumerator.MoveNext
- If _removed Then
- _current = _moveNext
- _moveNext = Nothing
- _movePrev = Nothing
- _removed = False
- Else
- If _current Is _list._tail Then ' Make sure the iterator "sticks" if on last element.
- Return False
- End If
- If _current Is Nothing Then
- _current = _list._head
- Else
- _current = _current.next
- End If
- End If
- Return Not _current Is Nothing
- End Function
-
- Public Function MovePrev() As Boolean
- If _removed Then
- _current = _movePrev
- _movePrev = Nothing
- _moveNext = Nothing
- _removed = False
- Else
- If _current Is _list._head Then ' Make sure the iterator "sticks" if on first element.
- Return False
- End If
- If _current Is Nothing Then
- _current = _list._tail
- Else
- _current = _current.prev
- End If
- End If
- Return Not _current Is Nothing
- End Function
-
- Public Sub Remove()
- If _current Is Nothing Then
- Throw New InvalidOperationException("iterator is not positioned on an element")
- End If
- _removed = True
- _moveNext = _current.next ' Remember where to move next for call to MoveNext().
- _movePrev = _current.prev ' Remember where to move next for call to MovePrev().
- _list.Remove(_current)
- _current = Nothing
- End Sub
-
- Private _list As LinkedList ' The list we are iterating over.
- Private _current As Node ' Current iterator position.
- Private _moveNext As Node ' Remembers node that preceded a removed element.
- Private _movePrev As Node ' Remembers node that followed a removed element.
- Private _removed As Boolean ' True after a call to Remove(), false otherwise.
-
- End Class
-
- End Class
-
-End Namespace
+Imports System +Imports System.Collections +Imports System.Diagnostics + +Namespace Evictor + + Public Class LinkedList + Implements ICollection, ICloneable + + Public Sub New() + _head = Nothing + _tail = Nothing + _count = Nothing + End Sub + + Public ReadOnly Property Count() As Integer Implements ICollection.Count + Get + Return _count + End Get + End Property + + Public ReadOnly Property IsSynchronized() As Boolean Implements ICollection.IsSynchronized + Get + Return False + End Get + End Property + + Public ReadOnly Property SyncRoot() As Object Implements ICollection.SyncRoot + Get + Return Me + End Get + End Property + + Public Sub CopyTo(ByVal array As System.Array, ByVal index As Integer) Implements ICollection.CopyTo + ' + ' Check preconditions. + ' + If array Is Nothing Then + Throw New ArgumentNullException("array", "array parameter must not be null") + End If + If index < 0 Then + Throw New ArgumentOutOfRangeException("index", _count, "index must not be less than zero") + End If + If index >= array.Length Then + Throw New ArgumentException("index out of bounds for array", "index") + End If + If array.Length - index > _count Then + Throw New ArgumentException("insufficient room in array", "array") + End If + If array.Rank <> 1 Then + Throw New ArgumentException("array must be one-dimensional", "array") + End If + + ' + ' Copy the elements. + ' + Dim n As Node = _head + While Not n Is Nothing + array.SetValue(n.val, index) + index += 1 + n = CType(n.next, Node) + End While + End Sub + + Public Function GetEnumerator() As IEnumerator Implements IEnumerable.GetEnumerator + Return New Enumerator(Me) + End Function + + Public Function Clone() As Object Implements ICloneable.Clone + Dim l As LinkedList = New LinkedList + Dim cursor As Node = _head + While Not cursor Is Nothing + l.Add(cursor.val) + cursor = cursor.next + End While + Return l + End Function + + Public Sub Add(ByVal value As Object) + Dim n As Node = New Node + n.val = value + If _tail Is Nothing Then + n.prev = Nothing + n.next = Nothing + _head = n + _tail = n + Else + n.prev = _tail + n.next = Nothing + _tail.next = n + _tail = n + End If + _count += 1 + End Sub + + Public Sub AddFirst(ByVal value As Object) + Dim n As Node = New Node + n.val = value + If _head Is Nothing Then + n.prev = Nothing + n.next = Nothing + _head = n + _tail = n + Else + n.prev = Nothing + n.next = _head + _head.prev = n + _head = n + End If + _count += 1 + End Sub + + Private Sub Remove(ByVal n As Node) + Debug.Assert(Not n Is Nothing) + Debug.Assert(_count <> 0) + + If Not n.prev Is Nothing Then + n.prev.next = n.next + Else + _head = n.next + End If + If Not n.next Is Nothing Then + n.next.prev = n.prev + Else + _tail = n.prev + End If + _count -= 1 + End Sub + + Friend Class Node + Friend [next] As Node + Friend prev As Node + Friend val As Object + End Class + + Private _head As Node + Private _tail As Node + Private _count As Integer + + Public Class Enumerator + Implements IEnumerator + + Friend Sub New(ByVal list As LinkedList) + _list = list + _current = Nothing + _movePrev = Nothing + _moveNext = Nothing + _removed = False + End Sub + + Public Sub Reset() Implements IEnumerator.Reset + _current = Nothing + _movePrev = Nothing + _moveNext = Nothing + _removed = False + End Sub + + Public ReadOnly Property Current() As Object Implements IEnumerator.Current + Get + If _current Is Nothing Then + Throw New InvalidOperationException("iterator not positioned on an element") + End If + Return _current.val + End Get + End Property + + Public Function MoveNext() As Boolean Implements IEnumerator.MoveNext + If _removed Then + _current = _moveNext + _moveNext = Nothing + _movePrev = Nothing + _removed = False + Else + If _current Is _list._tail Then ' Make sure the iterator "sticks" if on last element. + Return False + End If + If _current Is Nothing Then + _current = _list._head + Else + _current = _current.next + End If + End If + Return Not _current Is Nothing + End Function + + Public Function MovePrev() As Boolean + If _removed Then + _current = _movePrev + _movePrev = Nothing + _moveNext = Nothing + _removed = False + Else + If _current Is _list._head Then ' Make sure the iterator "sticks" if on first element. + Return False + End If + If _current Is Nothing Then + _current = _list._tail + Else + _current = _current.prev + End If + End If + Return Not _current Is Nothing + End Function + + Public Sub Remove() + If _current Is Nothing Then + Throw New InvalidOperationException("iterator is not positioned on an element") + End If + _removed = True + _moveNext = _current.next ' Remember where to move next for call to MoveNext(). + _movePrev = _current.prev ' Remember where to move next for call to MovePrev(). + _list.Remove(_current) + _current = Nothing + End Sub + + Private _list As LinkedList ' The list we are iterating over. + Private _current As Node ' Current iterator position. + Private _moveNext As Node ' Remembers node that preceded a removed element. + Private _movePrev As Node ' Remembers node that followed a removed element. + Private _removed As Boolean ' True after a call to Remove(), false otherwise. + + End Class + + End Class + +End Namespace diff --git a/vb/demo/book/printer/Server.vb b/vb/demo/book/printer/Server.vb index 81c5e4127df..4915c9d1347 100755 --- a/vb/demo/book/printer/Server.vb +++ b/vb/demo/book/printer/Server.vb @@ -11,7 +11,7 @@ Imports System Imports printerDemo.Demo Public Class PrinterI - Inherits _PrinterDisp + Inherits PrinterDisp_ Public Overloads Overrides Sub printString(ByVal s As String, ByVal current As Ice.Current) Console.WriteLine(s) diff --git a/vb/demo/book/simple_filesystem/DirectoryI.vb b/vb/demo/book/simple_filesystem/DirectoryI.vb index e0329922aa6..21c4d26345f 100755 --- a/vb/demo/book/simple_filesystem/DirectoryI.vb +++ b/vb/demo/book/simple_filesystem/DirectoryI.vb @@ -3,7 +3,7 @@ Imports System.Collections Imports Filesystem
Public Class DirectoryI
- Inherits _DirectoryDisp
+ Inherits DirectoryDisp_
Public Sub New(ByVal name As String, ByVal parent As DirectoryI)
_name = name
diff --git a/vb/demo/book/simple_filesystem/FileI.vb b/vb/demo/book/simple_filesystem/FileI.vb index c92548832f1..3ddedc61674 100755 --- a/vb/demo/book/simple_filesystem/FileI.vb +++ b/vb/demo/book/simple_filesystem/FileI.vb @@ -3,7 +3,7 @@ Imports System.Diagnostics Imports Filesystem
Public Class FileI
- Inherits _FileDisp
+ Inherits FileDisp_
Public Sub New(ByVal name As String, ByVal parent As DirectoryI)
_name = name
diff --git a/vb/demo/book/simple_filesystem/Server.vb b/vb/demo/book/simple_filesystem/Server.vb index f1270b40255..87d20174952 100755 --- a/vb/demo/book/simple_filesystem/Server.vb +++ b/vb/demo/book/simple_filesystem/Server.vb @@ -48,7 +48,7 @@ Module Server "Through caverns measureless to man", _
"Down to a sunless sea."}
Try
- CType(file, _FileOperationsNC).write(text)
+ CType(file, FileOperationsNC_).write(text)
file.write(text)
Catch e As GenericError
Console.Error.WriteLine(e.reason)
|