summaryrefslogtreecommitdiff
path: root/cpp/src/slice2vb/Gen.cpp
diff options
context:
space:
mode:
authorMichi Henning <michi@zeroc.com>2005-09-21 03:17:49 +0000
committerMichi Henning <michi@zeroc.com>2005-09-21 03:17:49 +0000
commitc8c8274bf45e01e1b951c309df0e7565aec149c0 (patch)
treed83ad78d2a3ef5f9a3d27244b3608cf58a655115 /cpp/src/slice2vb/Gen.cpp
parentBug 467. (diff)
downloadice-c8c8274bf45e01e1b951c309df0e7565aec149c0.tar.bz2
ice-c8c8274bf45e01e1b951c309df0e7565aec149c0.tar.xz
ice-c8c8274bf45e01e1b951c309df0e7565aec149c0.zip
Bug 426.
Diffstat (limited to 'cpp/src/slice2vb/Gen.cpp')
-rwxr-xr-xcpp/src/slice2vb/Gen.cpp913
1 files changed, 454 insertions, 459 deletions
diff --git a/cpp/src/slice2vb/Gen.cpp b/cpp/src/slice2vb/Gen.cpp
index dac5a51e307..2bdd310e052 100755
--- a/cpp/src/slice2vb/Gen.cpp
+++ b/cpp/src/slice2vb/Gen.cpp
@@ -116,8 +116,8 @@ Slice::VbVisitor::writeInheritedOperations(const ClassDefPtr& p)
{
_out << " As " << retS;
}
- _out << " Implements " << fixId(containingClass->scope()) << "_" << containingClass->name()
- << "OperationsNC." << fixId(name, DotNet::ICloneable, true);
+ _out << " Implements " << fixId(containingClass->scoped() + "OperationsNC_.")
+ << fixId(name, DotNet::ICloneable, true);
_out.inc();
_out << nl;
if((*op)->returnType())
@@ -133,15 +133,15 @@ Slice::VbVisitor::writeInheritedOperations(const ClassDefPtr& p)
<< spar << params;
if(!containingClass->isLocal())
{
- _out << "ByVal __current As Ice.Current";
+ _out << "ByVal current__ As Ice.Current";
}
_out << epar;
if(ret)
{
_out << " As " << retS;
}
- _out << " Implements " << fixId(containingClass->scope()) << "_" << containingClass->name()
- << "Operations." << fixId(name, DotNet::ICloneable, true);
+ _out << " Implements " << fixId(containingClass->scoped() + "Operations_.")
+ << fixId(name, DotNet::ICloneable, true);
}
else
{
@@ -149,17 +149,17 @@ Slice::VbVisitor::writeInheritedOperations(const ClassDefPtr& p)
vector<string> args = getArgsAsync(*op);
_out << sp << nl << "Public Sub " << ' ' << name << "_async" << spar << params << epar
- << " Implements " << fixId(containingClass->scope()) << "_" << containingClass->name()
- << "OperationsNC." << name << "_async";
+ << " Implements " << fixId(containingClass->scoped() + "OperationsNC_.")
+ << name << "_async";
_out.inc();
_out << nl << name << "_async" << spar << args << epar;
_out.dec();
_out << nl << "End Sub";
_out << sp << nl << "Public MustOverride Sub " << name << "_async"
- << spar << params << "ByVal __current As Ice.Current" << epar
- << " Implements " << fixId(containingClass->scope()) << "_" << containingClass->name()
- << "Operations." << name << "_async";
+ << spar << params << "ByVal current__ As Ice.Current" << epar
+ << " Implements " << fixId(containingClass->scoped() + "Operations_.")
+ << name << "_async";
}
}
@@ -214,7 +214,7 @@ Slice::VbVisitor::writeDispatch(const ClassDefPtr& p)
_out << sp << nl << "#Region \"Slice type-related members\"";
_out.restoreIndent();
- _out << sp << nl << "Public Shared Shadows __ids As String() = New String() _";
+ _out << sp << nl << "Public Shared Shadows ids__ As String() = New String() _";
_out.inc();
_out << nl << "{ _";
_out.inc();
@@ -235,44 +235,44 @@ Slice::VbVisitor::writeDispatch(const ClassDefPtr& p)
_out << sp << nl << "Public Overloads Overrides Function ice_isA(ByVal s As String) As Boolean";
_out.inc();
- _out << nl << "Return _System.Array.BinarySearch(__ids, s, _System.Collections.Comparer.DefaultInvariant) >= 0";
+ _out << nl << "Return _System.Array.BinarySearch(ids__, s, _System.Collections.Comparer.DefaultInvariant) >= 0";
_out.dec();
_out << nl << "End Function";
- _out << sp << nl << "Public Overloads Overrides Function ice_isA(ByVal s As String, Byval __current As Ice.Current)"
+ _out << sp << nl << "Public Overloads Overrides Function ice_isA(ByVal s As String, Byval current__ As Ice.Current)"
" As Boolean";
_out.inc();
- _out << nl << "Return _System.Array.BinarySearch(__ids, s, _System.Collections.Comparer.DefaultInvariant) >= 0";
+ _out << nl << "Return _System.Array.BinarySearch(ids__, s, _System.Collections.Comparer.DefaultInvariant) >= 0";
_out.dec();
_out << nl << "End Function";
_out << sp << nl << "Public Overloads Overrides Function ice_ids() As String()";
_out.inc();
- _out << nl << "Return __ids";
+ _out << nl << "Return ids__";
_out.dec();
_out << nl << "End Function";
- _out << sp << nl << "Public Overloads Overrides Function ice_ids(ByVal __current As Ice.Current) As String()";
+ _out << sp << nl << "Public Overloads Overrides Function ice_ids(ByVal current__ As Ice.Current) As String()";
_out.inc();
- _out << nl << "Return __ids";
+ _out << nl << "Return ids__";
_out.dec();
_out << nl << "End Function";
_out << sp << nl << "Public Overloads Overrides Function ice_id() As String";
_out.inc();
- _out << nl << "Return __ids(" << scopedPos << ")";
+ _out << nl << "Return ids__(" << scopedPos << ")";
_out.dec();
_out << nl << "End Function";
- _out << sp << nl << "Public Overloads Overrides Function ice_id(ByVal __current As Ice.Current) As String";
+ _out << sp << nl << "Public Overloads Overrides Function ice_id(ByVal current__ As Ice.Current) As String";
_out.inc();
- _out << nl << "Return __ids(" << scopedPos << ")";
+ _out << nl << "Return ids__(" << scopedPos << ")";
_out.dec();
_out << nl << "End Function";
_out << sp << nl << "Public Overloads Shared Function ice_staticId() As String";
_out.inc();
- _out << nl << "Return __ids(" << scopedPos << ")";
+ _out << nl << "Return ids__(" << scopedPos << ")";
_out.dec();
_out << nl << "End Function";
@@ -297,12 +297,12 @@ Slice::VbVisitor::writeDispatch(const ClassDefPtr& p)
assert(cl);
string opName = op->name();
- _out << sp << nl << "Public Shared Function ___" << opName << "( _";
+ _out << sp << nl << "Public Shared Function "<< opName << "___( _";
_out.inc();
_out.inc();
- _out << nl << "ByVal __obj As _" << p->name() << "Operations, _";
- _out << nl << "ByVal __inS As IceInternal.Incoming, _";
- _out << nl << "ByVal __current As Ice.Current) As IceInternal.DispatchStatus";
+ _out << nl << "ByVal obj__ As " << p->name() << "Operations_, _";
+ _out << nl << "ByVal inS__ As IceInternal.Incoming, _";
+ _out << nl << "ByVal current__ As Ice.Current) As IceInternal.DispatchStatus";
_out.dec();
bool amd = p->hasMetaData("amd") || op->hasMetaData("amd");
@@ -342,14 +342,14 @@ Slice::VbVisitor::writeDispatch(const ClassDefPtr& p)
#endif
TypeStringList::const_iterator q;
- _out << nl << "__checkMode(" << sliceModeToIceMode(op) << ", __current.mode)";
+ _out << nl << "checkMode__(" << sliceModeToIceMode(op) << ", current__.mode)";
if(!inParams.empty())
{
- _out << nl << "Dim __is As IceInternal.BasicStream = __inS.istr()";
+ _out << nl << "Dim is__ As IceInternal.BasicStream = inS__.istr()";
}
if(!outParams.empty() || ret || !throws.empty())
{
- _out << nl << "Dim __os As IceInternal.BasicStream = __inS.ostr()";
+ _out << nl << "Dim os__ As IceInternal.BasicStream = inS__.ostr()";
}
//
@@ -370,7 +370,7 @@ Slice::VbVisitor::writeDispatch(const ClassDefPtr& p)
}
if(op->sendsClasses())
{
- _out << nl << "__is.readPendingObjects()";
+ _out << nl << "is__.readPendingObjects()";
}
for(q = inParams.begin(); q != inParams.end(); ++q)
{
@@ -378,7 +378,7 @@ Slice::VbVisitor::writeDispatch(const ClassDefPtr& p)
bool patchStruct = st && !st->hasMetaData("clr:class") && st->classDataMembers().size() != 0;
if(patchStruct)
{
- _out << nl << fixId(q->second) << ".__patch()";
+ _out << nl << fixId(q->second) << ".patch__()";
}
}
@@ -400,9 +400,9 @@ Slice::VbVisitor::writeDispatch(const ClassDefPtr& p)
if(ret)
{
string retS = typeToString(ret);
- _out << "Dim __ret As " << retS << " = ";
+ _out << "Dim ret__ As " << retS << " = ";
}
- _out << "__obj." << fixId(opName, DotNet::ICloneable, true) << spar;
+ _out << "obj__." << fixId(opName, DotNet::ICloneable, true) << spar;
for(q = inParams.begin(); q != inParams.end(); ++q)
{
BuiltinPtr builtin = BuiltinPtr::dynamicCast(q->first);
@@ -422,7 +422,7 @@ Slice::VbVisitor::writeDispatch(const ClassDefPtr& p)
{
_out << fixId(q->second);
}
- _out << "__current" << epar;
+ _out << "current__" << epar;
//
// Marshal 'out' parameters and return value.
@@ -433,11 +433,11 @@ Slice::VbVisitor::writeDispatch(const ClassDefPtr& p)
}
if(ret)
{
- writeMarshalUnmarshalCode(_out, ret, "__ret", true, false, true, "");
+ writeMarshalUnmarshalCode(_out, ret, "ret__", true, false, true, "");
}
if(op->returnsClasses())
{
- _out << nl << "__os.writePendingObjects()";
+ _out << nl << "os__.writePendingObjects()";
}
_out << nl << "Return IceInternal.DispatchStatus.DispatchOK";
@@ -453,7 +453,7 @@ Slice::VbVisitor::writeDispatch(const ClassDefPtr& p)
string exS = fixId((*t)->scoped());
_out << nl << "Catch ex As " << exS;
_out.inc();
- _out << nl << "__os.writeUserException(ex)";
+ _out << nl << "os__.writeUserException(ex)";
_out << nl << "Return IceInternal.DispatchStatus.DispatchUserException";
_out.dec();
_out << nl << "End Try";
@@ -476,9 +476,10 @@ Slice::VbVisitor::writeDispatch(const ClassDefPtr& p)
}
TypeStringList::const_iterator q;
- _out << nl << "__checkMode(" << sliceModeToIceMode(op) << ", __current.mode)"; if(!inParams.empty())
+ _out << nl << "checkMode__(" << sliceModeToIceMode(op) << ", current__.mode)";
+ if(!inParams.empty())
{
- _out << nl << "Dim __is As IceInternal.BasicStream = __inS.istr()";
+ _out << nl << "Dim is__ As IceInternal.BasicStream = inS__.istr()";
}
//
@@ -497,7 +498,7 @@ Slice::VbVisitor::writeDispatch(const ClassDefPtr& p)
}
if(op->sendsClasses())
{
- _out << nl << "__is.readPendingObjects()";
+ _out << nl << "is__.readPendingObjects()";
}
for(q = inParams.begin(); q != inParams.end(); ++q)
{
@@ -505,7 +506,7 @@ Slice::VbVisitor::writeDispatch(const ClassDefPtr& p)
bool patchStruct = st && !st->hasMetaData("clr:class") && st->classDataMembers().size() != 0;
if(patchStruct)
{
- _out << nl << fixId(q->second) << ".__patch()";
+ _out << nl << fixId(q->second) << ".patch__()";
}
}
@@ -513,11 +514,11 @@ Slice::VbVisitor::writeDispatch(const ClassDefPtr& p)
// Call on the servant.
//
string classNameAMD = "AMD_" + p->name();
- _out << nl << "Dim __cb As " << classNameAMD << '_' << op->name() << " = new _"
- << classNameAMD << '_' << op->name() << "(__inS)";
+ _out << nl << "Dim cb__ As " << classNameAMD << '_' << op->name() << " = new _"
+ << classNameAMD << '_' << op->name() << "(inS__)";
_out << nl << "Try";
_out.inc();
- _out << nl << "__obj.";
+ _out << nl << "obj__.";
if(amd)
{
_out << opName << "_async";
@@ -529,7 +530,7 @@ Slice::VbVisitor::writeDispatch(const ClassDefPtr& p)
_out << spar;
if(amd)
{
- _out << "__cb";
+ _out << "cb__";
}
for(q = inParams.begin(); q != inParams.end(); ++q)
{
@@ -545,11 +546,11 @@ Slice::VbVisitor::writeDispatch(const ClassDefPtr& p)
_out << fixId(q->second);
}
}
- _out << "__current" << epar;
+ _out << "current__" << epar;
_out.dec();
_out << nl << "Catch ex As _System.Exception";
_out.inc();
- _out << nl << "__cb.ice_exception(ex)";
+ _out << nl << "cb__.ice_exception(ex)";
_out.dec();
_out << nl << "End Try";
_out << nl << "Return IceInternal.DispatchStatus.DispatchAsync";
@@ -590,7 +591,7 @@ Slice::VbVisitor::writeDispatch(const ClassDefPtr& p)
StringList::const_iterator q;
- _out << sp << nl << "Public Shared Shadows __all As String() = New String() _";
+ _out << sp << nl << "Public Shared Shadows all__ As String() = New String() _";
_out.inc();
_out << nl << "{ _";
_out.inc();
@@ -609,14 +610,14 @@ Slice::VbVisitor::writeDispatch(const ClassDefPtr& p)
_out << nl << '}';
_out.dec();
- _out << sp << nl << "Public Overloads Overrides Function __dispatch( _";
+ _out << sp << nl << "Public Overloads Overrides Function dispatch__( _";
_out.inc();
_out.inc();
- _out << nl << "ByVal __inS As IceInternal.Incoming, _";
- _out << nl << "ByVal __current As Ice.Current) As IceInternal.DispatchStatus";
+ _out << nl << "ByVal inS__ As IceInternal.Incoming, _";
+ _out << nl << "ByVal current__ As Ice.Current) As IceInternal.DispatchStatus";
_out.dec();
_out << nl << "Dim pos As Integer";
- _out << nl << "pos = _System.Array.BinarySearch(__all, __current.operation, "
+ _out << nl << "pos = _System.Array.BinarySearch(all__, current__.operation, "
<< "_System.Collections.Comparer.DefaultInvariant)";
_out << nl << "If pos < 0 Then";
_out.inc();
@@ -634,19 +635,19 @@ Slice::VbVisitor::writeDispatch(const ClassDefPtr& p)
_out.inc();
if(opName == "ice_id")
{
- _out << nl << "Return ___ice_id(Me, __inS, __current)";
+ _out << nl << "Return ice_id___(Me, inS__, current__)";
}
else if(opName == "ice_ids")
{
- _out << nl << "Return ___ice_ids(Me, __inS, __current)";
+ _out << nl << "Return ice_ids___(Me, inS__, current__)";
}
else if(opName == "ice_isA")
{
- _out << nl << "Return ___ice_isA(Me, __inS, __current)";
+ _out << nl << "Return ice_isA___(Me, inS__, current__)";
}
else if(opName == "ice_ping")
{
- _out << nl << "Return ___ice_ping(Me, __inS, __current)";
+ _out << nl << "Return ice_ping___(Me, inS__, current__)";
}
else
{
@@ -662,19 +663,16 @@ Slice::VbVisitor::writeDispatch(const ClassDefPtr& p)
assert(cl);
if(cl->scoped() == p->scoped())
{
- _out << nl << "Return ___" << opName << "(Me, __inS, __current)";
+ _out << nl << "Return " << opName << "___(Me, inS__, current__)";
}
else
{
string base = cl->scoped();
if(cl->isInterface())
{
- string::size_type pos = base.rfind("::");
- assert(pos != string::npos);
- base = base.insert(pos + 2, "_");
- base += "Disp";
+ base += "Disp_";
}
- _out << nl << "Return " << fixId(base) << ".___" << opName << "(Me, __inS, __current)";
+ _out << nl << "Return " << fixId(base) << "." << opName << "___(Me, inS__, current__)";
}
break;
}
@@ -737,7 +735,7 @@ Slice::VbVisitor::getParamsAsync(const OperationPtr& op, bool amd)
string name = op->name();
ContainerPtr container = op->container();
ClassDefPtr cl = ClassDefPtr::dynamicCast(container); // Get the class containing the op.
- string param = "ByVal __cb As ";
+ string param = "ByVal cb__ As ";
string scope = fixId(cl->scope());
param += scope + (amd ? "AMD_" : "AMI_") + cl->name() + "_" + op->name();
params.push_back(param);
@@ -762,7 +760,7 @@ Slice::VbVisitor::getParamsAsyncCB(const OperationPtr& op)
TypePtr ret = op->returnType();
if(ret)
{
- params.push_back("ByVal __ret As " + typeToString(ret));
+ params.push_back("ByVal ret__ As " + typeToString(ret));
}
ParamDeclList paramList = op->parameters();
@@ -796,7 +794,7 @@ Slice::VbVisitor::getArgsAsync(const OperationPtr& op)
{
vector<string> args;
- args.push_back("__cb");
+ args.push_back("cb__");
ParamDeclList paramList = op->parameters();
for(ParamDeclList::const_iterator q = paramList.begin(); q != paramList.end(); ++q)
@@ -817,7 +815,7 @@ Slice::VbVisitor::getArgsAsyncCB(const OperationPtr& op)
TypePtr ret = op->returnType();
if(ret)
{
- args.push_back("__ret");
+ args.push_back("ret__");
}
ParamDeclList paramList = op->parameters();
@@ -1139,17 +1137,17 @@ Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
_out << sp << nl << "Public NotInheritable Class " << p->name() << "Helper";
_out.inc();
- _out << sp << nl << "Public Sub New(ByVal __inS As Ice.InputStream)";
+ _out << sp << nl << "Public Sub New(ByVal inS__ As Ice.InputStream)";
_out.inc();
- _out << nl << "_in = __inS";
+ _out << nl << "_in = inS__";
_out << nl << "_pp = New IceInternal.ParamPatcher(GetType(" << scoped << "))";
_out.dec();
_out << nl << "End Sub";
- _out << sp << nl << "Public Shared Sub write(ByVal __outS As Ice.OutputStream, ByVal __v As "
+ _out << sp << nl << "Public Shared Sub write(ByVal outS__ As Ice.OutputStream, ByVal v__ As "
<< fixId(name) << ')';
_out.inc();
- _out << nl << "__outS.writeObject(__v)";
+ _out << nl << "outS__.writeObject(v__)";
_out.dec();
_out << nl << "End Sub";
@@ -1190,12 +1188,12 @@ Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
{
_out << nl << "Inherits Ice.Object";
}
- _out << ", _" << p->name();
+ _out << ", " << p->name();
if(!p->isLocal())
{
- _out << "Operations, _" << p->name();
+ _out << "Operations_, " << p->name();
}
- _out << "OperationsNC";
+ _out << "OperationsNC_";
if(!bases.empty())
{
ClassList::const_iterator q = bases.begin();
@@ -1234,12 +1232,12 @@ Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
}
if(p->isAbstract())
{
- _out << nl << "Implements _" << p->name();
+ _out << nl << "Implements " << p->name();
if(!p->isLocal())
{
- _out << "Operations, _" << p->name();
+ _out << "Operations_, " << p->name();
}
- _out << "OperationsNC";
+ _out << "OperationsNC_";
}
for(ClassList::const_iterator q = bases.begin(); q != bases.end(); ++q)
{
@@ -1365,24 +1363,24 @@ Slice::Gen::TypesVisitor::visitClassDefEnd(const ClassDefPtr& p)
_out << sp << nl << "#Region \"Marshaling support\"";
_out.restoreIndent();
- _out << sp << nl << "Public Overloads Overrides Sub __write(ByVal __os As IceInternal.BasicStream)";
+ _out << sp << nl << "Public Overloads Overrides Sub write__(ByVal os__ As IceInternal.BasicStream)";
_out.inc();
- _out << nl << "__os.writeTypeId(ice_staticId())";
- _out << nl << "__os.startWriteSlice()";
+ _out << nl << "os__.writeTypeId(ice_staticId())";
+ _out << nl << "os__.startWriteSlice()";
for(d = members.begin(); d != members.end(); ++d)
{
StringList metaData = (*d)->getMetaData();
writeMarshalUnmarshalCode(_out, (*d)->type(), fixId((*d)->name(), DotNet::ICloneable, true), true, false, false);
}
- _out << nl << "__os.endWriteSlice()";
- _out << nl << "MyBase.__write(__os)";
+ _out << nl << "os__.endWriteSlice()";
+ _out << nl << "MyBase.write__(os__)";
_out.dec();
_out << nl << "End Sub";
DataMemberList allClassMembers = p->allClassDataMembers();
if(allClassMembers.size() != 0)
{
- _out << sp << nl << "Public NotInheritable Class __Patcher";
+ _out << sp << nl << "Public NotInheritable Class Patcher__";
_out.inc();
_out << nl << "Inherits IceInternal.Patcher";
_out << sp << nl << "Friend Sub New(ByVal instance As Ice.ObjectImpl";
@@ -1417,7 +1415,7 @@ Slice::Gen::TypesVisitor::visitClassDefEnd(const ClassDefPtr& p)
}
string memberName = fixId((*d)->name(), DotNet::ICloneable, true);
string memberType = typeToString((*d)->type());
- _out << nl << "_type = GetType(" << memberType << ')';
+ _out << nl << "type_ = GetType(" << memberType << ')';
_out << nl << "_instance." << memberName << " = CType(v, " << memberType << ')';
if(allClassMembers.size() > 1)
{
@@ -1442,15 +1440,15 @@ Slice::Gen::TypesVisitor::visitClassDefEnd(const ClassDefPtr& p)
_out << nl << "End Class";
}
- _out << sp << nl << "Public Overloads Overrides Sub __read(ByVal __is As IceInternal.BasicStream, "
- "ByVal __rid As Boolean)";
+ _out << sp << nl << "Public Overloads Overrides Sub read__(ByVal is__ As IceInternal.BasicStream, "
+ "ByVal rid__ As Boolean)";
_out.inc();
- _out << nl << "If __rid Then";
+ _out << nl << "If rid__ Then";
_out.inc();
- _out << nl << "Dim myId As String = __is.readTypeId()";
+ _out << nl << "Dim myId As String = is__.readTypeId()";
_out.dec();
_out << nl << "End If";
- _out << nl << "__is.startReadSlice()";
+ _out << nl << "is__.startReadSlice()";
DataMemberList classMembers = p->classDataMembers();
int classMemberCount = static_cast<int>(allClassMembers.size() - classMembers.size());
for(d = members.begin(); d != members.end(); ++d)
@@ -1470,8 +1468,8 @@ Slice::Gen::TypesVisitor::visitClassDefEnd(const ClassDefPtr& p)
fixId((*d)->name(), DotNet::ICloneable, true),
false, false, false, patchParams.str());
}
- _out << nl << "__is.endReadSlice()";
- _out << nl << "MyBase.__read(__is, true)";
+ _out << nl << "is__.endReadSlice()";
+ _out << nl << "MyBase.read__(is__, true)";
_out.dec();
_out << nl << "End Sub";
@@ -1480,10 +1478,10 @@ Slice::Gen::TypesVisitor::visitClassDefEnd(const ClassDefPtr& p)
//
if(_stream)
{
- _out << sp << nl << "Public Overloads Overrides Sub __write(ByVal __outS As Ice.OutputStream)";
+ _out << sp << nl << "Public Overloads Overrides Sub write__(ByVal outS__ As Ice.OutputStream)";
_out.inc();
- _out << nl << "__outS.writeTypeId(ice_staticId())";
- _out << nl << "__outS.startSlice()";
+ _out << nl << "outS__.writeTypeId(ice_staticId())";
+ _out << nl << "outS__.startSlice()";
for(d = members.begin(); d != members.end(); ++d)
{
StringList metaData = (*d)->getMetaData();
@@ -1491,20 +1489,20 @@ Slice::Gen::TypesVisitor::visitClassDefEnd(const ClassDefPtr& p)
fixId((*d)->name(), DotNet::ICloneable, true),
true, true, false);
}
- _out << nl << "__outS.endSlice()";
- _out << nl << "MyBase.__write(__outS)";
+ _out << nl << "outS__.endSlice()";
+ _out << nl << "MyBase.write__(outS__)";
_out.dec();
_out << nl << "End Sub";
- _out << sp << nl << "Public Overloads Overrides Sub __read"
- << "(ByVal __inS As Ice.InputStream, ByVal __rid As Boolean)";
+ _out << sp << nl << "Public Overloads Overrides Sub read__"
+ << "(ByVal inS__ As Ice.InputStream, ByVal rid__ As Boolean)";
_out.inc();
- _out << nl << "If __rid Then";
+ _out << nl << "If rid__ Then";
_out.inc();
- _out << nl << "Dim myId As String = __inS.readTypeId()";
+ _out << nl << "Dim myId As String = inS__.readTypeId()";
_out.dec();
_out << nl << "End If";
- _out << nl << "__inS.startSlice()";
+ _out << nl << "inS__.startSlice()";
for(d = members.begin(); d != members.end(); ++d)
{
StringList metaData = (*d)->getMetaData();
@@ -1522,8 +1520,8 @@ Slice::Gen::TypesVisitor::visitClassDefEnd(const ClassDefPtr& p)
fixId((*d)->name(), DotNet::ICloneable, true),
false, true, false, patchParams.str());
}
- _out << nl << "__inS.endSlice()";
- _out << nl << "MyBase.__read(__inS, True)";
+ _out << nl << "inS__.endSlice()";
+ _out << nl << "MyBase.read__(inS__, True)";
_out.dec();
_out << nl << "End Sub";
}
@@ -1533,7 +1531,7 @@ Slice::Gen::TypesVisitor::visitClassDefEnd(const ClassDefPtr& p)
// Emit placeholder functions to catch errors.
//
string scoped = p->scoped();
- _out << sp << nl << "Public Overloads Overrides Sub __write(ByVal __outS As Ice.OutputStream)";
+ _out << sp << nl << "Public Overloads Overrides Sub write__(ByVal outS__ As Ice.OutputStream)";
_out.inc();
_out << nl << "Dim ex As Ice.MarshalException = New Ice.MarshalException";
_out << nl << "ex.reason = \"type " << scoped.substr(2) << " was not generated with stream support\"";
@@ -1541,8 +1539,8 @@ Slice::Gen::TypesVisitor::visitClassDefEnd(const ClassDefPtr& p)
_out.dec();
_out << nl << "End Sub";
- _out << sp << nl << "Public Overloads Overrides Sub __read"
- << "(ByVal __inS As Ice.InputStream, ByVal __rid As Boolean)";
+ _out << sp << nl << "Public Overloads Overrides Sub read__"
+ << "(ByVal inS__ As Ice.InputStream, ByVal rid__ As Boolean)";
_out.inc();
_out << nl << "Dim ex As Ice.MarshalException = New Ice.MarshalException";
_out << nl << "ex.reason = \"type " << scoped.substr(2) << " was not generated with stream support\"";
@@ -1609,7 +1607,7 @@ Slice::Gen::TypesVisitor::visitOperation(const OperationPtr& p)
{
_out << " As " << retS;
}
- _out << " Implements _" << classDef->name() << "OperationsNC." << name;
+ _out << " Implements " << classDef->name() << "OperationsNC_." << name;
if(!isLocal)
{
_out.inc();
@@ -1626,12 +1624,12 @@ Slice::Gen::TypesVisitor::visitOperation(const OperationPtr& p)
if(!isLocal)
{
_out << sp << nl << "Public MustOverride " << vbOp << ' ' << name
- << spar << params << "ByVal __current As Ice.Current" << epar;
+ << spar << params << "ByVal current__ As Ice.Current" << epar;
if(ret)
{
_out << " As " << retS;
}
- _out << " Implements _" << classDef->name() << "Operations." << name;
+ _out << " Implements " << classDef->name() << "Operations_." << name;
}
}
@@ -1670,9 +1668,9 @@ Slice::Gen::TypesVisitor::visitSequence(const SequencePtr& p)
_out.dec();
_out << nl << "End Sub";
- _out << sp << nl << "Public Sub New(ByVal __a As " << s << "())";
+ _out << sp << nl << "Public Sub New(ByVal a__ As " << s << "())";
_out.inc();
- _out << nl << "InnerList.AddRange(__a)";
+ _out << nl << "InnerList.AddRange(a__)";
_out.dec();
_out << nl << "End Sub";
@@ -1682,30 +1680,30 @@ Slice::Gen::TypesVisitor::visitSequence(const SequencePtr& p)
_out << sp << nl << "#Region \"Array copy and conversion\"";
_out.restoreIndent();
- _out << sp << nl << "Public Sub CopyTo(ByVal __a As " << s << "())";
+ _out << sp << nl << "Public Sub CopyTo(ByVal a__ As " << s << "())";
_out.inc();
- _out << nl << "InnerList.CopyTo(__a)";
+ _out << nl << "InnerList.CopyTo(a__)";
_out.dec();
_out << nl << "End Sub";
- _out << sp << nl << "Public Sub CopyTo(ByVal __a As " << s << "(), ByVal __i As Integer)";
+ _out << sp << nl << "Public Sub CopyTo(ByVal a__ As " << s << "(), ByVal i__ As Integer)";
_out.inc();
- _out << nl << "InnerList.CopyTo(__a, __i)";
+ _out << nl << "InnerList.CopyTo(a__, i__)";
_out.dec();
_out << nl << "End Sub";
- _out << sp << nl << "Public Sub CopyTo(ByVal __i As Integer, ByVal __a As " << s << "(), "
- "ByVal __ai As Integer, ByVal __c As Integer)";
+ _out << sp << nl << "Public Sub CopyTo(ByVal i__ As Integer, ByVal a__ As " << s << "(), "
+ "ByVal ai__ As Integer, ByVal c__ As Integer)";
_out.inc();
- _out << nl << "InnerList.CopyTo(__i, __a, __ai, __c)";
+ _out << nl << "InnerList.CopyTo(i__, a__, ai__, c__)";
_out.dec();
_out << nl << "End Sub";
_out << sp << nl << "Public Function ToArray() As " << s << "()";
_out.inc();
- _out << nl << "Dim __a As " << s << "() = New " << toArrayAlloc(s + "()", "InnerList.Count - 1") << " {}";
- _out << nl << "InnerList.CopyTo(__a)";
- _out << nl << "Return __a";
+ _out << nl << "Dim a__ As " << s << "() = New " << toArrayAlloc(s + "()", "InnerList.Count - 1") << " {}";
+ _out << nl << "InnerList.CopyTo(a__)";
+ _out << nl << "Return a__";
_out.dec();
_out << nl << "End Function";
@@ -1715,15 +1713,15 @@ Slice::Gen::TypesVisitor::visitSequence(const SequencePtr& p)
_out << sp << nl << "#Region \"AddRange members\"";
_out.restoreIndent();
- _out << sp << nl << "Public Sub AddRange(ByVal __s As " << name << ')';
+ _out << sp << nl << "Public Sub AddRange(ByVal s__ As " << name << ')';
_out.inc();
- _out << nl << "InnerList.AddRange(__s)";
+ _out << nl << "InnerList.AddRange(s__)";
_out.dec();
_out << nl << "End Sub";
- _out << sp << nl << "Public Sub AddRange(ByVal __a As " << s << "())";
+ _out << sp << nl << "Public Sub AddRange(ByVal a__ As " << s << "())";
_out.inc();
- _out << nl << "InnerList.AddRange(__a)";
+ _out << nl << "InnerList.AddRange(a__)";
_out.dec();
_out << nl << "End Sub";
@@ -1896,17 +1894,17 @@ Slice::Gen::TypesVisitor::visitSequence(const SequencePtr& p)
_out << nl << "Return False";
_out.dec();
_out << nl << "End If";
- _out << nl << "For __i As Integer = 0 To Count - 1";
+ _out << nl << "For i__ As Integer = 0 To Count - 1";
_out.inc();
if(!isValue)
{
- _out << nl << "If InnerList(__i) Is Nothing And Not CType(other, " << name << ")(__i) Is Nothing Then";
+ _out << nl << "If InnerList(i__) Is Nothing And Not CType(other, " << name << ")(i__) Is Nothing Then";
_out.inc();
_out << nl << "Return False";
_out.dec();
_out << nl << "End If";
}
- _out << nl << "If Not CType(InnerList(__i), Integer).Equals(CType(other, " << name << ")(__i)) Then";
+ _out << nl << "If Not CType(InnerList(i__), Integer).Equals(CType(other, " << name << ")(i__)) Then";
_out.inc();
_out << nl << "Return False";
_out.dec();
@@ -1923,16 +1921,16 @@ Slice::Gen::TypesVisitor::visitSequence(const SequencePtr& p)
_out << sp << nl << "#Region \"Shared Equals\"";
_out.restoreIndent();
- _out << sp << nl << "Public Overloads Shared Function Equals(ByVal __lhs As " << name
- << ", ByVal __rhs As " << name << ") As Boolean";
+ _out << sp << nl << "Public Overloads Shared Function Equals(ByVal lhs__ As " << name
+ << ", ByVal rhs__ As " << name << ") As Boolean";
_out.inc();
- _out << nl << "If Object.ReferenceEquals(__rhs, Nothing) Then";
+ _out << nl << "If Object.ReferenceEquals(rhs__, Nothing) Then";
_out.inc();
- _out << nl << "Return Object.ReferenceEquals(__rhs, Nothing)";
+ _out << nl << "Return Object.ReferenceEquals(rhs__, Nothing)";
_out.dec();
_out << nl << "Else";
_out.inc();
- _out << nl << "Return __lhs.Equals(__rhs)";
+ _out << nl << "Return lhs__.Equals(rhs__)";
_out.dec();
_out << nl << "End If";
_out.dec();
@@ -2002,21 +2000,21 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
_out.dec();
_out << nl << "End Sub";
- _out << sp << nl << "Public Sub New(ByVal __m As String)";
+ _out << sp << nl << "Public Sub New(ByVal m__ As String)";
_out.inc();
- _out << nl << "MyBase.New(__m)";
+ _out << nl << "MyBase.New(m__)";
_out.dec();
_out << nl << "End Sub";
- _out << sp << nl << "Public Sub New(ByVal __ex As _System.Exception)";
+ _out << sp << nl << "Public Sub New(ByVal ex__ As _System.Exception)";
_out.inc();
- _out << nl << "MyBase.New(_dflt, __ex)";
+ _out << nl << "MyBase.New(_dflt, ex__)";
_out.dec();
_out << nl << "End Sub";
- _out << sp << nl << "Public Sub New(ByVal __m As String, ByVal __ex As _System.Exception)";
+ _out << sp << nl << "Public Sub New(ByVal m__ As String, ByVal ex__ As _System.Exception)";
_out.inc();
- _out << nl << "MyBase.New(__m, __ex)";
+ _out << nl << "MyBase.New(m__, ex__)";
_out.dec();
_out << nl << "End Sub";
@@ -2028,7 +2026,7 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
_out << sp << nl << "Public Overrides Function GetHashCode() As Integer";
_out.inc();
- _out << nl << "Dim __h As Integer = 0";
+ _out << nl << "Dim h__ As Integer = 0";
for(q = dataMembers.begin(); q != dataMembers.end(); ++q)
{
string memberName = fixId((*q)->name(), DotNet::ApplicationException);
@@ -2042,17 +2040,17 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
if(cl && cl->isInterface()) // Bug in VB 7.1: cast should not be necessary.
{
_out << nl << "' Bug in VB 7.1: cast to Object should not be necessary.";
- _out << nl << "__h = 5 * __h + CType(" << memberName << ", Object).GetHashCode()";
+ _out << nl << "h__ = 5 * h__ + CType(" << memberName << ", Object).GetHashCode()";
}
else if(ProxyPtr::dynamicCast((*q)->type()))
{
_out << nl << "' Bug in VB 7.1: cast should not be necessary.";
- _out << nl << "__h = 5 * __h + CType(" << memberName << ", "
+ _out << nl << "h__ = 5 * h__ + CType(" << memberName << ", "
<< typeToString((*q)->type()) << "Helper).GetHashCode()";
}
else
{
- _out << nl << "__h = 5 * __h + " << memberName << ".GetHashCode()";
+ _out << nl << "h__ = 5 * h__ + " << memberName << ".GetHashCode()";
}
if(!isValue)
{
@@ -2060,26 +2058,26 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
_out << nl << "End If";
}
}
- _out << nl << "Return __h";
+ _out << nl << "Return h__";
_out.dec();
_out << nl << "End Function";
- _out << sp << nl << "Public Overloads Overrides Function Equals(ByVal __other As Object) As Boolean";
+ _out << sp << nl << "Public Overloads Overrides Function Equals(ByVal other__ As Object) As Boolean";
_out.inc();
- _out << nl << "If __other Is Nothing Then";
+ _out << nl << "If other__ Is Nothing Then";
_out.inc();
_out << nl << "Return False";
_out.dec();
_out << nl << "End If";
- _out << nl << "If Object.ReferenceEquals(Me, __other) Then";
+ _out << nl << "If Object.ReferenceEquals(Me, other__) Then";
_out.inc();
_out << nl << "Return True";
_out.dec();
_out << nl << "End If";
- _out << nl << "If Not TypeOf __other Is " << name << " Then";
+ _out << nl << "If Not TypeOf other__ Is " << name << " Then";
_out.inc();
_out << nl << "Throw New _System.ArgumentException(\"expected argument of type `" << p->name()
- << "'\", \"__other\")";
+ << "'\", \"other__\")";
_out.dec();
_out << nl << "End If";
for(q = dataMembers.begin(); q != dataMembers.end(); ++q)
@@ -2090,18 +2088,18 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
if(cl && cl->isInterface()) // Bug in VB 7.1: cast should not be necessary.
{
_out << nl << "' Bug in VB 7.1: cast to Object should not be necessary.";
- _out << nl << "If Not CType(" << memberName << ", Object).Equals(CType(__other, "
+ _out << nl << "If Not CType(" << memberName << ", Object).Equals(CType(other__, "
<< name << ")." << memberName << ") Then";
}
else if(ProxyPtr::dynamicCast((*q)->type()))
{
_out << nl << "' Bug in VB 7.1: cast should not be necessary.";
_out << nl << "If Not CType(" << memberName << ", " << typeToString((*q)->type())
- << "Helper).Equals(CType(__other, " << name << ")." << memberName << ") Then";
+ << "Helper).Equals(CType(other__, " << name << ")." << memberName << ") Then";
}
else
{
- _out << nl << "If Not " << memberName << ".Equals(CType(__other, " << name << ")."
+ _out << nl << "If Not " << memberName << ".Equals(CType(other__, " << name << ")."
<< memberName << ") Then";
}
_out.inc();
@@ -2119,17 +2117,17 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
_out << sp << nl << "#Region \"Shared Equals\"";
_out.restoreIndent();
- _out << sp << nl << "Public Overloads Shared Function Equals(ByVal __lhs As " << name
- << ", ByVal __rhs As " << name << ") As Boolean";
+ _out << sp << nl << "Public Overloads Shared Function Equals(ByVal lhs__ As " << name
+ << ", ByVal rhs__ As " << name << ") As Boolean";
_out.inc();
- _out << nl << "If Object.ReferenceEquals(__rhs, Nothing) Then";
+ _out << nl << "If Object.ReferenceEquals(rhs__, Nothing) Then";
_out.inc();
- _out << nl << "Return Object.ReferenceEquals(__rhs, Nothing)";
+ _out << nl << "Return Object.ReferenceEquals(rhs__, Nothing)";
_out.dec();
_out << nl << "Else";
_out.inc();
- _out << nl << "Return __lhs.Equals(__rhs)";
+ _out << nl << "Return lhs__.Equals(rhs__)";
_out.dec();
_out << nl << "End If";
_out.dec();
@@ -2149,20 +2147,20 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
ExceptionPtr base = p->base();
- _out << sp << nl << "Public Overloads Overrides Sub __write(ByVal __os As IceInternal.BasicStream)";
+ _out << sp << nl << "Public Overloads Overrides Sub write__(ByVal os__ As IceInternal.BasicStream)";
_out.inc();
- _out << nl << "__os.writeString(\"" << scoped << "\")";
- _out << nl << "__os.startWriteSlice()";
+ _out << nl << "os__.writeString(\"" << scoped << "\")";
+ _out << nl << "os__.startWriteSlice()";
for(q = dataMembers.begin(); q != dataMembers.end(); ++q)
{
writeMarshalUnmarshalCode(_out, (*q)->type(),
fixId((*q)->name(), DotNet::ApplicationException),
true, false, false);
}
- _out << nl << "__os.endWriteSlice()";
+ _out << nl << "os__.endWriteSlice()";
if(base)
{
- _out << nl << "MyBase.__write(__os)";
+ _out << nl << "MyBase.write__(os__)";
}
_out.dec();
_out << nl << "End Sub";
@@ -2170,7 +2168,7 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
DataMemberList allClassMembers = p->allClassDataMembers();
if(allClassMembers.size() != 0)
{
- _out << sp << nl << "Public NotInheritable Class __Patcher";
+ _out << sp << nl << "Public NotInheritable Class Patcher__";
_out.inc();
_out << nl << "Inherits IceInternal.Patcher";
_out << sp << nl << "Friend Sub New(ByVal instance As Ice.Exception";
@@ -2205,7 +2203,7 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
}
string memberName = fixId((*q)->name(), DotNet::ApplicationException);
string memberType = typeToString((*q)->type());
- _out << nl << "_type = GetType(" << memberType << ')';
+ _out << nl << "type_ = GetType(" << memberType << ')';
_out << nl << "_instance." << memberName << " = CType(v, " << memberType << ')';
if(allClassMembers.size() > 1)
{
@@ -2229,15 +2227,15 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
_out.dec();
_out << nl << "End Class";
}
- _out << sp << nl << "Public Overloads Overrides Sub __read(ByVal __is As IceInternal.BasicStream, "
- "ByVal __rid As Boolean)";
+ _out << sp << nl << "Public Overloads Overrides Sub read__(ByVal is__ As IceInternal.BasicStream, "
+ "ByVal rid__ As Boolean)";
_out.inc();
- _out << nl << "If __rid Then";
+ _out << nl << "If rid__ Then";
_out.inc();
- _out << nl << "Dim myId As String = __is.readString()";
+ _out << nl << "Dim myId As String = is__.readString()";
_out.dec();
_out << nl << "End If";
- _out << nl << "__is.startReadSlice()";
+ _out << nl << "is__.startReadSlice()";
DataMemberList classMembers = p->classDataMembers();
int classMemberCount = static_cast<int>(allClassMembers.size() - classMembers.size());
for(q = dataMembers.begin(); q != dataMembers.end(); ++q)
@@ -2256,43 +2254,43 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
fixId((*q)->name(), DotNet::ApplicationException),
false, false, false, patchParams.str());
}
- _out << nl << "__is.endReadSlice()";
+ _out << nl << "is__.endReadSlice()";
if(base)
{
- _out << nl << "MyBase.__read(__is, true)";
+ _out << nl << "MyBase.read__(is__, true)";
}
_out.dec();
_out << nl << "End Sub";
if(_stream)
{
- _out << sp << nl << "Public Overloads Overrides Sub __write(ByVal __outS As Ice.OutputStream)";
+ _out << sp << nl << "Public Overloads Overrides Sub write__(ByVal outS__ As Ice.OutputStream)";
_out.inc();
- _out << nl << "__outS.writeString(\"" << scoped << "\")";
- _out << nl << "__outS.startSlice()";
+ _out << nl << "outS__.writeString(\"" << scoped << "\")";
+ _out << nl << "outS__.startSlice()";
for(q = dataMembers.begin(); q != dataMembers.end(); ++q)
{
writeMarshalUnmarshalCode(_out, (*q)->type(),
fixId((*q)->name(), DotNet::ApplicationException),
true, true, false);
}
- _out << nl << "__outS.endSlice()";
+ _out << nl << "outS__.endSlice()";
if(base)
{
- _out << nl << "MyBase.__write(__outS)";
+ _out << nl << "MyBase.write__(outS__)";
}
_out.dec();
_out << nl << "End Sub";
- _out << sp << nl << "Public Overloads Overrides Sub __read(ByVal __inS As Ice.InputStream, "
- << "ByVal __rid As Boolean)";
+ _out << sp << nl << "Public Overloads Overrides Sub read__(ByVal inS__ As Ice.InputStream, "
+ << "ByVal rid__ As Boolean)";
_out.inc();
- _out << nl << "If __rid Then";
+ _out << nl << "If rid__ Then";
_out.inc();
- _out << nl << "Dim myId As String = __inS.readString()";
+ _out << nl << "Dim myId As String = inS__.readString()";
_out.dec();
_out << nl << "End If";
- _out << nl << "__inS.startSlice()";
+ _out << nl << "inS__.startSlice()";
classMemberCount = static_cast<int>(allClassMembers.size() - classMembers.size());
for(q = dataMembers.begin(); q != dataMembers.end(); ++q)
{
@@ -2310,10 +2308,10 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
fixId((*q)->name(), DotNet::ApplicationException),
false, true, false, patchParams.str());
}
- _out << nl << "__inS.endSlice()";
+ _out << nl << "inS__.endSlice()";
if(base)
{
- _out << nl << "MyBase.__read(__inS, true)";
+ _out << nl << "MyBase.read__(inS__, true)";
}
_out.dec();
_out << nl << "End Sub";
@@ -2324,7 +2322,7 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
// Emit placeholder functions to catch errors.
//
string scoped = p->scoped();
- _out << sp << nl << "Public Overloads Overrides Sub __write(ByVal __outS As Ice.OutputStream)";
+ _out << sp << nl << "Public Overloads Overrides Sub write__(ByVal outS__ As Ice.OutputStream)";
_out.inc();
_out << nl << "Dim ex As Ice.MarshalException = New Ice.MarshalException";
_out << nl << "ex.reason = \"type " << scoped.substr(2) << " was not generated with stream support\"";
@@ -2332,8 +2330,8 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
_out.dec();
_out << nl << "End Sub";
- _out << sp << nl << "Public Overloads Overrides Sub __read"
- << "(ByVal __inS As Ice.InputStream, ByVal __rid As Boolean)";
+ _out << sp << nl << "Public Overloads Overrides Sub read__"
+ << "(ByVal inS__ As Ice.InputStream, ByVal rid__ As Boolean)";
_out.inc();
_out << nl << "Dim ex As Ice.MarshalException = New Ice.MarshalException";
_out << nl << "ex.reason = \"type " << scoped.substr(2) << " was not generated with stream support\"";
@@ -2344,7 +2342,7 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
if(!base || base && !base->usesClasses())
{
- _out << sp << nl << "Public Overrides Function __usesClasses() As Boolean";
+ _out << sp << nl << "Public Overrides Function usesClasses__() As Boolean";
_out.inc();
_out << nl << "Return True";
_out.dec();
@@ -2370,17 +2368,17 @@ Slice::Gen::TypesVisitor::visitStructStart(const StructPtr& p)
_out << sp << nl << "Public NotInheritable Class " << p->name() << "Helper";
_out.inc();
- _out << sp << nl << "Public Shared Sub write(ByVal __outS As Ice.OutputStream, ByVal __v As " << name << ')';
+ _out << sp << nl << "Public Shared Sub write(ByVal outS__ As Ice.OutputStream, ByVal v__ As " << name << ')';
_out.inc();
- _out << nl << "__v.__write(__outS)";
+ _out << nl << "v__.write__(outS__)";
_out.dec();
_out << nl << "End Sub";
- _out << sp << nl << "Public Shared Function read(ByVal __inS As Ice.InputStream) As " << name;
+ _out << sp << nl << "Public Shared Function read(ByVal inS__ As Ice.InputStream) As " << name;
_out.inc();
- _out << nl << "Dim __v As " << name << " = New " << name;
- _out << nl << "__v.__read(__inS)";
- _out << nl << "Return __v";
+ _out << nl << "Dim v__ As " << name << " = New " << name;
+ _out << nl << "v__.read__(inS__)";
+ _out << nl << "Return v__";
_out.dec();
_out << nl << "End Function";
@@ -2454,7 +2452,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
bool patchStruct = !isClass && classMembers.size() != 0;
if(!p->isLocal() && patchStruct)
{
- _out << nl << "_pm = Nothing";
+ _out << nl << "pm_ = Nothing";
}
_out.dec();
_out << nl << "End Sub";
@@ -2486,7 +2484,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
_out << sp << nl << "Public Overrides Function GetHashCode() As Integer";
_out.inc();
- _out << nl << "Dim __h As Integer = 0";
+ _out << nl << "Dim h__ As Integer = 0";
for(q = dataMembers.begin(); q != dataMembers.end(); ++q)
{
string memberName = fixId((*q)->name(), isClass ? DotNet::ICloneable : 0);
@@ -2500,17 +2498,17 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
if(cl && cl->isInterface()) // Bug in VB 7.1: cast should not be necessary.
{
_out << nl << "' Bug in VB 7.1: cast to Object should not be necessary.";
- _out << nl << "__h = 5 * __h + CType(" << memberName << ", Object).GetHashCode()";
+ _out << nl << "h__ = 5 * h__ + CType(" << memberName << ", Object).GetHashCode()";
}
else if(ProxyPtr::dynamicCast((*q)->type()))
{
_out << nl << "' Bug in VB 7.1: cast should not be necessary.";
- _out << nl << "__h = 5 * __h + CType(" << memberName << ", "
+ _out << nl << "h__ = 5 * h__ + CType(" << memberName << ", "
<< typeToString((*q)->type()) << "Helper).GetHashCode()";
}
else
{
- _out << nl << "__h = 5 * __h + " << memberName << ".GetHashCode()";
+ _out << nl << "h__ = 5 * h__ + " << memberName << ".GetHashCode()";
}
if(!isValue)
{
@@ -2518,18 +2516,18 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
_out << nl << "End If";
}
}
- _out << nl << "Return __h";
+ _out << nl << "Return h__";
_out.dec();
_out << nl << "End Function";
- _out << sp << nl << "Public Overloads Overrides Function Equals(ByVal __other As Object) As Boolean";
+ _out << sp << nl << "Public Overloads Overrides Function Equals(ByVal other__ As Object) As Boolean";
_out.inc();
- _out << nl << "If Object.ReferenceEquals(Me, __other) Then";
+ _out << nl << "If Object.ReferenceEquals(Me, other__) Then";
_out.inc();
_out << nl << "Return True";
_out.dec();
_out << nl << "End If";
- _out << nl << "If Not TypeOf __other Is " << name << " Then";
+ _out << nl << "If Not TypeOf other__ Is " << name << " Then";
_out.inc();
_out << nl << "Return False";
_out.dec();
@@ -2541,7 +2539,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
{
_out << nl << "If " << memberName << " Is Nothing Then";
_out.inc();
- _out << nl << "If Not CType(__other, " << name << ")." << memberName << " Is Nothing Then";
+ _out << nl << "If Not CType(other__, " << name << ")." << memberName << " Is Nothing Then";
_out.inc();
_out << nl << "Return False";
_out.dec();
@@ -2553,18 +2551,18 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
if(cl && cl->isInterface()) // Bug in VB 7.1: cast should not be necessary.
{
_out << nl << "' Bug in VB 7.1: cast to Object should not be necessary.";
- _out << nl << "If Not CType(" << memberName << ", Object).Equals(CType(__other, "
+ _out << nl << "If Not CType(" << memberName << ", Object).Equals(CType(other__, "
<< name << ")." << memberName << ") Then";
}
else if(ProxyPtr::dynamicCast((*q)->type()))
{
_out << nl << "' Bug in VB 7.1: cast should not be necessary.";
_out << nl << "If Not CType(" << memberName << ", " << typeToString((*q)->type())
- << "Helper).Equals(CType(__other, " << name << ")." << memberName << ") Then";
+ << "Helper).Equals(CType(other__, " << name << ")." << memberName << ") Then";
}
else
{
- _out << nl << "If Not " << memberName << ".Equals(CType(__other, " << name << ")."
+ _out << nl << "If Not " << memberName << ".Equals(CType(other__, " << name << ")."
<< memberName << ") Then";
}
_out.inc();
@@ -2576,7 +2574,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
}
else
{
- _out << nl << "If Not " << memberName << ".Equals(CType(__other, " << name << ")."
+ _out << nl << "If Not " << memberName << ".Equals(CType(other__, " << name << ")."
<< memberName << ") Then";
_out.inc();
_out << nl << "Return False";
@@ -2594,17 +2592,17 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
_out << sp << nl << "#Region \"Shared Equals\"";
_out.restoreIndent();
- _out << sp << nl << "Public Overloads Shared Function Equals(ByVal __lhs As " << name
- << ", ByVal __rhs As " << name << ") As Boolean";
+ _out << sp << nl << "Public Overloads Shared Function Equals(ByVal lhs__ As " << name
+ << ", ByVal rhs__ As " << name << ") As Boolean";
_out.inc();
- _out << nl << "If Object.ReferenceEquals(__rhs, Nothing) Then";
+ _out << nl << "If Object.ReferenceEquals(rhs__, Nothing) Then";
_out.inc();
- _out << nl << "Return Object.ReferenceEquals(__rhs, Nothing)";
+ _out << nl << "Return Object.ReferenceEquals(rhs__, Nothing)";
_out.dec();
_out << nl << "Else";
_out.inc();
- _out << nl << "Return __lhs.Equals(__rhs)";
+ _out << nl << "Return lhs__.Equals(rhs__)";
_out.dec();
_out << nl << "End If";
_out.dec();
@@ -2620,7 +2618,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
_out << sp << nl << "#Region \"Marshalling support\"";
_out.restoreIndent();
- _out << sp << nl << "Public Sub __write(ByVal __os As IceInternal.BasicStream)";
+ _out << sp << nl << "Public Sub write__(ByVal os__ As IceInternal.BasicStream)";
_out.inc();
for(q = dataMembers.begin(); q != dataMembers.end(); ++q)
{
@@ -2634,13 +2632,13 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
if(classMembers.size() != 0)
{
- _out << sp << nl << "Public NotInheritable Class __Patcher";
+ _out << sp << nl << "Public NotInheritable Class Patcher__";
_out.inc();
_out << nl << "Inherits IceInternal.Patcher";
_out << sp << nl << "Friend Sub New(ByVal instance As " << name;
if(patchStruct)
{
- _out << ".__PatchMembers";
+ _out << ".PatchMembers__";
}
if(classMembers.size() > 1)
{
@@ -2673,7 +2671,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
}
string memberType = typeToString((*q)->type());
string memberName = fixId((*q)->name(), isClass ? DotNet::ICloneable : 0);
- _out << nl << "_type = GetType(" << memberType << ')';
+ _out << nl << "type_ = GetType(" << memberType << ')';
_out << nl << "_instance." << memberName << " = CType(v, " << memberType << ')';
if(classMembers.size() > 1)
{
@@ -2692,7 +2690,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
_out << sp << nl << "Private _instance As " << name;
if(patchStruct)
{
- _out << ".__PatchMembers";
+ _out << ".PatchMembers__";
}
if(classMembers.size() > 1)
{
@@ -2703,7 +2701,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
if(patchStruct)
{
- _out << sp << nl << "Friend Class __PatchMembers";
+ _out << sp << nl << "Friend Class PatchMembers__";
_out.inc();
for(q = classMembers.begin(); q != classMembers.end(); ++q)
{
@@ -2714,27 +2712,27 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
_out.dec();
_out << nl << "End Class";
- _out << sp << nl << "Private _pm As __PatchMembers";
+ _out << sp << nl << "Private pm_ As PatchMembers__";
- _out << sp << nl << "Public Sub __patch()";
+ _out << sp << nl << "Public Sub patch__()";
_out.inc();
for(q = classMembers.begin(); q != classMembers.end(); ++q)
{
string memberName = fixId((*q)->name(), isClass ? DotNet::ICloneable : 0);
- _out << nl << memberName << " = _pm." << memberName;
+ _out << nl << memberName << " = pm_." << memberName;
}
_out.dec();
_out << nl << "End Sub";
}
}
- _out << sp << nl << "Public Sub __read(ByVal __is As IceInternal.BasicStream)";
+ _out << sp << nl << "Public Sub read__(ByVal is__ As IceInternal.BasicStream)";
_out.inc();
if(patchStruct)
{
- _out << nl << "If _pm Is Nothing Then";
+ _out << nl << "If pm_ Is Nothing Then";
_out.inc();
- _out << nl << "_pm = new __PatchMembers()";
+ _out << nl << "pm_ = new PatchMembers__()";
_out.dec();
_out << nl << "End If";
}
@@ -2742,7 +2740,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
for(q = dataMembers.begin(); q != dataMembers.end(); ++q)
{
ostringstream patchParams;
- patchParams << (patchStruct ? "_pm" : "Me");
+ patchParams << (patchStruct ? "pm_" : "Me");
BuiltinPtr builtin = BuiltinPtr::dynamicCast((*q)->type());
if((builtin && builtin->kind() == Builtin::KindObject) || ClassDeclPtr::dynamicCast((*q)->type()))
{
@@ -2760,7 +2758,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
if(_stream)
{
- _out << sp << nl << "Public Sub __write(ByVal __outS As Ice.OutputStream)";
+ _out << sp << nl << "Public Sub write__(ByVal outS__ As Ice.OutputStream)";
_out.inc();
for(q = dataMembers.begin(); q != dataMembers.end(); ++q)
{
@@ -2771,13 +2769,13 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
_out.dec();
_out << nl << "End Sub";
- _out << sp << nl << "Public Sub __read(ByVal __inS As Ice.InputStream)";
+ _out << sp << nl << "Public Sub read__(ByVal inS__ As Ice.InputStream)";
_out.inc();
if(patchStruct)
{
- _out << nl << "If _pm Is Nothing";
+ _out << nl << "If pm_ Is Nothing";
_out.inc();
- _out << nl << "_pm = New __PatchMembers";
+ _out << nl << "pm_ = New PatchMembers__";
_out.dec();
_out << nl << "End If";
}
@@ -2785,7 +2783,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
for(q = dataMembers.begin(); q != dataMembers.end(); ++q)
{
ostringstream patchParams;
- patchParams << (patchStruct ? "_pm" : "Me");
+ patchParams << (patchStruct ? "pm_" : "Me");
BuiltinPtr builtin = BuiltinPtr::dynamicCast((*q)->type());
if((builtin && builtin->kind() == Builtin::KindObject) || ClassDeclPtr::dynamicCast((*q)->type()))
{
@@ -2830,9 +2828,9 @@ Slice::Gen::TypesVisitor::visitDictionary(const DictionaryPtr& p)
_out << sp << nl << "#Region \"" << name << " members\"";
_out.restoreIndent();
- _out << sp << nl << "Public Sub AddRange(ByVal __d As " << name << ')';
+ _out << sp << nl << "Public Sub AddRange(ByVal d__ As " << name << ')';
_out.inc();
- _out << nl << "For Each e As _System.Collections.DictionaryEntry in __d";
+ _out << nl << "For Each e As _System.Collections.DictionaryEntry in d__";
_out.inc();
_out << nl << "Try";
_out.inc();
@@ -3020,15 +3018,15 @@ Slice::Gen::TypesVisitor::visitDictionary(const DictionaryPtr& p)
_out << nl << "Return False";
_out.dec();
_out << nl << "End If";
- _out << nl << "Dim __klhs() As " << ks << " = New " << ks << "(Count - 1) {}";
- _out << nl << "Keys.CopyTo(__klhs, 0)";
- _out << nl << "_System.Array.Sort(__klhs)";
- _out << nl << "Dim __krhs() As " << ks << " = New " << ks << "(CType(other, " << name << ").Count - 1) {}";
- _out << nl << "CType(other, " << name << ").Keys.CopyTo(__krhs, 0)";
- _out << nl << "_System.Array.Sort(__krhs)";
+ _out << nl << "Dim klhs__() As " << ks << " = New " << ks << "(Count - 1) {}";
+ _out << nl << "Keys.CopyTo(klhs__, 0)";
+ _out << nl << "_System.Array.Sort(klhs__)";
+ _out << nl << "Dim krsh__() As " << ks << " = New " << ks << "(CType(other, " << name << ").Count - 1) {}";
+ _out << nl << "CType(other, " << name << ").Keys.CopyTo(krsh__, 0)";
+ _out << nl << "_System.Array.Sort(krsh__)";
_out << nl << "For i As Integer = 0 To Count - 1";
_out.inc();
- _out << nl << "If Not __klhs(i).Equals(__krhs(i))";
+ _out << nl << "If Not klhs__(i).Equals(krsh__(i))";
_out.inc();
_out << nl << "Return False";
_out.dec();
@@ -3039,30 +3037,30 @@ Slice::Gen::TypesVisitor::visitDictionary(const DictionaryPtr& p)
bool valueIsArray = seq && !seq->hasMetaData("clr:collection");
if(valueIsArray)
{
- _out << nl << "Dim __vlhs As " << vs << "() = New " << toArrayAlloc(vs + "()", "Count - 1") << " {}";
+ _out << nl << "Dim vlhs__ As " << vs << "() = New " << toArrayAlloc(vs + "()", "Count - 1") << " {}";
}
else
{
- _out << nl << "Dim __vlhs As " << vs << "() = New " << vs << "(Count - 1) {}";
+ _out << nl << "Dim vlhs__ As " << vs << "() = New " << vs << "(Count - 1) {}";
}
- _out << nl << "Values.CopyTo(__vlhs, 0)";
- _out << nl << "_System.Array.Sort(__vlhs)";
+ _out << nl << "Values.CopyTo(vlhs__, 0)";
+ _out << nl << "_System.Array.Sort(vlhs__)";
string vrhsCount = "Ctype(other, " + name + ").Count - 1";
if(valueIsArray)
{
- _out << nl << "Dim __vrhs As " << vs << "() = New " << toArrayAlloc(vs + "()", vrhsCount) << " {}";
+ _out << nl << "Dim vrhs__ As " << vs << "() = New " << toArrayAlloc(vs + "()", vrhsCount) << " {}";
}
else
{
- _out << nl << "Dim __vrhs As " << vs << "() = New " << vs << '(' << vrhsCount << ") {}";
+ _out << nl << "Dim vrhs__ As " << vs << "() = New " << vs << '(' << vrhsCount << ") {}";
}
- _out << nl << "CType(other, " << name << ").Values.CopyTo(__vrhs, 0)";
- _out << nl << "_System.Array.Sort(__vrhs)";
+ _out << nl << "CType(other, " << name << ").Values.CopyTo(vrhs__, 0)";
+ _out << nl << "_System.Array.Sort(vrhs__)";
_out << nl << "For i As Integer = 0 To Count - 1";
_out.inc();
if(!valueIsValue)
{
- _out << nl << "If __vlhs(i) Is Nothing And Not __vrhs(i) Is Nothing";
+ _out << nl << "If vlhs__(i) Is Nothing And Not vrhs__(i) Is Nothing";
_out.inc();
_out << nl << "Return False";
_out.dec();
@@ -3072,16 +3070,16 @@ Slice::Gen::TypesVisitor::visitDictionary(const DictionaryPtr& p)
if(cl && cl->isInterface()) // Bug in VB 7.1: cast should not be necessary.
{
_out << nl << "' Bug in VB 7.1: cast to Object should not be necessary.";
- _out << nl << "If Not CType(__vlhs(i), Object).Equals(__vrhs(i))";
+ _out << nl << "If Not CType(vlhs__(i), Object).Equals(vrhs__(i))";
}
else if(ProxyPtr::dynamicCast(p->valueType()))
{
_out << nl << "' Bug in VB 7.1: cast should not be necessary.";
- _out << nl << "If Not CType(__vlhs(i), " << typeToString(p->valueType()) << "Helper).Equals(__vrhs(i))";
+ _out << nl << "If Not CType(vlhs__(i), " << typeToString(p->valueType()) << "Helper).Equals(vrhs__(i))";
}
else
{
- _out << nl << "If Not __vlhs(i).Equals(__vrhs(i))";
+ _out << nl << "If Not vlhs__(i).Equals(vrhs__(i))";
}
_out.inc();
_out << nl << "Return False";
@@ -3099,16 +3097,16 @@ Slice::Gen::TypesVisitor::visitDictionary(const DictionaryPtr& p)
_out << sp << nl << "#Region \"Shared Equals\"";
_out.restoreIndent();
- _out << sp << nl << "Public Overloads Shared Function Equals(ByVal __lhs As " << name
- << ", ByVal __rhs As " << name << ") As Boolean";
+ _out << sp << nl << "Public Overloads Shared Function Equals(ByVal lhs__ As " << name
+ << ", ByVal rhs__ As " << name << ") As Boolean";
_out.inc();
- _out << nl << "If Object.ReferenceEquals(__rhs, Nothing) Then";
+ _out << nl << "If Object.ReferenceEquals(rhs__, Nothing) Then";
_out.inc();
- _out << nl << "Return Object.ReferenceEquals(__rhs, Nothing)";
+ _out << nl << "Return Object.ReferenceEquals(rhs__, Nothing)";
_out.dec();
_out << nl << "Else";
_out.inc();
- _out << nl << "Return __lhs.Equals(__rhs)";
+ _out << nl << "Return lhs__.Equals(rhs__)";
_out.dec();
_out << nl << "End If";
_out.dec();
@@ -3144,17 +3142,17 @@ Slice::Gen::TypesVisitor::visitEnum(const EnumPtr& p)
_out << sp << nl << "Public NotInheritable Class " << name << "Helper";
_out.inc();
- _out << sp << nl << "Public Shared Sub write(ByVal __outS As Ice.OutputStream, ByVal __v As " << scoped << ')';
+ _out << sp << nl << "Public Shared Sub write(ByVal outS__ As Ice.OutputStream, ByVal v__ As " << scoped << ')';
_out.inc();
- writeMarshalUnmarshalCode(_out, p, "__v", true, true, false);
+ writeMarshalUnmarshalCode(_out, p, "v__", true, true, false);
_out.dec();
_out << nl << "End Sub";
- _out << sp << nl << "Public Shared Function read(ByVal __inS As Ice.InputStream) As " << scoped;
+ _out << sp << nl << "Public Shared Function read(ByVal inS__ As Ice.InputStream) As " << scoped;
_out.inc();
- _out << nl << "Dim __v As " << scoped;
- writeMarshalUnmarshalCode(_out, p, "__v", false, true, false);
- _out << nl << "Return __v";
+ _out << nl << "Dim v__ As " << scoped;
+ writeMarshalUnmarshalCode(_out, p, "v__", false, true, false);
+ _out << nl << "Return v__";
_out.dec();
_out << nl << "End Function";
@@ -3391,7 +3389,7 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p)
_out << " As " << retS;
}
- _out << nl << vbOp << ' ' << name << spar << params << "ByVal __context As Ice.Context" << epar;
+ _out << nl << vbOp << ' ' << name << spar << params << "ByVal context__ As Ice.Context" << epar;
if(ret)
{
_out << " As " << retS;
@@ -3408,7 +3406,7 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p)
//
_out << sp;
_out << nl << "Sub " << p->name() << "_async" << spar << paramsAMI << epar;
- _out << nl << "Sub " << p->name() << "_async" << spar << paramsAMI << "ByVal __ctx As Ice.Context" << epar;
+ _out << nl << "Sub " << p->name() << "_async" << spar << paramsAMI << "ByVal ctx__ As Ice.Context" << epar;
}
}
@@ -3469,7 +3467,7 @@ Slice::Gen::OpsVisitor::writeOperations(const ClassDefPtr& p, bool noCurrent)
opIntfName += "NC";
}
- _out << sp << nl << "Public Interface _" << name << opIntfName;
+ _out << sp << nl << "Public Interface " << name << opIntfName << '_';
_out.inc();
if((bases.size() == 1 && bases.front()->isAbstract()) || bases.size() > 1)
{
@@ -3489,14 +3487,12 @@ Slice::Gen::OpsVisitor::writeOperations(const ClassDefPtr& p, bool noCurrent)
first = false;
}
string s = (*q)->scoped();
- string::size_type pos = s.rfind("::");
- assert(pos != string::npos);
- s.insert(pos + 2, "_");
s += "Operations";
if(noCurrent)
{
s += "NC";
}
+ s += "_";
_out << fixId(s);
}
++q;
@@ -3531,7 +3527,7 @@ Slice::Gen::OpsVisitor::writeOperations(const ClassDefPtr& p, bool noCurrent)
_out << vbOp << ' ' << name << spar << params;
if(!noCurrent && !p->isLocal())
{
- _out << "ByVal __current As Ice.Current";
+ _out << "ByVal current__ As Ice.Current";
}
_out << epar;
if(ret)
@@ -3617,54 +3613,54 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
{
_out << "Return ";
}
- _out << opName << spar << args << "__defaultContext()" << epar;
+ _out << opName << spar << args << "defaultContext__()" << epar;
_out.dec();
_out << nl << "End " << vbOp;
_out << sp << nl << "Public " << vbOp << ' ' << opName << spar << params
- << "ByVal __context As Ice.Context" << epar;
+ << "ByVal context__ As Ice.Context" << epar;
if(ret)
{
_out << " As " << retS;
}
_out << " Implements " << name << "Prx." << opName; // TODO: should be containing class?
_out.inc();
- _out << nl << "Dim __cnt As Integer = 0";
+ _out << nl << "Dim cnt__ As Integer = 0";
_out << nl << "While True";
_out.inc();
_out << nl << "Try";
_out.inc();
if(op->returnsData())
{
- _out << nl << "__checkTwowayOnly(\"" << op->name() << "\")";
+ _out << nl << "checkTwowayOnly__(\"" << op->name() << "\")";
}
- _out << nl << "Dim __delBase As Ice._ObjectDel = __getDelegate()";
- _out << nl << "Dim __del As _" << name << "Del = CType(__delBase, _" << name << "Del)";
+ _out << nl << "Dim delBase__ As Ice.ObjectDel_ = getDelegate__()";
+ _out << nl << "Dim del__ As _" << name << "Del = CType(delBase__, _" << name << "Del)";
_out << nl;
if(ret)
{
_out << "Return ";
}
- _out << "__del." << opName << spar << args << "__context" << epar;
+ _out << "del__." << opName << spar << args << "context__" << epar;
if(!ret)
{
_out << nl << "Return";
}
_out.dec();
- _out << nl << "Catch __ex As IceInternal.NonRepeatable";
+ _out << nl << "Catch ex__ As IceInternal.NonRepeatable";
_out.inc();
if(op->mode() == Operation::Idempotent || op->mode() == Operation::Nonmutating)
{
- _out << nl << "__cnt = __handleException(__ex.get(), __cnt)";
+ _out << nl << "cnt__ = handleException__(ex__.get(), cnt__)";
}
else
{
- _out << nl << "__rethrowException(__ex.get())";
+ _out << nl << "rethrowException__(ex__.get())";
}
_out.dec();
- _out << nl << "Catch __ex As Ice.LocalException";
+ _out << nl << "Catch ex__ As Ice.LocalException";
_out.inc();
- _out << nl << "__cnt = __handleException(__ex, __cnt)";
+ _out << nl << "cnt__ = handleException__(ex__, cnt__)";
_out.dec();
_out << nl << "End Try";
_out.dec();
@@ -3709,16 +3705,16 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
_out << sp << nl << "Public Sub " << opName << "_async" << spar << paramsAMI << epar
<< " Implements " << name << "Prx." << opName << "_async"; // TODO: should be containing class?
_out.inc();
- _out << nl << opName << "_async" << spar << argsAMI << "__defaultContext()" << epar;
+ _out << nl << opName << "_async" << spar << argsAMI << "defaultContext__()" << epar;
_out.dec();
_out << nl << "End Sub";
_out << sp << nl << "Public Sub " << opName << "_async" << spar << paramsAMI
- << "ByVal __ctx As Ice.Context" << epar
+ << "ByVal ctx__ As Ice.Context" << epar
<< " Implements " << name << "Prx." << opName << "_async"; // TODO: should be containing class?
_out.inc();
- _out << nl << "__checkTwowayOnly(\"" << p->name() << "\")";
- _out << nl << "__cb.__invoke" << spar << "Me" << argsAMI << "__ctx" << epar;
+ _out << nl << "checkTwowayOnly__(\"" << p->name() << "\")";
+ _out << nl << "cb__.invoke__" << spar << "Me" << argsAMI << "ctx__" << epar;
_out.dec();
_out << nl << "End Sub";
}
@@ -3750,7 +3746,7 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
_out << nl << "If b.ice_isA(\"" << p->scoped() << "\") Then";
_out.inc();
_out << nl << "Dim h As " << name << "PrxHelper = New " << name << "PrxHelper";
- _out << nl << "h.__copyFrom(b)";
+ _out << nl << "h.copyFrom__(b)";
_out << nl << "Return h";
_out.dec();
_out << nl << "End If";
@@ -3774,7 +3770,7 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
_out << nl << "If b.ice_isA(\"" << p->scoped() << "\", ctx) Then";
_out.inc();
_out << nl << "Dim h As " << name << "PrxHelper = New " << name << "PrxHelper";
- _out << nl << "h.__copyFrom(b)";
+ _out << nl << "h.copyFrom__(b)";
_out << nl << "Return h";
_out.dec();
_out << nl << "End If";
@@ -3797,12 +3793,12 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
_out << nl << "If bb.ice_isA(\"" << p->scoped() << "\") Then";
_out.inc();
_out << nl << "Dim h As " << name << "PrxHelper = new " << name << "PrxHelper()";
- _out << nl << "h.__copyFrom(bb)";
+ _out << nl << "h.copyFrom__(bb)";
_out << nl << "Return h";
_out.dec();
_out << nl << "End If";
_out.dec();
- _out << nl << "Catch __ex As Ice.FacetNotExistException";
+ _out << nl << "Catch ex__ As Ice.FacetNotExistException";
_out << nl << "End Try";
_out << nl << "Return Nothing";
_out.dec();
@@ -3822,12 +3818,12 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
_out << nl << "If bb.ice_isA(\"" << p->scoped() << "\", ctx) Then";
_out.inc();
_out << nl << "Dim h As " << name << "PrxHelper = new " << name << "PrxHelper()";
- _out << nl << "h.__copyFrom(bb)";
+ _out << nl << "h.copyFrom__(bb)";
_out << nl << "Return h";
_out.dec();
_out << nl << "End If";
_out.dec();
- _out << nl << "Catch __ex As Ice.FacetNotExistException";
+ _out << nl << "Catch ex__ As Ice.FacetNotExistException";
_out << nl << "End Try";
_out << nl << "Return Nothing";
_out.dec();
@@ -3841,7 +3837,7 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
_out.dec();
_out << nl << "End If";
_out << nl << "Dim h As " << name << "PrxHelper = new " << name << "PrxHelper()";
- _out << nl << "h.__copyFrom(b)";
+ _out << nl << "h.copyFrom__(b)";
_out << nl << "Return h";
_out.dec();
_out << nl << "End Function";
@@ -3856,7 +3852,7 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
_out << nl << "End If";
_out << nl << "Dim bb As Ice.ObjectPrx = b.ice_newFacet(f)";
_out << nl << "Dim h As " << name << "PrxHelper = new " << name << "PrxHelper()";
- _out << nl << "h.__copyFrom(bb)";
+ _out << nl << "h.copyFrom__(bb)";
_out << nl << "Return h";
_out.dec();
_out << nl << "End Function";
@@ -3867,32 +3863,32 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
_out << sp << nl << "#Region \"Marshaling support\"";
_out.restoreIndent();
- _out << sp << nl << "Protected Overrides Function __createDelegateM() As Ice._ObjectDelM";
+ _out << sp << nl << "Protected Overrides Function createDelegateM__() As Ice.ObjectDelM_";
_out.inc();
_out << nl << "Return New _" << name << "DelM()";
_out.dec();
_out << nl << "End Function";
- _out << sp << nl << "Protected Overrides Function __createDelegateD() As Ice._ObjectDelD";
+ _out << sp << nl << "Protected Overrides Function createDelegateD__() As Ice.ObjectDelD_";
_out.inc();
_out << nl << "Return New _" << name << "DelD()";
_out.dec();
_out << nl << "End Function";
- _out << sp << nl << "Public Shared Sub __write(ByVal __os As IceInternal.BasicStream, ByVal __v As "
+ _out << sp << nl << "Public Shared Sub write__(ByVal os__ As IceInternal.BasicStream, ByVal v__ As "
<< name << "Prx)";
_out.inc();
- _out << nl << "__os.writeProxy(__v)";
+ _out << nl << "os__.writeProxy(v__)";
_out.dec();
_out << nl << "End Sub";
- _out << sp << nl << "Public Shared Function __read(ByVal __is As IceInternal.BasicStream) As " << name << "Prx";
+ _out << sp << nl << "Public Shared Function read__(ByVal is__ As IceInternal.BasicStream) As " << name << "Prx";
_out.inc();
- _out << nl << "Dim proxy As Ice.ObjectPrx = __is.readProxy()";
+ _out << nl << "Dim proxy As Ice.ObjectPrx = is__.readProxy()";
_out << nl << "If Not proxy Is Nothing Then";
_out.inc();
_out << nl << "Dim result As " << name << "PrxHelper = New " << name << "PrxHelper";
- _out << nl << "result.__copyFrom(proxy)";
+ _out << nl << "result.copyFrom__(proxy)";
_out << nl << "Return result";
_out.dec();
_out << nl << "End If";
@@ -3902,19 +3898,19 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
if(_stream)
{
- _out << sp << nl << "Public Shared Sub write(ByVal __outS As Ice.OutputStream, ByVal __v As " << name << "Prx)";
+ _out << sp << nl << "Public Shared Sub write(ByVal outS__ As Ice.OutputStream, ByVal v__ As " << name << "Prx)";
_out.inc();
- _out << nl << "__outS.writeProxy(__v)";
+ _out << nl << "outS__.writeProxy(v__)";
_out.dec();
_out << nl << "End Sub";
- _out << sp << nl << "Public Shared Function read(ByVal __inS As Ice.InputStream) As " << name << "Prx";
+ _out << sp << nl << "Public Shared Function read(ByVal inS__ As Ice.InputStream) As " << name << "Prx";
_out.inc();
- _out << nl << "Dim proxy As Ice.ObjectPrx = __inS.readProxy()";
+ _out << nl << "Dim proxy As Ice.ObjectPrx = inS__.readProxy()";
_out << nl << "If Not proxy Is Nothing";
_out.inc();
_out << nl << "Dim result As " << name << "PrxHelper = New " << name << "PrxHelper";
- _out << nl << "result.__copyFrom(proxy)";
+ _out << nl << "result.copyFrom__(proxy)";
_out << nl << "Return result";
_out.dec();
_out << nl << "End If";
@@ -3954,33 +3950,33 @@ Slice::Gen::HelperVisitor::visitSequence(const SequencePtr& p)
_out << sp << nl << "Public NotInheritable Class " << p->name() << "Helper";
_out.inc();
- _out << sp << nl << "Public Shared Sub write(ByVal __os As IceInternal.BasicStream, ByVal __v As " << typeS << ')';
+ _out << sp << nl << "Public Shared Sub write(ByVal os__ As IceInternal.BasicStream, ByVal v__ As " << typeS << ')';
_out.inc();
- writeSequenceMarshalUnmarshalCode(_out, p, "__v", true, false);
+ writeSequenceMarshalUnmarshalCode(_out, p, "v__", true, false);
_out.dec();
_out << nl << "End Sub";
- _out << sp << nl << "Public Shared Function read(ByVal __is As IceInternal.BasicStream) As " << typeS;
+ _out << sp << nl << "Public Shared Function read(ByVal is__ As IceInternal.BasicStream) As " << typeS;
_out.inc();
- _out << nl << "Dim __v As " << typeS;
- writeSequenceMarshalUnmarshalCode(_out, p, "__v", false, false);
- _out << nl << "Return __v";
+ _out << nl << "Dim v__ As " << typeS;
+ writeSequenceMarshalUnmarshalCode(_out, p, "v__", false, false);
+ _out << nl << "Return v__";
_out.dec();
_out << nl << "End Function";
if(_stream)
{
- _out << sp << nl << "Public Shared Sub write(ByVal __outS As Ice.OutputStream, ByVal __v As " << typeS << ')';
+ _out << sp << nl << "Public Shared Sub write(ByVal outS__ As Ice.OutputStream, ByVal v__ As " << typeS << ')';
_out.inc();
- writeSequenceMarshalUnmarshalCode(_out, p, "__v", true, true);
+ writeSequenceMarshalUnmarshalCode(_out, p, "v__", true, true);
_out.dec();
_out << nl << "End Sub";
- _out << sp << nl << "Public Shared Function read(ByVal __inS As Ice.InputStream) As " << typeS;
+ _out << sp << nl << "Public Shared Function read(ByVal inS__ As Ice.InputStream) As " << typeS;
_out.inc();
- _out << nl << "Dim __v As " << typeS;
- writeSequenceMarshalUnmarshalCode(_out, p, "__v", false, true);
- _out << nl << "Return __v";
+ _out << nl << "Dim v__ As " << typeS;
+ writeSequenceMarshalUnmarshalCode(_out, p, "v__", false, true);
+ _out << nl << "Return v__";
_out.dec();
_out << nl << "End Function";
}
@@ -4010,21 +4006,21 @@ Slice::Gen::HelperVisitor::visitDictionary(const DictionaryPtr& p)
_out << sp << nl << "Public NotInheritable Class " << p->name() << "Helper";
_out.inc();
- _out << sp << nl << "Public Shared Sub write(ByVal __os As IceInternal.BasicStream, ByVal __v As "
+ _out << sp << nl << "Public Shared Sub write(ByVal os__ As IceInternal.BasicStream, ByVal v__ As "
<< name << ')';
_out.inc();
- _out << nl << "If __v Is Nothing Then";
+ _out << nl << "If v__ Is Nothing Then";
_out.inc();
- _out << nl << "__os.writeSize(0)";
+ _out << nl << "os__.writeSize(0)";
_out.dec();
_out << nl << "Else";
_out.inc();
- _out << nl << "__os.writeSize(__v.Count)";
- _out << nl << "For Each __e As _System.Collections.DictionaryEntry In __v";
+ _out << nl << "os__.writeSize(v__.Count)";
+ _out << nl << "For Each e__ As _System.Collections.DictionaryEntry In v__";
_out.inc();
- string keyArg = "CType(__e.Key, " + keyS + ")";
+ string keyArg = "CType(e__.Key, " + keyS + ")";
writeMarshalUnmarshalCode(_out, key, keyArg, true, false, false);
- string valueArg = "__e.Value";
+ string valueArg = "e__.Value";
writeMarshalUnmarshalCode(_out, value, valueArg, true, false, false);
_out.dec();
_out << nl << "Next";
@@ -4037,7 +4033,7 @@ Slice::Gen::HelperVisitor::visitDictionary(const DictionaryPtr& p)
bool hasClassValue = (builtin && builtin->kind() == Builtin::KindObject) || ClassDeclPtr::dynamicCast(value);
if(hasClassValue)
{
- _out << sp << nl << "Public NotInheritable Class __Patcher";
+ _out << sp << nl << "Public NotInheritable Class Patcher__";
_out.inc();
_out << nl << "Inherits IceInternal.Patcher";
_out << sp << nl << "Friend Sub New(ByVal m As " << name << ", ByVal key As " << keyS << ')';
@@ -4049,7 +4045,7 @@ Slice::Gen::HelperVisitor::visitDictionary(const DictionaryPtr& p)
_out << sp << nl << "Public Overrides Sub patch(ByVal v As Ice.Object)";
_out.inc();
- _out << nl << "_type = GetType(" << typeToString(p->valueType()) << ')';
+ _out << nl << "type_ = GetType(" << typeToString(p->valueType()) << ')';
_out << nl << "_m(_key) = CType(v, " << valueS << ')';
_out.dec();
_out << nl << "End Sub";
@@ -4060,44 +4056,44 @@ Slice::Gen::HelperVisitor::visitDictionary(const DictionaryPtr& p)
_out << sp << nl << "End Class";
}
- _out << sp << nl << "Public Shared Function " << " read(ByVal __is As IceInternal.BasicStream) As " << name;
+ _out << sp << nl << "Public Shared Function " << " read(ByVal is__ As IceInternal.BasicStream) As " << name;
_out.inc();
- _out << nl << "Dim __sz As Integer = __is.readSize()";
- _out << nl << "Dim __r As " << name << " = New " << name;
- _out << nl << "For __i As Integer = 0 To __sz - 1";
+ _out << nl << "Dim sz__ As Integer = is__.readSize()";
+ _out << nl << "Dim r__ As " << name << " = New " << name;
+ _out << nl << "For i__ As Integer = 0 To sz__ - 1";
_out.inc();
- _out << nl << "Dim __k As " << keyS;
- writeMarshalUnmarshalCode(_out, key, "__k", false, false, false);
+ _out << nl << "Dim k__ As " << keyS;
+ writeMarshalUnmarshalCode(_out, key, "k__", false, false, false);
if(!hasClassValue)
{
- _out << nl << "Dim __v As " << valueS;
+ _out << nl << "Dim v__ As " << valueS;
}
- writeMarshalUnmarshalCode(_out, value, "__v", false, false, false, "__r, __k");
+ writeMarshalUnmarshalCode(_out, value, "v__", false, false, false, "r__, k__");
if(!hasClassValue)
{
- _out << nl << "__r(__k) = __v";
+ _out << nl << "r__(k__) = v__";
}
_out.dec();
_out << nl << "Next";
- _out << nl << "Return __r";
+ _out << nl << "Return r__";
_out.dec();
_out << nl << "End Function";
if(_stream)
{
- _out << nl << "Public Shared Sub write(ByVal __outS As Ice.OutputStream, ByVal __v As " << name << ')';
+ _out << nl << "Public Shared Sub write(ByVal outS__ As Ice.OutputStream, ByVal v__ As " << name << ')';
_out.inc();
- _out << nl << "If __v Is Nothing Then";
+ _out << nl << "If v__ Is Nothing Then";
_out.inc();
- _out << nl << "__outS.writeSize(0)";
+ _out << nl << "outS__.writeSize(0)";
_out.dec();
_out << nl << "Else";
_out.inc();
- _out << nl << "__outS.writeSize(__v.Count)";
- _out << nl << "For Each __e As _System.Collections.DictionaryEntry In __v";
+ _out << nl << "outS__.writeSize(v__.Count)";
+ _out << nl << "For Each e__ As _System.Collections.DictionaryEntry In v__";
_out.inc();
writeMarshalUnmarshalCode(_out, key, keyArg, true, true, false);
writeMarshalUnmarshalCode(_out, value, valueArg, true, true, false);
@@ -4108,26 +4104,26 @@ Slice::Gen::HelperVisitor::visitDictionary(const DictionaryPtr& p)
_out.dec();
_out << nl << "End Sub";
- _out << sp << nl << "Public Shared Function read(ByVal __inS As Ice.InputStream) As " << name;
+ _out << sp << nl << "Public Shared Function read(ByVal inS__ As Ice.InputStream) As " << name;
_out.inc();
- _out << nl << "Dim __sz As Integer = __inS.readSize()";
- _out << nl << "Dim __r As " << name << " = New " << name;
- _out << nl << "For __i As Integer = 0 To __sz - 1";
+ _out << nl << "Dim sz__ As Integer = inS__.readSize()";
+ _out << nl << "Dim r__ As " << name << " = New " << name;
+ _out << nl << "For i__ As Integer = 0 To sz__ - 1";
_out.inc();
- _out << nl << "Dim __k As " << keyS;
- writeMarshalUnmarshalCode(_out, key, "__k", false, true, false);
+ _out << nl << "Dim k__ As " << keyS;
+ writeMarshalUnmarshalCode(_out, key, "k__", false, true, false);
if(!hasClassValue)
{
- _out << nl << "Dim __v As " << valueS;
+ _out << nl << "Dim v__ As " << valueS;
}
- writeMarshalUnmarshalCode(_out, value, "__v", false, true, false, "__r, __k");
+ writeMarshalUnmarshalCode(_out, value, "v__", false, true, false, "r__, k__");
if(!hasClassValue)
{
- _out << nl << "__r(__k) = __v";
+ _out << nl << "r__(k__) = v__";
}
_out.dec();
_out << nl << "Next";
- _out << nl << "Return __r";
+ _out << nl << "Return r__";
_out.dec();
_out << nl << "End Function";
}
@@ -4177,7 +4173,7 @@ Slice::Gen::DelegateVisitor::visitClassDefStart(const ClassDefPtr& p)
_out << nl << "Inherits ";
if(bases.empty())
{
- _out << "Ice._ObjectDel";
+ _out << "Ice.ObjectDel_";
}
else
{
@@ -4209,7 +4205,7 @@ Slice::Gen::DelegateVisitor::visitClassDefStart(const ClassDefPtr& p)
vector<string> params = getParams(op);
string vbOp = ret ? "Function" : "Sub";
- _out << sp << nl << vbOp << ' ' << opName << spar << params << "ByVal __context As Ice.Context" << epar;
+ _out << sp << nl << vbOp << ' ' << opName << spar << params << "ByVal context__ As Ice.Context" << epar;
if(ret)
{
_out << " As " << retS;
@@ -4264,7 +4260,7 @@ Slice::Gen::DelegateMVisitor::visitClassDefStart(const ClassDefPtr& p)
_out << sp << nl << "Public NotInheritable class _" << name << "DelM";
_out.inc();
- _out << nl << "Inherits Ice._ObjectDelM";
+ _out << nl << "Inherits Ice.ObjectDelM_";
_out << nl << "Implements _" << name << "Del";
OperationList ops = p->allOperations();
@@ -4315,7 +4311,7 @@ Slice::Gen::DelegateMVisitor::visitClassDefStart(const ClassDefPtr& p)
string vbOp = ret ? "Function" : "Sub";
_out << sp << nl << "Public " << vbOp << ' ' << opName << spar << params
- << "ByVal __context As Ice.Context" << epar;
+ << "ByVal context__ As Ice.Context" << epar;
if(ret)
{
_out << " As " << retS;
@@ -4323,35 +4319,35 @@ Slice::Gen::DelegateMVisitor::visitClassDefStart(const ClassDefPtr& p)
_out << " Implements _" << name << "Del." << opName; // TODO: should be containing class?
_out.inc();
- _out << nl << "Dim __og As IceInternal.Outgoing = getOutgoing(\""
- << op->name() << "\", " << sliceModeToIceMode(op) << ", __context)";
+ _out << nl << "Dim og__ As IceInternal.Outgoing = getOutgoing(\""
+ << op->name() << "\", " << sliceModeToIceMode(op) << ", context__)";
_out << nl << "Try";
_out.inc();
if(!inParams.empty())
{
_out << nl << "Try";
_out.inc();
- _out << nl << "Dim __os As IceInternal.BasicStream = __og.ostr()";
+ _out << nl << "Dim os__ As IceInternal.BasicStream = og__.ostr()";
for(q = inParams.begin(); q != inParams.end(); ++q)
{
writeMarshalUnmarshalCode(_out, q->first, fixId(q->second), true, false, false);
}
if(op->sendsClasses())
{
- _out << nl << "__os.writePendingObjects()";
+ _out << nl << "os__.writePendingObjects()";
}
_out.dec();
- _out << nl << "Catch __ex As Ice.LocalException";
+ _out << nl << "Catch ex__ As Ice.LocalException";
_out.inc();
- _out << nl << "__og.abort(__ex)";
+ _out << nl << "og__.abort(ex__)";
_out.dec();
_out << nl << "End Try";
}
- _out << nl << "Dim __ok As Boolean = __og.invoke()";
+ _out << nl << "Dim ok__ As Boolean = og__.invoke()";
_out << nl << "Try";
_out.inc();
- _out << nl << "Dim __is As IceInternal.BasicStream = __og.istr()";
- _out << nl << "If Not __ok Then";
+ _out << nl << "Dim is__ As IceInternal.BasicStream = og__.istr()";
+ _out << nl << "If Not ok__ Then";
_out.inc();
//
// The try/catch block is necessary because throwException()
@@ -4359,16 +4355,16 @@ Slice::Gen::DelegateMVisitor::visitClassDefStart(const ClassDefPtr& p)
//
_out << nl << "Try";
_out.inc();
- _out << nl << "__is.throwException()";
+ _out << nl << "is__.throwException()";
_out.dec();
for(ExceptionList::const_iterator t = throws.begin(); t != throws.end(); ++t)
{
- _out << nl << "Catch __ex As " << fixId((*t)->scoped());
+ _out << nl << "Catch ex__ As " << fixId((*t)->scoped());
_out.inc();
_out << nl << "Throw";
_out.dec();
}
- _out << nl << "Catch __ex As Ice.UserException";
+ _out << nl << "Catch ex__ As Ice.UserException";
_out.inc();
_out << nl << "Throw New Ice.UnknownUserException()";
_out.dec();
@@ -4384,20 +4380,20 @@ Slice::Gen::DelegateMVisitor::visitClassDefStart(const ClassDefPtr& p)
BuiltinPtr builtin = BuiltinPtr::dynamicCast(ret);
if((builtin && builtin->kind() == Builtin::KindObject) || ClassDeclPtr::dynamicCast(ret))
{
- _out << nl << "Dim __ret As " << retS;
- _out << nl << "Dim __ret_PP As IceInternal.ParamPatcher = New IceInternal.ParamPatcher(GetType("
+ _out << nl << "Dim ret__ As " << retS;
+ _out << nl << "Dim ret___PP As IceInternal.ParamPatcher = New IceInternal.ParamPatcher(GetType("
<< retS << "))";
- _out << nl << "__is.readObject(__ret_PP)";
+ _out << nl << "is__.readObject(ret___PP)";
}
else
{
- _out << nl << "Dim __ret As " << retS;
- writeMarshalUnmarshalCode(_out, ret, "__ret", false, false, true, "");
+ _out << nl << "Dim ret__ As " << retS;
+ writeMarshalUnmarshalCode(_out, ret, "ret__", false, false, true, "");
}
}
if(op->returnsClasses())
{
- _out << nl << "__is.readPendingObjects()";
+ _out << nl << "is__.readPendingObjects()";
for(q = outParams.begin(); q != outParams.end(); ++q)
{
string param = fixId(q->second);
@@ -4413,7 +4409,7 @@ Slice::Gen::DelegateMVisitor::visitClassDefStart(const ClassDefPtr& p)
bool patchStruct = st && !st->hasMetaData("clr:class") && st->classDataMembers().size() != 0;
if(patchStruct)
{
- _out << nl << param << ".__patch()";
+ _out << nl << param << ".patch__()";
}
}
}
@@ -4423,7 +4419,7 @@ Slice::Gen::DelegateMVisitor::visitClassDefStart(const ClassDefPtr& p)
BuiltinPtr builtin = BuiltinPtr::dynamicCast(ret);
if((builtin && builtin->kind() == Builtin::KindObject) || ClassDeclPtr::dynamicCast(ret))
{
- _out << nl << "__ret = CType(__ret_PP.value, " << retS << ')';
+ _out << nl << "ret__ = CType(ret___PP.value, " << retS << ')';
}
else
{
@@ -4431,21 +4427,21 @@ Slice::Gen::DelegateMVisitor::visitClassDefStart(const ClassDefPtr& p)
bool patchStruct = st && !st->hasMetaData("clr:class") && st->classDataMembers().size() != 0;
if(patchStruct)
{
- _out << nl << "__ret.__patch()";
+ _out << nl << "ret__.patch__()";
}
}
- _out << nl << "Return __ret";
+ _out << nl << "Return ret__";
}
_out.dec();
- _out << nl << "Catch __ex As Ice.LocalException";
+ _out << nl << "Catch ex__ As Ice.LocalException";
_out.inc();
- _out << nl << "throw New IceInternal.NonRepeatable(__ex)";
+ _out << nl << "throw New IceInternal.NonRepeatable(ex__)";
_out.dec();
_out << nl << "End Try";
_out.dec();
_out << nl << "Finally";
_out.inc();
- _out << nl << "reclaimOutgoing(__og)";
+ _out << nl << "reclaimOutgoing(og__)";
_out.dec();
_out << nl << "End Try";
@@ -4501,7 +4497,7 @@ Slice::Gen::DelegateDVisitor::visitClassDefStart(const ClassDefPtr& p)
_out << sp << nl << "Public NotInheritable class _" << name << "DelD";
_out.inc();
- _out << nl << "Inherits Ice._ObjectDelD";
+ _out << nl << "Inherits Ice.ObjectDelD_";
_out << nl << "Implements _" << name << "Del";
OperationList ops = p->allOperations();
@@ -4520,7 +4516,7 @@ Slice::Gen::DelegateDVisitor::visitClassDefStart(const ClassDefPtr& p)
vector<string> args = getArgs(op);
_out << sp;
- _out << nl << "Public " << vbOp << ' ' << opName << spar << params << "ByVal __context As Ice.Context" << epar;
+ _out << nl << "Public " << vbOp << ' ' << opName << spar << params << "ByVal context__ As Ice.Context" << epar;
if(ret)
{
_out << " As " << retS;
@@ -4533,14 +4529,14 @@ Slice::Gen::DelegateDVisitor::visitClassDefStart(const ClassDefPtr& p)
}
else
{
- _out << nl << "Dim __current As Ice.Current = New Ice.Current";
- _out << nl << "__initCurrent(__current, \"" << op->name() << "\", " << sliceModeToIceMode(op)
- << ", __context)";
+ _out << nl << "Dim current__ As Ice.Current = New Ice.Current";
+ _out << nl << "initCurrent__(current__, \"" << op->name() << "\", " << sliceModeToIceMode(op)
+ << ", context__)";
_out << nl << "While True";
_out.inc();
- _out << nl << "Dim __direct As IceInternal.Direct = New IceInternal.Direct(__current)";
- _out << nl << "Dim __servant As Object = __direct.servant()";
- _out << nl << "If TypeOf __servant Is " << fixId(name) << " Then";
+ _out << nl << "Dim direct__ As IceInternal.Direct = New IceInternal.Direct(current__)";
+ _out << nl << "Dim servant__ As Object = direct__.servant()";
+ _out << nl << "If TypeOf servant__ Is " << fixId(name) << " Then";
_out.inc();
_out << nl << "Try";
_out.inc();
@@ -4549,32 +4545,31 @@ Slice::Gen::DelegateDVisitor::visitClassDefStart(const ClassDefPtr& p)
{
_out << "Return ";
}
- _out << "CType(__servant, " << fixId(containingClass->scope())
- << '_' << containingClass->name() << "Operations" << ")."
- << opName << spar << args << "__current" << epar;
+ _out << "CType(servant__, " << fixId(containingClass->scoped() + "Operations_")
+ << ")." << opName << spar << args << "current__" << epar;
if(!ret)
{
_out << nl << "Return";
}
_out.dec();
- _out << nl << "Catch __ex As Ice.LocalException";
+ _out << nl << "Catch ex__ As Ice.LocalException";
_out.inc();
- _out << nl << "Throw New IceInternal.NonRepeatable(__ex)";
+ _out << nl << "Throw New IceInternal.NonRepeatable(ex__)";
_out.dec();
_out << nl << "Finally";
_out.inc();
- _out << nl << "__direct.destroy()";
+ _out << nl << "direct__.destroy()";
_out.dec();
_out << nl << "End Try";
_out.dec();
_out << nl << "Else";
_out.inc();
- _out << nl << "__direct.destroy()";
- _out << nl << "Dim __opEx As Ice.OperationNotExistException = new Ice.OperationNotExistException()";
- _out << nl << "__opEx.id = __current.id";
- _out << nl << "__opEx.facet = __current.facet";
- _out << nl << "__opEx.operation = __current.operation";
- _out << nl << "Throw __opEx";
+ _out << nl << "direct__.destroy()";
+ _out << nl << "Dim opEx__ As Ice.OperationNotExistException = new Ice.OperationNotExistException()";
+ _out << nl << "opEx__.id = current__.id";
+ _out << nl << "opEx__.facet = current__.facet";
+ _out << nl << "opEx__.operation = current__.operation";
+ _out << nl << "Throw opEx__";
_out.dec();
_out << nl << "End If";
_out.dec();
@@ -4627,7 +4622,7 @@ Slice::Gen::DispatcherVisitor::visitClassDefStart(const ClassDefPtr& p)
return false;
}
- _out << sp << nl << "Public MustInherit class _" << p->name() << "Disp";
+ _out << sp << nl << "Public MustInherit Class " << p->name() << "Disp_";
_out.inc();
_out << nl << "Inherits Ice.ObjectImpl";
_out << nl << "Implements " << fixId(p->name());
@@ -4670,7 +4665,7 @@ Slice::Gen::DispatcherVisitor::visitClassDefStart(const ClassDefPtr& p)
{
_out << " As " << typeToString(ret);
}
- _out << " Implements _" << p->name() << "OperationsNC" << '.' << name; // TODO: should be containing class?
+ _out << " Implements " << p->name() << "OperationsNC_" << '.' << name; // TODO: should be containing class?
_out.inc();
_out << nl;
if(ret)
@@ -4684,14 +4679,14 @@ Slice::Gen::DispatcherVisitor::visitClassDefStart(const ClassDefPtr& p)
_out << sp << nl << "Public MustOverride " << vbOp << ' ' << name << spar << params;
if(!p->isLocal())
{
- _out << "ByVal __current As Ice.Current";
+ _out << "ByVal current__ As Ice.Current";
}
_out << epar;
if(ret)
{
_out << " As " << typeToString(ret);
}
- _out << " Implements _" << p->name() << "Operations" << '.' << name; // TODO: should be containing class?
+ _out << " Implements " << p->name() << "Operations_" << '.' << name; // TODO: should be containing class?
}
if(!ops.empty())
@@ -4810,12 +4805,12 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p)
_out << sp;
_out << nl << "Public MustOverride Sub ice_response" << spar << params << epar;
- _out << sp << nl << "Public Sub __invoke" << spar << "ByVal __prx As Ice.ObjectPrx"
- << paramsInvoke << "ByVal __ctx As Ice.Context" << epar;
+ _out << sp << nl << "Public Sub invoke__" << spar << "ByVal prx__ As Ice.ObjectPrx"
+ << paramsInvoke << "ByVal ctx__ As Ice.Context" << epar;
_out.inc();
_out << nl << "Try";
_out.inc();
- _out << nl << "__prepare(__prx, \"" << p->name() << "\", " << sliceModeToIceMode(p) << ", __ctx)";
+ _out << nl << "prepare__(prx__, \"" << p->name() << "\", " << sliceModeToIceMode(p) << ", ctx__)";
for(q = inParams.begin(); q != inParams.end(); ++q)
{
string typeS = typeToString(q->first);
@@ -4823,21 +4818,21 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p)
}
if(p->sendsClasses())
{
- _out << nl << "__os.writePendingObjects()";
+ _out << nl << "os__.writePendingObjects()";
}
- _out << nl << "__os.endWriteEncaps()";
+ _out << nl << "os__.endWriteEncaps()";
_out.dec();
- _out << nl << "Catch __ex As Ice.LocalException";
+ _out << nl << "Catch ex__ As Ice.LocalException";
_out.inc();
- _out << nl << "__finished(__ex)";
+ _out << nl << "finished__(ex__)";
_out << nl << "Return";
_out.dec();
_out << nl << "End Try";
- _out << nl << "__send()";
+ _out << nl << "send__()";
_out.dec();
_out << nl << "End Sub";
- _out << sp << nl << "Protected Overrides Sub __response(__ok As Boolean) As Boolean";
+ _out << sp << nl << "Protected Overrides Sub response__(ok__ As Boolean) As Boolean";
_out.inc();
for(q = outParams.begin(); q != outParams.end(); ++q)
{
@@ -4845,24 +4840,24 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p)
}
if(ret)
{
- _out << nl << "Dim __ret As " << retS;
+ _out << nl << "Dim ret__ As " << retS;
}
_out << nl << "Try";
_out.inc();
- _out << nl << "If Not __ok Then";
+ _out << nl << "If Not ok__ Then";
_out.inc();
_out << nl << "Try";
_out.inc();
- _out << nl << "__is.throwException()";
+ _out << nl << "is__.throwException()";
_out.dec();
for(ExceptionList::const_iterator r = throws.begin(); r != throws.end(); ++r)
{
- _out << nl << "Catch __ex As " << fixId((*r)->scoped());
+ _out << nl << "Catch ex__ As " << fixId((*r)->scoped());
_out.inc();
- _out << nl << "Throw __ex";
+ _out << nl << "Throw ex__";
_out.dec();
}
- _out << nl << "Catch __ex As Ice.UserException";
+ _out << nl << "Catch ex__ As Ice.UserException";
_out.inc();
_out << nl << "Throw New Ice.UnknownUserException()";
_out.dec();
@@ -4875,11 +4870,11 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p)
}
if(ret)
{
- writeMarshalUnmarshalCode(_out, ret, "__ret", false, false, true);
+ writeMarshalUnmarshalCode(_out, ret, "ret__", false, false, true);
}
if(p->returnsClasses())
{
- _out << nl << "__is.readPendingObjects()";
+ _out << nl << "is__.readPendingObjects()";
}
for(q = outParams.begin(); q != outParams.end(); ++q)
{
@@ -4896,7 +4891,7 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p)
bool patchStruct = st && !st->hasMetaData("clr:class") && st->classDataMembers().size() != 0;
if(patchStruct)
{
- _out << nl << param << ".__patch()";
+ _out << nl << param << ".patch__()";
}
}
}
@@ -4906,7 +4901,7 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p)
if((builtin && builtin->kind() == Builtin::KindObject) || ClassDeclPtr::dynamicCast(ret))
{
string type = typeToString(ret);
- _out << nl << "__ret = CType(__ret_PP.value, " << retS << ')';
+ _out << nl << "ret__ = CType(ret___PP.value, " << retS << ')';
}
else
{
@@ -4914,20 +4909,20 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p)
bool patchStruct = st && !st->hasMetaData("clr:class") && st->classDataMembers().size() != 0;
if(patchStruct)
{
- _out << nl << "__ret.__patch()";
+ _out << nl << "ret__.patch__()";
}
}
}
_out.dec();
- _out << nl << "Catch __ex As Ice.LocalException";
+ _out << nl << "Catch ex__ As Ice.LocalException";
_out.inc();
- _out << nl << "Return __finished(__ex)";
+ _out << nl << "Return finished__(ex__)";
_out.dec();
if(!throws.empty())
{
- _out << nl << "Catch __ex As Ice.UserException";
+ _out << nl << "Catch ex__ As Ice.UserException";
_out.inc();
- _out << nl << "ice_exception(__ex)";
+ _out << nl << "ice_exception(ex__)";
_out << nl << "Return False";
_out.dec();
}
@@ -5001,7 +4996,7 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p)
{
_out << nl << "Try";
_out.inc();
- _out << nl << "Dim __os As IceInternal.BasicStream = Me.__os()";
+ _out << nl << "Dim os__ As IceInternal.BasicStream = Me.os__()";
for(q = outParams.begin(); q != outParams.end(); ++q)
{
string typeS = typeToString(q->first);
@@ -5010,20 +5005,20 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p)
if(ret)
{
string retS = typeToString(ret);
- writeMarshalUnmarshalCode(_out, ret, "__ret", true, false, false);
+ writeMarshalUnmarshalCode(_out, ret, "ret__", true, false, false);
}
if(p->returnsClasses())
{
- _out << nl << "__os.writePendingObjects()";
+ _out << nl << "os__.writePendingObjects()";
}
_out.dec();
- _out << nl << "Catch __ex As Ice.LocalException";
+ _out << nl << "Catch ex__ As Ice.LocalException";
_out.inc();
- _out << nl << "ice_exception(__ex)";
+ _out << nl << "ice_exception(ex__)";
_out.dec();
_out << nl << "End Try";
}
- _out << nl << "__response(true)";
+ _out << nl << "response__(true)";
_out.dec();
_out << nl << "End Sub";
@@ -5032,7 +5027,7 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p)
_out.inc();
if(throws.empty())
{
- _out << nl << "__exception(ex)";
+ _out << nl << "exception__(ex)";
}
else
{
@@ -5044,15 +5039,15 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p)
for(r = throws.begin(); r != throws.end(); ++r)
{
string exS = fixId((*r)->scoped());
- _out << nl << "Catch __ex As " << exS;
+ _out << nl << "Catch ex__ As " << exS;
_out.inc();
- _out << nl << "__os().writeUserException(__ex)";
- _out << nl << "__response(false)";
+ _out << nl << "os__().writeUserException(ex__)";
+ _out << nl << "response__(false)";
_out.dec();
}
- _out << nl << "Catch __ex As _System.Exception";
+ _out << nl << "Catch ex__ As _System.Exception";
_out.inc();
- _out << nl << "__exception(__ex)";
+ _out << nl << "exception__(ex__)";
_out.dec();
_out << nl << "End Try";
}
@@ -5105,7 +5100,7 @@ Slice::Gen::TieVisitor::visitClassDefStart(const ClassDefPtr& p)
opIntfName += "NC";
}
- _out << sp << nl << "Public Class _" << name << "Tie";
+ _out << sp << nl << "Public Class " << name << "Tie_";
_out.inc();
_out << nl << "Inherits ";
if(p->isInterface())
@@ -5116,7 +5111,7 @@ Slice::Gen::TieVisitor::visitClassDefStart(const ClassDefPtr& p)
}
else
{
- _out << '_' << name << "Disp";
+ _out << name << "Disp_";
}
}
else
@@ -5128,7 +5123,7 @@ Slice::Gen::TieVisitor::visitClassDefStart(const ClassDefPtr& p)
_out << sp << nl << "Public Sub New()";
_out << nl << "End Sub";
- _out << sp << nl << "Public Sub New(ByVal del As _" << name << opIntfName << ")";
+ _out << sp << nl << "Public Sub New(ByVal del As " << name << opIntfName << "_)";
_out.inc();
_out << nl << "_ice_delegate = del";
_out.dec();
@@ -5142,7 +5137,7 @@ Slice::Gen::TieVisitor::visitClassDefStart(const ClassDefPtr& p)
_out << sp << nl << "Public Sub ice_delegate(ByVal del As Object) Implements Ice.TieBase.ice_delegate";
_out.inc();
- _out << nl << "_ice_delegate = CType(del, _" << name << opIntfName << ")";
+ _out << nl << "_ice_delegate = CType(del, " << name << opIntfName << "_)";
_out.dec();
_out << nl << "End Sub";
@@ -5180,18 +5175,18 @@ Slice::Gen::TieVisitor::visitClassDefStart(const ClassDefPtr& p)
_out << nl << "Return true";
_out.dec();
_out << nl << "End If";
- _out << nl << "If Not TypeOf rhs Is _" << name << "Tie Then";
+ _out << nl << "If Not TypeOf rhs Is " << name << "Tie_ Then";
_out.inc();
_out << nl << "Return False";
_out.dec();
_out << nl << "End If";
_out << nl << "If _ice_delegate Is Nothing Then";
_out.inc();
- _out << nl << "Return CType(rhs, _" << name << "Tie)._ice_delegate Is Nothing";
+ _out << nl << "Return CType(rhs, " << name << "Tie_)._ice_delegate Is Nothing";
_out.dec();
_out << nl << "End If";
_out << nl << "' Bug in VB 7.1: cast to Object should not be necessary.";
- _out << nl << "Return CType(_ice_delegate, Object).Equals(CType(rhs, _" << name << "Tie)._ice_delegate)";
+ _out << nl << "Return CType(_ice_delegate, Object).Equals(CType(rhs, " << name << "Tie_)._ice_delegate)";
_out.dec();
_out << nl << "End Function";
@@ -5227,7 +5222,7 @@ Slice::Gen::TieVisitor::visitClassDefStart(const ClassDefPtr& p)
_out << vbOp << ' ' << opName << spar << params;
if(!p->isLocal())
{
- _out << "ByVal __current As Ice.Current";
+ _out << "ByVal current__ As Ice.Current";
}
_out << epar;
if(ret && !hasAMD)
@@ -5243,7 +5238,7 @@ Slice::Gen::TieVisitor::visitClassDefStart(const ClassDefPtr& p)
_out << "_ice_delegate." << opName << spar << args;
if(!p->isLocal())
{
- _out << "__current";
+ _out << "current__";
}
_out << epar;
_out.dec();
@@ -5257,7 +5252,7 @@ Slice::Gen::TieVisitor::visitClassDefStart(const ClassDefPtr& p)
writeInheritedOperationsWithOpNames(*i, opNames);
}
- _out << sp << nl << "Private _ice_delegate As _" << name << opIntfName;
+ _out << sp << nl << "Private _ice_delegate As " << name << opIntfName << '_';
return true;
}
@@ -5309,7 +5304,7 @@ Slice::Gen::TieVisitor::writeInheritedOperationsWithOpNames(const ClassDefPtr& p
_out << vbOp << ' ' << opName << spar << params;
if(!p->isLocal())
{
- _out << "ByVal __current As Ice.Current";
+ _out << "ByVal current__ As Ice.Current";
}
_out << epar;
if(ret && !hasAMD)
@@ -5325,7 +5320,7 @@ Slice::Gen::TieVisitor::writeInheritedOperationsWithOpNames(const ClassDefPtr& p
_out << "_ice_delegate." << opName << spar << args;
if(!p->isLocal())
{
- _out << "__current";
+ _out << "current__";
}
_out << epar;
_out.dec();
@@ -5372,7 +5367,7 @@ Slice::Gen::BaseImplVisitor::writeOperation(const OperationPtr& op, bool comment
{
_out << "Overrides ";
}
- _out << "Sub " << opName << "_async" << spar << pDecl << "ByVal __current As Ice.Current" << epar;
+ _out << "Sub " << opName << "_async" << spar << pDecl << "ByVal current__ As Ice.Current" << epar;
if(comment)
{
@@ -5382,14 +5377,14 @@ Slice::Gen::BaseImplVisitor::writeOperation(const OperationPtr& op, bool comment
{
if(forTie)
{
- _out << " Implements _" << cl->name() << "Operations." << opName << "_async"; // TODO: should be containing class?
+ _out << " Implements " << cl->name() << "Operations_." << opName << "_async"; // TODO: should be containing class?
}
}
_out.inc();
if(ret)
{
- _out << nl << "Dim __ret As " << typeToString(ret) << " = " << writeValue(ret);
+ _out << nl << "Dim ret__ As " << typeToString(ret) << " = " << writeValue(ret);
}
for(i = params.begin(); i != params.end(); ++i)
{
@@ -5400,10 +5395,10 @@ Slice::Gen::BaseImplVisitor::writeOperation(const OperationPtr& op, bool comment
_out << nl << "Dim " << name << " As " << typeToString(type) << " = " << writeValue(type);
}
}
- _out << nl << "__cb.ice_response" << spar;
+ _out << nl << "cb__.ice_response" << spar;
if(ret)
{
- _out << "__ret";
+ _out << "ret__";
}
for(i = params.begin(); i != params.end(); ++i)
{
@@ -5429,7 +5424,7 @@ Slice::Gen::BaseImplVisitor::writeOperation(const OperationPtr& op, bool comment
_out << vbOp << ' ' << fixId(opName, DotNet::ICloneable, true) << spar << pDecls;
if(!cl->isLocal())
{
- _out << "ByVal __current As Ice.Current";
+ _out << "ByVal current__ As Ice.Current";
}
_out << epar;
if(ret)
@@ -5444,7 +5439,7 @@ Slice::Gen::BaseImplVisitor::writeOperation(const OperationPtr& op, bool comment
{
if(forTie)
{
- _out << " Implements _" << cl->name() << "Operations." << fixId(opName, DotNet::ICloneable, true); // TODO: should be containing class?
+ _out << " Implements " << cl->name() << "Operations_." << fixId(opName, DotNet::ICloneable, true); // TODO: should be containing class?
}
}
_out.inc();
@@ -5569,7 +5564,7 @@ Slice::Gen::ImplVisitor::visitClassDefStart(const ClassDefPtr& p)
}
else
{
- _out << "Inherits _" << name << "Disp";
+ _out << "Inherits " << name << "Disp_";
}
}
else
@@ -5654,7 +5649,7 @@ Slice::Gen::ImplTieVisitor::visitClassDefStart(const ClassDefPtr& p)
_out << fixId(bases.front()->name());
}
}
- _out << nl << "Implements _" << name << "Operations";
+ _out << nl << "Implements " << name << "Operations_";
_out << sp << nl << "Public Sub New()";
_out << nl << "End Sub";