Cut out unused arguments
parent
c609666ab9
commit
b0fa5ce684
|
@ -53,13 +53,12 @@ void Method::proxy_header(FileWriter& proxyFile) const {
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
string Method::wrapper_call(FileWriter& wrapperFile, Str cppClassName,
|
string Method::wrapper_call(FileWriter& wrapperFile, Str cppClassName,
|
||||||
Str matlabUniqueName, const ArgumentList& args,
|
Str matlabUniqueName, const ArgumentList& args,
|
||||||
const ReturnValue& returnVal, const TypeAttributesTable& typeAttributes,
|
|
||||||
const Qualified& instName) const {
|
const Qualified& instName) const {
|
||||||
// check arguments
|
// check arguments
|
||||||
// extra argument obj -> nargin-1 is passed !
|
// extra argument obj -> nargin-1 is passed !
|
||||||
// example: checkArguments("equals",nargout,nargin-1,2);
|
// example: checkArguments("equals",nargout,nargin-1,2);
|
||||||
wrapperFile.oss << " checkArguments(\"" << matlabName() << "\",nargout,nargin-1,"
|
wrapperFile.oss << " checkArguments(\"" << matlabName()
|
||||||
<< args.size() << ");\n";
|
<< "\",nargout,nargin-1," << args.size() << ");\n";
|
||||||
|
|
||||||
// get class pointer
|
// get class pointer
|
||||||
// example: shared_ptr<Test> = unwrap_shared_ptr< Test >(in[0], "Test");
|
// example: shared_ptr<Test> = unwrap_shared_ptr< Test >(in[0], "Test");
|
||||||
|
|
|
@ -56,7 +56,6 @@ private:
|
||||||
|
|
||||||
virtual std::string wrapper_call(FileWriter& wrapperFile, Str cppClassName,
|
virtual std::string wrapper_call(FileWriter& wrapperFile, Str cppClassName,
|
||||||
Str matlabUniqueName, const ArgumentList& args,
|
Str matlabUniqueName, const ArgumentList& args,
|
||||||
const ReturnValue& returnVal, const TypeAttributesTable& typeAttributes,
|
|
||||||
const Qualified& instName) const;
|
const Qualified& instName) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -121,7 +121,7 @@ string MethodBase::wrapper_fragment(FileWriter& wrapperFile, Str cppClassName,
|
||||||
// for static methods: cppClassName::staticMethod<TemplateVal>
|
// for static methods: cppClassName::staticMethod<TemplateVal>
|
||||||
// for instance methods: obj->instanceMethod<TemplateVal>
|
// for instance methods: obj->instanceMethod<TemplateVal>
|
||||||
string expanded = wrapper_call(wrapperFile, cppClassName, matlabUniqueName,
|
string expanded = wrapper_call(wrapperFile, cppClassName, matlabUniqueName,
|
||||||
args, returnVal, typeAttributes, instName);
|
args, instName);
|
||||||
|
|
||||||
expanded += ("(" + args.names() + ")");
|
expanded += ("(" + args.names() + ")");
|
||||||
if (returnVal.type1.name != "void")
|
if (returnVal.type1.name != "void")
|
||||||
|
@ -136,10 +136,9 @@ string MethodBase::wrapper_fragment(FileWriter& wrapperFile, Str cppClassName,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
void MethodBase::python_wrapper(FileWriter& wrapperFile,
|
void MethodBase::python_wrapper(FileWriter& wrapperFile, Str className) const {
|
||||||
Str className) const {
|
wrapperFile.oss << " .def(\"" << name_ << "\", &" << className << "::"
|
||||||
wrapperFile.oss << " .def(\"" << name_ << "\", &" << className << "::" << name_
|
<< name_ << ");\n";
|
||||||
<< ");\n";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
|
|
|
@ -64,7 +64,6 @@ protected:
|
||||||
|
|
||||||
virtual std::string wrapper_call(FileWriter& wrapperFile, Str cppClassName,
|
virtual std::string wrapper_call(FileWriter& wrapperFile, Str cppClassName,
|
||||||
Str matlabUniqueName, const ArgumentList& args,
|
Str matlabUniqueName, const ArgumentList& args,
|
||||||
const ReturnValue& returnVal, const TypeAttributesTable& typeAttributes,
|
|
||||||
const Qualified& instName) const = 0;
|
const Qualified& instName) const = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,6 @@ void StaticMethod::proxy_header(FileWriter& proxyFile) const {
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
string StaticMethod::wrapper_call(FileWriter& wrapperFile, Str cppClassName,
|
string StaticMethod::wrapper_call(FileWriter& wrapperFile, Str cppClassName,
|
||||||
Str matlabUniqueName, const ArgumentList& args,
|
Str matlabUniqueName, const ArgumentList& args,
|
||||||
const ReturnValue& returnVal, const TypeAttributesTable& typeAttributes,
|
|
||||||
const Qualified& instName) const {
|
const Qualified& instName) const {
|
||||||
// check arguments
|
// check arguments
|
||||||
// NOTE: for static functions, there is no object passed
|
// NOTE: for static functions, there is no object passed
|
||||||
|
|
|
@ -44,7 +44,6 @@ protected:
|
||||||
|
|
||||||
virtual std::string wrapper_call(FileWriter& wrapperFile, Str cppClassName,
|
virtual std::string wrapper_call(FileWriter& wrapperFile, Str cppClassName,
|
||||||
Str matlabUniqueName, const ArgumentList& args,
|
Str matlabUniqueName, const ArgumentList& args,
|
||||||
const ReturnValue& returnVal, const TypeAttributesTable& typeAttributes,
|
|
||||||
const Qualified& instName) const;
|
const Qualified& instName) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue