diff --git a/wrap/Class.cpp b/wrap/Class.cpp index 10625731e..db179c847 100644 --- a/wrap/Class.cpp +++ b/wrap/Class.cpp @@ -32,8 +32,8 @@ void Class::matlab_proxy(const string& classFile) { if(verbose_) cerr << "generating " << classFile << endl; // emit class proxy code - emit_header_comment(ofs,"%"); ofs << "classdef " << name << endl; + emit_header_comment(ofs,"%"); ofs << " properties" << endl; ofs << " self = 0" << endl; ofs << " end" << endl; diff --git a/wrap/Constructor.cpp b/wrap/Constructor.cpp index 9caf4793f..3493e62da 100644 --- a/wrap/Constructor.cpp +++ b/wrap/Constructor.cpp @@ -55,10 +55,10 @@ void Constructor::matlab_mfile(const string& toolboxPath, const string& classNam if(verbose_) cerr << "generating " << wrapperFile << endl; // generate code - emit_header_comment(ofs, "%"); ofs << "function result = " << name << "(obj"; if (args.size()) ofs << "," << args.names(); ofs << ")" << endl; + emit_header_comment(ofs, "%"); ofs << " error('need to compile " << name << ".cpp');" << endl; ofs << "end" << endl; diff --git a/wrap/Method.cpp b/wrap/Method.cpp index fb58680c8..ba88a8243 100644 --- a/wrap/Method.cpp +++ b/wrap/Method.cpp @@ -55,12 +55,12 @@ void Method::matlab_mfile(const string& classPath) { if(verbose_) cerr << "generating " << wrapperFile << endl; // generate code - emit_header_comment(ofs, "%"); - ofs << "% usage: obj." << name_ << "(" << args_.names() << ")" << endl; string returnType = returns_pair_? "[first,second]" : "result"; ofs << "function " << returnType << " = " << name_ << "(obj"; if (args_.size()) ofs << "," << args_.names(); ofs << ")" << endl; + ofs << "% usage: obj." << name_ << "(" << args_.names() << ")" << endl; + emit_header_comment(ofs, "%"); ofs << " error('need to compile " << name_ << ".cpp');" << endl; ofs << "end" << endl;