Cut out unused arguments

release/4.3a0
dellaert 2014-11-29 19:34:46 +01:00
parent c609666ab9
commit b0fa5ce684
6 changed files with 6 additions and 12 deletions

View File

@ -53,13 +53,12 @@ void Method::proxy_header(FileWriter& proxyFile) const {
/* ************************************************************************* */
string Method::wrapper_call(FileWriter& wrapperFile, Str cppClassName,
Str matlabUniqueName, const ArgumentList& args,
const ReturnValue& returnVal, const TypeAttributesTable& typeAttributes,
const Qualified& instName) const {
// check arguments
// extra argument obj -> nargin-1 is passed !
// example: checkArguments("equals",nargout,nargin-1,2);
wrapperFile.oss << " checkArguments(\"" << matlabName() << "\",nargout,nargin-1,"
<< args.size() << ");\n";
wrapperFile.oss << " checkArguments(\"" << matlabName()
<< "\",nargout,nargin-1," << args.size() << ");\n";
// get class pointer
// example: shared_ptr<Test> = unwrap_shared_ptr< Test >(in[0], "Test");

View File

@ -56,7 +56,6 @@ private:
virtual std::string wrapper_call(FileWriter& wrapperFile, Str cppClassName,
Str matlabUniqueName, const ArgumentList& args,
const ReturnValue& returnVal, const TypeAttributesTable& typeAttributes,
const Qualified& instName) const;
};

View File

@ -121,7 +121,7 @@ string MethodBase::wrapper_fragment(FileWriter& wrapperFile, Str cppClassName,
// for static methods: cppClassName::staticMethod<TemplateVal>
// for instance methods: obj->instanceMethod<TemplateVal>
string expanded = wrapper_call(wrapperFile, cppClassName, matlabUniqueName,
args, returnVal, typeAttributes, instName);
args, instName);
expanded += ("(" + args.names() + ")");
if (returnVal.type1.name != "void")
@ -136,10 +136,9 @@ string MethodBase::wrapper_fragment(FileWriter& wrapperFile, Str cppClassName,
}
/* ************************************************************************* */
void MethodBase::python_wrapper(FileWriter& wrapperFile,
Str className) const {
wrapperFile.oss << " .def(\"" << name_ << "\", &" << className << "::" << name_
<< ");\n";
void MethodBase::python_wrapper(FileWriter& wrapperFile, Str className) const {
wrapperFile.oss << " .def(\"" << name_ << "\", &" << className << "::"
<< name_ << ");\n";
}
/* ************************************************************************* */

View File

@ -64,7 +64,6 @@ protected:
virtual std::string wrapper_call(FileWriter& wrapperFile, Str cppClassName,
Str matlabUniqueName, const ArgumentList& args,
const ReturnValue& returnVal, const TypeAttributesTable& typeAttributes,
const Qualified& instName) const = 0;
};

View File

@ -39,7 +39,6 @@ void StaticMethod::proxy_header(FileWriter& proxyFile) const {
/* ************************************************************************* */
string StaticMethod::wrapper_call(FileWriter& wrapperFile, Str cppClassName,
Str matlabUniqueName, const ArgumentList& args,
const ReturnValue& returnVal, const TypeAttributesTable& typeAttributes,
const Qualified& instName) const {
// check arguments
// NOTE: for static functions, there is no object passed

View File

@ -44,7 +44,6 @@ protected:
virtual std::string wrapper_call(FileWriter& wrapperFile, Str cppClassName,
Str matlabUniqueName, const ArgumentList& args,
const ReturnValue& returnVal, const TypeAttributesTable& typeAttributes,
const Qualified& instName) const;
};