Wrap tests now pass with new file structure
parent
169c0191c6
commit
9c876ed6b0
|
@ -1,22 +0,0 @@
|
|||
% automatically generated by wrap
|
||||
classdef Point2 < handle
|
||||
properties
|
||||
self = 0
|
||||
end
|
||||
methods
|
||||
function obj = Point2(varargin)
|
||||
if (nargin == 0), obj.self = new_Point2(0,0); end
|
||||
if (nargin == 2 && isa(varargin{1},'double') && isa(varargin{2},'double')), obj.self = new_Point2(0,1,varargin{1},varargin{2}); end
|
||||
if nargin ==14, new_Point2(varargin{1},0); end
|
||||
if nargin ~= 13 && nargin ~= 14 && obj.self == 0, error('Point2 constructor failed'); end
|
||||
end
|
||||
function delete(obj)
|
||||
if obj.self ~= 0
|
||||
new_Point2(obj.self);
|
||||
obj.self = 0;
|
||||
end
|
||||
end
|
||||
function display(obj), obj.print(''); end
|
||||
function disp(obj), obj.display; end
|
||||
end
|
||||
end
|
|
@ -1,11 +0,0 @@
|
|||
// automatically generated by wrap
|
||||
#include <wrap/matlab.h>
|
||||
#include <Point2.h>
|
||||
typedef boost::shared_ptr<Point2> Shared;
|
||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("argChar",nargout,nargin-1,1);
|
||||
Shared obj = unwrap_shared_ptr<Point2>(in[0], "Point2");
|
||||
char a = unwrap< char >(in[1]);
|
||||
obj->argChar(a);
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
% result = obj.argChar(a)
|
||||
function result = argChar(obj,a)
|
||||
error('need to compile argChar.cpp');
|
||||
end
|
|
@ -1,11 +0,0 @@
|
|||
// automatically generated by wrap
|
||||
#include <wrap/matlab.h>
|
||||
#include <Point2.h>
|
||||
typedef boost::shared_ptr<Point2> Shared;
|
||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("argUChar",nargout,nargin-1,1);
|
||||
Shared obj = unwrap_shared_ptr<Point2>(in[0], "Point2");
|
||||
unsigned char a = unwrap< unsigned char >(in[1]);
|
||||
obj->argUChar(a);
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
% result = obj.argUChar(a)
|
||||
function result = argUChar(obj,a)
|
||||
error('need to compile argUChar.cpp');
|
||||
end
|
|
@ -1,11 +0,0 @@
|
|||
// automatically generated by wrap
|
||||
#include <wrap/matlab.h>
|
||||
#include <Point2.h>
|
||||
typedef boost::shared_ptr<Point2> Shared;
|
||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("dim",nargout,nargin-1,0);
|
||||
Shared obj = unwrap_shared_ptr<Point2>(in[0], "Point2");
|
||||
int result = obj->dim();
|
||||
out[0] = wrap< int >(result);
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
% result = obj.dim()
|
||||
function result = dim(obj)
|
||||
error('need to compile dim.cpp');
|
||||
end
|
|
@ -1,11 +0,0 @@
|
|||
// automatically generated by wrap
|
||||
#include <wrap/matlab.h>
|
||||
#include <Point2.h>
|
||||
typedef boost::shared_ptr<Point2> Shared;
|
||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("returnChar",nargout,nargin-1,0);
|
||||
Shared obj = unwrap_shared_ptr<Point2>(in[0], "Point2");
|
||||
char result = obj->returnChar();
|
||||
out[0] = wrap< char >(result);
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
% result = obj.returnChar()
|
||||
function result = returnChar(obj)
|
||||
error('need to compile returnChar.cpp');
|
||||
end
|
|
@ -1,13 +0,0 @@
|
|||
// automatically generated by wrap
|
||||
#include <wrap/matlab.h>
|
||||
#include <Point2.h>
|
||||
typedef boost::shared_ptr<VectorNotEigen> SharedVectorNotEigen;
|
||||
typedef boost::shared_ptr<Point2> Shared;
|
||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("vectorConfusion",nargout,nargin-1,0);
|
||||
Shared obj = unwrap_shared_ptr<Point2>(in[0], "Point2");
|
||||
VectorNotEigen result = obj->vectorConfusion();
|
||||
SharedVectorNotEigen* ret = new SharedVectorNotEigen(new VectorNotEigen(result));
|
||||
out[0] = wrap_collect_shared_ptr(ret,"VectorNotEigen");
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
% result = obj.vectorConfusion()
|
||||
function result = vectorConfusion(obj)
|
||||
error('need to compile vectorConfusion.cpp');
|
||||
end
|
|
@ -1,11 +0,0 @@
|
|||
// automatically generated by wrap
|
||||
#include <wrap/matlab.h>
|
||||
#include <Point2.h>
|
||||
typedef boost::shared_ptr<Point2> Shared;
|
||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("x",nargout,nargin-1,0);
|
||||
Shared obj = unwrap_shared_ptr<Point2>(in[0], "Point2");
|
||||
double result = obj->x();
|
||||
out[0] = wrap< double >(result);
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
% result = obj.x()
|
||||
function result = x(obj)
|
||||
error('need to compile x.cpp');
|
||||
end
|
|
@ -1,11 +0,0 @@
|
|||
// automatically generated by wrap
|
||||
#include <wrap/matlab.h>
|
||||
#include <Point2.h>
|
||||
typedef boost::shared_ptr<Point2> Shared;
|
||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("y",nargout,nargin-1,0);
|
||||
Shared obj = unwrap_shared_ptr<Point2>(in[0], "Point2");
|
||||
double result = obj->y();
|
||||
out[0] = wrap< double >(result);
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
% result = obj.y()
|
||||
function result = y(obj)
|
||||
error('need to compile y.cpp');
|
||||
end
|
|
@ -1,21 +0,0 @@
|
|||
% automatically generated by wrap
|
||||
classdef Point3 < handle
|
||||
properties
|
||||
self = 0
|
||||
end
|
||||
methods
|
||||
function obj = Point3(varargin)
|
||||
if (nargin == 3 && isa(varargin{1},'double') && isa(varargin{2},'double') && isa(varargin{3},'double')), obj.self = new_Point3(0,0,varargin{1},varargin{2},varargin{3}); end
|
||||
if nargin ==14, new_Point3(varargin{1},0); end
|
||||
if nargin ~= 13 && nargin ~= 14 && obj.self == 0, error('Point3 constructor failed'); end
|
||||
end
|
||||
function delete(obj)
|
||||
if obj.self ~= 0
|
||||
new_Point3(obj.self);
|
||||
obj.self = 0;
|
||||
end
|
||||
end
|
||||
function display(obj), obj.print(''); end
|
||||
function disp(obj), obj.display; end
|
||||
end
|
||||
end
|
|
@ -1,12 +0,0 @@
|
|||
// automatically generated by wrap
|
||||
#include <wrap/matlab.h>
|
||||
#include <Point3.h>
|
||||
using namespace geometry;
|
||||
typedef boost::shared_ptr<Point3> Shared;
|
||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("norm",nargout,nargin-1,0);
|
||||
Shared obj = unwrap_shared_ptr<Point3>(in[0], "Point3");
|
||||
double result = obj->norm();
|
||||
out[0] = wrap< double >(result);
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
% result = obj.norm()
|
||||
function result = norm(obj)
|
||||
error('need to compile norm.cpp');
|
||||
end
|
|
@ -1,22 +0,0 @@
|
|||
% automatically generated by wrap
|
||||
classdef Test < handle
|
||||
properties
|
||||
self = 0
|
||||
end
|
||||
methods
|
||||
function obj = Test(varargin)
|
||||
if (nargin == 0), obj.self = new_Test(0,0); end
|
||||
if (nargin == 2 && isa(varargin{1},'double') && isa(varargin{2},'double')), obj.self = new_Test(0,1,varargin{1},varargin{2}); end
|
||||
if nargin ==14, new_Test(varargin{1},0); end
|
||||
if nargin ~= 13 && nargin ~= 14 && obj.self == 0, error('Test constructor failed'); end
|
||||
end
|
||||
function delete(obj)
|
||||
if obj.self ~= 0
|
||||
new_Test(obj.self);
|
||||
obj.self = 0;
|
||||
end
|
||||
end
|
||||
function display(obj), obj.print(''); end
|
||||
function disp(obj), obj.display; end
|
||||
end
|
||||
end
|
|
@ -1,12 +0,0 @@
|
|||
// automatically generated by wrap
|
||||
#include <wrap/matlab.h>
|
||||
#include <folder/path/to/Test.h>
|
||||
using namespace geometry;
|
||||
typedef boost::shared_ptr<Test> Shared;
|
||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("arg_EigenConstRef",nargout,nargin-1,1);
|
||||
Shared obj = unwrap_shared_ptr<Test>(in[0], "Test");
|
||||
Matrix& value = *unwrap_shared_ptr< Matrix >(in[1], "Matrix");
|
||||
obj->arg_EigenConstRef(value);
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
% result = obj.arg_EigenConstRef(value)
|
||||
function result = arg_EigenConstRef(obj,value)
|
||||
error('need to compile arg_EigenConstRef.cpp');
|
||||
end
|
|
@ -1,17 +0,0 @@
|
|||
// automatically generated by wrap
|
||||
#include <wrap/matlab.h>
|
||||
#include <folder/path/to/Test.h>
|
||||
using namespace geometry;
|
||||
typedef boost::shared_ptr<Test> SharedTest;
|
||||
typedef boost::shared_ptr<Test> SharedTest;
|
||||
typedef boost::shared_ptr<Test> Shared;
|
||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("create_MixedPtrs",nargout,nargin-1,0);
|
||||
Shared obj = unwrap_shared_ptr<Test>(in[0], "Test");
|
||||
pair< Test, SharedTest > result = obj->create_MixedPtrs();
|
||||
SharedTest* ret = new SharedTest(new Test(result.first));
|
||||
out[0] = wrap_collect_shared_ptr(ret,"Test");
|
||||
SharedTest* ret = new SharedTest(result.second);
|
||||
out[1] = wrap_collect_shared_ptr(ret,"Test");
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
% [first,second] = obj.create_MixedPtrs()
|
||||
function [first,second] = create_MixedPtrs(obj)
|
||||
error('need to compile create_MixedPtrs.cpp');
|
||||
end
|
|
@ -1,17 +0,0 @@
|
|||
// automatically generated by wrap
|
||||
#include <wrap/matlab.h>
|
||||
#include <folder/path/to/Test.h>
|
||||
using namespace geometry;
|
||||
typedef boost::shared_ptr<Test> SharedTest;
|
||||
typedef boost::shared_ptr<Test> SharedTest;
|
||||
typedef boost::shared_ptr<Test> Shared;
|
||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("create_ptrs",nargout,nargin-1,0);
|
||||
Shared obj = unwrap_shared_ptr<Test>(in[0], "Test");
|
||||
pair< SharedTest, SharedTest > result = obj->create_ptrs();
|
||||
SharedTest* ret = new SharedTest(result.first);
|
||||
out[0] = wrap_collect_shared_ptr(ret,"Test");
|
||||
SharedTest* ret = new SharedTest(result.second);
|
||||
out[1] = wrap_collect_shared_ptr(ret,"Test");
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
% [first,second] = obj.create_ptrs()
|
||||
function [first,second] = create_ptrs(obj)
|
||||
error('need to compile create_ptrs.cpp');
|
||||
end
|
|
@ -1,11 +0,0 @@
|
|||
// automatically generated by wrap
|
||||
#include <wrap/matlab.h>
|
||||
#include <folder/path/to/Test.h>
|
||||
using namespace geometry;
|
||||
typedef boost::shared_ptr<Test> Shared;
|
||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("print",nargout,nargin-1,0);
|
||||
Shared obj = unwrap_shared_ptr<Test>(in[0], "Test");
|
||||
obj->print();
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
% result = obj.print()
|
||||
function result = print(obj)
|
||||
error('need to compile print.cpp');
|
||||
end
|
|
@ -1,15 +0,0 @@
|
|||
// automatically generated by wrap
|
||||
#include <wrap/matlab.h>
|
||||
#include <folder/path/to/Test.h>
|
||||
using namespace geometry;
|
||||
typedef boost::shared_ptr<Point2> SharedPoint2;
|
||||
typedef boost::shared_ptr<Test> Shared;
|
||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("return_Point2Ptr",nargout,nargin-1,1);
|
||||
Shared obj = unwrap_shared_ptr<Test>(in[0], "Test");
|
||||
bool value = unwrap< bool >(in[1]);
|
||||
SharedPoint2 result = obj->return_Point2Ptr(value);
|
||||
SharedPoint2* ret = new SharedPoint2(result);
|
||||
out[0] = wrap_collect_shared_ptr(ret,"Point2");
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
% result = obj.return_Point2Ptr(value)
|
||||
function result = return_Point2Ptr(obj,value)
|
||||
error('need to compile return_Point2Ptr.cpp');
|
||||
end
|
|
@ -1,15 +0,0 @@
|
|||
// automatically generated by wrap
|
||||
#include <wrap/matlab.h>
|
||||
#include <folder/path/to/Test.h>
|
||||
using namespace geometry;
|
||||
typedef boost::shared_ptr<Test> SharedTest;
|
||||
typedef boost::shared_ptr<Test> Shared;
|
||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("return_Test",nargout,nargin-1,1);
|
||||
Shared obj = unwrap_shared_ptr<Test>(in[0], "Test");
|
||||
boost::shared_ptr<Test> value = unwrap_shared_ptr< Test >(in[1], "Test");
|
||||
Test result = obj->return_Test(value);
|
||||
SharedTest* ret = new SharedTest(new Test(result));
|
||||
out[0] = wrap_collect_shared_ptr(ret,"Test");
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
% result = obj.return_Test(value)
|
||||
function result = return_Test(obj,value)
|
||||
error('need to compile return_Test.cpp');
|
||||
end
|
|
@ -1,15 +0,0 @@
|
|||
// automatically generated by wrap
|
||||
#include <wrap/matlab.h>
|
||||
#include <folder/path/to/Test.h>
|
||||
using namespace geometry;
|
||||
typedef boost::shared_ptr<Test> SharedTest;
|
||||
typedef boost::shared_ptr<Test> Shared;
|
||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("return_TestPtr",nargout,nargin-1,1);
|
||||
Shared obj = unwrap_shared_ptr<Test>(in[0], "Test");
|
||||
boost::shared_ptr<Test> value = unwrap_shared_ptr< Test >(in[1], "Test");
|
||||
SharedTest result = obj->return_TestPtr(value);
|
||||
SharedTest* ret = new SharedTest(result);
|
||||
out[0] = wrap_collect_shared_ptr(ret,"Test");
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
% result = obj.return_TestPtr(value)
|
||||
function result = return_TestPtr(obj,value)
|
||||
error('need to compile return_TestPtr.cpp');
|
||||
end
|
|
@ -1,13 +0,0 @@
|
|||
// automatically generated by wrap
|
||||
#include <wrap/matlab.h>
|
||||
#include <folder/path/to/Test.h>
|
||||
using namespace geometry;
|
||||
typedef boost::shared_ptr<Test> Shared;
|
||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("return_bool",nargout,nargin-1,1);
|
||||
Shared obj = unwrap_shared_ptr<Test>(in[0], "Test");
|
||||
bool value = unwrap< bool >(in[1]);
|
||||
bool result = obj->return_bool(value);
|
||||
out[0] = wrap< bool >(result);
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
% result = obj.return_bool(value)
|
||||
function result = return_bool(obj,value)
|
||||
error('need to compile return_bool.cpp');
|
||||
end
|
|
@ -1,13 +0,0 @@
|
|||
// automatically generated by wrap
|
||||
#include <wrap/matlab.h>
|
||||
#include <folder/path/to/Test.h>
|
||||
using namespace geometry;
|
||||
typedef boost::shared_ptr<Test> Shared;
|
||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("return_double",nargout,nargin-1,1);
|
||||
Shared obj = unwrap_shared_ptr<Test>(in[0], "Test");
|
||||
double value = unwrap< double >(in[1]);
|
||||
double result = obj->return_double(value);
|
||||
out[0] = wrap< double >(result);
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
% result = obj.return_double(value)
|
||||
function result = return_double(obj,value)
|
||||
error('need to compile return_double.cpp');
|
||||
end
|
|
@ -1,13 +0,0 @@
|
|||
// automatically generated by wrap
|
||||
#include <wrap/matlab.h>
|
||||
#include <folder/path/to/Test.h>
|
||||
using namespace geometry;
|
||||
typedef boost::shared_ptr<Test> Shared;
|
||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("return_field",nargout,nargin-1,1);
|
||||
Shared obj = unwrap_shared_ptr<Test>(in[0], "Test");
|
||||
Test& t = *unwrap_shared_ptr< Test >(in[1], "Test");
|
||||
bool result = obj->return_field(t);
|
||||
out[0] = wrap< bool >(result);
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
% result = obj.return_field(t)
|
||||
function result = return_field(obj,t)
|
||||
error('need to compile return_field.cpp');
|
||||
end
|
|
@ -1,13 +0,0 @@
|
|||
// automatically generated by wrap
|
||||
#include <wrap/matlab.h>
|
||||
#include <folder/path/to/Test.h>
|
||||
using namespace geometry;
|
||||
typedef boost::shared_ptr<Test> Shared;
|
||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("return_int",nargout,nargin-1,1);
|
||||
Shared obj = unwrap_shared_ptr<Test>(in[0], "Test");
|
||||
int value = unwrap< int >(in[1]);
|
||||
int result = obj->return_int(value);
|
||||
out[0] = wrap< int >(result);
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
% result = obj.return_int(value)
|
||||
function result = return_int(obj,value)
|
||||
error('need to compile return_int.cpp');
|
||||
end
|
|
@ -1,13 +0,0 @@
|
|||
// automatically generated by wrap
|
||||
#include <wrap/matlab.h>
|
||||
#include <folder/path/to/Test.h>
|
||||
using namespace geometry;
|
||||
typedef boost::shared_ptr<Test> Shared;
|
||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("return_matrix1",nargout,nargin-1,1);
|
||||
Shared obj = unwrap_shared_ptr<Test>(in[0], "Test");
|
||||
Matrix value = unwrap< Matrix >(in[1]);
|
||||
Matrix result = obj->return_matrix1(value);
|
||||
out[0] = wrap< Matrix >(result);
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
% result = obj.return_matrix1(value)
|
||||
function result = return_matrix1(obj,value)
|
||||
error('need to compile return_matrix1.cpp');
|
||||
end
|
|
@ -1,13 +0,0 @@
|
|||
// automatically generated by wrap
|
||||
#include <wrap/matlab.h>
|
||||
#include <folder/path/to/Test.h>
|
||||
using namespace geometry;
|
||||
typedef boost::shared_ptr<Test> Shared;
|
||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("return_matrix2",nargout,nargin-1,1);
|
||||
Shared obj = unwrap_shared_ptr<Test>(in[0], "Test");
|
||||
Matrix value = unwrap< Matrix >(in[1]);
|
||||
Matrix result = obj->return_matrix2(value);
|
||||
out[0] = wrap< Matrix >(result);
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
% result = obj.return_matrix2(value)
|
||||
function result = return_matrix2(obj,value)
|
||||
error('need to compile return_matrix2.cpp');
|
||||
end
|
|
@ -1,15 +0,0 @@
|
|||
// automatically generated by wrap
|
||||
#include <wrap/matlab.h>
|
||||
#include <folder/path/to/Test.h>
|
||||
using namespace geometry;
|
||||
typedef boost::shared_ptr<Test> Shared;
|
||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("return_pair",nargout,nargin-1,2);
|
||||
Shared obj = unwrap_shared_ptr<Test>(in[0], "Test");
|
||||
Vector v = unwrap< Vector >(in[1]);
|
||||
Matrix A = unwrap< Matrix >(in[2]);
|
||||
pair< Vector, Matrix > result = obj->return_pair(v,A);
|
||||
out[0] = wrap< Vector >(result.first);
|
||||
out[1] = wrap< Matrix >(result.second);
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
% [first,second] = obj.return_pair(v,A)
|
||||
function [first,second] = return_pair(obj,v,A)
|
||||
error('need to compile return_pair.cpp');
|
||||
end
|
|
@ -1,19 +0,0 @@
|
|||
// automatically generated by wrap
|
||||
#include <wrap/matlab.h>
|
||||
#include <folder/path/to/Test.h>
|
||||
using namespace geometry;
|
||||
typedef boost::shared_ptr<Test> SharedTest;
|
||||
typedef boost::shared_ptr<Test> SharedTest;
|
||||
typedef boost::shared_ptr<Test> Shared;
|
||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("return_ptrs",nargout,nargin-1,2);
|
||||
Shared obj = unwrap_shared_ptr<Test>(in[0], "Test");
|
||||
boost::shared_ptr<Test> p1 = unwrap_shared_ptr< Test >(in[1], "Test");
|
||||
boost::shared_ptr<Test> p2 = unwrap_shared_ptr< Test >(in[2], "Test");
|
||||
pair< SharedTest, SharedTest > result = obj->return_ptrs(p1,p2);
|
||||
SharedTest* ret = new SharedTest(result.first);
|
||||
out[0] = wrap_collect_shared_ptr(ret,"Test");
|
||||
SharedTest* ret = new SharedTest(result.second);
|
||||
out[1] = wrap_collect_shared_ptr(ret,"Test");
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
% [first,second] = obj.return_ptrs(p1,p2)
|
||||
function [first,second] = return_ptrs(obj,p1,p2)
|
||||
error('need to compile return_ptrs.cpp');
|
||||
end
|
|
@ -1,13 +0,0 @@
|
|||
// automatically generated by wrap
|
||||
#include <wrap/matlab.h>
|
||||
#include <folder/path/to/Test.h>
|
||||
using namespace geometry;
|
||||
typedef boost::shared_ptr<Test> Shared;
|
||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("return_size_t",nargout,nargin-1,1);
|
||||
Shared obj = unwrap_shared_ptr<Test>(in[0], "Test");
|
||||
size_t value = unwrap< size_t >(in[1]);
|
||||
size_t result = obj->return_size_t(value);
|
||||
out[0] = wrap< size_t >(result);
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
% result = obj.return_size_t(value)
|
||||
function result = return_size_t(obj,value)
|
||||
error('need to compile return_size_t.cpp');
|
||||
end
|
|
@ -1,13 +0,0 @@
|
|||
// automatically generated by wrap
|
||||
#include <wrap/matlab.h>
|
||||
#include <folder/path/to/Test.h>
|
||||
using namespace geometry;
|
||||
typedef boost::shared_ptr<Test> Shared;
|
||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("return_string",nargout,nargin-1,1);
|
||||
Shared obj = unwrap_shared_ptr<Test>(in[0], "Test");
|
||||
string value = unwrap< string >(in[1]);
|
||||
string result = obj->return_string(value);
|
||||
out[0] = wrap< string >(result);
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
% result = obj.return_string(value)
|
||||
function result = return_string(obj,value)
|
||||
error('need to compile return_string.cpp');
|
||||
end
|
|
@ -1,13 +0,0 @@
|
|||
// automatically generated by wrap
|
||||
#include <wrap/matlab.h>
|
||||
#include <folder/path/to/Test.h>
|
||||
using namespace geometry;
|
||||
typedef boost::shared_ptr<Test> Shared;
|
||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("return_vector1",nargout,nargin-1,1);
|
||||
Shared obj = unwrap_shared_ptr<Test>(in[0], "Test");
|
||||
Vector value = unwrap< Vector >(in[1]);
|
||||
Vector result = obj->return_vector1(value);
|
||||
out[0] = wrap< Vector >(result);
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
% result = obj.return_vector1(value)
|
||||
function result = return_vector1(obj,value)
|
||||
error('need to compile return_vector1.cpp');
|
||||
end
|
|
@ -1,13 +0,0 @@
|
|||
// automatically generated by wrap
|
||||
#include <wrap/matlab.h>
|
||||
#include <folder/path/to/Test.h>
|
||||
using namespace geometry;
|
||||
typedef boost::shared_ptr<Test> Shared;
|
||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("return_vector2",nargout,nargin-1,1);
|
||||
Shared obj = unwrap_shared_ptr<Test>(in[0], "Test");
|
||||
Vector value = unwrap< Vector >(in[1]);
|
||||
Vector result = obj->return_vector2(value);
|
||||
out[0] = wrap< Vector >(result);
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
% result = obj.return_vector2(value)
|
||||
function result = return_vector2(obj,value)
|
||||
error('need to compile return_vector2.cpp');
|
||||
end
|
|
@ -1,94 +0,0 @@
|
|||
# automatically generated by wrap
|
||||
|
||||
MEX = mex
|
||||
MEXENDING = mexa64
|
||||
PATH_TO_WRAP = /not_really_a_real_path/borg/gtsam/wrap
|
||||
mex_flags = -O5
|
||||
|
||||
all: Point2 Point3 Test
|
||||
|
||||
# Point2
|
||||
new_Point2.$(MEXENDING): new_Point2.cpp $(PATH_TO_WRAP)/matlab.h
|
||||
$(MEX) $(mex_flags) new_Point2.cpp -output new_Point2
|
||||
@Point2/x.$(MEXENDING): @Point2/x.cpp $(PATH_TO_WRAP)/matlab.h
|
||||
$(MEX) $(mex_flags) @Point2/x.cpp -output @Point2/x
|
||||
@Point2/y.$(MEXENDING): @Point2/y.cpp $(PATH_TO_WRAP)/matlab.h
|
||||
$(MEX) $(mex_flags) @Point2/y.cpp -output @Point2/y
|
||||
@Point2/dim.$(MEXENDING): @Point2/dim.cpp $(PATH_TO_WRAP)/matlab.h
|
||||
$(MEX) $(mex_flags) @Point2/dim.cpp -output @Point2/dim
|
||||
@Point2/returnChar.$(MEXENDING): @Point2/returnChar.cpp $(PATH_TO_WRAP)/matlab.h
|
||||
$(MEX) $(mex_flags) @Point2/returnChar.cpp -output @Point2/returnChar
|
||||
@Point2/argChar.$(MEXENDING): @Point2/argChar.cpp $(PATH_TO_WRAP)/matlab.h
|
||||
$(MEX) $(mex_flags) @Point2/argChar.cpp -output @Point2/argChar
|
||||
@Point2/argUChar.$(MEXENDING): @Point2/argUChar.cpp $(PATH_TO_WRAP)/matlab.h
|
||||
$(MEX) $(mex_flags) @Point2/argUChar.cpp -output @Point2/argUChar
|
||||
@Point2/vectorConfusion.$(MEXENDING): @Point2/vectorConfusion.cpp $(PATH_TO_WRAP)/matlab.h
|
||||
$(MEX) $(mex_flags) @Point2/vectorConfusion.cpp -output @Point2/vectorConfusion
|
||||
|
||||
Point2: new_Point2.$(MEXENDING) @Point2/x.$(MEXENDING) @Point2/y.$(MEXENDING) @Point2/dim.$(MEXENDING) @Point2/returnChar.$(MEXENDING) @Point2/argChar.$(MEXENDING) @Point2/argUChar.$(MEXENDING) @Point2/vectorConfusion.$(MEXENDING)
|
||||
|
||||
# Point3
|
||||
new_Point3.$(MEXENDING): new_Point3.cpp $(PATH_TO_WRAP)/matlab.h
|
||||
$(MEX) $(mex_flags) new_Point3.cpp -output new_Point3
|
||||
Point3_staticFunction.$(MEXENDING): Point3_staticFunction.cpp $(PATH_TO_WRAP)/matlab.h
|
||||
$(MEX) $(mex_flags) Point3_staticFunction.cpp -output Point3_staticFunction
|
||||
Point3_StaticFunctionRet.$(MEXENDING): Point3_StaticFunctionRet.cpp $(PATH_TO_WRAP)/matlab.h
|
||||
$(MEX) $(mex_flags) Point3_StaticFunctionRet.cpp -output Point3_StaticFunctionRet
|
||||
@Point3/norm.$(MEXENDING): @Point3/norm.cpp $(PATH_TO_WRAP)/matlab.h
|
||||
$(MEX) $(mex_flags) @Point3/norm.cpp -output @Point3/norm
|
||||
|
||||
Point3: new_Point3.$(MEXENDING) Point3_staticFunction.$(MEXENDING) Point3_StaticFunctionRet.$(MEXENDING) @Point3/norm.$(MEXENDING)
|
||||
|
||||
# Test
|
||||
new_Test.$(MEXENDING): new_Test.cpp $(PATH_TO_WRAP)/matlab.h
|
||||
$(MEX) $(mex_flags) new_Test.cpp -output new_Test
|
||||
@Test/return_pair.$(MEXENDING): @Test/return_pair.cpp $(PATH_TO_WRAP)/matlab.h
|
||||
$(MEX) $(mex_flags) @Test/return_pair.cpp -output @Test/return_pair
|
||||
@Test/return_bool.$(MEXENDING): @Test/return_bool.cpp $(PATH_TO_WRAP)/matlab.h
|
||||
$(MEX) $(mex_flags) @Test/return_bool.cpp -output @Test/return_bool
|
||||
@Test/return_size_t.$(MEXENDING): @Test/return_size_t.cpp $(PATH_TO_WRAP)/matlab.h
|
||||
$(MEX) $(mex_flags) @Test/return_size_t.cpp -output @Test/return_size_t
|
||||
@Test/return_int.$(MEXENDING): @Test/return_int.cpp $(PATH_TO_WRAP)/matlab.h
|
||||
$(MEX) $(mex_flags) @Test/return_int.cpp -output @Test/return_int
|
||||
@Test/return_double.$(MEXENDING): @Test/return_double.cpp $(PATH_TO_WRAP)/matlab.h
|
||||
$(MEX) $(mex_flags) @Test/return_double.cpp -output @Test/return_double
|
||||
@Test/return_string.$(MEXENDING): @Test/return_string.cpp $(PATH_TO_WRAP)/matlab.h
|
||||
$(MEX) $(mex_flags) @Test/return_string.cpp -output @Test/return_string
|
||||
@Test/return_vector1.$(MEXENDING): @Test/return_vector1.cpp $(PATH_TO_WRAP)/matlab.h
|
||||
$(MEX) $(mex_flags) @Test/return_vector1.cpp -output @Test/return_vector1
|
||||
@Test/return_matrix1.$(MEXENDING): @Test/return_matrix1.cpp $(PATH_TO_WRAP)/matlab.h
|
||||
$(MEX) $(mex_flags) @Test/return_matrix1.cpp -output @Test/return_matrix1
|
||||
@Test/return_vector2.$(MEXENDING): @Test/return_vector2.cpp $(PATH_TO_WRAP)/matlab.h
|
||||
$(MEX) $(mex_flags) @Test/return_vector2.cpp -output @Test/return_vector2
|
||||
@Test/return_matrix2.$(MEXENDING): @Test/return_matrix2.cpp $(PATH_TO_WRAP)/matlab.h
|
||||
$(MEX) $(mex_flags) @Test/return_matrix2.cpp -output @Test/return_matrix2
|
||||
@Test/arg_EigenConstRef.$(MEXENDING): @Test/arg_EigenConstRef.cpp $(PATH_TO_WRAP)/matlab.h
|
||||
$(MEX) $(mex_flags) @Test/arg_EigenConstRef.cpp -output @Test/arg_EigenConstRef
|
||||
@Test/return_field.$(MEXENDING): @Test/return_field.cpp $(PATH_TO_WRAP)/matlab.h
|
||||
$(MEX) $(mex_flags) @Test/return_field.cpp -output @Test/return_field
|
||||
@Test/return_TestPtr.$(MEXENDING): @Test/return_TestPtr.cpp $(PATH_TO_WRAP)/matlab.h
|
||||
$(MEX) $(mex_flags) @Test/return_TestPtr.cpp -output @Test/return_TestPtr
|
||||
@Test/return_Test.$(MEXENDING): @Test/return_Test.cpp $(PATH_TO_WRAP)/matlab.h
|
||||
$(MEX) $(mex_flags) @Test/return_Test.cpp -output @Test/return_Test
|
||||
@Test/return_Point2Ptr.$(MEXENDING): @Test/return_Point2Ptr.cpp $(PATH_TO_WRAP)/matlab.h
|
||||
$(MEX) $(mex_flags) @Test/return_Point2Ptr.cpp -output @Test/return_Point2Ptr
|
||||
@Test/create_ptrs.$(MEXENDING): @Test/create_ptrs.cpp $(PATH_TO_WRAP)/matlab.h
|
||||
$(MEX) $(mex_flags) @Test/create_ptrs.cpp -output @Test/create_ptrs
|
||||
@Test/create_MixedPtrs.$(MEXENDING): @Test/create_MixedPtrs.cpp $(PATH_TO_WRAP)/matlab.h
|
||||
$(MEX) $(mex_flags) @Test/create_MixedPtrs.cpp -output @Test/create_MixedPtrs
|
||||
@Test/return_ptrs.$(MEXENDING): @Test/return_ptrs.cpp $(PATH_TO_WRAP)/matlab.h
|
||||
$(MEX) $(mex_flags) @Test/return_ptrs.cpp -output @Test/return_ptrs
|
||||
@Test/print.$(MEXENDING): @Test/print.cpp $(PATH_TO_WRAP)/matlab.h
|
||||
$(MEX) $(mex_flags) @Test/print.cpp -output @Test/print
|
||||
|
||||
Test: new_Test.$(MEXENDING) @Test/return_pair.$(MEXENDING) @Test/return_bool.$(MEXENDING) @Test/return_size_t.$(MEXENDING) @Test/return_int.$(MEXENDING) @Test/return_double.$(MEXENDING) @Test/return_string.$(MEXENDING) @Test/return_vector1.$(MEXENDING) @Test/return_matrix1.$(MEXENDING) @Test/return_vector2.$(MEXENDING) @Test/return_matrix2.$(MEXENDING) @Test/arg_EigenConstRef.$(MEXENDING) @Test/return_field.$(MEXENDING) @Test/return_TestPtr.$(MEXENDING) @Test/return_Test.$(MEXENDING) @Test/return_Point2Ptr.$(MEXENDING) @Test/create_ptrs.$(MEXENDING) @Test/create_MixedPtrs.$(MEXENDING) @Test/return_ptrs.$(MEXENDING) @Test/print.$(MEXENDING)
|
||||
|
||||
|
||||
|
||||
clean:
|
||||
rm -rf *.$(MEXENDING)
|
||||
rm -rf @Point2/*.$(MEXENDING)
|
||||
rm -rf @Point3/*.$(MEXENDING)
|
||||
rm -rf @Test/*.$(MEXENDING)
|
||||
|
||||
|
|
@ -0,0 +1,88 @@
|
|||
% automatically generated by wrap
|
||||
classdef Point2 < handle
|
||||
properties
|
||||
self = 0
|
||||
end
|
||||
methods
|
||||
function obj = Point2(varargin)
|
||||
if nargin == 2 && isa(varargin{1}, 'uint64') && varargin{1} == uint64(5139824614673773682)
|
||||
obj.self = varargin{2};
|
||||
geometry_wrapper(obj.self);
|
||||
elseif nargin == 0
|
||||
obj.self = geometry_wrapper(1);
|
||||
elseif nargin == 2 && isa(varargin{1},'double') && isa(varargin{2},'double')
|
||||
obj.self = geometry_wrapper(2,varargin{1},varargin{2});
|
||||
else
|
||||
error('Arguments do not match any overload of Point2 constructor');
|
||||
end
|
||||
end
|
||||
|
||||
function delete(obj)
|
||||
geometry_wrapper(3, obj.self);
|
||||
end
|
||||
|
||||
function display(obj), obj.print(''); end
|
||||
|
||||
function disp(obj), obj.display; end
|
||||
|
||||
function varargout = argChar(self, varargin)
|
||||
if length(varargin) == 1 && isa(varargin{1},'char')
|
||||
geometry_wrapper(4, self, varargin{:});
|
||||
else
|
||||
error('Arguments do not match any overload of function Point2.argChar');
|
||||
end
|
||||
end
|
||||
|
||||
function varargout = argUChar(self, varargin)
|
||||
if length(varargin) == 1 && isa(varargin{1},'char')
|
||||
geometry_wrapper(5, self, varargin{:});
|
||||
else
|
||||
error('Arguments do not match any overload of function Point2.argUChar');
|
||||
end
|
||||
end
|
||||
|
||||
function varargout = dim(self, varargin)
|
||||
if length(varargin) == 0
|
||||
varargout{1} = geometry_wrapper(6, self, varargin{:});
|
||||
else
|
||||
error('Arguments do not match any overload of function Point2.dim');
|
||||
end
|
||||
end
|
||||
|
||||
function varargout = returnChar(self, varargin)
|
||||
if length(varargin) == 0
|
||||
varargout{1} = geometry_wrapper(7, self, varargin{:});
|
||||
else
|
||||
error('Arguments do not match any overload of function Point2.returnChar');
|
||||
end
|
||||
end
|
||||
|
||||
function varargout = vectorConfusion(self, varargin)
|
||||
if length(varargin) == 0
|
||||
varargout{1} = geometry_wrapper(8, self, varargin{:});
|
||||
else
|
||||
error('Arguments do not match any overload of function Point2.vectorConfusion');
|
||||
end
|
||||
end
|
||||
|
||||
function varargout = x(self, varargin)
|
||||
if length(varargin) == 0
|
||||
varargout{1} = geometry_wrapper(9, self, varargin{:});
|
||||
else
|
||||
error('Arguments do not match any overload of function Point2.x');
|
||||
end
|
||||
end
|
||||
|
||||
function varargout = y(self, varargin)
|
||||
if length(varargin) == 0
|
||||
varargout{1} = geometry_wrapper(10, self, varargin{:});
|
||||
else
|
||||
error('Arguments do not match any overload of function Point2.y');
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
methods(Static = true)
|
||||
end
|
||||
end
|
|
@ -0,0 +1,54 @@
|
|||
% automatically generated by wrap
|
||||
classdef Point3 < handle
|
||||
properties
|
||||
self = 0
|
||||
end
|
||||
methods
|
||||
function obj = Point3(varargin)
|
||||
if nargin == 2 && isa(varargin{1}, 'uint64') && varargin{1} == uint64(5139824614673773682)
|
||||
obj.self = varargin{2};
|
||||
geometry_wrapper(obj.self);
|
||||
elseif nargin == 3 && isa(varargin{1},'double') && isa(varargin{2},'double') && isa(varargin{3},'double')
|
||||
obj.self = geometry_wrapper(12,varargin{1},varargin{2},varargin{3});
|
||||
else
|
||||
error('Arguments do not match any overload of Point3 constructor');
|
||||
end
|
||||
end
|
||||
|
||||
function delete(obj)
|
||||
geometry_wrapper(13, obj.self);
|
||||
end
|
||||
|
||||
function display(obj), obj.print(''); end
|
||||
|
||||
function disp(obj), obj.display; end
|
||||
|
||||
function varargout = norm(self, varargin)
|
||||
if length(varargin) == 0
|
||||
varargout{1} = geometry_wrapper(14, self, varargin{:});
|
||||
else
|
||||
error('Arguments do not match any overload of function Point3.norm');
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
methods(Static = true)
|
||||
function varargout = StaticFunctionRet(varargin)
|
||||
if length(varargin) == 1 && isa(varargin{1},'double')
|
||||
varargout{1} = geometry_wrapper(15, varargin{:});
|
||||
else
|
||||
error('Arguments do not match any overload of function Point3.StaticFunctionRet');
|
||||
end
|
||||
end
|
||||
|
||||
function varargout = StaticFunction(varargin)
|
||||
if length(varargin) == 0
|
||||
varargout{1} = geometry_wrapper(16, varargin{:});
|
||||
else
|
||||
error('Arguments do not match any overload of function Point3.StaticFunction');
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
|
@ -1,14 +0,0 @@
|
|||
// automatically generated by wrap
|
||||
#include <wrap/matlab.h>
|
||||
#include <Point3.h>
|
||||
using namespace geometry;
|
||||
typedef boost::shared_ptr<Point3> SharedPoint3;
|
||||
typedef boost::shared_ptr<Point3> Shared;
|
||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("Point3_StaticFunctionRet",nargout,nargin,1);
|
||||
double z = unwrap< double >(in[0]);
|
||||
Point3 result = Point3::StaticFunctionRet(z);
|
||||
SharedPoint3* ret = new SharedPoint3(new Point3(result));
|
||||
out[0] = wrap_collect_shared_ptr(ret,"Point3");
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
% automatically generated by wrap
|
||||
function result = Point3_StaticFunctionRet(z)
|
||||
% usage: x = Point3_StaticFunctionRet(z)
|
||||
error('need to compile Point3_StaticFunctionRet.cpp');
|
||||
end
|
|
@ -1,12 +0,0 @@
|
|||
// automatically generated by wrap
|
||||
#include <wrap/matlab.h>
|
||||
#include <Point3.h>
|
||||
using namespace geometry;
|
||||
typedef boost::shared_ptr<double> Shareddouble;
|
||||
typedef boost::shared_ptr<Point3> Shared;
|
||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("Point3_staticFunction",nargout,nargin,0);
|
||||
double result = Point3::staticFunction();
|
||||
out[0] = wrap< double >(result);
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
% automatically generated by wrap
|
||||
function result = Point3_staticFunction()
|
||||
% usage: x = Point3_staticFunction()
|
||||
error('need to compile Point3_staticFunction.cpp');
|
||||
end
|
|
@ -0,0 +1,184 @@
|
|||
% automatically generated by wrap
|
||||
classdef Test < handle
|
||||
properties
|
||||
self = 0
|
||||
end
|
||||
methods
|
||||
function obj = Test(varargin)
|
||||
if nargin == 2 && isa(varargin{1}, 'uint64') && varargin{1} == uint64(5139824614673773682)
|
||||
obj.self = varargin{2};
|
||||
geometry_wrapper(obj.self);
|
||||
elseif nargin == 0
|
||||
obj.self = geometry_wrapper(18);
|
||||
elseif nargin == 2 && isa(varargin{1},'double') && isa(varargin{2},'double')
|
||||
obj.self = geometry_wrapper(19,varargin{1},varargin{2});
|
||||
else
|
||||
error('Arguments do not match any overload of Test constructor');
|
||||
end
|
||||
end
|
||||
|
||||
function delete(obj)
|
||||
geometry_wrapper(20, obj.self);
|
||||
end
|
||||
|
||||
function display(obj), obj.print(''); end
|
||||
|
||||
function disp(obj), obj.display; end
|
||||
|
||||
function varargout = arg_EigenConstRef(self, varargin)
|
||||
if length(varargin) == 1 && isa(varargin{1},'double')
|
||||
geometry_wrapper(21, self, varargin{:});
|
||||
else
|
||||
error('Arguments do not match any overload of function Test.arg_EigenConstRef');
|
||||
end
|
||||
end
|
||||
|
||||
function varargout = create_MixedPtrs(self, varargin)
|
||||
if length(varargin) == 0
|
||||
[ varargout{1} varargout{2} ] = geometry_wrapper(22, self, varargin{:});
|
||||
else
|
||||
error('Arguments do not match any overload of function Test.create_MixedPtrs');
|
||||
end
|
||||
end
|
||||
|
||||
function varargout = create_ptrs(self, varargin)
|
||||
if length(varargin) == 0
|
||||
[ varargout{1} varargout{2} ] = geometry_wrapper(23, self, varargin{:});
|
||||
else
|
||||
error('Arguments do not match any overload of function Test.create_ptrs');
|
||||
end
|
||||
end
|
||||
|
||||
function varargout = print(self, varargin)
|
||||
if length(varargin) == 0
|
||||
geometry_wrapper(24, self, varargin{:});
|
||||
else
|
||||
error('Arguments do not match any overload of function Test.print');
|
||||
end
|
||||
end
|
||||
|
||||
function varargout = return_Point2Ptr(self, varargin)
|
||||
if length(varargin) == 1 && isa(varargin{1},'logical')
|
||||
varargout{1} = geometry_wrapper(25, self, varargin{:});
|
||||
else
|
||||
error('Arguments do not match any overload of function Test.return_Point2Ptr');
|
||||
end
|
||||
end
|
||||
|
||||
function varargout = return_Test(self, varargin)
|
||||
if length(varargin) == 1 && isa(varargin{1},'Test')
|
||||
varargout{1} = geometry_wrapper(26, self, varargin{:});
|
||||
else
|
||||
error('Arguments do not match any overload of function Test.return_Test');
|
||||
end
|
||||
end
|
||||
|
||||
function varargout = return_TestPtr(self, varargin)
|
||||
if length(varargin) == 1 && isa(varargin{1},'Test')
|
||||
varargout{1} = geometry_wrapper(27, self, varargin{:});
|
||||
else
|
||||
error('Arguments do not match any overload of function Test.return_TestPtr');
|
||||
end
|
||||
end
|
||||
|
||||
function varargout = return_bool(self, varargin)
|
||||
if length(varargin) == 1 && isa(varargin{1},'logical')
|
||||
varargout{1} = geometry_wrapper(28, self, varargin{:});
|
||||
else
|
||||
error('Arguments do not match any overload of function Test.return_bool');
|
||||
end
|
||||
end
|
||||
|
||||
function varargout = return_double(self, varargin)
|
||||
if length(varargin) == 1 && isa(varargin{1},'double')
|
||||
varargout{1} = geometry_wrapper(29, self, varargin{:});
|
||||
else
|
||||
error('Arguments do not match any overload of function Test.return_double');
|
||||
end
|
||||
end
|
||||
|
||||
function varargout = return_field(self, varargin)
|
||||
if length(varargin) == 1 && isa(varargin{1},'Test')
|
||||
varargout{1} = geometry_wrapper(30, self, varargin{:});
|
||||
else
|
||||
error('Arguments do not match any overload of function Test.return_field');
|
||||
end
|
||||
end
|
||||
|
||||
function varargout = return_int(self, varargin)
|
||||
if length(varargin) == 1 && isa(varargin{1},'numeric')
|
||||
varargout{1} = geometry_wrapper(31, self, varargin{:});
|
||||
else
|
||||
error('Arguments do not match any overload of function Test.return_int');
|
||||
end
|
||||
end
|
||||
|
||||
function varargout = return_matrix1(self, varargin)
|
||||
if length(varargin) == 1 && isa(varargin{1},'double')
|
||||
varargout{1} = geometry_wrapper(32, self, varargin{:});
|
||||
else
|
||||
error('Arguments do not match any overload of function Test.return_matrix1');
|
||||
end
|
||||
end
|
||||
|
||||
function varargout = return_matrix2(self, varargin)
|
||||
if length(varargin) == 1 && isa(varargin{1},'double')
|
||||
varargout{1} = geometry_wrapper(33, self, varargin{:});
|
||||
else
|
||||
error('Arguments do not match any overload of function Test.return_matrix2');
|
||||
end
|
||||
end
|
||||
|
||||
function varargout = return_pair(self, varargin)
|
||||
if length(varargin) == 2 && isa(varargin{1},'double') && isa(varargin{2},'double')
|
||||
[ varargout{1} varargout{2} ] = geometry_wrapper(34, self, varargin{:});
|
||||
else
|
||||
error('Arguments do not match any overload of function Test.return_pair');
|
||||
end
|
||||
end
|
||||
|
||||
function varargout = return_ptrs(self, varargin)
|
||||
if length(varargin) == 2 && isa(varargin{1},'Test') && isa(varargin{2},'Test')
|
||||
[ varargout{1} varargout{2} ] = geometry_wrapper(35, self, varargin{:});
|
||||
else
|
||||
error('Arguments do not match any overload of function Test.return_ptrs');
|
||||
end
|
||||
end
|
||||
|
||||
function varargout = return_size_t(self, varargin)
|
||||
if length(varargin) == 1 && isa(varargin{1},'numeric')
|
||||
varargout{1} = geometry_wrapper(36, self, varargin{:});
|
||||
else
|
||||
error('Arguments do not match any overload of function Test.return_size_t');
|
||||
end
|
||||
end
|
||||
|
||||
function varargout = return_string(self, varargin)
|
||||
if length(varargin) == 1 && isa(varargin{1},'char')
|
||||
varargout{1} = geometry_wrapper(37, self, varargin{:});
|
||||
else
|
||||
error('Arguments do not match any overload of function Test.return_string');
|
||||
end
|
||||
end
|
||||
|
||||
function varargout = return_vector1(self, varargin)
|
||||
if length(varargin) == 1 && isa(varargin{1},'double')
|
||||
varargout{1} = geometry_wrapper(38, self, varargin{:});
|
||||
else
|
||||
error('Arguments do not match any overload of function Test.return_vector1');
|
||||
end
|
||||
end
|
||||
|
||||
function varargout = return_vector2(self, varargin)
|
||||
if length(varargin) == 1 && isa(varargin{1},'double')
|
||||
varargout{1} = geometry_wrapper(39, self, varargin{:});
|
||||
else
|
||||
error('Arguments do not match any overload of function Test.return_vector2');
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
methods(Static = true)
|
||||
end
|
||||
end
|
|
@ -0,0 +1,621 @@
|
|||
// automatically generated by wrap
|
||||
#include <wrap/matlab.h>
|
||||
#include <map>
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
#include <Point2.h>
|
||||
#include <Point3.h>
|
||||
#include <folder/path/to/Test.h>
|
||||
|
||||
typedef std::set<boost::shared_ptr<Point2>*> Collector_Point2;
|
||||
static Collector_Point2 collector_Point2;
|
||||
typedef std::set<boost::shared_ptr<Point3>*> Collector_Point3;
|
||||
static Collector_Point3 collector_Point3;
|
||||
typedef std::set<boost::shared_ptr<Test>*> Collector_Test;
|
||||
static Collector_Test collector_Test;
|
||||
void _deleteAllObjects()
|
||||
{
|
||||
for(Collector_Point2::iterator iter = collector_Point2.begin();
|
||||
iter != collector_Point2.end(); ) {
|
||||
delete *iter;
|
||||
collector_Point2.erase(iter++);
|
||||
}
|
||||
for(Collector_Point3::iterator iter = collector_Point3.begin();
|
||||
iter != collector_Point3.end(); ) {
|
||||
delete *iter;
|
||||
collector_Point3.erase(iter++);
|
||||
}
|
||||
for(Collector_Test::iterator iter = collector_Test.begin();
|
||||
iter != collector_Test.end(); ) {
|
||||
delete *iter;
|
||||
collector_Test.erase(iter++);
|
||||
}
|
||||
}
|
||||
void Point2_constructor_0(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
mexAtExit(&_deleteAllObjects);
|
||||
typedef boost::shared_ptr<Point2> Shared;
|
||||
|
||||
Shared *self = *reinterpret_cast<Shared**> (mxGetData(in[0]));
|
||||
collector_Point2.insert(self);
|
||||
}
|
||||
void Point2_constructor_1(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
mexAtExit(&_deleteAllObjects);
|
||||
typedef boost::shared_ptr<Point2> Shared;
|
||||
|
||||
Shared *self = new Shared(new Point2());
|
||||
collector_Point2.insert(self);
|
||||
out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL);
|
||||
*reinterpret_cast<Shared**> (mxGetData(out[0])) = self;
|
||||
}
|
||||
|
||||
void Point2_constructor_2(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
mexAtExit(&_deleteAllObjects);
|
||||
typedef boost::shared_ptr<Point2> Shared;
|
||||
|
||||
double x = unwrap< double >(in[0]);
|
||||
double y = unwrap< double >(in[1]);
|
||||
Shared *self = new Shared(new Point2(x,y));
|
||||
collector_Point2.insert(self);
|
||||
out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL);
|
||||
*reinterpret_cast<Shared**> (mxGetData(out[0])) = self;
|
||||
}
|
||||
|
||||
void Point2_deconstructor_3(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
typedef boost::shared_ptr<Point2> Shared;
|
||||
checkArguments("delete_Point2",nargout,nargin,1);
|
||||
Shared *self = *reinterpret_cast<Shared**>(mxGetData(in[0]));
|
||||
Collector_Point2::iterator item;
|
||||
item = collector_Point2.find(self);
|
||||
if(item != collector_Point2.end()) {
|
||||
delete self;
|
||||
collector_Point2.erase(item);
|
||||
}
|
||||
}
|
||||
|
||||
void Point2_argChar_4(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
typedef boost::shared_ptr<Point2> Shared;
|
||||
checkArguments("argChar",nargout,nargin-1,1);
|
||||
Shared obj = unwrap_shared_ptr<Point2>(in[0], "Point2");
|
||||
char a = unwrap< char >(in[1]);
|
||||
obj->argChar(a);
|
||||
}
|
||||
|
||||
void Point2_argUChar_5(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
typedef boost::shared_ptr<Point2> Shared;
|
||||
checkArguments("argUChar",nargout,nargin-1,1);
|
||||
Shared obj = unwrap_shared_ptr<Point2>(in[0], "Point2");
|
||||
unsigned char a = unwrap< unsigned char >(in[1]);
|
||||
obj->argUChar(a);
|
||||
}
|
||||
|
||||
void Point2_dim_6(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
typedef boost::shared_ptr<Point2> Shared;
|
||||
checkArguments("dim",nargout,nargin-1,0);
|
||||
Shared obj = unwrap_shared_ptr<Point2>(in[0], "Point2");
|
||||
int result = obj->dim();
|
||||
out[0] = wrap< int >(result);
|
||||
}
|
||||
|
||||
void Point2_returnChar_7(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
typedef boost::shared_ptr<Point2> Shared;
|
||||
checkArguments("returnChar",nargout,nargin-1,0);
|
||||
Shared obj = unwrap_shared_ptr<Point2>(in[0], "Point2");
|
||||
char result = obj->returnChar();
|
||||
out[0] = wrap< char >(result);
|
||||
}
|
||||
|
||||
void Point2_vectorConfusion_8(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
typedef boost::shared_ptr<VectorNotEigen> SharedVectorNotEigen;
|
||||
typedef boost::shared_ptr<Point2> Shared;
|
||||
checkArguments("vectorConfusion",nargout,nargin-1,0);
|
||||
Shared obj = unwrap_shared_ptr<Point2>(in[0], "Point2");
|
||||
VectorNotEigen result = obj->vectorConfusion();
|
||||
SharedVectorNotEigen* ret = new SharedVectorNotEigen(new VectorNotEigen(result));
|
||||
out[0] = wrap_shared_ptr(ret,"VectorNotEigen");
|
||||
}
|
||||
|
||||
void Point2_x_9(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
typedef boost::shared_ptr<Point2> Shared;
|
||||
checkArguments("x",nargout,nargin-1,0);
|
||||
Shared obj = unwrap_shared_ptr<Point2>(in[0], "Point2");
|
||||
double result = obj->x();
|
||||
out[0] = wrap< double >(result);
|
||||
}
|
||||
|
||||
void Point2_y_10(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
typedef boost::shared_ptr<Point2> Shared;
|
||||
checkArguments("y",nargout,nargin-1,0);
|
||||
Shared obj = unwrap_shared_ptr<Point2>(in[0], "Point2");
|
||||
double result = obj->y();
|
||||
out[0] = wrap< double >(result);
|
||||
}
|
||||
|
||||
void Point3_constructor_11(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
mexAtExit(&_deleteAllObjects);
|
||||
using namespace geometry;
|
||||
typedef boost::shared_ptr<Point3> Shared;
|
||||
|
||||
Shared *self = *reinterpret_cast<Shared**> (mxGetData(in[0]));
|
||||
collector_Point3.insert(self);
|
||||
}
|
||||
void Point3_constructor_12(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
mexAtExit(&_deleteAllObjects);
|
||||
using namespace geometry;
|
||||
typedef boost::shared_ptr<Point3> Shared;
|
||||
|
||||
double x = unwrap< double >(in[0]);
|
||||
double y = unwrap< double >(in[1]);
|
||||
double z = unwrap< double >(in[2]);
|
||||
Shared *self = new Shared(new Point3(x,y,z));
|
||||
collector_Point3.insert(self);
|
||||
out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL);
|
||||
*reinterpret_cast<Shared**> (mxGetData(out[0])) = self;
|
||||
}
|
||||
|
||||
void Point3_deconstructor_13(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
using namespace geometry;
|
||||
typedef boost::shared_ptr<Point3> Shared;
|
||||
checkArguments("delete_Point3",nargout,nargin,1);
|
||||
Shared *self = *reinterpret_cast<Shared**>(mxGetData(in[0]));
|
||||
Collector_Point3::iterator item;
|
||||
item = collector_Point3.find(self);
|
||||
if(item != collector_Point3.end()) {
|
||||
delete self;
|
||||
collector_Point3.erase(item);
|
||||
}
|
||||
}
|
||||
|
||||
void Point3_norm_14(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
using namespace geometry;
|
||||
typedef boost::shared_ptr<Point3> Shared;
|
||||
checkArguments("norm",nargout,nargin-1,0);
|
||||
Shared obj = unwrap_shared_ptr<Point3>(in[0], "Point3");
|
||||
double result = obj->norm();
|
||||
out[0] = wrap< double >(result);
|
||||
}
|
||||
|
||||
void Point3_StaticFunctionRet_15(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
using namespace geometry;
|
||||
typedef boost::shared_ptr<Point3> SharedPoint3;
|
||||
typedef boost::shared_ptr<Point3> Shared;
|
||||
checkArguments("Point3.StaticFunctionRet",nargout,nargin,1);
|
||||
double z = unwrap< double >(in[0]);
|
||||
Point3 result = Point3::StaticFunctionRet(z);
|
||||
SharedPoint3* ret = new SharedPoint3(new Point3(result));
|
||||
out[0] = wrap_shared_ptr(ret,"Point3");
|
||||
}
|
||||
|
||||
void Point3_staticFunction_16(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
using namespace geometry;
|
||||
typedef boost::shared_ptr<Point3> Shared;
|
||||
checkArguments("Point3.staticFunction",nargout,nargin,0);
|
||||
double result = Point3::staticFunction();
|
||||
out[0] = wrap< double >(result);
|
||||
}
|
||||
|
||||
void Test_constructor_17(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
mexAtExit(&_deleteAllObjects);
|
||||
using namespace geometry;
|
||||
typedef boost::shared_ptr<Test> Shared;
|
||||
|
||||
Shared *self = *reinterpret_cast<Shared**> (mxGetData(in[0]));
|
||||
collector_Test.insert(self);
|
||||
}
|
||||
void Test_constructor_18(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
mexAtExit(&_deleteAllObjects);
|
||||
using namespace geometry;
|
||||
typedef boost::shared_ptr<Test> Shared;
|
||||
|
||||
Shared *self = new Shared(new Test());
|
||||
collector_Test.insert(self);
|
||||
out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL);
|
||||
*reinterpret_cast<Shared**> (mxGetData(out[0])) = self;
|
||||
}
|
||||
|
||||
void Test_constructor_19(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
mexAtExit(&_deleteAllObjects);
|
||||
using namespace geometry;
|
||||
typedef boost::shared_ptr<Test> Shared;
|
||||
|
||||
double a = unwrap< double >(in[0]);
|
||||
Matrix b = unwrap< Matrix >(in[1]);
|
||||
Shared *self = new Shared(new Test(a,b));
|
||||
collector_Test.insert(self);
|
||||
out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL);
|
||||
*reinterpret_cast<Shared**> (mxGetData(out[0])) = self;
|
||||
}
|
||||
|
||||
void Test_deconstructor_20(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
using namespace geometry;
|
||||
typedef boost::shared_ptr<Test> Shared;
|
||||
checkArguments("delete_Test",nargout,nargin,1);
|
||||
Shared *self = *reinterpret_cast<Shared**>(mxGetData(in[0]));
|
||||
Collector_Test::iterator item;
|
||||
item = collector_Test.find(self);
|
||||
if(item != collector_Test.end()) {
|
||||
delete self;
|
||||
collector_Test.erase(item);
|
||||
}
|
||||
}
|
||||
|
||||
void Test_arg_EigenConstRef_21(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
using namespace geometry;
|
||||
typedef boost::shared_ptr<Test> Shared;
|
||||
checkArguments("arg_EigenConstRef",nargout,nargin-1,1);
|
||||
Shared obj = unwrap_shared_ptr<Test>(in[0], "Test");
|
||||
Matrix& value = *unwrap_shared_ptr< Matrix >(in[1], "Matrix");
|
||||
obj->arg_EigenConstRef(value);
|
||||
}
|
||||
|
||||
void Test_create_MixedPtrs_22(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
using namespace geometry;
|
||||
typedef boost::shared_ptr<Test> SharedTest;
|
||||
typedef boost::shared_ptr<Test> SharedTest;
|
||||
typedef boost::shared_ptr<Test> Shared;
|
||||
checkArguments("create_MixedPtrs",nargout,nargin-1,0);
|
||||
Shared obj = unwrap_shared_ptr<Test>(in[0], "Test");
|
||||
pair< Test, SharedTest > result = obj->create_MixedPtrs();
|
||||
SharedTest* ret = new SharedTest(new Test(result.first));
|
||||
out[0] = wrap_shared_ptr(ret,"Test");
|
||||
SharedTest* ret = new SharedTest(result.second);
|
||||
out[1] = wrap_shared_ptr(ret,"Test");
|
||||
}
|
||||
|
||||
void Test_create_ptrs_23(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
using namespace geometry;
|
||||
typedef boost::shared_ptr<Test> SharedTest;
|
||||
typedef boost::shared_ptr<Test> SharedTest;
|
||||
typedef boost::shared_ptr<Test> Shared;
|
||||
checkArguments("create_ptrs",nargout,nargin-1,0);
|
||||
Shared obj = unwrap_shared_ptr<Test>(in[0], "Test");
|
||||
pair< SharedTest, SharedTest > result = obj->create_ptrs();
|
||||
SharedTest* ret = new SharedTest(result.first);
|
||||
out[0] = wrap_shared_ptr(ret,"Test");
|
||||
SharedTest* ret = new SharedTest(result.second);
|
||||
out[1] = wrap_shared_ptr(ret,"Test");
|
||||
}
|
||||
|
||||
void Test_print_24(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
using namespace geometry;
|
||||
typedef boost::shared_ptr<Test> Shared;
|
||||
checkArguments("print",nargout,nargin-1,0);
|
||||
Shared obj = unwrap_shared_ptr<Test>(in[0], "Test");
|
||||
obj->print();
|
||||
}
|
||||
|
||||
void Test_return_Point2Ptr_25(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
using namespace geometry;
|
||||
typedef boost::shared_ptr<Point2> SharedPoint2;
|
||||
typedef boost::shared_ptr<Test> Shared;
|
||||
checkArguments("return_Point2Ptr",nargout,nargin-1,1);
|
||||
Shared obj = unwrap_shared_ptr<Test>(in[0], "Test");
|
||||
bool value = unwrap< bool >(in[1]);
|
||||
SharedPoint2 result = obj->return_Point2Ptr(value);
|
||||
SharedPoint2* ret = new SharedPoint2(result);
|
||||
out[0] = wrap_shared_ptr(ret,"Point2");
|
||||
}
|
||||
|
||||
void Test_return_Test_26(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
using namespace geometry;
|
||||
typedef boost::shared_ptr<Test> SharedTest;
|
||||
typedef boost::shared_ptr<Test> Shared;
|
||||
checkArguments("return_Test",nargout,nargin-1,1);
|
||||
Shared obj = unwrap_shared_ptr<Test>(in[0], "Test");
|
||||
boost::shared_ptr<Test> value = unwrap_shared_ptr< Test >(in[1], "Test");
|
||||
Test result = obj->return_Test(value);
|
||||
SharedTest* ret = new SharedTest(new Test(result));
|
||||
out[0] = wrap_shared_ptr(ret,"Test");
|
||||
}
|
||||
|
||||
void Test_return_TestPtr_27(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
using namespace geometry;
|
||||
typedef boost::shared_ptr<Test> SharedTest;
|
||||
typedef boost::shared_ptr<Test> Shared;
|
||||
checkArguments("return_TestPtr",nargout,nargin-1,1);
|
||||
Shared obj = unwrap_shared_ptr<Test>(in[0], "Test");
|
||||
boost::shared_ptr<Test> value = unwrap_shared_ptr< Test >(in[1], "Test");
|
||||
SharedTest result = obj->return_TestPtr(value);
|
||||
SharedTest* ret = new SharedTest(result);
|
||||
out[0] = wrap_shared_ptr(ret,"Test");
|
||||
}
|
||||
|
||||
void Test_return_bool_28(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
using namespace geometry;
|
||||
typedef boost::shared_ptr<Test> Shared;
|
||||
checkArguments("return_bool",nargout,nargin-1,1);
|
||||
Shared obj = unwrap_shared_ptr<Test>(in[0], "Test");
|
||||
bool value = unwrap< bool >(in[1]);
|
||||
bool result = obj->return_bool(value);
|
||||
out[0] = wrap< bool >(result);
|
||||
}
|
||||
|
||||
void Test_return_double_29(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
using namespace geometry;
|
||||
typedef boost::shared_ptr<Test> Shared;
|
||||
checkArguments("return_double",nargout,nargin-1,1);
|
||||
Shared obj = unwrap_shared_ptr<Test>(in[0], "Test");
|
||||
double value = unwrap< double >(in[1]);
|
||||
double result = obj->return_double(value);
|
||||
out[0] = wrap< double >(result);
|
||||
}
|
||||
|
||||
void Test_return_field_30(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
using namespace geometry;
|
||||
typedef boost::shared_ptr<Test> Shared;
|
||||
checkArguments("return_field",nargout,nargin-1,1);
|
||||
Shared obj = unwrap_shared_ptr<Test>(in[0], "Test");
|
||||
Test& t = *unwrap_shared_ptr< Test >(in[1], "Test");
|
||||
bool result = obj->return_field(t);
|
||||
out[0] = wrap< bool >(result);
|
||||
}
|
||||
|
||||
void Test_return_int_31(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
using namespace geometry;
|
||||
typedef boost::shared_ptr<Test> Shared;
|
||||
checkArguments("return_int",nargout,nargin-1,1);
|
||||
Shared obj = unwrap_shared_ptr<Test>(in[0], "Test");
|
||||
int value = unwrap< int >(in[1]);
|
||||
int result = obj->return_int(value);
|
||||
out[0] = wrap< int >(result);
|
||||
}
|
||||
|
||||
void Test_return_matrix1_32(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
using namespace geometry;
|
||||
typedef boost::shared_ptr<Test> Shared;
|
||||
checkArguments("return_matrix1",nargout,nargin-1,1);
|
||||
Shared obj = unwrap_shared_ptr<Test>(in[0], "Test");
|
||||
Matrix value = unwrap< Matrix >(in[1]);
|
||||
Matrix result = obj->return_matrix1(value);
|
||||
out[0] = wrap< Matrix >(result);
|
||||
}
|
||||
|
||||
void Test_return_matrix2_33(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
using namespace geometry;
|
||||
typedef boost::shared_ptr<Test> Shared;
|
||||
checkArguments("return_matrix2",nargout,nargin-1,1);
|
||||
Shared obj = unwrap_shared_ptr<Test>(in[0], "Test");
|
||||
Matrix value = unwrap< Matrix >(in[1]);
|
||||
Matrix result = obj->return_matrix2(value);
|
||||
out[0] = wrap< Matrix >(result);
|
||||
}
|
||||
|
||||
void Test_return_pair_34(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
using namespace geometry;
|
||||
typedef boost::shared_ptr<Test> Shared;
|
||||
checkArguments("return_pair",nargout,nargin-1,2);
|
||||
Shared obj = unwrap_shared_ptr<Test>(in[0], "Test");
|
||||
Vector v = unwrap< Vector >(in[1]);
|
||||
Matrix A = unwrap< Matrix >(in[2]);
|
||||
pair< Vector, Matrix > result = obj->return_pair(v,A);
|
||||
out[0] = wrap< Vector >(result.first);
|
||||
out[1] = wrap< Matrix >(result.second);
|
||||
}
|
||||
|
||||
void Test_return_ptrs_35(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
using namespace geometry;
|
||||
typedef boost::shared_ptr<Test> SharedTest;
|
||||
typedef boost::shared_ptr<Test> SharedTest;
|
||||
typedef boost::shared_ptr<Test> Shared;
|
||||
checkArguments("return_ptrs",nargout,nargin-1,2);
|
||||
Shared obj = unwrap_shared_ptr<Test>(in[0], "Test");
|
||||
boost::shared_ptr<Test> p1 = unwrap_shared_ptr< Test >(in[1], "Test");
|
||||
boost::shared_ptr<Test> p2 = unwrap_shared_ptr< Test >(in[2], "Test");
|
||||
pair< SharedTest, SharedTest > result = obj->return_ptrs(p1,p2);
|
||||
SharedTest* ret = new SharedTest(result.first);
|
||||
out[0] = wrap_shared_ptr(ret,"Test");
|
||||
SharedTest* ret = new SharedTest(result.second);
|
||||
out[1] = wrap_shared_ptr(ret,"Test");
|
||||
}
|
||||
|
||||
void Test_return_size_t_36(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
using namespace geometry;
|
||||
typedef boost::shared_ptr<Test> Shared;
|
||||
checkArguments("return_size_t",nargout,nargin-1,1);
|
||||
Shared obj = unwrap_shared_ptr<Test>(in[0], "Test");
|
||||
size_t value = unwrap< size_t >(in[1]);
|
||||
size_t result = obj->return_size_t(value);
|
||||
out[0] = wrap< size_t >(result);
|
||||
}
|
||||
|
||||
void Test_return_string_37(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
using namespace geometry;
|
||||
typedef boost::shared_ptr<Test> Shared;
|
||||
checkArguments("return_string",nargout,nargin-1,1);
|
||||
Shared obj = unwrap_shared_ptr<Test>(in[0], "Test");
|
||||
string value = unwrap< string >(in[1]);
|
||||
string result = obj->return_string(value);
|
||||
out[0] = wrap< string >(result);
|
||||
}
|
||||
|
||||
void Test_return_vector1_38(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
using namespace geometry;
|
||||
typedef boost::shared_ptr<Test> Shared;
|
||||
checkArguments("return_vector1",nargout,nargin-1,1);
|
||||
Shared obj = unwrap_shared_ptr<Test>(in[0], "Test");
|
||||
Vector value = unwrap< Vector >(in[1]);
|
||||
Vector result = obj->return_vector1(value);
|
||||
out[0] = wrap< Vector >(result);
|
||||
}
|
||||
|
||||
void Test_return_vector2_39(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
using namespace geometry;
|
||||
typedef boost::shared_ptr<Test> Shared;
|
||||
checkArguments("return_vector2",nargout,nargin-1,1);
|
||||
Shared obj = unwrap_shared_ptr<Test>(in[0], "Test");
|
||||
Vector value = unwrap< Vector >(in[1]);
|
||||
Vector result = obj->return_vector2(value);
|
||||
out[0] = wrap< Vector >(result);
|
||||
}
|
||||
|
||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
mstream mout;
|
||||
std::streambuf *outbuf = std::cout.rdbuf(&mout);
|
||||
|
||||
int id = unwrap<int>(in[0]);
|
||||
|
||||
switch(id) {
|
||||
case 0:
|
||||
Point2_constructor_0(nargout, out, nargin-1, in+1);
|
||||
break;
|
||||
case 1:
|
||||
Point2_constructor_1(nargout, out, nargin-1, in+1);
|
||||
break;
|
||||
case 2:
|
||||
Point2_constructor_2(nargout, out, nargin-1, in+1);
|
||||
break;
|
||||
case 3:
|
||||
Point2_deconstructor_3(nargout, out, nargin-1, in+1);
|
||||
break;
|
||||
case 4:
|
||||
Point2_argChar_4(nargout, out, nargin-1, in+1);
|
||||
break;
|
||||
case 5:
|
||||
Point2_argUChar_5(nargout, out, nargin-1, in+1);
|
||||
break;
|
||||
case 6:
|
||||
Point2_dim_6(nargout, out, nargin-1, in+1);
|
||||
break;
|
||||
case 7:
|
||||
Point2_returnChar_7(nargout, out, nargin-1, in+1);
|
||||
break;
|
||||
case 8:
|
||||
Point2_vectorConfusion_8(nargout, out, nargin-1, in+1);
|
||||
break;
|
||||
case 9:
|
||||
Point2_x_9(nargout, out, nargin-1, in+1);
|
||||
break;
|
||||
case 10:
|
||||
Point2_y_10(nargout, out, nargin-1, in+1);
|
||||
break;
|
||||
case 11:
|
||||
Point3_constructor_11(nargout, out, nargin-1, in+1);
|
||||
break;
|
||||
case 12:
|
||||
Point3_constructor_12(nargout, out, nargin-1, in+1);
|
||||
break;
|
||||
case 13:
|
||||
Point3_deconstructor_13(nargout, out, nargin-1, in+1);
|
||||
break;
|
||||
case 14:
|
||||
Point3_norm_14(nargout, out, nargin-1, in+1);
|
||||
break;
|
||||
case 15:
|
||||
Point3_StaticFunctionRet_15(nargout, out, nargin-1, in+1);
|
||||
break;
|
||||
case 16:
|
||||
Point3_staticFunction_16(nargout, out, nargin-1, in+1);
|
||||
break;
|
||||
case 17:
|
||||
Test_constructor_17(nargout, out, nargin-1, in+1);
|
||||
break;
|
||||
case 18:
|
||||
Test_constructor_18(nargout, out, nargin-1, in+1);
|
||||
break;
|
||||
case 19:
|
||||
Test_constructor_19(nargout, out, nargin-1, in+1);
|
||||
break;
|
||||
case 20:
|
||||
Test_deconstructor_20(nargout, out, nargin-1, in+1);
|
||||
break;
|
||||
case 21:
|
||||
Test_arg_EigenConstRef_21(nargout, out, nargin-1, in+1);
|
||||
break;
|
||||
case 22:
|
||||
Test_create_MixedPtrs_22(nargout, out, nargin-1, in+1);
|
||||
break;
|
||||
case 23:
|
||||
Test_create_ptrs_23(nargout, out, nargin-1, in+1);
|
||||
break;
|
||||
case 24:
|
||||
Test_print_24(nargout, out, nargin-1, in+1);
|
||||
break;
|
||||
case 25:
|
||||
Test_return_Point2Ptr_25(nargout, out, nargin-1, in+1);
|
||||
break;
|
||||
case 26:
|
||||
Test_return_Test_26(nargout, out, nargin-1, in+1);
|
||||
break;
|
||||
case 27:
|
||||
Test_return_TestPtr_27(nargout, out, nargin-1, in+1);
|
||||
break;
|
||||
case 28:
|
||||
Test_return_bool_28(nargout, out, nargin-1, in+1);
|
||||
break;
|
||||
case 29:
|
||||
Test_return_double_29(nargout, out, nargin-1, in+1);
|
||||
break;
|
||||
case 30:
|
||||
Test_return_field_30(nargout, out, nargin-1, in+1);
|
||||
break;
|
||||
case 31:
|
||||
Test_return_int_31(nargout, out, nargin-1, in+1);
|
||||
break;
|
||||
case 32:
|
||||
Test_return_matrix1_32(nargout, out, nargin-1, in+1);
|
||||
break;
|
||||
case 33:
|
||||
Test_return_matrix2_33(nargout, out, nargin-1, in+1);
|
||||
break;
|
||||
case 34:
|
||||
Test_return_pair_34(nargout, out, nargin-1, in+1);
|
||||
break;
|
||||
case 35:
|
||||
Test_return_ptrs_35(nargout, out, nargin-1, in+1);
|
||||
break;
|
||||
case 36:
|
||||
Test_return_size_t_36(nargout, out, nargin-1, in+1);
|
||||
break;
|
||||
case 37:
|
||||
Test_return_string_37(nargout, out, nargin-1, in+1);
|
||||
break;
|
||||
case 38:
|
||||
Test_return_vector1_38(nargout, out, nargin-1, in+1);
|
||||
break;
|
||||
case 39:
|
||||
Test_return_vector2_39(nargout, out, nargin-1, in+1);
|
||||
break;
|
||||
}
|
||||
|
||||
std::cout.rdbuf(outbuf);
|
||||
}
|
|
@ -1,59 +0,0 @@
|
|||
% automatically generated by wrap
|
||||
echo on
|
||||
|
||||
toolboxpath = mfilename('fullpath');
|
||||
delims = find(toolboxpath == '/' | toolboxpath == '\');
|
||||
toolboxpath = toolboxpath(1:(delims(end)-1));
|
||||
clear delims
|
||||
addpath(toolboxpath);
|
||||
|
||||
%% Point2
|
||||
cd(toolboxpath)
|
||||
mex -O5 new_Point2.cpp
|
||||
|
||||
cd @Point2
|
||||
mex -O5 x.cpp
|
||||
mex -O5 y.cpp
|
||||
mex -O5 dim.cpp
|
||||
mex -O5 returnChar.cpp
|
||||
mex -O5 argChar.cpp
|
||||
mex -O5 argUChar.cpp
|
||||
mex -O5 vectorConfusion.cpp
|
||||
|
||||
%% Point3
|
||||
cd(toolboxpath)
|
||||
mex -O5 new_Point3.cpp
|
||||
mex -O5 Point3_staticFunction.cpp
|
||||
mex -O5 Point3_StaticFunctionRet.cpp
|
||||
|
||||
cd @Point3
|
||||
mex -O5 norm.cpp
|
||||
|
||||
%% Test
|
||||
cd(toolboxpath)
|
||||
mex -O5 new_Test.cpp
|
||||
|
||||
cd @Test
|
||||
mex -O5 return_pair.cpp
|
||||
mex -O5 return_bool.cpp
|
||||
mex -O5 return_size_t.cpp
|
||||
mex -O5 return_int.cpp
|
||||
mex -O5 return_double.cpp
|
||||
mex -O5 return_string.cpp
|
||||
mex -O5 return_vector1.cpp
|
||||
mex -O5 return_matrix1.cpp
|
||||
mex -O5 return_vector2.cpp
|
||||
mex -O5 return_matrix2.cpp
|
||||
mex -O5 arg_EigenConstRef.cpp
|
||||
mex -O5 return_field.cpp
|
||||
mex -O5 return_TestPtr.cpp
|
||||
mex -O5 return_Test.cpp
|
||||
mex -O5 return_Point2Ptr.cpp
|
||||
mex -O5 create_ptrs.cpp
|
||||
mex -O5 create_MixedPtrs.cpp
|
||||
mex -O5 return_ptrs.cpp
|
||||
mex -O5 print.cpp
|
||||
|
||||
cd(toolboxpath)
|
||||
|
||||
echo off
|
|
@ -1,41 +0,0 @@
|
|||
// automatically generated by wrap
|
||||
#include <wrap/matlab.h>
|
||||
#include <Point2.h>
|
||||
typedef boost::shared_ptr<Point2> Shared;
|
||||
|
||||
static std::set<Shared*> collector;
|
||||
|
||||
void cleanup(void) {
|
||||
for(std::set<Shared*>::iterator iter = collector.begin(); iter != collector.end(); ) {
|
||||
delete *iter;
|
||||
collector.erase(iter++);
|
||||
}
|
||||
}
|
||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
mexAtExit(cleanup);
|
||||
|
||||
const mxArray* input = in[0];
|
||||
Shared* self = *(Shared**) mxGetData(input);
|
||||
|
||||
if(self) {
|
||||
if(nargin > 1) {
|
||||
collector.insert(self);
|
||||
}
|
||||
else if(collector.erase(self))
|
||||
delete self;
|
||||
} else {
|
||||
int nc = unwrap<int>(in[1]);
|
||||
|
||||
if(nc == 0)
|
||||
self = new Shared(new Point2());
|
||||
if(nc == 1) {
|
||||
double x = unwrap< double >(in[2]);
|
||||
double y = unwrap< double >(in[3]);
|
||||
self = new Shared(new Point2(x,y));
|
||||
}
|
||||
collector.insert(self);
|
||||
out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL);
|
||||
*reinterpret_cast<Shared**> (mxGetPr(out[0])) = self;
|
||||
}
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
% automatically generated by wrap
|
||||
function result = new_Point2(obj,x,y)
|
||||
error('need to compile new_Point2.cpp');
|
||||
end
|
|
@ -1,41 +0,0 @@
|
|||
// automatically generated by wrap
|
||||
#include <wrap/matlab.h>
|
||||
#include <Point3.h>
|
||||
using namespace geometry;
|
||||
typedef boost::shared_ptr<Point3> Shared;
|
||||
|
||||
static std::set<Shared*> collector;
|
||||
|
||||
void cleanup(void) {
|
||||
for(std::set<Shared*>::iterator iter = collector.begin(); iter != collector.end(); ) {
|
||||
delete *iter;
|
||||
collector.erase(iter++);
|
||||
}
|
||||
}
|
||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
mexAtExit(cleanup);
|
||||
|
||||
const mxArray* input = in[0];
|
||||
Shared* self = *(Shared**) mxGetData(input);
|
||||
|
||||
if(self) {
|
||||
if(nargin > 1) {
|
||||
collector.insert(self);
|
||||
}
|
||||
else if(collector.erase(self))
|
||||
delete self;
|
||||
} else {
|
||||
int nc = unwrap<int>(in[1]);
|
||||
|
||||
if(nc == 0) {
|
||||
double x = unwrap< double >(in[2]);
|
||||
double y = unwrap< double >(in[3]);
|
||||
double z = unwrap< double >(in[4]);
|
||||
self = new Shared(new Point3(x,y,z));
|
||||
}
|
||||
collector.insert(self);
|
||||
out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL);
|
||||
*reinterpret_cast<Shared**> (mxGetPr(out[0])) = self;
|
||||
}
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
% automatically generated by wrap
|
||||
function result = new_Point3(obj,x,y,z)
|
||||
error('need to compile new_Point3.cpp');
|
||||
end
|
|
@ -1,42 +0,0 @@
|
|||
// automatically generated by wrap
|
||||
#include <wrap/matlab.h>
|
||||
#include <folder/path/to/Test.h>
|
||||
using namespace geometry;
|
||||
typedef boost::shared_ptr<Test> Shared;
|
||||
|
||||
static std::set<Shared*> collector;
|
||||
|
||||
void cleanup(void) {
|
||||
for(std::set<Shared*>::iterator iter = collector.begin(); iter != collector.end(); ) {
|
||||
delete *iter;
|
||||
collector.erase(iter++);
|
||||
}
|
||||
}
|
||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
mexAtExit(cleanup);
|
||||
|
||||
const mxArray* input = in[0];
|
||||
Shared* self = *(Shared**) mxGetData(input);
|
||||
|
||||
if(self) {
|
||||
if(nargin > 1) {
|
||||
collector.insert(self);
|
||||
}
|
||||
else if(collector.erase(self))
|
||||
delete self;
|
||||
} else {
|
||||
int nc = unwrap<int>(in[1]);
|
||||
|
||||
if(nc == 0)
|
||||
self = new Shared(new Test());
|
||||
if(nc == 1) {
|
||||
double a = unwrap< double >(in[2]);
|
||||
Matrix b = unwrap< Matrix >(in[3]);
|
||||
self = new Shared(new Test(a,b));
|
||||
}
|
||||
collector.insert(self);
|
||||
out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL);
|
||||
*reinterpret_cast<Shared**> (mxGetPr(out[0])) = self;
|
||||
}
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
% automatically generated by wrap
|
||||
function result = new_Test(obj,a,b)
|
||||
error('need to compile new_Test.cpp');
|
||||
end
|
|
@ -1,21 +0,0 @@
|
|||
% automatically generated by wrap
|
||||
classdef ClassD < handle
|
||||
properties
|
||||
self = 0
|
||||
end
|
||||
methods
|
||||
function obj = ClassD(varargin)
|
||||
if (nargin == 0), obj.self = new_ClassD(0,0); end
|
||||
if nargin ==14, new_ClassD(varargin{1},0); end
|
||||
if nargin ~= 13 && nargin ~= 14 && obj.self == 0, error('ClassD constructor failed'); end
|
||||
end
|
||||
function delete(obj)
|
||||
if obj.self ~= 0
|
||||
new_ClassD(obj.self);
|
||||
obj.self = 0;
|
||||
end
|
||||
end
|
||||
function display(obj), obj.print(''); end
|
||||
function disp(obj), obj.display; end
|
||||
end
|
||||
end
|
|
@ -1,21 +0,0 @@
|
|||
% automatically generated by wrap
|
||||
classdef ns1ClassA < handle
|
||||
properties
|
||||
self = 0
|
||||
end
|
||||
methods
|
||||
function obj = ns1ClassA(varargin)
|
||||
if (nargin == 0), obj.self = new_ns1ClassA(0,0); end
|
||||
if nargin ==14, new_ns1ClassA(varargin{1},0); end
|
||||
if nargin ~= 13 && nargin ~= 14 && obj.self == 0, error('ns1ClassA constructor failed'); end
|
||||
end
|
||||
function delete(obj)
|
||||
if obj.self ~= 0
|
||||
new_ns1ClassA(obj.self);
|
||||
obj.self = 0;
|
||||
end
|
||||
end
|
||||
function display(obj), obj.print(''); end
|
||||
function disp(obj), obj.display; end
|
||||
end
|
||||
end
|
|
@ -1,21 +0,0 @@
|
|||
% automatically generated by wrap
|
||||
classdef ns1ClassB < handle
|
||||
properties
|
||||
self = 0
|
||||
end
|
||||
methods
|
||||
function obj = ns1ClassB(varargin)
|
||||
if (nargin == 0), obj.self = new_ns1ClassB(0,0); end
|
||||
if nargin ==14, new_ns1ClassB(varargin{1},0); end
|
||||
if nargin ~= 13 && nargin ~= 14 && obj.self == 0, error('ns1ClassB constructor failed'); end
|
||||
end
|
||||
function delete(obj)
|
||||
if obj.self ~= 0
|
||||
new_ns1ClassB(obj.self);
|
||||
obj.self = 0;
|
||||
end
|
||||
end
|
||||
function display(obj), obj.print(''); end
|
||||
function disp(obj), obj.display; end
|
||||
end
|
||||
end
|
|
@ -1,12 +0,0 @@
|
|||
// automatically generated by wrap
|
||||
#include <wrap/matlab.h>
|
||||
#include <path/to/ns2.h>
|
||||
#include <path/to/ns2/ClassA.h>
|
||||
typedef boost::shared_ptr<ns2::ClassA> Shared;
|
||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("memberFunction",nargout,nargin-1,0);
|
||||
Shared obj = unwrap_shared_ptr<ns2::ClassA>(in[0], "ns2::ClassA");
|
||||
double result = obj->memberFunction();
|
||||
out[0] = wrap< double >(result);
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
% result = obj.memberFunction()
|
||||
function result = memberFunction(obj)
|
||||
error('need to compile memberFunction.cpp');
|
||||
end
|
|
@ -1,21 +0,0 @@
|
|||
% automatically generated by wrap
|
||||
classdef ns2ClassA < handle
|
||||
properties
|
||||
self = 0
|
||||
end
|
||||
methods
|
||||
function obj = ns2ClassA(varargin)
|
||||
if (nargin == 0), obj.self = new_ns2ClassA(0,0); end
|
||||
if nargin ==14, new_ns2ClassA(varargin{1},0); end
|
||||
if nargin ~= 13 && nargin ~= 14 && obj.self == 0, error('ns2ClassA constructor failed'); end
|
||||
end
|
||||
function delete(obj)
|
||||
if obj.self ~= 0
|
||||
new_ns2ClassA(obj.self);
|
||||
obj.self = 0;
|
||||
end
|
||||
end
|
||||
function display(obj), obj.print(''); end
|
||||
function disp(obj), obj.display; end
|
||||
end
|
||||
end
|
|
@ -1,13 +0,0 @@
|
|||
// automatically generated by wrap
|
||||
#include <wrap/matlab.h>
|
||||
#include <path/to/ns2.h>
|
||||
#include <path/to/ns2/ClassA.h>
|
||||
typedef boost::shared_ptr<ns2::ClassA> Shared;
|
||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("nsArg",nargout,nargin-1,1);
|
||||
Shared obj = unwrap_shared_ptr<ns2::ClassA>(in[0], "ns2::ClassA");
|
||||
ns1::ClassB& arg = *unwrap_shared_ptr< ns1::ClassB >(in[1], "ns1ClassB");
|
||||
int result = obj->nsArg(arg);
|
||||
out[0] = wrap< int >(result);
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
% result = obj.nsArg(arg)
|
||||
function result = nsArg(obj,arg)
|
||||
error('need to compile nsArg.cpp');
|
||||
end
|
|
@ -1,15 +0,0 @@
|
|||
// automatically generated by wrap
|
||||
#include <wrap/matlab.h>
|
||||
#include <path/to/ns2.h>
|
||||
#include <path/to/ns2/ClassA.h>
|
||||
typedef boost::shared_ptr<ns2::ns3::ClassB> SharedClassB;
|
||||
typedef boost::shared_ptr<ns2::ClassA> Shared;
|
||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("nsReturn",nargout,nargin-1,1);
|
||||
Shared obj = unwrap_shared_ptr<ns2::ClassA>(in[0], "ns2::ClassA");
|
||||
double q = unwrap< double >(in[1]);
|
||||
ns2::ns3::ClassB result = obj->nsReturn(q);
|
||||
SharedClassB* ret = new SharedClassB(new ns2::ns3::ClassB(result));
|
||||
out[0] = wrap_collect_shared_ptr(ret,"ns2ns3ClassB");
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
% result = obj.nsReturn(q)
|
||||
function result = nsReturn(obj,q)
|
||||
error('need to compile nsReturn.cpp');
|
||||
end
|
|
@ -1,21 +0,0 @@
|
|||
% automatically generated by wrap
|
||||
classdef ns2ClassC < handle
|
||||
properties
|
||||
self = 0
|
||||
end
|
||||
methods
|
||||
function obj = ns2ClassC(varargin)
|
||||
if (nargin == 0), obj.self = new_ns2ClassC(0,0); end
|
||||
if nargin ==14, new_ns2ClassC(varargin{1},0); end
|
||||
if nargin ~= 13 && nargin ~= 14 && obj.self == 0, error('ns2ClassC constructor failed'); end
|
||||
end
|
||||
function delete(obj)
|
||||
if obj.self ~= 0
|
||||
new_ns2ClassC(obj.self);
|
||||
obj.self = 0;
|
||||
end
|
||||
end
|
||||
function display(obj), obj.print(''); end
|
||||
function disp(obj), obj.display; end
|
||||
end
|
||||
end
|
|
@ -1,21 +0,0 @@
|
|||
% automatically generated by wrap
|
||||
classdef ns2ns3ClassB < handle
|
||||
properties
|
||||
self = 0
|
||||
end
|
||||
methods
|
||||
function obj = ns2ns3ClassB(varargin)
|
||||
if (nargin == 0), obj.self = new_ns2ns3ClassB(0,0); end
|
||||
if nargin ==14, new_ns2ns3ClassB(varargin{1},0); end
|
||||
if nargin ~= 13 && nargin ~= 14 && obj.self == 0, error('ns2ns3ClassB constructor failed'); end
|
||||
end
|
||||
function delete(obj)
|
||||
if obj.self ~= 0
|
||||
new_ns2ns3ClassB(obj.self);
|
||||
obj.self = 0;
|
||||
end
|
||||
end
|
||||
function display(obj), obj.print(''); end
|
||||
function disp(obj), obj.display; end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,30 @@
|
|||
% automatically generated by wrap
|
||||
classdef ClassD < handle
|
||||
properties
|
||||
self = 0
|
||||
end
|
||||
methods
|
||||
function obj = ClassD(varargin)
|
||||
if nargin == 2 && isa(varargin{1}, 'uint64') && varargin{1} == uint64(5139824614673773682)
|
||||
obj.self = varargin{2};
|
||||
testNamespaces_wrapper(obj.self);
|
||||
elseif nargin == 0
|
||||
obj.self = testNamespaces_wrapper(20);
|
||||
else
|
||||
error('Arguments do not match any overload of ClassD constructor');
|
||||
end
|
||||
end
|
||||
|
||||
function delete(obj)
|
||||
testNamespaces_wrapper(21, obj.self);
|
||||
end
|
||||
|
||||
function display(obj), obj.print(''); end
|
||||
|
||||
function disp(obj), obj.display; end
|
||||
|
||||
end
|
||||
|
||||
methods(Static = true)
|
||||
end
|
||||
end
|
|
@ -1,65 +0,0 @@
|
|||
# automatically generated by wrap
|
||||
|
||||
MEX = mex
|
||||
MEXENDING = mexa64
|
||||
PATH_TO_WRAP = /not_really_a_real_path/borg/gtsam/wrap
|
||||
mex_flags = -O5
|
||||
|
||||
all: ns1ClassA ns1ClassB ns2ClassA ns2ns3ClassB ns2ClassC ClassD
|
||||
|
||||
# ns1ClassA
|
||||
new_ns1ClassA.$(MEXENDING): new_ns1ClassA.cpp $(PATH_TO_WRAP)/matlab.h
|
||||
$(MEX) $(mex_flags) new_ns1ClassA.cpp -output new_ns1ClassA
|
||||
|
||||
ns1ClassA: new_ns1ClassA.$(MEXENDING)
|
||||
|
||||
# ns1ClassB
|
||||
new_ns1ClassB.$(MEXENDING): new_ns1ClassB.cpp $(PATH_TO_WRAP)/matlab.h
|
||||
$(MEX) $(mex_flags) new_ns1ClassB.cpp -output new_ns1ClassB
|
||||
|
||||
ns1ClassB: new_ns1ClassB.$(MEXENDING)
|
||||
|
||||
# ns2ClassA
|
||||
new_ns2ClassA.$(MEXENDING): new_ns2ClassA.cpp $(PATH_TO_WRAP)/matlab.h
|
||||
$(MEX) $(mex_flags) new_ns2ClassA.cpp -output new_ns2ClassA
|
||||
ns2ClassA_afunction.$(MEXENDING): ns2ClassA_afunction.cpp $(PATH_TO_WRAP)/matlab.h
|
||||
$(MEX) $(mex_flags) ns2ClassA_afunction.cpp -output ns2ClassA_afunction
|
||||
@ns2ClassA/memberFunction.$(MEXENDING): @ns2ClassA/memberFunction.cpp $(PATH_TO_WRAP)/matlab.h
|
||||
$(MEX) $(mex_flags) @ns2ClassA/memberFunction.cpp -output @ns2ClassA/memberFunction
|
||||
@ns2ClassA/nsArg.$(MEXENDING): @ns2ClassA/nsArg.cpp $(PATH_TO_WRAP)/matlab.h
|
||||
$(MEX) $(mex_flags) @ns2ClassA/nsArg.cpp -output @ns2ClassA/nsArg
|
||||
@ns2ClassA/nsReturn.$(MEXENDING): @ns2ClassA/nsReturn.cpp $(PATH_TO_WRAP)/matlab.h
|
||||
$(MEX) $(mex_flags) @ns2ClassA/nsReturn.cpp -output @ns2ClassA/nsReturn
|
||||
|
||||
ns2ClassA: new_ns2ClassA.$(MEXENDING) ns2ClassA_afunction.$(MEXENDING) @ns2ClassA/memberFunction.$(MEXENDING) @ns2ClassA/nsArg.$(MEXENDING) @ns2ClassA/nsReturn.$(MEXENDING)
|
||||
|
||||
# ns2ns3ClassB
|
||||
new_ns2ns3ClassB.$(MEXENDING): new_ns2ns3ClassB.cpp $(PATH_TO_WRAP)/matlab.h
|
||||
$(MEX) $(mex_flags) new_ns2ns3ClassB.cpp -output new_ns2ns3ClassB
|
||||
|
||||
ns2ns3ClassB: new_ns2ns3ClassB.$(MEXENDING)
|
||||
|
||||
# ns2ClassC
|
||||
new_ns2ClassC.$(MEXENDING): new_ns2ClassC.cpp $(PATH_TO_WRAP)/matlab.h
|
||||
$(MEX) $(mex_flags) new_ns2ClassC.cpp -output new_ns2ClassC
|
||||
|
||||
ns2ClassC: new_ns2ClassC.$(MEXENDING)
|
||||
|
||||
# ClassD
|
||||
new_ClassD.$(MEXENDING): new_ClassD.cpp $(PATH_TO_WRAP)/matlab.h
|
||||
$(MEX) $(mex_flags) new_ClassD.cpp -output new_ClassD
|
||||
|
||||
ClassD: new_ClassD.$(MEXENDING)
|
||||
|
||||
|
||||
|
||||
clean:
|
||||
rm -rf *.$(MEXENDING)
|
||||
rm -rf @ns1ClassA/*.$(MEXENDING)
|
||||
rm -rf @ns1ClassB/*.$(MEXENDING)
|
||||
rm -rf @ns2ClassA/*.$(MEXENDING)
|
||||
rm -rf @ns2ns3ClassB/*.$(MEXENDING)
|
||||
rm -rf @ns2ClassC/*.$(MEXENDING)
|
||||
rm -rf @ClassD/*.$(MEXENDING)
|
||||
|
||||
|
|
@ -1,52 +0,0 @@
|
|||
% automatically generated by wrap
|
||||
echo on
|
||||
|
||||
toolboxpath = mfilename('fullpath');
|
||||
delims = find(toolboxpath == '/' | toolboxpath == '\');
|
||||
toolboxpath = toolboxpath(1:(delims(end)-1));
|
||||
clear delims
|
||||
addpath(toolboxpath);
|
||||
|
||||
%% ns1ClassA
|
||||
cd(toolboxpath)
|
||||
mex -O5 new_ns1ClassA.cpp
|
||||
|
||||
cd @ns1ClassA
|
||||
|
||||
%% ns1ClassB
|
||||
cd(toolboxpath)
|
||||
mex -O5 new_ns1ClassB.cpp
|
||||
|
||||
cd @ns1ClassB
|
||||
|
||||
%% ns2ClassA
|
||||
cd(toolboxpath)
|
||||
mex -O5 new_ns2ClassA.cpp
|
||||
mex -O5 ns2ClassA_afunction.cpp
|
||||
|
||||
cd @ns2ClassA
|
||||
mex -O5 memberFunction.cpp
|
||||
mex -O5 nsArg.cpp
|
||||
mex -O5 nsReturn.cpp
|
||||
|
||||
%% ns2ns3ClassB
|
||||
cd(toolboxpath)
|
||||
mex -O5 new_ns2ns3ClassB.cpp
|
||||
|
||||
cd @ns2ns3ClassB
|
||||
|
||||
%% ns2ClassC
|
||||
cd(toolboxpath)
|
||||
mex -O5 new_ns2ClassC.cpp
|
||||
|
||||
cd @ns2ClassC
|
||||
|
||||
%% ClassD
|
||||
cd(toolboxpath)
|
||||
mex -O5 new_ClassD.cpp
|
||||
|
||||
cd @ClassD
|
||||
|
||||
cd(toolboxpath)
|
||||
|
||||
echo off
|
|
@ -1,36 +0,0 @@
|
|||
// automatically generated by wrap
|
||||
#include <wrap/matlab.h>
|
||||
#include <ClassD.h>
|
||||
typedef boost::shared_ptr<ClassD> Shared;
|
||||
|
||||
static std::set<Shared*> collector;
|
||||
|
||||
void cleanup(void) {
|
||||
for(std::set<Shared*>::iterator iter = collector.begin(); iter != collector.end(); ) {
|
||||
delete *iter;
|
||||
collector.erase(iter++);
|
||||
}
|
||||
}
|
||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
mexAtExit(cleanup);
|
||||
|
||||
const mxArray* input = in[0];
|
||||
Shared* self = *(Shared**) mxGetData(input);
|
||||
|
||||
if(self) {
|
||||
if(nargin > 1) {
|
||||
collector.insert(self);
|
||||
}
|
||||
else if(collector.erase(self))
|
||||
delete self;
|
||||
} else {
|
||||
int nc = unwrap<int>(in[1]);
|
||||
|
||||
if(nc == 0)
|
||||
self = new Shared(new ClassD());
|
||||
collector.insert(self);
|
||||
out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL);
|
||||
*reinterpret_cast<Shared**> (mxGetPr(out[0])) = self;
|
||||
}
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
% automatically generated by wrap
|
||||
function result = new_ClassD(obj)
|
||||
error('need to compile new_ClassD.cpp');
|
||||
end
|
|
@ -1,36 +0,0 @@
|
|||
// automatically generated by wrap
|
||||
#include <wrap/matlab.h>
|
||||
#include <path/to/ns1.h>
|
||||
typedef boost::shared_ptr<ns1::ClassA> Shared;
|
||||
|
||||
static std::set<Shared*> collector;
|
||||
|
||||
void cleanup(void) {
|
||||
for(std::set<Shared*>::iterator iter = collector.begin(); iter != collector.end(); ) {
|
||||
delete *iter;
|
||||
collector.erase(iter++);
|
||||
}
|
||||
}
|
||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
mexAtExit(cleanup);
|
||||
|
||||
const mxArray* input = in[0];
|
||||
Shared* self = *(Shared**) mxGetData(input);
|
||||
|
||||
if(self) {
|
||||
if(nargin > 1) {
|
||||
collector.insert(self);
|
||||
}
|
||||
else if(collector.erase(self))
|
||||
delete self;
|
||||
} else {
|
||||
int nc = unwrap<int>(in[1]);
|
||||
|
||||
if(nc == 0)
|
||||
self = new Shared(new ns1::ClassA());
|
||||
collector.insert(self);
|
||||
out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL);
|
||||
*reinterpret_cast<Shared**> (mxGetPr(out[0])) = self;
|
||||
}
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
% automatically generated by wrap
|
||||
function result = new_ns1ClassA(obj)
|
||||
error('need to compile new_ns1ClassA.cpp');
|
||||
end
|
|
@ -1,37 +0,0 @@
|
|||
// automatically generated by wrap
|
||||
#include <wrap/matlab.h>
|
||||
#include <path/to/ns1.h>
|
||||
#include <path/to/ns1/ClassB.h>
|
||||
typedef boost::shared_ptr<ns1::ClassB> Shared;
|
||||
|
||||
static std::set<Shared*> collector;
|
||||
|
||||
void cleanup(void) {
|
||||
for(std::set<Shared*>::iterator iter = collector.begin(); iter != collector.end(); ) {
|
||||
delete *iter;
|
||||
collector.erase(iter++);
|
||||
}
|
||||
}
|
||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
mexAtExit(cleanup);
|
||||
|
||||
const mxArray* input = in[0];
|
||||
Shared* self = *(Shared**) mxGetData(input);
|
||||
|
||||
if(self) {
|
||||
if(nargin > 1) {
|
||||
collector.insert(self);
|
||||
}
|
||||
else if(collector.erase(self))
|
||||
delete self;
|
||||
} else {
|
||||
int nc = unwrap<int>(in[1]);
|
||||
|
||||
if(nc == 0)
|
||||
self = new Shared(new ns1::ClassB());
|
||||
collector.insert(self);
|
||||
out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL);
|
||||
*reinterpret_cast<Shared**> (mxGetPr(out[0])) = self;
|
||||
}
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
% automatically generated by wrap
|
||||
function result = new_ns1ClassB(obj)
|
||||
error('need to compile new_ns1ClassB.cpp');
|
||||
end
|
|
@ -1,37 +0,0 @@
|
|||
// automatically generated by wrap
|
||||
#include <wrap/matlab.h>
|
||||
#include <path/to/ns2.h>
|
||||
#include <path/to/ns2/ClassA.h>
|
||||
typedef boost::shared_ptr<ns2::ClassA> Shared;
|
||||
|
||||
static std::set<Shared*> collector;
|
||||
|
||||
void cleanup(void) {
|
||||
for(std::set<Shared*>::iterator iter = collector.begin(); iter != collector.end(); ) {
|
||||
delete *iter;
|
||||
collector.erase(iter++);
|
||||
}
|
||||
}
|
||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
mexAtExit(cleanup);
|
||||
|
||||
const mxArray* input = in[0];
|
||||
Shared* self = *(Shared**) mxGetData(input);
|
||||
|
||||
if(self) {
|
||||
if(nargin > 1) {
|
||||
collector.insert(self);
|
||||
}
|
||||
else if(collector.erase(self))
|
||||
delete self;
|
||||
} else {
|
||||
int nc = unwrap<int>(in[1]);
|
||||
|
||||
if(nc == 0)
|
||||
self = new Shared(new ns2::ClassA());
|
||||
collector.insert(self);
|
||||
out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL);
|
||||
*reinterpret_cast<Shared**> (mxGetPr(out[0])) = self;
|
||||
}
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
% automatically generated by wrap
|
||||
function result = new_ns2ClassA(obj)
|
||||
error('need to compile new_ns2ClassA.cpp');
|
||||
end
|
|
@ -1,36 +0,0 @@
|
|||
// automatically generated by wrap
|
||||
#include <wrap/matlab.h>
|
||||
#include <path/to/ns2.h>
|
||||
typedef boost::shared_ptr<ns2::ClassC> Shared;
|
||||
|
||||
static std::set<Shared*> collector;
|
||||
|
||||
void cleanup(void) {
|
||||
for(std::set<Shared*>::iterator iter = collector.begin(); iter != collector.end(); ) {
|
||||
delete *iter;
|
||||
collector.erase(iter++);
|
||||
}
|
||||
}
|
||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
mexAtExit(cleanup);
|
||||
|
||||
const mxArray* input = in[0];
|
||||
Shared* self = *(Shared**) mxGetData(input);
|
||||
|
||||
if(self) {
|
||||
if(nargin > 1) {
|
||||
collector.insert(self);
|
||||
}
|
||||
else if(collector.erase(self))
|
||||
delete self;
|
||||
} else {
|
||||
int nc = unwrap<int>(in[1]);
|
||||
|
||||
if(nc == 0)
|
||||
self = new Shared(new ns2::ClassC());
|
||||
collector.insert(self);
|
||||
out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL);
|
||||
*reinterpret_cast<Shared**> (mxGetPr(out[0])) = self;
|
||||
}
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
% automatically generated by wrap
|
||||
function result = new_ns2ClassC(obj)
|
||||
error('need to compile new_ns2ClassC.cpp');
|
||||
end
|
|
@ -1,37 +0,0 @@
|
|||
// automatically generated by wrap
|
||||
#include <wrap/matlab.h>
|
||||
#include <path/to/ns2.h>
|
||||
#include <path/to/ns3.h>
|
||||
typedef boost::shared_ptr<ns2::ns3::ClassB> Shared;
|
||||
|
||||
static std::set<Shared*> collector;
|
||||
|
||||
void cleanup(void) {
|
||||
for(std::set<Shared*>::iterator iter = collector.begin(); iter != collector.end(); ) {
|
||||
delete *iter;
|
||||
collector.erase(iter++);
|
||||
}
|
||||
}
|
||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
mexAtExit(cleanup);
|
||||
|
||||
const mxArray* input = in[0];
|
||||
Shared* self = *(Shared**) mxGetData(input);
|
||||
|
||||
if(self) {
|
||||
if(nargin > 1) {
|
||||
collector.insert(self);
|
||||
}
|
||||
else if(collector.erase(self))
|
||||
delete self;
|
||||
} else {
|
||||
int nc = unwrap<int>(in[1]);
|
||||
|
||||
if(nc == 0)
|
||||
self = new Shared(new ns2::ns3::ClassB());
|
||||
collector.insert(self);
|
||||
out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL);
|
||||
*reinterpret_cast<Shared**> (mxGetPr(out[0])) = self;
|
||||
}
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
% automatically generated by wrap
|
||||
function result = new_ns2ns3ClassB(obj)
|
||||
error('need to compile new_ns2ns3ClassB.cpp');
|
||||
end
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue