Change ordering of comments so "doc class" works in MATLAB
parent
03280f2446
commit
5d6f4ae7e5
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue