summaryrefslogtreecommitdiff
path: root/cpp/src/slice2cs
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2016-11-03 15:40:55 -0400
committerBernard Normier <bernard@zeroc.com>2016-11-03 15:40:55 -0400
commitc693f916141772b82da44d0ef90f64602a69d3ec (patch)
treebb104e0db314089bfae763dfeeff9a9c0fbcc0e4 /cpp/src/slice2cs
parentFix ICE-7433 - C++ Ice/exceptions failure (diff)
downloadice-c693f916141772b82da44d0ef90f64602a69d3ec.tar.bz2
ice-c693f916141772b82da44d0ef90f64602a69d3ec.tar.xz
ice-c693f916141772b82da44d0ef90f64602a69d3ec.zip
Replaced double underscores in C# mapping by ice-prefix names
Diffstat (limited to 'cpp/src/slice2cs')
-rw-r--r--cpp/src/slice2cs/CsUtil.cpp294
-rw-r--r--cpp/src/slice2cs/Gen.cpp592
2 files changed, 443 insertions, 443 deletions
diff --git a/cpp/src/slice2cs/CsUtil.cpp b/cpp/src/slice2cs/CsUtil.cpp
index 3487cde3fce..0f112677b7f 100644
--- a/cpp/src/slice2cs/CsUtil.cpp
+++ b/cpp/src/slice2cs/CsUtil.cpp
@@ -145,7 +145,7 @@ Slice::CsGenerator::fixId(const ContainedPtr& cont, int baseTypes, bool mangleCa
if(contained && contained->hasMetaData("clr:property") &&
(contained->containedType() == Contained::ContainedTypeClass || contained->containedType() == Contained::ContainedTypeStruct))
{
- return cont->name() + "__prop";
+ return "_" + cont->name();
}
else
{
@@ -509,7 +509,7 @@ Slice::CsGenerator::writeMarshalUnmarshalCode(Output &out,
const string& param,
bool marshal)
{
- string stream = marshal ? "os__" : "is__";
+ string stream = marshal ? "iceOs" : "iceIs";
BuiltinPtr builtin = BuiltinPtr::dynamicCast(type);
if(builtin)
@@ -687,7 +687,7 @@ Slice::CsGenerator::writeMarshalUnmarshalCode(Output &out,
}
else
{
- out << nl << param << ".write__(" << stream << ");";
+ out << nl << param << ".iceWrite(" << stream << ");";
}
}
else
@@ -698,7 +698,7 @@ Slice::CsGenerator::writeMarshalUnmarshalCode(Output &out,
}
else
{
- out << nl << param << ".read__(" << stream << ");";
+ out << nl << param << ".iceRead(" << stream << ");";
}
}
return;
@@ -754,7 +754,7 @@ Slice::CsGenerator::writeOptionalMarshalUnmarshalCode(Output &out,
int tag,
bool marshal)
{
- string stream = marshal ? "os__" : "is__";
+ string stream = marshal ? "iceOs" : "iceIs";
BuiltinPtr builtin = BuiltinPtr::dynamicCast(type);
if(builtin)
@@ -901,9 +901,9 @@ Slice::CsGenerator::writeOptionalMarshalUnmarshalCode(Output &out,
out << nl << "if(" << param << ".HasValue && " << stream << ".writeOptional(" << tag
<< ", Ice.OptionalFormat.FSize))";
out << sb;
- out << nl << "int pos__ = " << stream << ".startSize();";
+ out << nl << "int icePos = " << stream << ".startSize();";
writeMarshalUnmarshalCode(out, type, param + ".Value", marshal);
- out << nl << stream << ".endSize(pos__);";
+ out << nl << stream << ".endSize(icePos);";
out << eb;
}
else
@@ -911,7 +911,7 @@ Slice::CsGenerator::writeOptionalMarshalUnmarshalCode(Output &out,
out << nl << "if(" << stream << ".readOptional(" << tag << ", Ice.OptionalFormat.FSize))";
out << sb;
out << nl << stream << ".skip(4);";
- string tmp = "tmpVal__";
+ string tmp = "iceTmpVal";
string typeS = typeToString(type);
out << nl << typeS << ' ' << tmp << ';';
writeMarshalUnmarshalCode(out, type, tmp, marshal);
@@ -949,7 +949,7 @@ Slice::CsGenerator::writeOptionalMarshalUnmarshalCode(Output &out,
out << sb;
if(st->isVariableLength())
{
- out << nl << "int pos__ = " << stream << ".startSize();";
+ out << nl << "int icePos = " << stream << ".startSize();";
}
else
{
@@ -958,7 +958,7 @@ Slice::CsGenerator::writeOptionalMarshalUnmarshalCode(Output &out,
writeMarshalUnmarshalCode(out, type, param + ".Value", marshal);
if(st->isVariableLength())
{
- out << nl << stream << ".endSize(pos__);";
+ out << nl << stream << ".endSize(icePos);";
}
out << eb;
}
@@ -975,7 +975,7 @@ Slice::CsGenerator::writeOptionalMarshalUnmarshalCode(Output &out,
out << nl << stream << ".skipSize();";
}
string typeS = typeToString(type);
- string tmp = "tmpVal__";
+ string tmp = "iceTmpVal";
if(isValueType(st))
{
out << nl << typeS << ' ' << tmp << " = new " << typeS << "();";
@@ -1011,7 +1011,7 @@ Slice::CsGenerator::writeOptionalMarshalUnmarshalCode(Output &out,
out << nl << "if(" << stream << ".readOptional(" << tag << ", Ice.OptionalFormat.Size))";
out << sb;
string typeS = typeToString(type);
- string tmp = "tmpVal__";
+ string tmp = "iceTmpVal";
out << nl << typeS << ' ' << tmp << ';';
writeMarshalUnmarshalCode(out, type, tmp, marshal);
out << nl << param << " = new Ice.Optional<" << typeS << ">(" << tmp << ");";
@@ -1042,7 +1042,7 @@ Slice::CsGenerator::writeOptionalMarshalUnmarshalCode(Output &out,
out << sb;
if(keyType->isVariableLength() || valueType->isVariableLength())
{
- out << nl << "int pos__ = " << stream << ".startSize();";
+ out << nl << "int icePos = " << stream << ".startSize();";
}
else
{
@@ -1053,7 +1053,7 @@ Slice::CsGenerator::writeOptionalMarshalUnmarshalCode(Output &out,
writeMarshalUnmarshalCode(out, type, param + ".Value", marshal);
if(keyType->isVariableLength() || valueType->isVariableLength())
{
- out << nl << stream << ".endSize(pos__);";
+ out << nl << stream << ".endSize(icePos);";
}
out << eb;
}
@@ -1070,7 +1070,7 @@ Slice::CsGenerator::writeOptionalMarshalUnmarshalCode(Output &out,
out << nl << stream << ".skipSize();";
}
string typeS = typeToString(type);
- string tmp = "tmpVal__";
+ string tmp = "iceTmpVal";
out << nl << typeS << ' ' << tmp << " = new " << typeS << "();";
writeMarshalUnmarshalCode(out, type, tmp, marshal);
out << nl << param << " = new Ice.Optional<" << typeS << ">(" << tmp << ");";
@@ -1089,7 +1089,7 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out,
bool marshal,
bool useHelper)
{
- string stream = marshal ? "os__" : "is__";
+ string stream = marshal ? "iceOs" : "iceIs";
if(useHelper)
{
@@ -1175,30 +1175,30 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out,
// cannot contain Ice.Object.
//
out << nl << "Ice.ObjectPrx[] " << param << "_tmp = " << param << ".ToArray();";
- out << nl << "for(int ix__ = 0; ix__ < " << param << "_tmp.Length; ++ix__)";
+ out << nl << "for(int iceIx = 0; iceIx < " << param << "_tmp.Length; ++iceIx)";
out << sb;
- out << nl << stream << ".writeProxy(" << param << "_tmp[ix__]);";
+ out << nl << stream << ".writeProxy(" << param << "_tmp[iceIx]);";
out << eb;
}
else
{
out << nl << "_System.Collections.Generic.IEnumerator<" << typeS
- << "> e__ = " << param << ".GetEnumerator();";
- out << nl << "while(e__.MoveNext())";
+ << "> iceE = " << param << ".GetEnumerator();";
+ out << nl << "while(iceE.MoveNext())";
out << sb;
string func = (builtin->kind() == Builtin::KindObject ||
builtin->kind() == Builtin::KindValue) ? "writeValue" : "writeProxy";
- out << nl << stream << '.' << func << "(e__.Current);";
+ out << nl << stream << '.' << func << "(iceE.Current);";
out << eb;
}
}
else
{
- out << nl << "for(int ix__ = 0; ix__ < " << param << '.' << limitID << "; ++ix__)";
+ out << nl << "for(int iceIx = 0; iceIx < " << param << '.' << limitID << "; ++iceIx)";
out << sb;
string func = (builtin->kind() == Builtin::KindObject ||
builtin->kind() == Builtin::KindValue) ? "writeValue" : "writeProxy";
- out << nl << stream << '.' << func << '(' << param << "[ix__]);";
+ out << nl << stream << '.' << func << '(' << param << "[iceIx]);";
out << eb;
}
out << eb;
@@ -1231,7 +1231,7 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out,
{
out << typeToString(seq) << "(" << param << "_lenx);";
}
- out << nl << "for(int ix__ = 0; ix__ < " << param << "_lenx; ++ix__)";
+ out << nl << "for(int iceIx = 0; iceIx < " << param << "_lenx; ++iceIx)";
out << sb;
string patcherName;
if(isCustom)
@@ -1250,9 +1250,9 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out,
{
patcherName = "Sequence";
}
- out << nl << "IceInternal." << patcherName << "Patcher<Ice.Value> p__ = new IceInternal."
- << patcherName << "Patcher<Ice.Value>(\"::Ice::Object\", " << param << ", ix__);";
- out << nl << stream << ".readValue(p__.patch);";
+ out << nl << "IceInternal." << patcherName << "Patcher<Ice.Value> iceP = new IceInternal."
+ << patcherName << "Patcher<Ice.Value>(\"::Ice::Object\", " << param << ", iceIx);";
+ out << nl << stream << ".readValue(iceP.patch);";
}
else
{
@@ -1273,17 +1273,17 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out,
{
out << typeToString(seq) << "(" << param << "_lenx);";
}
- out << nl << "for(int ix__ = 0; ix__ < " << param << "_lenx; ++ix__)";
+ out << nl << "for(int iceIx = 0; iceIx < " << param << "_lenx; ++iceIx)";
out << sb;
if(isArray)
{
- out << nl << param << "[ix__] = " << stream << ".readProxy();";
+ out << nl << param << "[iceIx] = " << stream << ".readProxy();";
}
else
{
- out << nl << "Ice.ObjectPrx val__ = new Ice.ObjectPrxHelperBase();";
- out << nl << "val__ = " << stream << ".readProxy();";
- out << nl << param << "." << addMethod << "(val__);";
+ out << nl << "Ice.ObjectPrx iceVal = new Ice.ObjectPrxHelperBase();";
+ out << nl << "iceVal = " << stream << ".readProxy();";
+ out << nl << param << "." << addMethod << "(iceVal);";
}
}
out << eb;
@@ -1338,8 +1338,8 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out,
out << sb;
out << nl << param << " = new " << "global::" << genericType << "<"
<< typeToString(type) << ">();";
- out << nl << "int szx__ = " << stream << ".readSize();";
- out << nl << "for(int ix__ = 0; ix__ < szx__; ++ix__)";
+ out << nl << "int iceSzx = " << stream << ".readSize();";
+ out << nl << "for(int iceIx = 0; iceIx < iceSzx; ++iceIx)";
out << sb;
out << nl << param << ".Add(" << stream << ".read" << func << "());";
out << eb;
@@ -1376,17 +1376,17 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out,
// stack bottom-up here.
//
out << nl << "_System.Collections.Generic.IEnumerator<" << typeS
- << "> e__ = " << param << ".GetEnumerator();";
- out << nl << "while(e__.MoveNext())";
+ << "> iceE = " << param << ".GetEnumerator();";
+ out << nl << "while(iceE.MoveNext())";
out << sb;
- out << nl << stream << ".writeValue(e__.Current);";
+ out << nl << stream << ".writeValue(iceE.Current);";
out << eb;
}
else
{
- out << nl << "for(int ix__ = 0; ix__ < " << param << '.' << limitID << "; ++ix__)";
+ out << nl << "for(int iceIx = 0; iceIx < " << param << '.' << limitID << "; ++iceIx)";
out << sb;
- out << nl << stream << ".writeValue(" << param << "[ix__]);";
+ out << nl << stream << ".writeValue(" << param << "[iceIx]);";
out << eb;
}
out << eb;
@@ -1394,12 +1394,12 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out,
else
{
out << sb;
- out << nl << "int szx__ = " << stream << ".readAndCheckSeqSize("
+ out << nl << "int iceSzx = " << stream << ".readAndCheckSeqSize("
<< static_cast<unsigned>(type->minWireSize()) << ");";
out << nl << param << " = new ";
if(isArray)
{
- out << toArrayAlloc(typeS + "[]", "szx__");
+ out << toArrayAlloc(typeS + "[]", "iceSzx");
}
else if(isCustom)
{
@@ -1410,16 +1410,16 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out,
out << "_System.Collections.Generic." << genericType << "<" << typeS << ">(";
if(!isLinkedList)
{
- out << "szx__";
+ out << "iceSzx";
}
out << ")";
}
else
{
- out << fixId(seq->scoped()) << "(szx__)";
+ out << fixId(seq->scoped()) << "(iceSzx)";
}
out << ';';
- out << nl << "for(int ix__ = 0; ix__ < szx__; ++ix__)";
+ out << nl << "for(int iceIx = 0; iceIx < iceSzx; ++iceIx)";
out << sb;
string patcherName;
@@ -1441,7 +1441,7 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out,
}
string scoped = ContainedPtr::dynamicCast(type)->scoped();
out << nl << "IceInternal." << patcherName << "Patcher<" << typeS << "> spx = new IceInternal."
- << patcherName << "Patcher<" << typeS << ">(\"" << scoped << "\", " << param << ", ix__);";
+ << patcherName << "Patcher<" << typeS << ">(\"" << scoped << "\", " << param << ", iceIx);";
out << nl << stream << ".readValue(spx.patch);";
out << eb;
out << eb;
@@ -1469,18 +1469,18 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out,
if(isStack)
{
out << nl << typeS << "[] " << param << "_tmp = " << param << ".ToArray();";
- out << nl << "for(int ix__ = 0; ix__ < " << param << "_tmp.Length; ++ix__)";
+ out << nl << "for(int iceIx = 0; iceIx < " << param << "_tmp.Length; ++iceIx)";
}
else
{
out << nl << "_System.Collections.Generic.IEnumerator<" << typeS
- << "> e__ = " << param << ".GetEnumerator();";
- out << nl << "while(e__.MoveNext())";
+ << "> iceE = " << param << ".GetEnumerator();";
+ out << nl << "while(iceE.MoveNext())";
}
}
else
{
- out << nl << "for(int ix__ = 0; ix__ < " << param << '.' << limitID << "; ++ix__)";
+ out << nl << "for(int iceIx = 0; iceIx < " << param << '.' << limitID << "; ++iceIx)";
}
out << sb;
string call;
@@ -1488,12 +1488,12 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out,
{
if(isValueType(type))
{
- call = "e__.Current";
+ call = "iceE.Current";
}
else
{
- call = "(e__.Current == null ? new ";
- call += typeS + "() : e__.Current)";
+ call = "(iceE.Current == null ? new ";
+ call += typeS + "() : iceE.Current)";
}
}
else
@@ -1514,20 +1514,20 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out,
{
call += "_tmp";
}
- call += "[ix__] == null ? new " + typeS + "() : " + param;
+ call += "[iceIx] == null ? new " + typeS + "() : " + param;
if(isStack)
{
call += "_tmp";
}
}
- call += "[ix__]";
+ call += "[iceIx]";
if(!isValueType(type))
{
call += ")";
}
}
call += ".";
- call += "write__";
+ call += "iceWrite";
call += "(" + stream + ");";
out << nl << call;
out << eb;
@@ -1536,11 +1536,11 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out,
else
{
out << sb;
- out << nl << "int szx__ = " << stream << ".readAndCheckSeqSize("
+ out << nl << "int iceSzx = " << stream << ".readAndCheckSeqSize("
<< static_cast<unsigned>(type->minWireSize()) << ");";
if(isArray)
{
- out << nl << param << " = new " << toArrayAlloc(typeS + "[]", "szx__") << ";";
+ out << nl << param << " = new " << toArrayAlloc(typeS + "[]", "iceSzx") << ";";
}
else if(isCustom)
{
@@ -1548,44 +1548,44 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out,
}
else if(isStack)
{
- out << nl << typeS << "[] " << param << "__tmp = new " << toArrayAlloc(typeS + "[]", "szx__") << ";";
+ out << nl << typeS << "[] " << param << "_tmp = new " << toArrayAlloc(typeS + "[]", "iceSzx") << ";";
}
else if(isGeneric)
{
out << nl << param << " = new _System.Collections.Generic." << genericType << "<" << typeS << ">(";
if(!isLinkedList)
{
- out << "szx__";
+ out << "iceSzx";
}
out << ");";
}
else
{
- out << nl << param << " = new " << fixId(seq->scoped()) << "(szx__);";
+ out << nl << param << " = new " << fixId(seq->scoped()) << "(iceSzx);";
}
- out << nl << "for(int ix__ = 0; ix__ < szx__; ++ix__)";
+ out << nl << "for(int iceIx = 0; iceIx < iceSzx; ++iceIx)";
out << sb;
if(isArray || isStack)
{
- string v = isArray ? param : param + "__tmp";
+ string v = isArray ? param : param + "_tmp";
if(!isValueType(st))
{
- out << nl << v << "[ix__] = new " << typeS << "();";
+ out << nl << v << "[iceIx] = new " << typeS << "();";
}
- out << nl << v << "[ix__].read__(" << stream << ");";
+ out << nl << v << "[iceIx].iceRead(" << stream << ");";
}
else
{
- out << nl << typeS << " val__ = new " << typeS << "();";
- out << nl << "val__.read__(" << stream << ");";
- out << nl << param << "." << addMethod << "(val__);";
+ out << nl << typeS << " iceVal = new " << typeS << "();";
+ out << nl << "iceVal.iceRead(" << stream << ");";
+ out << nl << param << "." << addMethod << "(iceVal);";
}
out << eb;
if(isStack)
{
- out << nl << "_System.Array.Reverse(" << param << "__tmp);";
+ out << nl << "_System.Array.Reverse(" << param << "_tmp);";
out << nl << param << " = new _System.Collections.Generic." << genericType << "<" << typeS << ">("
- << param << "__tmp);";
+ << param << "_tmp);";
}
out << eb;
}
@@ -1612,26 +1612,26 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out,
if(isStack)
{
out << nl << typeS << "[] " << param << "_tmp = " << param << ".ToArray();";
- out << nl << "for(int ix__ = 0; ix__ < " << param << "_tmp.Length; ++ix__)";
+ out << nl << "for(int iceIx = 0; iceIx < " << param << "_tmp.Length; ++iceIx)";
out << sb;
- out << nl << stream << ".writeEnum((int)" << param << "_tmp[ix__], " << en->maxValue() << ");";
+ out << nl << stream << ".writeEnum((int)" << param << "_tmp[iceIx], " << en->maxValue() << ");";
out << eb;
}
else
{
out << nl << "_System.Collections.Generic.IEnumerator<" << typeS
- << "> e__ = " << param << ".GetEnumerator();";
- out << nl << "while(e__.MoveNext())";
+ << "> iceE = " << param << ".GetEnumerator();";
+ out << nl << "while(iceE.MoveNext())";
out << sb;
- out << nl << stream << ".writeEnum((int)e__.Current, " << en->maxValue() << ");";
+ out << nl << stream << ".writeEnum((int)iceE.Current, " << en->maxValue() << ");";
out << eb;
}
}
else
{
- out << nl << "for(int ix__ = 0; ix__ < " << param << '.' << limitID << "; ++ix__)";
+ out << nl << "for(int iceIx = 0; iceIx < " << param << '.' << limitID << "; ++iceIx)";
out << sb;
- out << nl << stream << ".writeEnum((int)" << param << "[ix__], " << en->maxValue() << ");";
+ out << nl << stream << ".writeEnum((int)" << param << "[iceIx], " << en->maxValue() << ");";
out << eb;
}
out << eb;
@@ -1639,11 +1639,11 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out,
else
{
out << sb;
- out << nl << "int szx__ = " << stream << ".readAndCheckSeqSize(" <<
+ out << nl << "int iceSzx = " << stream << ".readAndCheckSeqSize(" <<
static_cast<unsigned>(type->minWireSize()) << ");";
if(isArray)
{
- out << nl << param << " = new " << toArrayAlloc(typeS + "[]", "szx__") << ";";
+ out << nl << param << " = new " << toArrayAlloc(typeS + "[]", "iceSzx") << ";";
}
else if(isCustom)
{
@@ -1651,27 +1651,27 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out,
}
else if(isStack)
{
- out << nl << typeS << "[] " << param << "__tmp = new " << toArrayAlloc(typeS + "[]", "szx__") << ";";
+ out << nl << typeS << "[] " << param << "_tmp = new " << toArrayAlloc(typeS + "[]", "iceSzx") << ";";
}
else if(isGeneric)
{
out << nl << param << " = new _System.Collections.Generic." << genericType << "<" << typeS << ">(";
if(!isLinkedList)
{
- out << "szx__";
+ out << "iceSzx";
}
out << ");";
}
else
{
- out << nl << param << " = new " << fixId(seq->scoped()) << "(szx__);";
+ out << nl << param << " = new " << fixId(seq->scoped()) << "(iceSzx);";
}
- out << nl << "for(int ix__ = 0; ix__ < szx__; ++ix__)";
+ out << nl << "for(int iceIx = 0; iceIx < iceSzx; ++iceIx)";
out << sb;
if(isArray || isStack)
{
- string v = isArray ? param : param + "__tmp";
- out << nl << v << "[ix__] = (" << typeS << ')' << stream << ".readEnum(" << en->maxValue() << ");";
+ string v = isArray ? param : param + "_tmp";
+ out << nl << v << "[iceIx] = (" << typeS << ')' << stream << ".readEnum(" << en->maxValue() << ");";
}
else
{
@@ -1681,9 +1681,9 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out,
out << eb;
if(isStack)
{
- out << nl << "_System.Array.Reverse(" << param << "__tmp);";
+ out << nl << "_System.Array.Reverse(" << param << "_tmp);";
out << nl << param << " = new _System.Collections.Generic." << genericType << "<" << typeS << ">("
- << param << "__tmp);";
+ << param << "_tmp);";
}
out << eb;
}
@@ -1719,26 +1719,26 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out,
if(isStack)
{
out << nl << typeS << "[] " << param << "_tmp = " << param << ".ToArray();";
- out << nl << "for(int ix__ = 0; ix__ < " << param << "_tmp.Length; ++ix__)";
+ out << nl << "for(int iceIx = 0; iceIx < " << param << "_tmp.Length; ++iceIx)";
out << sb;
- out << nl << helperName << '.' << func << '(' << stream << ", " << param << "_tmp[ix__]);";
+ out << nl << helperName << '.' << func << '(' << stream << ", " << param << "_tmp[iceIx]);";
out << eb;
}
else
{
out << nl << "_System.Collections.Generic.IEnumerator<" << typeS
- << "> e__ = " << param << ".GetEnumerator();";
- out << nl << "while(e__.MoveNext())";
+ << "> iceE = " << param << ".GetEnumerator();";
+ out << nl << "while(iceE.MoveNext())";
out << sb;
- out << nl << helperName << '.' << func << '(' << stream << ", e__.Current);";
+ out << nl << helperName << '.' << func << '(' << stream << ", iceE.Current);";
out << eb;
}
}
else
{
- out << nl << "for(int ix__ = 0; ix__ < " << param << '.' << limitID << "; ++ix__)";
+ out << nl << "for(int iceIx = 0; iceIx < " << param << '.' << limitID << "; ++iceIx)";
out << sb;
- out << nl << helperName << '.' << func << '(' << stream << ", " << param << "[ix__]);";
+ out << nl << helperName << '.' << func << '(' << stream << ", " << param << "[iceIx]);";
out << eb;
}
out << eb;
@@ -1747,11 +1747,11 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out,
{
func = "read";
out << sb;
- out << nl << "int szx__ = " << stream << ".readAndCheckSeqSize("
+ out << nl << "int iceSzx = " << stream << ".readAndCheckSeqSize("
<< static_cast<unsigned>(type->minWireSize()) << ");";
if(isArray)
{
- out << nl << param << " = new " << toArrayAlloc(typeS + "[]", "szx__") << ";";
+ out << nl << param << " = new " << toArrayAlloc(typeS + "[]", "iceSzx") << ";";
}
else if(isCustom)
{
@@ -1759,7 +1759,7 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out,
}
else if(isStack)
{
- out << nl << typeS << "[] " << param << "__tmp = new " << toArrayAlloc(typeS + "[]", "szx__") << ";";
+ out << nl << typeS << "[] " << param << "_tmp = new " << toArrayAlloc(typeS + "[]", "iceSzx") << ";";
}
else if(isGeneric)
{
@@ -1767,14 +1767,14 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out,
}
else
{
- out << nl << param << " = new " << fixId(seq->scoped()) << "(szx__);";
+ out << nl << param << " = new " << fixId(seq->scoped()) << "(iceSzx);";
}
- out << nl << "for(int ix__ = 0; ix__ < szx__; ++ix__)";
+ out << nl << "for(int iceIx = 0; iceIx < iceSzx; ++iceIx)";
out << sb;
if(isArray || isStack)
{
- string v = isArray ? param : param + "__tmp";
- out << nl << v << "[ix__] = " << helperName << '.' << func << '(' << stream << ");";
+ string v = isArray ? param : param + "_tmp";
+ out << nl << v << "[iceIx] = " << helperName << '.' << func << '(' << stream << ");";
}
else
{
@@ -1783,9 +1783,9 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out,
out << eb;
if(isStack)
{
- out << nl << "_System.Array.Reverse(" << param << "__tmp);";
+ out << nl << "_System.Array.Reverse(" << param << "_tmp);";
out << nl << param << " = new _System.Collections.Generic." << genericType << "<" << typeS << ">("
- << param << "__tmp);";
+ << param << "_tmp);";
}
out << eb;
}
@@ -1800,7 +1800,7 @@ Slice::CsGenerator::writeOptionalSequenceMarshalUnmarshalCode(Output& out,
int tag,
bool marshal)
{
- string stream = marshal ? "os__" : "is__";
+ string stream = marshal ? "iceOs" : "iceIs";
const TypePtr type = seq->type();
const string typeS = typeToString(type);
@@ -1863,7 +1863,7 @@ Slice::CsGenerator::writeOptionalSequenceMarshalUnmarshalCode(Output& out,
{
out << nl << stream << ".skipSize();";
}
- string tmp = "tmpVal__";
+ string tmp = "iceTmpVal";
out << nl << seqS << ' ' << tmp << ';';
writeSequenceMarshalUnmarshalCode(out, seq, tmp, marshal, true);
out << nl << param << " = new Ice.Optional<" << seqS << ">(" << tmp << ");";
@@ -1885,9 +1885,9 @@ Slice::CsGenerator::writeOptionalSequenceMarshalUnmarshalCode(Output& out,
out << nl << "if(" << param << ".HasValue && " << stream << ".writeOptional(" << tag << ", "
<< getOptionalFormat(seq) << "))";
out << sb;
- out << nl << "int pos__ = " << stream << ".startSize();";
+ out << nl << "int icePos = " << stream << ".startSize();";
writeSequenceMarshalUnmarshalCode(out, seq, param + ".Value", marshal, true);
- out << nl << stream << ".endSize(pos__);";
+ out << nl << stream << ".endSize(icePos);";
out << eb;
}
else
@@ -1895,7 +1895,7 @@ Slice::CsGenerator::writeOptionalSequenceMarshalUnmarshalCode(Output& out,
out << nl << "if(" << stream << ".readOptional(" << tag << ", " << getOptionalFormat(seq) << "))";
out << sb;
out << nl << stream << ".skip(4);";
- string tmp = "tmpVal__";
+ string tmp = "iceTmpVal";
out << nl << seqS << ' ' << tmp << ';';
writeSequenceMarshalUnmarshalCode(out, seq, tmp, marshal, true);
out << nl << param << " = new Ice.Optional<" << seqS << ">(" << tmp << ");";
@@ -1925,7 +1925,7 @@ Slice::CsGenerator::writeOptionalSequenceMarshalUnmarshalCode(Output& out,
out << sb;
if(st->isVariableLength())
{
- out << nl << "int pos__ = " << stream << ".startSize();";
+ out << nl << "int icePos = " << stream << ".startSize();";
}
else if(st->minWireSize() > 1)
{
@@ -1935,7 +1935,7 @@ Slice::CsGenerator::writeOptionalSequenceMarshalUnmarshalCode(Output& out,
writeSequenceMarshalUnmarshalCode(out, seq, param + ".Value", marshal, true);
if(st->isVariableLength())
{
- out << nl << stream << ".endSize(pos__);";
+ out << nl << stream << ".endSize(icePos);";
}
out << eb;
}
@@ -1951,7 +1951,7 @@ Slice::CsGenerator::writeOptionalSequenceMarshalUnmarshalCode(Output& out,
{
out << nl << stream << ".skipSize();";
}
- string tmp = "tmpVal__";
+ string tmp = "iceTmpVal";
out << nl << seqS << ' ' << tmp << ';';
writeSequenceMarshalUnmarshalCode(out, seq, tmp, marshal, true);
out << nl << param << " = new Ice.Optional<" << seqS << ">(" << tmp << ");";
@@ -1972,9 +1972,9 @@ Slice::CsGenerator::writeOptionalSequenceMarshalUnmarshalCode(Output& out,
out << nl << "if(" << param << ".HasValue && " << stream << ".writeOptional(" << tag << ", "
<< getOptionalFormat(seq) << "))";
out << sb;
- out << nl << "int pos__ = " << stream << ".startSize();";
+ out << nl << "int icePos = " << stream << ".startSize();";
writeSequenceMarshalUnmarshalCode(out, seq, param + ".Value", marshal, true);
- out << nl << stream << ".endSize(pos__);";
+ out << nl << stream << ".endSize(icePos);";
out << eb;
}
else
@@ -1982,7 +1982,7 @@ Slice::CsGenerator::writeOptionalSequenceMarshalUnmarshalCode(Output& out,
out << nl << "if(" << stream << ".readOptional(" << tag << ", " << getOptionalFormat(seq) << "))";
out << sb;
out << nl << stream << ".skip(4);";
- string tmp = "tmpVal__";
+ string tmp = "iceTmpVal";
out << nl << seqS << ' ' << tmp << ';';
writeSequenceMarshalUnmarshalCode(out, seq, tmp, marshal, true);
out << nl << param << " = new Ice.Optional<" << seqS << ">(" << tmp << ");";
@@ -2007,11 +2007,11 @@ Slice::CsGenerator::writeSerializeDeserializeCode(Output &out,
const string typeName = typeToString(type, true);
if(serialize)
{
- out << nl << "info__.AddValue(\"" << param << "\", " << param << ", typeof(" << typeName << "));";
+ out << nl << "iceInfo.AddValue(\"" << param << "\", " << param << ", typeof(" << typeName << "));";
}
else
{
- out << nl << param << " = (" << typeName << ")info__.GetValue(\"" << param << "\", typeof(" << typeName
+ out << nl << param << " = (" << typeName << ")iceInfo.GetValue(\"" << param << "\", typeof(" << typeName
<< "));";
}
return;
@@ -2026,11 +2026,11 @@ Slice::CsGenerator::writeSerializeDeserializeCode(Output &out,
{
if(serialize)
{
- out << nl << "info__.AddValue(\"" << param << "\", " << param << ");";
+ out << nl << "iceInfo.AddValue(\"" << param << "\", " << param << ");";
}
else
{
- out << nl << param << " = " << "info__.GetByte(\"" << param << "\");";
+ out << nl << param << " = " << "iceInfo.GetByte(\"" << param << "\");";
}
break;
}
@@ -2038,11 +2038,11 @@ Slice::CsGenerator::writeSerializeDeserializeCode(Output &out,
{
if(serialize)
{
- out << nl << "info__.AddValue(\"" << param << "\", " << param << ");";
+ out << nl << "iceInfo.AddValue(\"" << param << "\", " << param << ");";
}
else
{
- out << nl << param << " = " << "info__.GetBoolean(\"" << param << "\");";
+ out << nl << param << " = " << "iceInfo.GetBoolean(\"" << param << "\");";
}
break;
}
@@ -2050,11 +2050,11 @@ Slice::CsGenerator::writeSerializeDeserializeCode(Output &out,
{
if(serialize)
{
- out << nl << "info__.AddValue(\"" << param << "\", " << param << ");";
+ out << nl << "iceInfo.AddValue(\"" << param << "\", " << param << ");";
}
else
{
- out << nl << param << " = " << "info__.GetInt16(\"" << param << "\");";
+ out << nl << param << " = " << "iceInfo.GetInt16(\"" << param << "\");";
}
break;
}
@@ -2062,11 +2062,11 @@ Slice::CsGenerator::writeSerializeDeserializeCode(Output &out,
{
if(serialize)
{
- out << nl << "info__.AddValue(\"" << param << "\", " << param << ");";
+ out << nl << "iceInfo.AddValue(\"" << param << "\", " << param << ");";
}
else
{
- out << nl << param << " = " << "info__.GetInt32(\"" << param << "\");";
+ out << nl << param << " = " << "iceInfo.GetInt32(\"" << param << "\");";
}
break;
}
@@ -2074,11 +2074,11 @@ Slice::CsGenerator::writeSerializeDeserializeCode(Output &out,
{
if(serialize)
{
- out << nl << "info__.AddValue(\"" << param << "\", " << param << ");";
+ out << nl << "iceInfo.AddValue(\"" << param << "\", " << param << ");";
}
else
{
- out << nl << param << " = " << "info__.GetInt64(\"" << param << "\");";
+ out << nl << param << " = " << "iceInfo.GetInt64(\"" << param << "\");";
}
break;
}
@@ -2086,11 +2086,11 @@ Slice::CsGenerator::writeSerializeDeserializeCode(Output &out,
{
if(serialize)
{
- out << nl << "info__.AddValue(\"" << param << "\", " << param << ");";
+ out << nl << "iceInfo.AddValue(\"" << param << "\", " << param << ");";
}
else
{
- out << nl << param << " = " << "info__.GetSingle(\"" << param << "\");";
+ out << nl << param << " = " << "iceInfo.GetSingle(\"" << param << "\");";
}
break;
}
@@ -2098,11 +2098,11 @@ Slice::CsGenerator::writeSerializeDeserializeCode(Output &out,
{
if(serialize)
{
- out << nl << "info__.AddValue(\"" << param << "\", " << param << ");";
+ out << nl << "iceInfo.AddValue(\"" << param << "\", " << param << ");";
}
else
{
- out << nl << param << " = " << "info__.GetDouble(\"" << param << "\");";
+ out << nl << param << " = " << "iceInfo.GetDouble(\"" << param << "\");";
}
break;
}
@@ -2110,12 +2110,12 @@ Slice::CsGenerator::writeSerializeDeserializeCode(Output &out,
{
if(serialize)
{
- out << nl << "info__.AddValue(\"" << param << "\", " << param << " == null ? \"\" : " << param
+ out << nl << "iceInfo.AddValue(\"" << param << "\", " << param << " == null ? \"\" : " << param
<< ");";
}
else
{
- out << nl << param << " = " << "info__.GetString(\"" << param << "\");";
+ out << nl << param << " = " << "iceInfo.GetString(\"" << param << "\");";
}
break;
}
@@ -2126,11 +2126,11 @@ Slice::CsGenerator::writeSerializeDeserializeCode(Output &out,
const string typeName = typeToString(type, false);
if(serialize)
{
- out << nl << "info__.AddValue(\"" << param << "\", " << param << ", typeof(" << typeName << "));";
+ out << nl << "iceInfo.AddValue(\"" << param << "\", " << param << ", typeof(" << typeName << "));";
}
else
{
- out << nl << param << " = (" << typeName << ")info__.GetValue(\"" << param << "\", typeof("
+ out << nl << param << " = (" << typeName << ")iceInfo.GetValue(\"" << param << "\", typeof("
<< typeName << "));";
}
break;
@@ -2139,12 +2139,12 @@ Slice::CsGenerator::writeSerializeDeserializeCode(Output &out,
{
if(serialize)
{
- out << nl << "info__.AddValue(\"" << param << "\", " << param
+ out << nl << "iceInfo.AddValue(\"" << param << "\", " << param
<< ", typeof(Ice.ObjectPrxHelperBase));";
}
else
{
- out << nl << param << " = (Ice.ObjectPrx)info__.GetValue(\"" << param
+ out << nl << param << " = (Ice.ObjectPrx)iceInfo.GetValue(\"" << param
<< "\", typeof(Ice.ObjectPrxHelperBase));";
}
break;
@@ -2159,11 +2159,11 @@ Slice::CsGenerator::writeSerializeDeserializeCode(Output &out,
const string typeName = typeToString(type, false);
if(serialize)
{
- out << nl << "info__.AddValue(\"" << param << "\", " << param << ", typeof(" << typeName << "Helper));";
+ out << nl << "iceInfo.AddValue(\"" << param << "\", " << param << ", typeof(" << typeName << "Helper));";
}
else
{
- out << nl << param << " = (" << typeName << ")info__.GetValue(\"" << param << "\", typeof(" << typeName
+ out << nl << param << " = (" << typeName << ")iceInfo.GetValue(\"" << param << "\", typeof(" << typeName
<< "Helper));";
}
return;
@@ -2175,11 +2175,11 @@ Slice::CsGenerator::writeSerializeDeserializeCode(Output &out,
const string typeName = typeToString(type, false);
if(serialize)
{
- out << nl << "info__.AddValue(\"" << param << "\", " << param << ", typeof(" << typeName << "));";
+ out << nl << "iceInfo.AddValue(\"" << param << "\", " << param << ", typeof(" << typeName << "));";
}
else
{
- out << nl << param << " = (" << typeName << ")info__.GetValue(\"" << param << "\", typeof(" << typeName
+ out << nl << param << " = (" << typeName << ")iceInfo.GetValue(\"" << param << "\", typeof(" << typeName
<< "));";
}
return;
@@ -2191,11 +2191,11 @@ Slice::CsGenerator::writeSerializeDeserializeCode(Output &out,
const string typeName = typeToString(type, false);
if(serialize)
{
- out << nl << "info__.AddValue(\"" << param << "\", " << param << ", typeof(" << typeName << "));";
+ out << nl << "iceInfo.AddValue(\"" << param << "\", " << param << ", typeof(" << typeName << "));";
}
else
{
- out << nl << param << " = (" << typeName << ")info__.GetValue(\"" << param << "\", typeof(" << typeName
+ out << nl << param << " = (" << typeName << ")iceInfo.GetValue(\"" << param << "\", typeof(" << typeName
<< "));";
}
return;
@@ -2207,11 +2207,11 @@ Slice::CsGenerator::writeSerializeDeserializeCode(Output &out,
const string typeName = typeToString(type, false);
if(serialize)
{
- out << nl << "info__.AddValue(\"" << param << "\", " << param << ", typeof(" << typeName << "));";
+ out << nl << "iceInfo.AddValue(\"" << param << "\", " << param << ", typeof(" << typeName << "));";
}
else
{
- out << nl << param << " = (" << typeName << ")info__.GetValue(\"" << param << "\", typeof(" << typeName
+ out << nl << param << " = (" << typeName << ")iceInfo.GetValue(\"" << param << "\", typeof(" << typeName
<< "));";
}
return;
@@ -2223,11 +2223,11 @@ Slice::CsGenerator::writeSerializeDeserializeCode(Output &out,
const string typeName = typeToString(type, false);
if(serialize)
{
- out << nl << "info__.AddValue(\"" << param << "\", " << param << ", typeof(" << typeName << "));";
+ out << nl << "iceInfo.AddValue(\"" << param << "\", " << param << ", typeof(" << typeName << "));";
}
else
{
- out << nl << param << " = (" << typeName << ")info__.GetValue(\"" << param << "\", typeof(" << typeName
+ out << nl << param << " = (" << typeName << ")iceInfo.GetValue(\"" << param << "\", typeof(" << typeName
<< "));";
}
return;
@@ -2238,11 +2238,11 @@ Slice::CsGenerator::writeSerializeDeserializeCode(Output &out,
const string typeName = typeToString(type, false);
if(serialize)
{
- out << nl << "info__.AddValue(\"" << param << "\", " << param << ", typeof(" << typeName << "));";
+ out << nl << "iceInfo.AddValue(\"" << param << "\", " << param << ", typeof(" << typeName << "));";
}
else
{
- out << nl << param << " = (" << typeName << ")info__.GetValue(\"" << param << "\", typeof(" << typeName
+ out << nl << param << " = (" << typeName << ")iceInfo.GetValue(\"" << param << "\", typeof(" << typeName
<< "));";
}
}
diff --git a/cpp/src/slice2cs/Gen.cpp b/cpp/src/slice2cs/Gen.cpp
index 9122c83a68b..4871bc05ff7 100644
--- a/cpp/src/slice2cs/Gen.cpp
+++ b/cpp/src/slice2cs/Gen.cpp
@@ -118,7 +118,7 @@ getEscapedParamName(const ParamDeclList& params, const string& name)
{
if((*i)->name() == name)
{
- return name + "__";
+ return name + "_";
}
}
return name;
@@ -155,13 +155,13 @@ Slice::CsVisitor::writeMarshalUnmarshalParams(const ParamDeclList& params, const
ParamDeclList optionals;
string paramPrefix = "";
- string returnValueS = "ret__";
+ string returnValueS = "iceRet";
if(op && resultStruct)
{
if((op->returnType() && !params.empty()) || params.size() > 1)
{
- paramPrefix = "ret__.";
+ paramPrefix = "iceRet.";
returnValueS = resultStructReturnValueName(params);
}
}
@@ -174,7 +174,7 @@ Slice::CsVisitor::writeMarshalUnmarshalParams(const ParamDeclList& params, const
if(!marshal && isClassType(type))
{
patch = true;
- param = (*pli)->name() + "__PP";
+ param = "iceP_"+ (*pli)->name();
string typeS = typeToString(type);
if((*pli)->optional())
{
@@ -205,7 +205,7 @@ Slice::CsVisitor::writeMarshalUnmarshalParams(const ParamDeclList& params, const
{
ret = op->returnType();
bool patch = false;
- string param = "ret__";
+ string param = "iceRet";
if(!marshal && isClassType(ret))
{
patch = true;
@@ -252,7 +252,7 @@ Slice::CsVisitor::writeMarshalUnmarshalParams(const ParamDeclList& params, const
{
if(checkReturnType && op->returnTag() < (*pli)->tag())
{
- const string param = !marshal && isClassType(ret) ? "ret__PP.patch" : (paramPrefix + returnValueS);
+ const string param = !marshal && isClassType(ret) ? "iceRetPP.patch" : (paramPrefix + returnValueS);
writeOptionalMarshalUnmarshalCode(_out, ret, param, op->returnTag(), marshal);
checkReturnType = false;
}
@@ -263,7 +263,7 @@ Slice::CsVisitor::writeMarshalUnmarshalParams(const ParamDeclList& params, const
bool patch = false;
if(!marshal && isClassType(type))
{
- param = (*pli)->name() + "__PP.patch";
+ param = "iceP_" + (*pli)->name() + ".patch";
patch = true;
}
@@ -272,7 +272,7 @@ Slice::CsVisitor::writeMarshalUnmarshalParams(const ParamDeclList& params, const
if(checkReturnType)
{
- const string param = !marshal && isClassType(ret) ? "ret__PP.patch" : (paramPrefix + returnValueS);
+ const string param = !marshal && isClassType(ret) ? "iceRetPP.patch" : (paramPrefix + returnValueS);
writeOptionalMarshalUnmarshalCode(_out, ret, param, op->returnTag(), marshal);
}
}
@@ -282,13 +282,13 @@ Slice::CsVisitor::writePostUnmarshalParams(const ParamDeclList& params, const Op
{
string paramPrefix = "";
- string returnValueS = "ret__";
+ string returnValueS = "iceRet";
if(op)
{
if((op->returnType() && !params.empty()) || params.size() > 1)
{
- paramPrefix = "ret__.";
+ paramPrefix = "iceRet.";
returnValueS = resultStructReturnValueName(op->outParameters());
}
}
@@ -297,14 +297,14 @@ Slice::CsVisitor::writePostUnmarshalParams(const ParamDeclList& params, const Op
{
if(isClassType((*pli)->type()))
{
- const string tmp = (*pli)->name() + "__PP";
+ const string tmp = "iceP_" + (*pli)->name();
_out << nl << paramPrefix << fixId((*pli)->name()) << " = " << tmp << ".value;";
}
}
if(op && op->returnType() && isClassType(op->returnType()))
{
- _out << nl << paramPrefix << returnValueS << " = ret__PP.value;";
+ _out << nl << paramPrefix << returnValueS << " = iceRetPP.value;";
}
}
@@ -330,7 +330,7 @@ Slice::CsVisitor::writeUnmarshalDataMember(const DataMemberPtr& member, const st
string patcher;
if(classType)
{
- patcher = "new Patcher__(" + getStaticId(member->type()) + ", this";
+ patcher = "new IcePatcher(" + getStaticId(member->type()) + ", this";
if(needPatcher)
{
ostringstream ostr;
@@ -412,7 +412,7 @@ Slice::CsVisitor::writeDispatch(const ClassDefPtr& p)
emitGeneratedCodeAttribute();
}
- _out << nl << "public static new readonly string[] ids__ = ";
+ _out << nl << "public static new readonly string[] s_iceIds = ";
_out << sb;
{
StringList::const_iterator q = ids.begin();
@@ -432,9 +432,9 @@ Slice::CsVisitor::writeDispatch(const ClassDefPtr& p)
{
emitGeneratedCodeAttribute();
}
- _out << nl << "public override bool ice_isA(string s, Ice.Current current__ = null)";
+ _out << nl << "public override bool ice_isA(string s, Ice.Current iceCurrent = null)";
_out << sb;
- _out << nl << "return _System.Array.BinarySearch(ids__, s, IceUtilInternal.StringUtil.OrdinalStringComparer) >= 0;";
+ _out << nl << "return _System.Array.BinarySearch(s_iceIds, s, IceUtilInternal.StringUtil.OrdinalStringComparer) >= 0;";
_out << eb;
_out << sp;
@@ -442,9 +442,9 @@ Slice::CsVisitor::writeDispatch(const ClassDefPtr& p)
{
emitGeneratedCodeAttribute();
}
- _out << nl << "public override string[] ice_ids(Ice.Current current__ = null)";
+ _out << nl << "public override string[] ice_ids(Ice.Current iceCurrent = null)";
_out << sb;
- _out << nl << "return ids__;";
+ _out << nl << "return s_iceIds;";
_out << eb;
_out << sp;
@@ -452,9 +452,9 @@ Slice::CsVisitor::writeDispatch(const ClassDefPtr& p)
{
emitGeneratedCodeAttribute();
}
- _out << nl << "public override string ice_id(Ice.Current current__ = null)";
+ _out << nl << "public override string ice_id(Ice.Current iceCurrent = null)";
_out << sb;
- _out << nl << "return ids__[" << scopedPos << "];";
+ _out << nl << "return s_iceIds[" << scopedPos << "];";
_out << eb;
_out << sp;
@@ -465,7 +465,7 @@ Slice::CsVisitor::writeDispatch(const ClassDefPtr& p)
_out << nl << "public static new string ice_staticId()";
_out << sb;
- _out << nl << "return ids__[" << scopedPos << "];";
+ _out << nl << "return s_iceIds[" << scopedPos << "];";
_out << eb;
_out << sp << nl << "#endregion"; // Slice type-related members
@@ -491,21 +491,21 @@ Slice::CsVisitor::writeDispatch(const ClassDefPtr& p)
emitGeneratedCodeAttribute();
}
_out << nl << "public static _System.Threading.Tasks.Task<Ice.OutputStream>";
- _out << nl << opName << "___(" << name << (p->isInterface() ? "" : "Disp_") << " obj__, "
- << "IceInternal.Incoming inS__, Ice.Current current__)";
+ _out << nl << "iceD_" << opName << "(" << name << (p->isInterface() ? "" : "Disp_") << " iceObj, "
+ << "IceInternal.Incoming iceInS, Ice.Current iceCurrent)";
_out << sb;
TypePtr ret = op->returnType();
ParamDeclList inParams = op->inParameters();
ParamDeclList outParams = op->outParameters();
- _out << nl << "Ice.ObjectImpl.checkMode__(" << sliceModeToIceMode(op->mode()) << ", current__.mode);";
+ _out << nl << "Ice.ObjectImpl.iceCheckMode(" << sliceModeToIceMode(op->mode()) << ", iceCurrent.mode);";
if(!inParams.empty())
{
//
// Unmarshal 'in' parameters.
//
- _out << nl << "var is__ = inS__.startReadParams();";
+ _out << nl << "var iceIs = iceInS.startReadParams();";
for(ParamDeclList::const_iterator pli = inParams.begin(); pli != inParams.end(); ++pli)
{
string param = fixId((*pli)->name());
@@ -539,55 +539,55 @@ Slice::CsVisitor::writeDispatch(const ClassDefPtr& p)
writeMarshalUnmarshalParams(inParams, 0, false);
if(op->sendsClasses(false))
{
- _out << nl << "is__.readPendingValues();";
+ _out << nl << "iceIs.readPendingValues();";
}
- _out << nl << "inS__.endReadParams();";
+ _out << nl << "iceInS.endReadParams();";
}
else
{
- _out << nl << "inS__.readEmptyParams();";
+ _out << nl << "iceInS.readEmptyParams();";
}
if(op->format() != DefaultFormat)
{
- _out << nl << "inS__.setFormat(" << opFormatTypeToString(op) << ");";
+ _out << nl << "iceInS.setFormat(" << opFormatTypeToString(op) << ");";
}
vector<string> inArgs;
for(ParamDeclList::const_iterator pli = inParams.begin(); pli != inParams.end(); ++pli)
{
- inArgs.push_back(isClassType((*pli)->type()) ? ((*pli)->name() + "__PP.value") : fixId((*pli)->name()));
+ inArgs.push_back(isClassType((*pli)->type()) ? ("iceP_" + (*pli)->name() + ".value") : fixId((*pli)->name()));
}
const bool amd = p->hasMetaData("amd") || op->hasMetaData("amd");
if(op->hasMarshaledResult())
{
- _out << nl << "return inS__." << (amd ? "setMarshaledResultTask" : "setMarshaledResult");
- _out << "(obj__." << opName << (amd ? "Async" : "") << spar << inArgs << "current__" << epar << ");";
+ _out << nl << "return iceInS." << (amd ? "setMarshaledResultTask" : "setMarshaledResult");
+ _out << "(iceObj." << opName << (amd ? "Async" : "") << spar << inArgs << "iceCurrent" << epar << ");";
_out << eb;
}
else if(amd)
{
string retS = resultType(op);
- _out << nl << "return inS__.setResultTask" << (retS.empty() ? "" : ('<' + retS + '>'));
- _out << "(obj__." << opName << "Async" << spar << inArgs << "current__" << epar;
+ _out << nl << "return iceInS.setResultTask" << (retS.empty() ? "" : ('<' + retS + '>'));
+ _out << "(iceObj." << opName << "Async" << spar << inArgs << "iceCurrent" << epar;
if(!retS.empty())
{
_out << ",";
_out.inc();
if(!ret && outParams.size() == 1)
{
- _out << nl << "(os__, " << fixId(outParams.front()->name()) << ") =>";
+ _out << nl << "(iceOs, " << fixId(outParams.front()->name()) << ") =>";
}
else
{
- _out << nl << "(os__, ret__) =>";
+ _out << nl << "(iceOs, iceRet) =>";
}
_out << sb;
writeMarshalUnmarshalParams(outParams, op, true, true);
if(op->returnsClasses(false))
{
- _out << nl << "os__.writePendingValues();";
+ _out << nl << "iceOs.writePendingValues();";
}
_out << eb;
_out.dec();
@@ -609,32 +609,32 @@ Slice::CsVisitor::writeDispatch(const ClassDefPtr& p)
_out << nl;
if(ret)
{
- _out << "var ret__ = ";
+ _out << "var iceRet = ";
}
- _out << "obj__." << fixId(opName, DotNet::ICloneable, true) << spar << inArgs;
+ _out << "iceObj." << fixId(opName, DotNet::ICloneable, true) << spar << inArgs;
for(ParamDeclList::const_iterator pli = outParams.begin(); pli != outParams.end(); ++pli)
{
_out << "out " + fixId((*pli)->name());
}
- _out << "current__" << epar << ';';
+ _out << "iceCurrent" << epar << ';';
//
// Marshal 'out' parameters and return value.
//
if(!outParams.empty() || ret)
{
- _out << nl << "var os__ = inS__.startWriteParams();";
+ _out << nl << "var iceOs = iceInS.startWriteParams();";
writeMarshalUnmarshalParams(outParams, op, true);
if(op->returnsClasses(false))
{
- _out << nl << "os__.writePendingValues();";
+ _out << nl << "iceOs.writePendingValues();";
}
- _out << nl << "inS__.endWriteParams(os__);";
- _out << nl << "return inS__.setResult(os__);";
+ _out << nl << "iceInS.endWriteParams(iceOs);";
+ _out << nl << "return iceInS.setResult(iceOs);";
}
else
{
- _out << nl << "return inS__.setResult(inS__.writeEmptyParams());";
+ _out << nl << "return iceInS.setResult(iceInS.writeEmptyParams());";
}
_out << eb;
}
@@ -652,7 +652,7 @@ Slice::CsVisitor::writeDispatch(const ClassDefPtr& p)
allOpNames.sort();
allOpNames.unique();
- _out << sp << nl << "private static string[] all__ =";
+ _out << sp << nl << "private static string[] s_iceAll =";
_out << sb;
for(StringList::const_iterator q = allOpNames.begin(); q != allOpNames.end();)
{
@@ -670,13 +670,13 @@ Slice::CsVisitor::writeDispatch(const ClassDefPtr& p)
emitGeneratedCodeAttribute();
}
_out << nl << "public override _System.Threading.Tasks.Task<Ice.OutputStream>";
- _out << nl << "dispatch__(IceInternal.Incoming inS__, Ice.Current current__)";
+ _out << nl << "iceDispatch(IceInternal.Incoming iceInS, Ice.Current iceCurrent)";
_out << sb;
- _out << nl << "int pos = _System.Array.BinarySearch(all__, current__.operation, "
+ _out << nl << "int pos = _System.Array.BinarySearch(s_iceAll, iceCurrent.operation, "
<< "IceUtilInternal.StringUtil.OrdinalStringComparer);";
_out << nl << "if(pos < 0)";
_out << sb;
- _out << nl << "throw new Ice.OperationNotExistException(current__.id, current__.facet, current__.operation);";
+ _out << nl << "throw new Ice.OperationNotExistException(iceCurrent.id, iceCurrent.facet, iceCurrent.operation);";
_out << eb;
_out << sp << nl << "switch(pos)";
_out << sb;
@@ -689,19 +689,19 @@ Slice::CsVisitor::writeDispatch(const ClassDefPtr& p)
_out << sb;
if(opName == "ice_id")
{
- _out << nl << "return Ice.ObjectImpl.ice_id___(this, inS__, current__);";
+ _out << nl << "return Ice.ObjectImpl.iceD_ice_id(this, iceInS, iceCurrent);";
}
else if(opName == "ice_ids")
{
- _out << nl << "return Ice.ObjectImpl.ice_ids___(this, inS__, current__);";
+ _out << nl << "return Ice.ObjectImpl.iceD_ice_ids(this, iceInS, iceCurrent);";
}
else if(opName == "ice_isA")
{
- _out << nl << "return Ice.ObjectImpl.ice_isA___(this, inS__, current__);";
+ _out << nl << "return Ice.ObjectImpl.iceD_ice_isA(this, iceInS, iceCurrent);";
}
else if(opName == "ice_ping")
{
- _out << nl << "return Ice.ObjectImpl.ice_ping___(this, inS__, current__);";
+ _out << nl << "return Ice.ObjectImpl.iceD_ice_ping(this, iceInS, iceCurrent);";
}
else
{
@@ -717,11 +717,11 @@ Slice::CsVisitor::writeDispatch(const ClassDefPtr& p)
assert(cl);
if(cl->scoped() == p->scoped())
{
- _out << nl << "return " << opName << "___(this, inS__, current__);";
+ _out << nl << "return iceD_" << opName << "(this, iceInS, iceCurrent);";
}
else
{
- _out << nl << "return " << fixId(cl->scoped() + "Disp_") << "." << opName << "___(this, inS__, current__);";
+ _out << nl << "return " << fixId(cl->scoped() + "Disp_") << ".iceD_" << opName << "(this, iceInS, iceCurrent);";
}
break;
}
@@ -731,7 +731,7 @@ Slice::CsVisitor::writeDispatch(const ClassDefPtr& p)
}
_out << eb;
_out << sp << nl << "_System.Diagnostics.Debug.Assert(false);";
- _out << nl << "throw new Ice.OperationNotExistException(current__.id, current__.facet, current__.operation);";
+ _out << nl << "throw new Ice.OperationNotExistException(iceCurrent.id, iceCurrent.facet, iceCurrent.operation);";
_out << eb;
}
@@ -786,11 +786,11 @@ Slice::CsVisitor::writeMarshaling(const ClassDefPtr& p)
emitGeneratedCodeAttribute();
}
- _out << nl << "public override void write__(Ice.OutputStream os__)";
+ _out << nl << "public override void iceWrite(Ice.OutputStream iceOs)";
_out << sb;
- _out << nl << "os__.startValue(slicedData__);";
- _out << nl << "writeImpl__(os__);";
- _out << nl << "os__.endValue();";
+ _out << nl << "iceOs.startValue(m_iceSlicedData);";
+ _out << nl << "iceWriteImpl(iceOs);";
+ _out << nl << "iceOs.endValue();";
_out << eb;
_out << sp;
@@ -798,11 +798,11 @@ Slice::CsVisitor::writeMarshaling(const ClassDefPtr& p)
{
emitGeneratedCodeAttribute();
}
- _out << nl << "public override void read__(Ice.InputStream is__)";
+ _out << nl << "public override void iceRead(Ice.InputStream iceIs)";
_out << sb;
- _out << nl << "is__.startValue();";
- _out << nl << "readImpl__(is__);";
- _out << nl << "slicedData__ = is__.endValue(true);";
+ _out << nl << "iceIs.startValue();";
+ _out << nl << "iceReadImpl(iceIs);";
+ _out << nl << "m_iceSlicedData = iceIs.endValue(true);";
_out << eb;
}
@@ -811,9 +811,9 @@ Slice::CsVisitor::writeMarshaling(const ClassDefPtr& p)
{
emitGeneratedCodeAttribute();
}
- _out << nl << "protected override void writeImpl__(Ice.OutputStream os__)";
+ _out << nl << "protected override void iceWriteImpl(Ice.OutputStream iceOs)";
_out << sb;
- _out << nl << "os__.startSlice(ice_staticId(), " << p->compactId() << (!base ? ", true" : ", false") << ");";
+ _out << nl << "iceOs.startSlice(ice_staticId(), " << p->compactId() << (!base ? ", true" : ", false") << ");";
for(DataMemberList::const_iterator d = members.begin(); d != members.end(); ++d)
{
if(!(*d)->optional())
@@ -825,10 +825,10 @@ Slice::CsVisitor::writeMarshaling(const ClassDefPtr& p)
{
writeMarshalDataMember(*d, fixId(*d, DotNet::ICloneable, true));
}
- _out << nl << "os__.endSlice();";
+ _out << nl << "iceOs.endSlice();";
if(base)
{
- _out << nl << "base.writeImpl__(os__);";
+ _out << nl << "base.iceWriteImpl(iceOs);";
}
_out << eb;
@@ -844,9 +844,9 @@ Slice::CsVisitor::writeMarshaling(const ClassDefPtr& p)
{
_out << "new ";
}
- _out << "class Patcher__";
+ _out << "class IcePatcher";
_out << sb;
- _out << sp << nl << "internal Patcher__(string type, Ice.Value instance";
+ _out << sp << nl << "internal IcePatcher(string type, Ice.Value instance";
if(classMembers.size() > 1)
{
@@ -973,9 +973,9 @@ Slice::CsVisitor::writeMarshaling(const ClassDefPtr& p)
{
emitGeneratedCodeAttribute();
}
- _out << nl << "protected override void readImpl__(Ice.InputStream is__)";
+ _out << nl << "protected override void iceReadImpl(Ice.InputStream iceIs)";
_out << sb;
- _out << nl << "is__.startSlice();";
+ _out << nl << "iceIs.startSlice();";
int patchIter = 0;
const bool needCustomPatcher = classMembers.size() > 1;
for(DataMemberList::const_iterator d = members.begin(); d != members.end(); ++d)
@@ -989,16 +989,16 @@ Slice::CsVisitor::writeMarshaling(const ClassDefPtr& p)
{
writeUnmarshalDataMember(*d, fixId(*d, DotNet::ICloneable, true), needCustomPatcher, patchIter);
}
- _out << nl << "is__.endSlice();";
+ _out << nl << "iceIs.endSlice();";
if(base)
{
- _out << nl << "base.readImpl__(is__);";
+ _out << nl << "base.iceReadImpl(iceIs);";
}
_out << eb;
if(preserved && !basePreserved)
{
- _out << sp << nl << "protected Ice.SlicedData slicedData__;";
+ _out << sp << nl << "protected Ice.SlicedData m_iceSlicedData;";
}
_out << sp << nl << "#endregion"; // Marshalling support
@@ -1066,7 +1066,7 @@ Slice::CsVisitor::getOutParams(const OperationPtr& op, bool returnParam, bool ou
TypePtr ret = op->returnType();
if(ret)
{
- params.push_back(typeToString(ret, op->returnIsOptional()) + " ret__");
+ params.push_back(typeToString(ret, op->returnIsOptional()) + " iceRet");
}
}
@@ -1335,7 +1335,7 @@ Slice::CsVisitor::writeDataMemberInitializers(const DataMemberList& members, int
_out << nl << "this.";
if(propertyMapping)
{
- _out << (*p)->name() << "__prop";
+ _out << "_" << (*p)->name();
}
else
{
@@ -2475,7 +2475,7 @@ Slice::Gen::TypesVisitor::visitClassDefEnd(const ClassDefPtr& p)
const string paramName = fixId((*d)->name());
if(propertyMapping)
{
- _out << (*d)->name() << "__prop";
+ _out << "_" << (*d)->name();
}
else
{
@@ -2504,18 +2504,18 @@ Slice::Gen::TypesVisitor::visitClassDefEnd(const ClassDefPtr& p)
if(!p->isInterface() && !p->isLocal())
{
_out << sp << nl;
- _out << nl << "public static new readonly string static_id__ = \""
+ _out << nl << "public static new readonly string s_iceId = \""
<< p->scoped() << "\";";
_out << sp;
_out << nl << "public static new string ice_staticId()";
_out << sb;
- _out << nl << "return static_id__;";
+ _out << nl << "return s_iceId;";
_out << eb;
_out << nl << "public override string ice_id()";
_out << sb;
- _out << nl << "return static_id__;";
+ _out << nl << "return s_iceId;";
_out << eb;
writeMarshaling(p);
@@ -2710,7 +2710,7 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
const bool hasDataMemberInitializers = requiresDataMemberInitializers(dataMembers);
if(hasDataMemberInitializers)
{
- _out << sp << nl << "private void initDM__()";
+ _out << sp << nl << "private void iceInitDM()";
_out << sb;
writeDataMemberInitializers(dataMembers, DotNet::Exception);
_out << eb;
@@ -2722,23 +2722,23 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
_out << sb;
if(hasDataMemberInitializers)
{
- _out << nl << "initDM__();";
+ _out << nl << "iceInitDM();";
}
_out << eb;
_out << sp;
emitGeneratedCodeAttribute();
- _out << nl << "public " << name << "(_System.Exception ex__) : base(ex__)";
+ _out << nl << "public " << name << "(_System.Exception iceEx) : base(iceEx)";
_out << sb;
if(hasDataMemberInitializers)
{
- _out << nl << "initDM__();";
+ _out << nl << "iceInitDM();";
}
_out << eb;
_out << sp;
emitGeneratedCodeAttribute();
- _out << nl << "public " << name << "(_System.Runtime.Serialization.SerializationInfo info__, "
- << "_System.Runtime.Serialization.StreamingContext context__) : base(info__, context__)";
+ _out << nl << "public " << name << "(_System.Runtime.Serialization.SerializationInfo iceInfo, "
+ << "_System.Runtime.Serialization.StreamingContext iceContext) : base(iceInfo, iceContext)";
_out << sb;
for(DataMemberList::const_iterator q = dataMembers.begin(); q != dataMembers.end(); ++q)
{
@@ -2751,7 +2751,7 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
{
if(!dataMembers.empty())
{
- _out << sp << nl << "private void initDM__" << spar << paramDecl << epar;
+ _out << sp << nl << "private void iceInitDM" << spar << paramDecl << epar;
_out << sb;
for(DataMemberList::const_iterator q = dataMembers.begin(); q != dataMembers.end(); ++q)
{
@@ -2771,14 +2771,14 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
_out << sb;
if(!dataMembers.empty())
{
- _out << nl << "initDM__" << spar << paramNames << epar << ';';
+ _out << nl << "iceInitDM" << spar << paramNames << epar << ';';
}
_out << eb;
vector<string> exceptionParam;
- exceptionParam.push_back("ex__");
+ exceptionParam.push_back("iceEx");
vector<string> exceptionDecl;
- exceptionDecl.push_back("_System.Exception ex__");
+ exceptionDecl.push_back("_System.Exception iceEx");
_out << sp;
emitGeneratedCodeAttribute();
_out << nl << "public " << name << spar << allParamDecl << exceptionDecl << epar << " : base" << spar;
@@ -2790,7 +2790,7 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
_out << sb;
if(!dataMembers.empty())
{
- _out << nl << "initDM__" << spar << paramNames << epar << ';';
+ _out << nl << "iceInitDM" << spar << paramNames << epar << ';';
}
_out << eb;
}
@@ -2812,37 +2812,37 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
_out << sb;
if(p->base())
{
- _out << nl << "int h__ = base.GetHashCode();";
+ _out << nl << "int iceH = base.GetHashCode();";
}
else
{
- _out << nl << "int h__ = 5381;";
+ _out << nl << "int iceH = 5381;";
}
- _out << nl << "IceInternal.HashUtil.hashAdd(ref h__, \"" << p->scoped() << "\");";
+ _out << nl << "IceInternal.HashUtil.hashAdd(ref iceH, \"" << p->scoped() << "\");";
writeMemberHashCode(dataMembers, DotNet::Exception);
- _out << nl << "return h__;";
+ _out << nl << "return iceH;";
_out << eb;
_out << sp;
emitGeneratedCodeAttribute();
- _out << nl << "public override bool Equals(object other__)";
+ _out << nl << "public override bool Equals(object iceOther)";
_out << sb;
- _out << nl << "if(other__ == null)";
+ _out << nl << "if(iceOther == null)";
_out << sb;
_out << nl << "return false;";
_out << eb;
- _out << nl << "if(object.ReferenceEquals(this, other__))";
+ _out << nl << "if(object.ReferenceEquals(this, iceOther))";
_out << sb;
_out << nl << "return true;";
_out << eb;
- _out << nl << name << " o__ = other__ as " << name << ";";
- _out << nl << "if(o__ == null)";
+ _out << nl << name << " iceO = iceOther as " << name << ";";
+ _out << nl << "if(iceO == null)";
_out << sb;
_out << nl << "return false;";
_out << eb;
if(p->base())
{
- _out << nl << "if(!base.Equals(other__))";
+ _out << nl << "if(!base.Equals(iceOther))";
_out << sb;
_out << nl << "return false;";
_out << eb;
@@ -2855,15 +2855,15 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
{
_out << sp;
emitGeneratedCodeAttribute();
- _out << nl << "public override void GetObjectData(_System.Runtime.Serialization.SerializationInfo info__, "
- << "_System.Runtime.Serialization.StreamingContext context__)";
+ _out << nl << "public override void GetObjectData(_System.Runtime.Serialization.SerializationInfo iceInfo, "
+ << "_System.Runtime.Serialization.StreamingContext iceContext)";
_out << sb;
for(DataMemberList::const_iterator q = dataMembers.begin(); q != dataMembers.end(); ++q)
{
string name = fixId((*q)->name(), DotNet::Exception, false);
writeSerializeDeserializeCode(_out, (*q)->type(), name, (*q)->optional(), (*q)->tag(), true);
}
- _out << sp << nl << "base.GetObjectData(info__, context__);";
+ _out << sp << nl << "base.GetObjectData(iceInfo, iceContext);";
_out << eb;
}
@@ -2873,16 +2873,16 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
_out << sp;
emitGeneratedCodeAttribute();
- _out << nl << "public static bool operator==(" << name << " lhs__, " << name << " rhs__)";
+ _out << nl << "public static bool operator==(" << name << " iceLhs, " << name << " iceRhs)";
_out << sb;
- _out << nl << "return Equals(lhs__, rhs__);";
+ _out << nl << "return Equals(iceLhs, iceRhs);";
_out << eb;
_out << sp;
emitGeneratedCodeAttribute();
- _out << nl << "public static bool operator!=(" << name << " lhs__, " << name << " rhs__)";
+ _out << nl << "public static bool operator!=(" << name << " iceLhs, " << name << " iceRhs)";
_out << sb;
- _out << nl << "return !Equals(lhs__, rhs__);";
+ _out << nl << "return !Equals(iceLhs, iceRhs);";
_out << eb;
_out << sp << nl << "#endregion"; // Comparison members
@@ -2901,36 +2901,36 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
{
_out << sp;
emitGeneratedCodeAttribute();
- _out << nl << "public override void write__(Ice.OutputStream os__)";
+ _out << nl << "public override void iceWrite(Ice.OutputStream iceOs)";
_out << sb;
- _out << nl << "os__.startException(slicedData__);";
- _out << nl << "writeImpl__(os__);";
- _out << nl << "os__.endException();";
+ _out << nl << "iceOs.startException(m_iceSlicedData);";
+ _out << nl << "iceWriteImpl(iceOs);";
+ _out << nl << "iceOs.endException();";
_out << eb;
_out << sp;
emitGeneratedCodeAttribute();
- _out << nl << "public override void read__(Ice.InputStream is__)";
+ _out << nl << "public override void iceRead(Ice.InputStream iceIs)";
_out << sb;
- _out << nl << "is__.startException();";
- _out << nl << "readImpl__(is__);";
- _out << nl << "slicedData__ = is__.endException(true);";
+ _out << nl << "iceIs.startException();";
+ _out << nl << "iceReadImpl(iceIs);";
+ _out << nl << "m_iceSlicedData = iceIs.endException(true);";
_out << eb;
}
_out << sp;
emitGeneratedCodeAttribute();
- _out << nl << "protected override void writeImpl__(Ice.OutputStream os__)";
+ _out << nl << "protected override void iceWriteImpl(Ice.OutputStream iceOs)";
_out << sb;
- _out << nl << "os__.startSlice(\"" << scoped << "\", -1, " << (!base ? "true" : "false") << ");";
+ _out << nl << "iceOs.startSlice(\"" << scoped << "\", -1, " << (!base ? "true" : "false") << ");";
for(DataMemberList::const_iterator q = dataMembers.begin(); q != dataMembers.end(); ++q)
{
writeMarshalDataMember(*q, fixId((*q)->name(), DotNet::Exception));
}
- _out << nl << "os__.endSlice();";
+ _out << nl << "iceOs.endSlice();";
if(base)
{
- _out << nl << "base.writeImpl__(os__);";
+ _out << nl << "base.iceWriteImpl(iceOs);";
}
_out << eb;
@@ -2944,9 +2944,9 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
{
_out << "new ";
}
- _out << "class Patcher__";
+ _out << "class IcePatcher";
_out << sb;
- _out << sp << nl << "internal Patcher__(string type, Ice.Exception instance";
+ _out << sp << nl << "internal IcePatcher(string type, Ice.Exception instance";
if(classMembers.size() > 1)
{
_out << ", int member";
@@ -3082,9 +3082,9 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
_out << sp;
emitGeneratedCodeAttribute();
- _out << nl << "protected override void readImpl__(Ice.InputStream is__)";
+ _out << nl << "protected override void iceReadImpl(Ice.InputStream iceIs)";
_out << sb;
- _out << nl << "is__.startSlice();";
+ _out << nl << "iceIs.startSlice();";
int patchIter = 0;
const bool needCustomPatcher = classMembers.size() > 1;
@@ -3092,10 +3092,10 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
{
writeUnmarshalDataMember(*q, fixId((*q)->name(), DotNet::Exception), needCustomPatcher, patchIter);
}
- _out << nl << "is__.endSlice();";
+ _out << nl << "iceIs.endSlice();";
if(base)
{
- _out << nl << "base.readImpl__(is__);";
+ _out << nl << "base.iceReadImpl(iceIs);";
}
_out << eb;
@@ -3103,7 +3103,7 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
{
_out << sp;
emitGeneratedCodeAttribute();
- _out << nl << "public override bool usesClasses__()";
+ _out << nl << "public override bool iceUsesClasses()";
_out << sb;
_out << nl << "return true;";
_out << eb;
@@ -3111,7 +3111,7 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
if(preserved && !basePreserved)
{
- _out << sp << nl << "protected Ice.SlicedData slicedData__;";
+ _out << sp << nl << "protected Ice.SlicedData m_iceSlicedData;";
}
_out << sp << nl << "#endregion"; // Marshalling support
@@ -3223,7 +3223,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
_out << nl << "this.";
if(propertyMapping)
{
- _out << (*q)->name() << "__prop";
+ _out << "_" << (*q)->name();
}
else
{
@@ -3255,41 +3255,41 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
emitGeneratedCodeAttribute();
_out << nl << "public override int GetHashCode()";
_out << sb;
- _out << nl << "int h__ = 5381;";
- _out << nl << "IceInternal.HashUtil.hashAdd(ref h__, \"" << p->scoped() << "\");";
+ _out << nl << "int iceH = 5381;";
+ _out << nl << "IceInternal.HashUtil.hashAdd(ref iceH, \"" << p->scoped() << "\");";
writeMemberHashCode(dataMembers, isClass ? DotNet::ICloneable : 0);
- _out << nl << "return h__;";
+ _out << nl << "return iceH;";
_out << eb;
_out << sp;
emitGeneratedCodeAttribute();
- _out << nl << "public override bool Equals(object other__)";
+ _out << nl << "public override bool Equals(object iceOther)";
_out << sb;
if(isClass)
{
- _out << nl << "if(object.ReferenceEquals(this, other__))";
+ _out << nl << "if(object.ReferenceEquals(this, iceOther))";
_out << sb;
_out << nl << "return true;";
_out << eb;
}
if(isClass)
{
- _out << nl << "if(other__ == null)";
+ _out << nl << "if(iceOther == null)";
_out << sb;
_out << nl << "return false;";
_out << eb;
- _out << nl << "if(GetType() != other__.GetType())";
+ _out << nl << "if(GetType() != iceOther.GetType())";
}
else
{
- _out << nl << "if(!(other__ is " << name << "))";
+ _out << nl << "if(!(iceOther is " << name << "))";
}
_out << sb;
_out << nl << "return false;";
_out << eb;
if(!dataMembers.empty())
{
- _out << nl << name << " o__ = (" << name << ")other__;";
+ _out << nl << name << " iceO = (" << name << ")iceOther;";
}
writeMemberEquals(dataMembers, isClass ? DotNet::ICloneable : 0);
_out << nl << "return true;";
@@ -3301,16 +3301,16 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
_out << sp;
emitGeneratedCodeAttribute();
- _out << nl << "public static bool operator==(" << name << " lhs__, " << name << " rhs__)";
+ _out << nl << "public static bool operator==(" << name << " iceLhs, " << name << " iceRhs)";
_out << sb;
- _out << nl << "return Equals(lhs__, rhs__);";
+ _out << nl << "return Equals(iceLhs, iceRhs);";
_out << eb;
_out << sp;
emitGeneratedCodeAttribute();
- _out << nl << "public static bool operator!=(" << name << " lhs__, " << name << " rhs__)";
+ _out << nl << "public static bool operator!=(" << name << " iceLhs, " << name << " iceRhs)";
_out << sb;
- _out << nl << "return !Equals(lhs__, rhs__);";
+ _out << nl << "return !Equals(iceLhs, iceRhs);";
_out << eb;
_out << sp << nl << "#endregion"; // Comparison members
@@ -3321,7 +3321,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
_out << sp;
emitGeneratedCodeAttribute();
- _out << nl << "public void write__(Ice.OutputStream os__)";
+ _out << nl << "public void iceWrite(Ice.OutputStream iceOs)";
_out << sb;
for(DataMemberList::const_iterator q = dataMembers.begin(); q != dataMembers.end(); ++q)
{
@@ -3333,9 +3333,9 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
{
_out << sp;
emitGeneratedCodeAttribute();
- _out << nl << "public sealed class Patcher__";
+ _out << nl << "public sealed class IcePatcher";
_out << sb;
- _out << sp << nl << "internal Patcher__(string type, " << name << " instance";
+ _out << sp << nl << "internal IcePatcher(string type, " << name << " instance";
if(classMembers.size() > 1)
{
_out << ", int member";
@@ -3406,7 +3406,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
_out << sp;
emitGeneratedCodeAttribute();
- _out << nl << "public void read__(Ice.InputStream is__)";
+ _out << nl << "public void iceRead(Ice.InputStream iceIs)";
_out << sb;
int patchIter = 0;
const bool needCustomPatcher = classMembers.size() > 1;
@@ -3419,37 +3419,37 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
_out << sp;
emitGeneratedCodeAttribute();
- _out << nl << "public static void write(Ice.OutputStream os__, " << name << " v__)";
+ _out << nl << "public static void write(Ice.OutputStream iceOs, " << name << " iceV)";
_out << sb;
if(isClass)
{
- _out << nl << "if(v__ == null)";
+ _out << nl << "if(iceV == null)";
_out << sb;
- _out << nl << "nullMarshalValue__.write__(os__);";
+ _out << nl << "iceNullMarshalValue.iceWrite(iceOs);";
_out << eb;
_out << nl << "else";
_out << sb;
- _out << nl << "v__.write__(os__);";
+ _out << nl << "iceV.iceWrite(iceOs);";
_out << eb;
}
else
{
- _out << nl << "v__.write__(os__);";
+ _out << nl << "iceV.iceWrite(iceOs);";
}
_out << eb;
_out << sp;
emitGeneratedCodeAttribute();
- _out << nl << "public static " << name << " read(Ice.InputStream is__)";
+ _out << nl << "public static " << name << " read(Ice.InputStream iceIs)";
_out << sb;
- _out << nl << name << " v__ = new " << name << "();";
- _out << nl << "v__.read__(is__);";
- _out << nl << "return v__;";
+ _out << nl << name << " iceV = new " << name << "();";
+ _out << nl << "iceV.iceRead(iceIs);";
+ _out << nl << "return iceV;";
_out << eb;
if(isClass)
{
- _out << nl << nl << "private static readonly " << name << " nullMarshalValue__ = new " << name << "();";
+ _out << nl << nl << "private static readonly " << name << " iceNullMarshalValue = new " << name << "();";
}
_out << sp << nl << "#endregion"; // Marshalling support
}
@@ -3497,18 +3497,18 @@ Slice::Gen::TypesVisitor::visitEnum(const EnumPtr& p)
_out << nl << "public sealed class " << p->name() << "Helper";
_out << sb;
_out << sp;
- _out << nl << "public static void write(Ice.OutputStream os__, " << name << " v__)";
+ _out << nl << "public static void write(Ice.OutputStream iceOs, " << name << " iceV)";
_out << sb;
- writeMarshalUnmarshalCode(_out, p, "v__", true);
+ writeMarshalUnmarshalCode(_out, p, "iceV", true);
_out << eb;
_out << sp;
emitGeneratedCodeAttribute();
- _out << nl << "public static " << name << " read(Ice.InputStream is__)";
+ _out << nl << "public static " << name << " read(Ice.InputStream iceIs)";
_out << sb;
- _out << nl << name << " v__;";
- writeMarshalUnmarshalCode(_out, p, "v__", false);
- _out << nl << "return v__;";
+ _out << nl << name << " iceV;";
+ writeMarshalUnmarshalCode(_out, p, "iceV", false);
+ _out << nl << "return iceV;";
_out << eb;
_out << eb;
@@ -3586,7 +3586,7 @@ Slice::Gen::TypesVisitor::visitDataMember(const DataMemberPtr& p)
string dataMemberName;
if(isProperty)
{
- dataMemberName = p->name() + "__prop";
+ dataMemberName = "_" + p->name();
}
else
{
@@ -3647,7 +3647,7 @@ Slice::Gen::TypesVisitor::writeMemberHashCode(const DataMemberList& dataMembers,
{
for(DataMemberList::const_iterator q = dataMembers.begin(); q != dataMembers.end(); ++q)
{
- _out << nl << "IceInternal.HashUtil.hashAdd(ref h__, " << fixId((*q)->name(), baseTypes);
+ _out << nl << "IceInternal.HashUtil.hashAdd(ref iceH, " << fixId((*q)->name(), baseTypes);
if((*q)->optional())
{
_out << ".Value";
@@ -3667,7 +3667,7 @@ Slice::Gen::TypesVisitor::writeMemberEquals(const DataMemberList& dataMembers, i
{
_out << nl << "if(" << memberName << " == null)";
_out << sb;
- _out << nl << "if(o__." << memberName << " != null)";
+ _out << nl << "if(iceO." << memberName << " != null)";
_out << sb;
_out << nl << "return false;";
_out << eb;
@@ -3686,14 +3686,14 @@ Slice::Gen::TypesVisitor::writeMemberEquals(const DataMemberList& dataMembers, i
//
// Equals() for native arrays does not have value semantics.
//
- _out << nl << "if(!IceUtilInternal.Arrays.Equals(" << memberName << ", o__." << memberName << "))";
+ _out << nl << "if(!IceUtilInternal.Arrays.Equals(" << memberName << ", iceO." << memberName << "))";
}
else if(isGeneric)
{
//
// Equals() for generic types does not have value semantics.
//
- _out << nl << "if(!IceUtilInternal.Collections.SequenceEquals(" << memberName << ", o__."
+ _out << nl << "if(!IceUtilInternal.Collections.SequenceEquals(" << memberName << ", iceO."
<< memberName << "))";
}
}
@@ -3705,12 +3705,12 @@ Slice::Gen::TypesVisitor::writeMemberEquals(const DataMemberList& dataMembers, i
//
// Equals() for generic types does not have value semantics.
//
- _out << nl << "if(!IceUtilInternal.Collections.DictionaryEquals(" << memberName << ", o__."
+ _out << nl << "if(!IceUtilInternal.Collections.DictionaryEquals(" << memberName << ", iceO."
<< memberName << "))";
}
else
{
- _out << nl << "if(!" << memberName << ".Equals(o__." << memberName << "))";
+ _out << nl << "if(!" << memberName << ".Equals(iceO." << memberName << "))";
}
}
_out << sb;
@@ -3720,7 +3720,7 @@ Slice::Gen::TypesVisitor::writeMemberEquals(const DataMemberList& dataMembers, i
}
else
{
- _out << nl << "if(!" << memberName << ".Equals(o__." << memberName << "))";
+ _out << nl << "if(!" << memberName << ".Equals(iceO." << memberName << "))";
_out << sb;
_out << nl << "return false;";
_out << eb;
@@ -3852,21 +3852,21 @@ Slice::Gen::ResultVisitor::visitOperation(const OperationPtr& p)
//
// One shot constructor
//
- _out << nl << "public " << name << spar << getOutParams(p, true, false) << "Ice.Current current__" << epar;
+ _out << nl << "public " << name << spar << getOutParams(p, true, false) << "Ice.Current iceCurrent" << epar;
_out << sb;
- _out << nl << "os__ = IceInternal.Incoming.createResponseOutputStream(current__);";
- _out << nl << "os__.startEncapsulation(current__.encoding, " << opFormatTypeToString(p) << ");";
+ _out << nl << "iceOs = IceInternal.Incoming.createResponseOutputStream(iceCurrent);";
+ _out << nl << "iceOs.startEncapsulation(iceCurrent.encoding, " << opFormatTypeToString(p) << ");";
writeMarshalUnmarshalParams(outParams, p, true);
if(p->returnsClasses(false))
{
- _out << nl << "os__.writePendingValues();";
+ _out << nl << "iceOs.writePendingValues();";
}
- _out << nl << "os__.endEncapsulation();";
+ _out << nl << "iceOs.endEncapsulation();";
_out << eb;
_out << sp;
_out << nl << "public Ice.OutputStream getOutputStream(Ice.Current current)";
_out << sb;
- _out << nl << "if(os__ == null)";
+ _out << nl << "if(iceOs == null)";
_out << sb;
_out << nl << "return new " << name << spar;
if(ret)
@@ -3879,10 +3879,10 @@ Slice::Gen::ResultVisitor::visitOperation(const OperationPtr& p)
}
_out << "current" << epar << ".getOutputStream(current);";
_out << eb;
- _out << nl << "return os__;";
+ _out << nl << "return iceOs;";
_out << eb;
_out << sp;
- _out << nl << "private Ice.OutputStream os__;";
+ _out << nl << "private Ice.OutputStream iceOs;";
_out << eb;
}
}
@@ -4119,7 +4119,7 @@ Slice::Gen::AsyncDelegateVisitor::visitOperation(const OperationPtr& p)
_out << nl << "public delegate void " << delName << spar;
if(p->returnType())
{
- _out << retS + " ret__";
+ _out << retS + " iceRet";
}
_out << paramDeclAMI << epar << ';';
}
@@ -4270,8 +4270,8 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
_out << eb;
_out << sp;
- _out << nl << "public " << name << "PrxHelper(_System.Runtime.Serialization.SerializationInfo info__, "
- << "_System.Runtime.Serialization.StreamingContext context__) : base(info__, context__)";
+ _out << nl << "public " << name << "PrxHelper(_System.Runtime.Serialization.SerializationInfo iceInfo, "
+ << "_System.Runtime.Serialization.StreamingContext iceContext) : base(iceInfo, iceContext)";
_out << sb;
_out << eb;
@@ -4334,7 +4334,7 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
}
else if(ret || outParams.size() > 1)
{
- _out << "var result__ = ";
+ _out << "var iceResult = ";
}
else
{
@@ -4358,18 +4358,18 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
for(ParamDeclList::const_iterator i = outParams.begin(); i != outParams.end(); ++i)
{
ParamDeclPtr param = *i;
- _out << nl << fixId(param->name()) << " = result__." << fixId(param->name()) << ";";
+ _out << nl << fixId(param->name()) << " = iceResult." << fixId(param->name()) << ";";
}
if(ret)
{
- _out << nl << "return result__." << resultStructReturnValueName(outParams) << ";";
+ _out << nl << "return iceResult." << resultStructReturnValueName(outParams) << ";";
}
}
_out << eb;
- _out << nl << "catch(_System.AggregateException ex__)";
+ _out << nl << "catch(_System.AggregateException iceEx)";
_out << sb;
- _out << nl << "throw ex__.InnerException;";
+ _out << nl << "throw iceEx.InnerException;";
_out << eb;
_out << eb;
}
@@ -4453,72 +4453,72 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
_out << "<" << returnTypeS << ">";
}
_out << " " << opName << "Async" << spar << paramsAMI
- << "Ice.OptionalContext context__"
- << "_System.IProgress<bool> progress__"
- << "_System.Threading.CancellationToken cancel__"
- << "bool synchronous__" << epar;
+ << "Ice.OptionalContext iceContext"
+ << "_System.IProgress<bool> iceProgress"
+ << "_System.Threading.CancellationToken iceCancel"
+ << "bool iceSynchronous" << epar;
_out << sb;
if(returnTypeS.empty())
{
- _out << nl << "var completed__ = "
- << "new IceInternal.OperationTaskCompletionCallback<object>(progress__, cancel__);";
+ _out << nl << "var iceCompleted = "
+ << "new IceInternal.OperationTaskCompletionCallback<object>(iceProgress, iceCancel);";
}
else
{
- _out << nl << "var completed__ = "
- << "new IceInternal.OperationTaskCompletionCallback<" << returnTypeS << ">(progress__, cancel__);";
+ _out << nl << "var iceCompleted = "
+ << "new IceInternal.OperationTaskCompletionCallback<" << returnTypeS << ">(iceProgress, iceCancel);";
}
- _out << nl << opName << "___" << spar << argsAMI << "context__" << "synchronous__" << "completed__"
+ _out << nl << "iceI_" << opName << spar << argsAMI << "iceContext" << "iceSynchronous" << "iceCompleted"
<< epar << ";";
- _out << nl << "return completed__.Task;";
+ _out << nl << "return iceCompleted.Task;";
_out << eb;
- string flatName = "__" + opName + "_name";
+ string flatName = "_" + opName + "_name";
_out << sp << nl << "private const string " << flatName << " = \"" << op->name() << "\";";
//
// Write the common invoke method
//
_out << sp << nl;
- _out << "private void " << op->name() << "___" << spar << paramsAMI
- << "_System.Collections.Generic.Dictionary<string, string> ctx__"
- << "bool synchronous__"
- << "IceInternal.OutgoingAsyncCompletionCallback completed__" << epar;
+ _out << "private void iceI_" << op->name() << spar << paramsAMI
+ << "_System.Collections.Generic.Dictionary<string, string> iceCtx"
+ << "bool iceSynchronous"
+ << "IceInternal.OutgoingAsyncCompletionCallback iceCompleted" << epar;
_out << sb;
if(op->returnsData())
{
- _out << nl << "checkAsyncTwowayOnly__(" << flatName << ");";
+ _out << nl << "iceCheckAsyncTwowayOnly(" << flatName << ");";
}
if(returnTypeS.empty())
{
- _out << nl << "var outAsync__ = getOutgoingAsync<object>(completed__);";
+ _out << nl << "var iceOutAsync = getOutgoingAsync<object>(iceCompleted);";
}
else
{
- _out << nl << "var outAsync__ = getOutgoingAsync<" << returnTypeS << ">(completed__);";
+ _out << nl << "var iceOutAsync = getOutgoingAsync<" << returnTypeS << ">(iceCompleted);";
}
- _out << nl << "outAsync__.invoke(";
+ _out << nl << "iceOutAsync.invoke(";
_out.inc();
_out << nl << flatName << ",";
_out << nl << sliceModeToIceMode(op->sendMode()) << ",";
_out << nl << opFormatTypeToString(op) << ",";
- _out << nl << "ctx__,";
- _out << nl << "synchronous__";
+ _out << nl << "iceCtx,";
+ _out << nl << "iceSynchronous";
if(!inParams.empty())
{
_out << ",";
- _out << nl << "write: (Ice.OutputStream os__) =>";
+ _out << nl << "write: (Ice.OutputStream iceOs) =>";
_out << sb;
writeMarshalUnmarshalParams(inParams, 0, true);
if(op->sendsClasses(false))
{
- _out << nl << "os__.writePendingValues();";
+ _out << nl << "iceOs.writePendingValues();";
}
_out << eb;
}
@@ -4554,11 +4554,11 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
if(ret || !outParams.empty())
{
_out << ",";
- _out << nl << "read: (Ice.InputStream is__) =>";
+ _out << nl << "read: (Ice.InputStream iceIs) =>";
_out << sb;
if(outParams.empty())
{
- _out << nl << returnTypeS << " ret__";
+ _out << nl << returnTypeS << " iceRet";
if(!op->returnIsOptional() && !isClassType(ret) && StructPtr::dynamicCast(ret))
{
_out << " = " << (isValueType(StructPtr::dynamicCast(ret)) ? ("new " + returnTypeS + "()") : "null");
@@ -4567,7 +4567,7 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
}
else if(ret || outParams.size() > 1)
{
- _out << nl << returnTypeS << " ret__ = new " << returnTypeS << "();";
+ _out << nl << returnTypeS << " iceRet = new " << returnTypeS << "();";
}
else
{
@@ -4583,7 +4583,7 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
writeMarshalUnmarshalParams(outParams, op, false, true);
if(op->returnsClasses(false))
{
- _out << nl << "is__.readPendingValues();";
+ _out << nl << "iceIs.readPendingValues();";
}
writePostUnmarshalParams(outParams, op);
@@ -4594,7 +4594,7 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
}
else
{
- _out << nl << "return ret__;";
+ _out << nl << "return iceRet;";
}
_out << eb;
}
@@ -4633,65 +4633,65 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
_out << sp;
_out << nl << "public Ice.AsyncResult<" << delType << "> begin_" << opName << spar << paramsAMI
- << ("Ice.OptionalContext ctx__ = new Ice.OptionalContext()") << epar;
+ << ("Ice.OptionalContext iceCtx = new Ice.OptionalContext()") << epar;
_out << sb;
- _out << nl << "return begin_" << opName << spar << argsAMI << "ctx__" << "null" << "null" << "false"
+ _out << nl << "return begin_" << opName << spar << argsAMI << "iceCtx" << "null" << "null" << "false"
<< epar << ';';
_out << eb;
_out << sp;
_out << nl << "public Ice.AsyncResult begin_" << opName << spar << paramsAMI
- << "Ice.AsyncCallback cb__" << "object cookie__" << epar;
+ << "Ice.AsyncCallback iceCb" << "object iceCookie" << epar;
_out << sb;
- _out << nl << "return begin_" << opName << spar << argsAMI << "new Ice.OptionalContext()" << "cb__"
- << "cookie__" << "false" << epar << ';';
+ _out << nl << "return begin_" << opName << spar << argsAMI << "new Ice.OptionalContext()" << "iceCb"
+ << "iceCookie" << "false" << epar << ';';
_out << eb;
_out << sp;
_out << nl << "public Ice.AsyncResult begin_" << opName << spar << paramsAMI
- << "Ice.OptionalContext ctx__" << "Ice.AsyncCallback cb__"
- << "object cookie__" << epar;
+ << "Ice.OptionalContext iceCtx" << "Ice.AsyncCallback iceCb"
+ << "object iceCookie" << epar;
_out << sb;
- _out << nl << "return begin_" << opName << spar << argsAMI << "ctx__" << "cb__"
- << "cookie__" << "false" << epar << ';';
+ _out << nl << "return begin_" << opName << spar << argsAMI << "iceCtx" << "iceCb"
+ << "iceCookie" << "false" << epar << ';';
_out << eb;
//
// Write the end_ method.
//
- string flatName = "__" + opName + "_name";
+ string flatName = "_" + opName + "_name";
_out << sp << nl << "public " << retS << " end_" << opName << spar << getOutParams(op, false, true)
- << "Ice.AsyncResult r__" << epar;
+ << "Ice.AsyncResult iceR" << epar;
_out << sb;
- _out << nl << "var resultI__ = IceInternal.AsyncResultI.check(r__, this, " << flatName << ");";
+ _out << nl << "var iceResultI = IceInternal.AsyncResultI.check(iceR, this, " << flatName << ");";
if(returnTypeS.empty())
{
- _out << nl << "((IceInternal.OutgoingAsyncT<object>)resultI__.OutgoingAsync).result__(resultI__.wait());";
+ _out << nl << "((IceInternal.OutgoingAsyncT<object>)iceResultI.OutgoingAsync).iceResult(iceResultI.wait());";
}
else
{
- _out << nl << "var outgoing__ = (IceInternal.OutgoingAsyncT<" << returnTypeS << ">)resultI__.OutgoingAsync;";
+ _out << nl << "var iceOutgoing = (IceInternal.OutgoingAsyncT<" << returnTypeS << ">)iceResultI.OutgoingAsync;";
if(outParams.empty())
{
- _out << nl << "return outgoing__.result__(resultI__.wait());";
+ _out << nl << "return iceOutgoing.iceResult(iceResultI.wait());";
}
else if(!ret && outParams.size() == 1)
{
- _out << nl << fixId(outParams.front()->name()) << " = outgoing__.result__(resultI__.wait());";
+ _out << nl << fixId(outParams.front()->name()) << " = iceOutgoing.iceResult(iceResultI.wait());";
}
else
{
- _out << nl << "var result__ = outgoing__.result__(resultI__.wait());";
+ _out << nl << "var iceResult = iceOutgoing.iceResult(iceResultI.wait());";
for(ParamDeclList::const_iterator i = outParams.begin(); i != outParams.end(); ++i)
{
- _out << nl << fixId((*i)->name()) << " = result__." << fixId((*i)->name()) << ";";
+ _out << nl << fixId((*i)->name()) << " = iceResult." << fixId((*i)->name()) << ";";
}
if(ret)
{
- _out << nl << "return result__." << resultStructReturnValueName(outParams) << ";";
+ _out << nl << "return iceResult." << resultStructReturnValueName(outParams) << ";";
}
}
}
@@ -4702,12 +4702,12 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
//
_out << sp;
_out << nl << "private Ice.AsyncResult<" << delType << "> begin_" << opName << spar << paramsAMI
- << "_System.Collections.Generic.Dictionary<string, string> ctx__"
- << "Ice.AsyncCallback completedCallback__" << "object cookie__" << "bool synchronous__"
+ << "_System.Collections.Generic.Dictionary<string, string> iceCtx"
+ << "Ice.AsyncCallback iceCompletedCallback" << "object iceCookie" << "bool iceSynchronous"
<< epar;
_out << sb;
- _out << nl << "var completed__ = new IceInternal.OperationAsyncResultCompletionCallback<" << delType;
+ _out << nl << "var iceCompleted = new IceInternal.OperationAsyncResultCompletionCallback<" << delType;
_out << ", " << (returnTypeS.empty() ? "object" : returnTypeS);
_out << ">(";
@@ -4715,38 +4715,38 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
// Write the completed callback
//
_out.inc();
- _out << nl << "(" << delType << " cb__, " << (returnTypeS.empty() ? "object" : returnTypeS) << " ret__) =>";
+ _out << nl << "(" << delType << " iceCb, " << (returnTypeS.empty() ? "object" : returnTypeS) << " iceRet) =>";
_out << sb;
- _out << nl << "if(cb__ != null)";
+ _out << nl << "if(iceCb != null)";
_out << sb;
- _out << nl << "cb__.Invoke" << spar;
+ _out << nl << "iceCb.Invoke" << spar;
if(ret && outParams.empty())
{
- _out << "ret__";
+ _out << "iceRet";
}
else if(ret || outParams.size() > 1)
{
if(ret)
{
- _out << "ret__." + resultStructReturnValueName(outParams);
+ _out << "iceRet." + resultStructReturnValueName(outParams);
}
for(ParamDeclList::const_iterator pli = outParams.begin(); pli != outParams.end(); ++pli)
{
- _out << "ret__." + fixId((*pli)->name());
+ _out << "iceRet." + fixId((*pli)->name());
}
}
else if(!outParams.empty())
{
- _out << "ret__";
+ _out << "iceRet";
}
_out << epar << ';';
_out << eb;
_out << eb << ",";
- _out << nl << "this, " << flatName << ", cookie__, completedCallback__);";
+ _out << nl << "this, " << flatName << ", iceCookie, iceCompletedCallback);";
_out.dec();
- _out << nl << op->name() << "___" << spar << argsAMI << "ctx__" << "synchronous__" << "completed__" << epar << ";";
- _out << nl << "return completed__;";
+ _out << nl << "iceI_" << op->name() << spar << argsAMI << "iceCtx" << "iceSynchronous" << "iceCompleted" << epar << ";";
+ _out << nl << "return iceCompleted;";
_out << eb;
}
_out << sp << nl << "#endregion"; // Asynchronous operations
@@ -4762,7 +4762,7 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
_out << nl << "if((r == null) && b.ice_isA(ice_staticId()))";
_out << sb;
_out << nl << name << "PrxHelper h = new " << name << "PrxHelper();";
- _out << nl << "h.copyFrom__(b);";
+ _out << nl << "h.iceCopyFrom(b);";
_out << nl << "r = h;";
_out << eb;
_out << nl << "return r;";
@@ -4779,7 +4779,7 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
_out << nl << "if((r == null) && b.ice_isA(ice_staticId(), ctx))";
_out << sb;
_out << nl << name << "PrxHelper h = new " << name << "PrxHelper();";
- _out << nl << "h.copyFrom__(b);";
+ _out << nl << "h.iceCopyFrom(b);";
_out << nl << "r = h;";
_out << eb;
_out << nl << "return r;";
@@ -4797,7 +4797,7 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
_out << nl << "if(bb.ice_isA(ice_staticId()))";
_out << sb;
_out << nl << name << "PrxHelper h = new " << name << "PrxHelper();";
- _out << nl << "h.copyFrom__(bb);";
+ _out << nl << "h.iceCopyFrom(bb);";
_out << nl << "return h;";
_out << eb;
_out << eb;
@@ -4821,7 +4821,7 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
_out << nl << "if(bb.ice_isA(ice_staticId(), ctx))";
_out << sb;
_out << nl << name << "PrxHelper h = new " << name << "PrxHelper();";
- _out << nl << "h.copyFrom__(bb);";
+ _out << nl << "h.iceCopyFrom(bb);";
_out << nl << "return h;";
_out << eb;
_out << eb;
@@ -4841,7 +4841,7 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
_out << nl << "if(r == null)";
_out << sb;
_out << nl << name << "PrxHelper h = new " << name << "PrxHelper();";
- _out << nl << "h.copyFrom__(b);";
+ _out << nl << "h.iceCopyFrom(b);";
_out << nl << "r = h;";
_out << eb;
_out << nl << "return r;";
@@ -4855,7 +4855,7 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
_out << eb;
_out << nl << "Ice.ObjectPrx bb = b.ice_facet(f);";
_out << nl << name << "PrxHelper h = new " << name << "PrxHelper();";
- _out << nl << "h.copyFrom__(bb);";
+ _out << nl << "h.iceCopyFrom(bb);";
_out << nl << "return h;";
_out << eb;
@@ -4875,7 +4875,7 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
assert(scopedIter != ids.end());
StringList::difference_type scopedPos = IceUtilInternal::distance(firstIter, scopedIter);
- _out << sp << nl << "public static readonly string[] ids__ =";
+ _out << sp << nl << "public static readonly string[] s_iceIds =";
_out << sb;
{
@@ -4893,25 +4893,25 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
_out << sp << nl << "public static string ice_staticId()";
_out << sb;
- _out << nl << "return ids__[" << scopedPos << "];";
+ _out << nl << "return s_iceIds[" << scopedPos << "];";
_out << eb;
_out << sp << nl << "#endregion"; // Checked and unchecked cast operations
_out << sp << nl << "#region Marshaling support";
- _out << sp << nl << "public static void write(Ice.OutputStream os__, " << name << "Prx v__)";
+ _out << sp << nl << "public static void write(Ice.OutputStream iceOs, " << name << "Prx iceV)";
_out << sb;
- _out << nl << "os__.writeProxy(v__);";
+ _out << nl << "iceOs.writeProxy(iceV);";
_out << eb;
- _out << sp << nl << "public static " << name << "Prx read(Ice.InputStream is__)";
+ _out << sp << nl << "public static " << name << "Prx read(Ice.InputStream iceIs)";
_out << sb;
- _out << nl << "Ice.ObjectPrx proxy = is__.readProxy();";
+ _out << nl << "Ice.ObjectPrx proxy = iceIs.readProxy();";
_out << nl << "if(proxy != null)";
_out << sb;
_out << nl << name << "PrxHelper result = new " << name << "PrxHelper();";
- _out << nl << "result.copyFrom__(proxy);";
+ _out << nl << "result.iceCopyFrom(proxy);";
_out << nl << "return result;";
_out << eb;
_out << nl << "return null;";
@@ -4946,16 +4946,16 @@ Slice::Gen::HelperVisitor::visitSequence(const SequencePtr& p)
_out << nl << "public sealed class " << p->name() << "Helper";
_out << sb;
- _out << sp << nl << "public static void write(Ice.OutputStream os__, " << typeS << " v__)";
+ _out << sp << nl << "public static void write(Ice.OutputStream iceOs, " << typeS << " iceV)";
_out << sb;
- writeSequenceMarshalUnmarshalCode(_out, p, "v__", true, false);
+ writeSequenceMarshalUnmarshalCode(_out, p, "iceV", true, false);
_out << eb;
- _out << sp << nl << "public static " << typeS << " read(Ice.InputStream is__)";
+ _out << sp << nl << "public static " << typeS << " read(Ice.InputStream iceIs)";
_out << sb;
- _out << nl << typeS << " v__;";
- writeSequenceMarshalUnmarshalCode(_out, p, "v__", false, false);
- _out << nl << "return v__;";
+ _out << nl << typeS << " iceV;";
+ writeSequenceMarshalUnmarshalCode(_out, p, "iceV", false, false);
+ _out << nl << "return iceV;";
_out << eb;
_out << eb;
@@ -5030,23 +5030,23 @@ Slice::Gen::HelperVisitor::visitDictionary(const DictionaryPtr& p)
_out << sp << nl << "public static void write(";
_out.useCurrentPosAsIndent();
- _out << "Ice.OutputStream os__,";
- _out << nl << name << " v__)";
+ _out << "Ice.OutputStream iceOs,";
+ _out << nl << name << " iceV)";
_out.restoreIndent();
_out << sb;
- _out << nl << "if(v__ == null)";
+ _out << nl << "if(iceV == null)";
_out << sb;
- _out << nl << "os__.writeSize(0);";
+ _out << nl << "iceOs.writeSize(0);";
_out << eb;
_out << nl << "else";
_out << sb;
- _out << nl << "os__.writeSize(v__.Count);";
+ _out << nl << "iceOs.writeSize(iceV.Count);";
_out << nl << "foreach(_System.Collections.";
_out << "Generic.KeyValuePair<" << keyS << ", " << valueS << ">";
- _out << " e__ in v__)";
+ _out << " iceE in iceV)";
_out << sb;
- writeMarshalUnmarshalCode(_out, key, "e__.Key", true);
- writeMarshalUnmarshalCode(_out, value, "e__.Value", true);
+ writeMarshalUnmarshalCode(_out, key, "iceE.Key", true);
+ writeMarshalUnmarshalCode(_out, value, "iceE.Value", true);
_out << eb;
_out << eb;
_out << eb;
@@ -5055,9 +5055,9 @@ Slice::Gen::HelperVisitor::visitDictionary(const DictionaryPtr& p)
if(hasClassValue)
{
- _out << sp << nl << "public sealed class Patcher__";
+ _out << sp << nl << "public sealed class IcePatcher";
_out << sb;
- _out << sp << nl << "internal Patcher__(string type, " << name << " m, " << keyS << " key)";
+ _out << sp << nl << "internal IcePatcher(string type, " << name << " m, " << keyS << " key)";
_out << sb;
_out << nl << "_type = type;";
_out << nl << "_m = m;";
@@ -5089,56 +5089,56 @@ Slice::Gen::HelperVisitor::visitDictionary(const DictionaryPtr& p)
_out << eb;
}
- _out << sp << nl << "public static " << name << " read(Ice.InputStream is__)";
+ _out << sp << nl << "public static " << name << " read(Ice.InputStream iceIs)";
_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 iceSz = iceIs.readSize();";
+ _out << nl << name << " iceR = new " << name << "();";
+ _out << nl << "for(int iceI = 0; iceI < iceSz; ++iceI)";
_out << sb;
- _out << nl << keyS << " k__;";
+ _out << nl << keyS << " iceK;";
StructPtr st = StructPtr::dynamicCast(key);
if(st)
{
if(isValueType(st))
{
- _out << nl << "k__ = new " << typeToString(key) << "();";
+ _out << nl << "iceK = new " << typeToString(key) << "();";
}
else
{
- _out << nl << "k__ = null;";
+ _out << nl << "iceK = null;";
}
}
- writeMarshalUnmarshalCode(_out, key, "k__", false);
+ writeMarshalUnmarshalCode(_out, key, "iceK", false);
string patcher;
if(hasClassValue)
{
- patcher = "new Patcher__(" + getStaticId(value) + ", r__, k__).patch";
+ patcher = "new IcePatcher(" + getStaticId(value) + ", iceR, iceK).patch";
}
else
{
- _out << nl << valueS << " v__;";
+ _out << nl << valueS << " iceV;";
StructPtr st = StructPtr::dynamicCast(value);
if(st)
{
if(isValueType(st))
{
- _out << nl << "v__ = new " << typeToString(value) << "();";
+ _out << nl << "iceV = new " << typeToString(value) << "();";
}
else
{
- _out << nl << "v__ = null;";
+ _out << nl << "iceV = null;";
}
}
}
- writeMarshalUnmarshalCode(_out, value, hasClassValue ? patcher : "v__", false);
+ writeMarshalUnmarshalCode(_out, value, hasClassValue ? patcher : "iceV", false);
if(!hasClassValue)
{
- _out << nl << "r__[k__] = v__;";
+ _out << nl << "iceR[iceK] = iceV;";
}
_out << eb;
- _out << nl << "return r__;";
+ _out << nl << "return iceR;";
_out << eb;
_out << eb;
@@ -5391,7 +5391,7 @@ Slice::Gen::BaseImplVisitor::writeOperation(const OperationPtr& op, bool comment
{
_out << "override ";
}
- _out << "void " << opName << "_async" << spar << pDecl << "Ice.Current current__ = null" << epar;
+ _out << "void " << opName << "_async" << spar << pDecl << "Ice.Current iceCurrent = null" << epar;
if(comment)
{
@@ -5402,7 +5402,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) << " iceRet = " << writeValue(ret) << ';';
}
for(ParamDeclList::const_iterator i = params.begin(); i != params.end(); ++i)
{
@@ -5413,10 +5413,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 << "iceCb.ice_response" << spar;
if(ret)
{
- _out << "ret__";
+ _out << "iceRet";
}
for(ParamDeclList::const_iterator i = params.begin(); i != params.end(); ++i)
{
@@ -5440,7 +5440,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__ = null";
+ _out << "Ice.Current iceCurrent = null";
}
_out << epar;
if(comment)