summaryrefslogtreecommitdiff
path: root/cpp/src/slice2cs
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2016-07-29 13:01:08 +0200
committerJose <jose@zeroc.com>2016-07-29 13:01:08 +0200
commit56b0663e46d5592e85900fcc80ffe8df61108a09 (patch)
tree66ebbb0f4dd0166cd36d5f30bb6295969fdcdb0d /cpp/src/slice2cs
parentRemove unused variables in slice2cs build (diff)
downloadice-56b0663e46d5592e85900fcc80ffe8df61108a09.tar.bz2
ice-56b0663e46d5592e85900fcc80ffe8df61108a09.tar.xz
ice-56b0663e46d5592e85900fcc80ffe8df61108a09.zip
Fix indentation (replace tabs with whitespaces)
Diffstat (limited to 'cpp/src/slice2cs')
-rw-r--r--cpp/src/slice2cs/Gen.cpp136
1 files changed, 68 insertions, 68 deletions
diff --git a/cpp/src/slice2cs/Gen.cpp b/cpp/src/slice2cs/Gen.cpp
index 697a85d979b..8f309996ffd 100644
--- a/cpp/src/slice2cs/Gen.cpp
+++ b/cpp/src/slice2cs/Gen.cpp
@@ -4463,75 +4463,75 @@ Slice::Gen::OpsVisitor::visitClassDefStart(const ClassDefPtr& p)
{
return false;
}
- string name = p->name();
- string scoped = fixId(p->scoped());
- ClassList bases = p->bases();
- string opIntfName = "Operations";
-
- _out << sp;
- writeDocComment(p, getDeprecateReason(p, 0, p->isInterface() ? "interface" : "class"));
- emitGeneratedCodeAttribute();
- _out << nl << "public interface " << name << opIntfName << '_';
- if((bases.size() == 1 && bases.front()->isAbstract()) || bases.size() > 1)
- {
- _out << " : ";
- ClassList::const_iterator q = bases.begin();
- bool first = true;
- while(q != bases.end())
- {
- if((*q)->isAbstract())
- {
- if (!first)
- {
- _out << ", ";
- }
- else
- {
- first = false;
- }
- string s = (*q)->scoped();
- s += "Operations";
- _out << fixId(s) << '_';
- }
- ++q;
- }
- }
- _out << sb;
-
- OperationList ops = p->operations();
- for(OperationList::const_iterator r = ops.begin(); r != ops.end(); ++r)
- {
- OperationPtr op = *r;
- bool amd = !p->isLocal() && (p->hasMetaData("amd") || op->hasMetaData("amd"));
-
- TypePtr ret = op->returnType();
- string retS = amd ? "void" : typeToString(ret, op->returnIsOptional());
- string opName = amd ? (op->name() + "Async") : fixId(op->name(), DotNet::ICloneable, true);
- vector<string> params = amd ? getParamsAsync(op) : getParams(op);
+ string name = p->name();
+ string scoped = fixId(p->scoped());
+ ClassList bases = p->bases();
+ string opIntfName = "Operations";
+
+ _out << sp;
+ writeDocComment(p, getDeprecateReason(p, 0, p->isInterface() ? "interface" : "class"));
+ emitGeneratedCodeAttribute();
+ _out << nl << "public interface " << name << opIntfName << '_';
+ if((bases.size() == 1 && bases.front()->isAbstract()) || bases.size() > 1)
+ {
+ _out << " : ";
+ ClassList::const_iterator q = bases.begin();
+ bool first = true;
+ while(q != bases.end())
+ {
+ if((*q)->isAbstract())
+ {
+ if (!first)
+ {
+ _out << ", ";
+ }
+ else
+ {
+ first = false;
+ }
+ string s = (*q)->scoped();
+ s += "Operations";
+ _out << fixId(s) << '_';
+ }
+ ++q;
+ }
+ }
+ _out << sb;
+
+ OperationList ops = p->operations();
+ for(OperationList::const_iterator r = ops.begin(); r != ops.end(); ++r)
+ {
+ OperationPtr op = *r;
+ bool amd = !p->isLocal() && (p->hasMetaData("amd") || op->hasMetaData("amd"));
+
+ TypePtr ret = op->returnType();
+ string retS = amd ? "void" : typeToString(ret, op->returnIsOptional());
+ string opName = amd ? (op->name() + "Async") : fixId(op->name(), DotNet::ICloneable, true);
+ vector<string> params = amd ? getParamsAsync(op) : getParams(op);
if(amd)
- {
- params.push_back(asyncResultType(op, "_System.Action") + " response__");
- params.push_back("_System.Action<_System.Exception> exception__");
- }
- params.push_back("Ice.Current current__ = null");
-
- _out << sp;
- if(amd)
- {
- writeDocCommentAMD(op);
- }
- else
- {
- writeDocComment(op, getDeprecateReason(op, p, "operation"),
- "<param name=\"current__\">The Current object for the invocation.</param>");
- }
- emitAttributes(op);
- emitDeprecate(op, op, _out, "operation");
- emitGeneratedCodeAttribute();
- _out << nl << retS << " " << opName << spar << params << epar << ";";
- }
-
- _out << eb;
+ {
+ params.push_back(asyncResultType(op, "_System.Action") + " response__");
+ params.push_back("_System.Action<_System.Exception> exception__");
+ }
+ params.push_back("Ice.Current current__ = null");
+
+ _out << sp;
+ if(amd)
+ {
+ writeDocCommentAMD(op);
+ }
+ else
+ {
+ writeDocComment(op, getDeprecateReason(op, p, "operation"),
+ "<param name=\"current__\">The Current object for the invocation.</param>");
+ }
+ emitAttributes(op);
+ emitDeprecate(op, op, _out, "operation");
+ emitGeneratedCodeAttribute();
+ _out << nl << retS << " " << opName << spar << params << epar << ";";
+ }
+
+ _out << eb;
return false;
}