diff options
author | Jose <jose@zeroc.com> | 2016-07-29 13:01:08 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2016-07-29 13:01:08 +0200 |
commit | 56b0663e46d5592e85900fcc80ffe8df61108a09 (patch) | |
tree | 66ebbb0f4dd0166cd36d5f30bb6295969fdcdb0d /cpp/src/slice2cs | |
parent | Remove unused variables in slice2cs build (diff) | |
download | ice-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.cpp | 136 |
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; } |