diff options
author | Mark Spruiell <mes@zeroc.com> | 2017-09-29 14:08:22 -0700 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2017-09-29 14:08:22 -0700 |
commit | 6a6578990d27bc7b74576a6fbf5acec24a38941f (patch) | |
tree | 40b5bddcbed1d210226e1b0910b991bc187072b6 /cpp/src/slice2matlab/Main.cpp | |
parent | Minor proxy fix (diff) | |
download | ice-6a6578990d27bc7b74576a6fbf5acec24a38941f.tar.bz2 ice-6a6578990d27bc7b74576a6fbf5acec24a38941f.tar.xz ice-6a6578990d27bc7b74576a6fbf5acec24a38941f.zip |
Adding endpoint support; adding ami test; test script fixes
Diffstat (limited to 'cpp/src/slice2matlab/Main.cpp')
-rw-r--r-- | cpp/src/slice2matlab/Main.cpp | 52 |
1 files changed, 51 insertions, 1 deletions
diff --git a/cpp/src/slice2matlab/Main.cpp b/cpp/src/slice2matlab/Main.cpp index 798808fdfab..ed242dfbcb5 100644 --- a/cpp/src/slice2matlab/Main.cpp +++ b/cpp/src/slice2matlab/Main.cpp @@ -696,7 +696,12 @@ CodeVisitor::visitClassDefStart(const ClassDefPtr& p) IceUtilInternal::Output out; openClass(abs, out); - out << nl << "classdef " << name; + out << nl << "classdef "; + if(p->isLocal() && !p->allOperations().empty()) + { + out << "(Abstract) "; + } + out << name; if(base) { out << " < " << getAbsolute(base); @@ -705,6 +710,10 @@ CodeVisitor::visitClassDefStart(const ClassDefPtr& p) { out << " < Ice.Value"; } + else + { + out << " < matlab.mixin.Copyable"; + } out.inc(); @@ -1017,6 +1026,47 @@ CodeVisitor::visitClassDefStart(const ClassDefPtr& p) out << nl << "end"; } } + else + { + const OperationList ops = p->operations(); + if(!ops.empty()) + { + out << nl << "methods(Abstract)"; + out.inc(); + for(OperationList::const_iterator q = ops.begin(); q != ops.end(); ++q) + { + OperationPtr op = *q; + const ParamInfoList outParams = getAllOutParams(op); + out << nl; + if(outParams.size() > 1) + { + out << "["; + for(ParamInfoList::const_iterator r = outParams.begin(); r != outParams.end(); ++r) + { + if(r != outParams.begin()) + { + out << ", "; + } + out << r->fixedName; + } + out << "] = "; + } + else if(outParams.size() == 1) + { + out << outParams.begin()->fixedName << " = "; + } + out << fixIdent(op->name()) << spar << "obj_"; + const ParamInfoList inParams = getAllInParams(op); + for(ParamInfoList::const_iterator r = inParams.begin(); r != inParams.end(); ++r) + { + out << r->fixedName; + } + out << epar; + } + out.dec(); + out << nl << "end"; + } + } out.dec(); out << nl << "end"; |