diff --git a/wrap/tests/expected/@Point2/Point2.m b/wrap/tests/expected/@Point2/Point2.m deleted file mode 100644 index 5cfd7fc61..000000000 --- a/wrap/tests/expected/@Point2/Point2.m +++ /dev/null @@ -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 diff --git a/wrap/tests/expected/@Point2/argChar.cpp b/wrap/tests/expected/@Point2/argChar.cpp deleted file mode 100644 index d0e9a7a7a..000000000 --- a/wrap/tests/expected/@Point2/argChar.cpp +++ /dev/null @@ -1,11 +0,0 @@ -// automatically generated by wrap -#include -#include -typedef boost::shared_ptr Shared; -void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) -{ - checkArguments("argChar",nargout,nargin-1,1); - Shared obj = unwrap_shared_ptr(in[0], "Point2"); - char a = unwrap< char >(in[1]); - obj->argChar(a); -} diff --git a/wrap/tests/expected/@Point2/argChar.m b/wrap/tests/expected/@Point2/argChar.m deleted file mode 100644 index 6c935a1d6..000000000 --- a/wrap/tests/expected/@Point2/argChar.m +++ /dev/null @@ -1,4 +0,0 @@ -% result = obj.argChar(a) -function result = argChar(obj,a) - error('need to compile argChar.cpp'); -end diff --git a/wrap/tests/expected/@Point2/argUChar.cpp b/wrap/tests/expected/@Point2/argUChar.cpp deleted file mode 100644 index 06e62c36b..000000000 --- a/wrap/tests/expected/@Point2/argUChar.cpp +++ /dev/null @@ -1,11 +0,0 @@ -// automatically generated by wrap -#include -#include -typedef boost::shared_ptr Shared; -void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) -{ - checkArguments("argUChar",nargout,nargin-1,1); - Shared obj = unwrap_shared_ptr(in[0], "Point2"); - unsigned char a = unwrap< unsigned char >(in[1]); - obj->argUChar(a); -} diff --git a/wrap/tests/expected/@Point2/argUChar.m b/wrap/tests/expected/@Point2/argUChar.m deleted file mode 100644 index ea42a2b4f..000000000 --- a/wrap/tests/expected/@Point2/argUChar.m +++ /dev/null @@ -1,4 +0,0 @@ -% result = obj.argUChar(a) -function result = argUChar(obj,a) - error('need to compile argUChar.cpp'); -end diff --git a/wrap/tests/expected/@Point2/dim.cpp b/wrap/tests/expected/@Point2/dim.cpp deleted file mode 100644 index a7e938a16..000000000 --- a/wrap/tests/expected/@Point2/dim.cpp +++ /dev/null @@ -1,11 +0,0 @@ -// automatically generated by wrap -#include -#include -typedef boost::shared_ptr Shared; -void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) -{ - checkArguments("dim",nargout,nargin-1,0); - Shared obj = unwrap_shared_ptr(in[0], "Point2"); - int result = obj->dim(); - out[0] = wrap< int >(result); -} diff --git a/wrap/tests/expected/@Point2/dim.m b/wrap/tests/expected/@Point2/dim.m deleted file mode 100644 index 934e0b895..000000000 --- a/wrap/tests/expected/@Point2/dim.m +++ /dev/null @@ -1,4 +0,0 @@ -% result = obj.dim() -function result = dim(obj) - error('need to compile dim.cpp'); -end diff --git a/wrap/tests/expected/@Point2/returnChar.cpp b/wrap/tests/expected/@Point2/returnChar.cpp deleted file mode 100644 index ed6f34190..000000000 --- a/wrap/tests/expected/@Point2/returnChar.cpp +++ /dev/null @@ -1,11 +0,0 @@ -// automatically generated by wrap -#include -#include -typedef boost::shared_ptr Shared; -void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) -{ - checkArguments("returnChar",nargout,nargin-1,0); - Shared obj = unwrap_shared_ptr(in[0], "Point2"); - char result = obj->returnChar(); - out[0] = wrap< char >(result); -} diff --git a/wrap/tests/expected/@Point2/returnChar.m b/wrap/tests/expected/@Point2/returnChar.m deleted file mode 100644 index 8c3ceee35..000000000 --- a/wrap/tests/expected/@Point2/returnChar.m +++ /dev/null @@ -1,4 +0,0 @@ -% result = obj.returnChar() -function result = returnChar(obj) - error('need to compile returnChar.cpp'); -end diff --git a/wrap/tests/expected/@Point2/vectorConfusion.cpp b/wrap/tests/expected/@Point2/vectorConfusion.cpp deleted file mode 100644 index 3e2982803..000000000 --- a/wrap/tests/expected/@Point2/vectorConfusion.cpp +++ /dev/null @@ -1,13 +0,0 @@ -// automatically generated by wrap -#include -#include -typedef boost::shared_ptr SharedVectorNotEigen; -typedef boost::shared_ptr Shared; -void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) -{ - checkArguments("vectorConfusion",nargout,nargin-1,0); - Shared obj = unwrap_shared_ptr(in[0], "Point2"); - VectorNotEigen result = obj->vectorConfusion(); - SharedVectorNotEigen* ret = new SharedVectorNotEigen(new VectorNotEigen(result)); - out[0] = wrap_collect_shared_ptr(ret,"VectorNotEigen"); -} diff --git a/wrap/tests/expected/@Point2/vectorConfusion.m b/wrap/tests/expected/@Point2/vectorConfusion.m deleted file mode 100644 index 9966c930d..000000000 --- a/wrap/tests/expected/@Point2/vectorConfusion.m +++ /dev/null @@ -1,4 +0,0 @@ -% result = obj.vectorConfusion() -function result = vectorConfusion(obj) - error('need to compile vectorConfusion.cpp'); -end diff --git a/wrap/tests/expected/@Point2/x.cpp b/wrap/tests/expected/@Point2/x.cpp deleted file mode 100644 index 273eb7834..000000000 --- a/wrap/tests/expected/@Point2/x.cpp +++ /dev/null @@ -1,11 +0,0 @@ -// automatically generated by wrap -#include -#include -typedef boost::shared_ptr Shared; -void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) -{ - checkArguments("x",nargout,nargin-1,0); - Shared obj = unwrap_shared_ptr(in[0], "Point2"); - double result = obj->x(); - out[0] = wrap< double >(result); -} diff --git a/wrap/tests/expected/@Point2/x.m b/wrap/tests/expected/@Point2/x.m deleted file mode 100644 index 44f069872..000000000 --- a/wrap/tests/expected/@Point2/x.m +++ /dev/null @@ -1,4 +0,0 @@ -% result = obj.x() -function result = x(obj) - error('need to compile x.cpp'); -end diff --git a/wrap/tests/expected/@Point2/y.cpp b/wrap/tests/expected/@Point2/y.cpp deleted file mode 100644 index 44f824fb0..000000000 --- a/wrap/tests/expected/@Point2/y.cpp +++ /dev/null @@ -1,11 +0,0 @@ -// automatically generated by wrap -#include -#include -typedef boost::shared_ptr Shared; -void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) -{ - checkArguments("y",nargout,nargin-1,0); - Shared obj = unwrap_shared_ptr(in[0], "Point2"); - double result = obj->y(); - out[0] = wrap< double >(result); -} diff --git a/wrap/tests/expected/@Point2/y.m b/wrap/tests/expected/@Point2/y.m deleted file mode 100644 index 7971c1e33..000000000 --- a/wrap/tests/expected/@Point2/y.m +++ /dev/null @@ -1,4 +0,0 @@ -% result = obj.y() -function result = y(obj) - error('need to compile y.cpp'); -end diff --git a/wrap/tests/expected/@Point3/Point3.m b/wrap/tests/expected/@Point3/Point3.m deleted file mode 100644 index 81bd00a5a..000000000 --- a/wrap/tests/expected/@Point3/Point3.m +++ /dev/null @@ -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 diff --git a/wrap/tests/expected/@Point3/norm.cpp b/wrap/tests/expected/@Point3/norm.cpp deleted file mode 100644 index dd5c726ee..000000000 --- a/wrap/tests/expected/@Point3/norm.cpp +++ /dev/null @@ -1,12 +0,0 @@ -// automatically generated by wrap -#include -#include -using namespace geometry; -typedef boost::shared_ptr Shared; -void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) -{ - checkArguments("norm",nargout,nargin-1,0); - Shared obj = unwrap_shared_ptr(in[0], "Point3"); - double result = obj->norm(); - out[0] = wrap< double >(result); -} diff --git a/wrap/tests/expected/@Point3/norm.m b/wrap/tests/expected/@Point3/norm.m deleted file mode 100644 index ad925e85d..000000000 --- a/wrap/tests/expected/@Point3/norm.m +++ /dev/null @@ -1,4 +0,0 @@ -% result = obj.norm() -function result = norm(obj) - error('need to compile norm.cpp'); -end diff --git a/wrap/tests/expected/@Test/Test.m b/wrap/tests/expected/@Test/Test.m deleted file mode 100644 index 63914d2aa..000000000 --- a/wrap/tests/expected/@Test/Test.m +++ /dev/null @@ -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 diff --git a/wrap/tests/expected/@Test/arg_EigenConstRef.cpp b/wrap/tests/expected/@Test/arg_EigenConstRef.cpp deleted file mode 100644 index a6a384870..000000000 --- a/wrap/tests/expected/@Test/arg_EigenConstRef.cpp +++ /dev/null @@ -1,12 +0,0 @@ -// automatically generated by wrap -#include -#include -using namespace geometry; -typedef boost::shared_ptr Shared; -void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) -{ - checkArguments("arg_EigenConstRef",nargout,nargin-1,1); - Shared obj = unwrap_shared_ptr(in[0], "Test"); - Matrix& value = *unwrap_shared_ptr< Matrix >(in[1], "Matrix"); - obj->arg_EigenConstRef(value); -} diff --git a/wrap/tests/expected/@Test/arg_EigenConstRef.m b/wrap/tests/expected/@Test/arg_EigenConstRef.m deleted file mode 100644 index c348014c1..000000000 --- a/wrap/tests/expected/@Test/arg_EigenConstRef.m +++ /dev/null @@ -1,4 +0,0 @@ -% result = obj.arg_EigenConstRef(value) -function result = arg_EigenConstRef(obj,value) - error('need to compile arg_EigenConstRef.cpp'); -end diff --git a/wrap/tests/expected/@Test/create_MixedPtrs.cpp b/wrap/tests/expected/@Test/create_MixedPtrs.cpp deleted file mode 100644 index 21010eb0c..000000000 --- a/wrap/tests/expected/@Test/create_MixedPtrs.cpp +++ /dev/null @@ -1,17 +0,0 @@ -// automatically generated by wrap -#include -#include -using namespace geometry; -typedef boost::shared_ptr SharedTest; -typedef boost::shared_ptr SharedTest; -typedef boost::shared_ptr Shared; -void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) -{ - checkArguments("create_MixedPtrs",nargout,nargin-1,0); - Shared obj = unwrap_shared_ptr(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"); -} diff --git a/wrap/tests/expected/@Test/create_MixedPtrs.m b/wrap/tests/expected/@Test/create_MixedPtrs.m deleted file mode 100644 index 38a9f1d7e..000000000 --- a/wrap/tests/expected/@Test/create_MixedPtrs.m +++ /dev/null @@ -1,4 +0,0 @@ -% [first,second] = obj.create_MixedPtrs() -function [first,second] = create_MixedPtrs(obj) - error('need to compile create_MixedPtrs.cpp'); -end diff --git a/wrap/tests/expected/@Test/create_ptrs.cpp b/wrap/tests/expected/@Test/create_ptrs.cpp deleted file mode 100644 index b51c3f00e..000000000 --- a/wrap/tests/expected/@Test/create_ptrs.cpp +++ /dev/null @@ -1,17 +0,0 @@ -// automatically generated by wrap -#include -#include -using namespace geometry; -typedef boost::shared_ptr SharedTest; -typedef boost::shared_ptr SharedTest; -typedef boost::shared_ptr Shared; -void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) -{ - checkArguments("create_ptrs",nargout,nargin-1,0); - Shared obj = unwrap_shared_ptr(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"); -} diff --git a/wrap/tests/expected/@Test/create_ptrs.m b/wrap/tests/expected/@Test/create_ptrs.m deleted file mode 100644 index 80c6781dc..000000000 --- a/wrap/tests/expected/@Test/create_ptrs.m +++ /dev/null @@ -1,4 +0,0 @@ -% [first,second] = obj.create_ptrs() -function [first,second] = create_ptrs(obj) - error('need to compile create_ptrs.cpp'); -end diff --git a/wrap/tests/expected/@Test/print.cpp b/wrap/tests/expected/@Test/print.cpp deleted file mode 100644 index 3cf9cd14d..000000000 --- a/wrap/tests/expected/@Test/print.cpp +++ /dev/null @@ -1,11 +0,0 @@ -// automatically generated by wrap -#include -#include -using namespace geometry; -typedef boost::shared_ptr Shared; -void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) -{ - checkArguments("print",nargout,nargin-1,0); - Shared obj = unwrap_shared_ptr(in[0], "Test"); - obj->print(); -} diff --git a/wrap/tests/expected/@Test/print.m b/wrap/tests/expected/@Test/print.m deleted file mode 100644 index ca6bf4769..000000000 --- a/wrap/tests/expected/@Test/print.m +++ /dev/null @@ -1,4 +0,0 @@ -% result = obj.print() -function result = print(obj) - error('need to compile print.cpp'); -end diff --git a/wrap/tests/expected/@Test/return_Point2Ptr.cpp b/wrap/tests/expected/@Test/return_Point2Ptr.cpp deleted file mode 100644 index 0d8650e84..000000000 --- a/wrap/tests/expected/@Test/return_Point2Ptr.cpp +++ /dev/null @@ -1,15 +0,0 @@ -// automatically generated by wrap -#include -#include -using namespace geometry; -typedef boost::shared_ptr SharedPoint2; -typedef boost::shared_ptr Shared; -void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) -{ - checkArguments("return_Point2Ptr",nargout,nargin-1,1); - Shared obj = unwrap_shared_ptr(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"); -} diff --git a/wrap/tests/expected/@Test/return_Point2Ptr.m b/wrap/tests/expected/@Test/return_Point2Ptr.m deleted file mode 100644 index 84e586bc7..000000000 --- a/wrap/tests/expected/@Test/return_Point2Ptr.m +++ /dev/null @@ -1,4 +0,0 @@ -% result = obj.return_Point2Ptr(value) -function result = return_Point2Ptr(obj,value) - error('need to compile return_Point2Ptr.cpp'); -end diff --git a/wrap/tests/expected/@Test/return_Test.cpp b/wrap/tests/expected/@Test/return_Test.cpp deleted file mode 100644 index fb3ad822c..000000000 --- a/wrap/tests/expected/@Test/return_Test.cpp +++ /dev/null @@ -1,15 +0,0 @@ -// automatically generated by wrap -#include -#include -using namespace geometry; -typedef boost::shared_ptr SharedTest; -typedef boost::shared_ptr Shared; -void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) -{ - checkArguments("return_Test",nargout,nargin-1,1); - Shared obj = unwrap_shared_ptr(in[0], "Test"); - boost::shared_ptr 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"); -} diff --git a/wrap/tests/expected/@Test/return_Test.m b/wrap/tests/expected/@Test/return_Test.m deleted file mode 100644 index d1a2e440c..000000000 --- a/wrap/tests/expected/@Test/return_Test.m +++ /dev/null @@ -1,4 +0,0 @@ -% result = obj.return_Test(value) -function result = return_Test(obj,value) - error('need to compile return_Test.cpp'); -end diff --git a/wrap/tests/expected/@Test/return_TestPtr.cpp b/wrap/tests/expected/@Test/return_TestPtr.cpp deleted file mode 100644 index 06bc80269..000000000 --- a/wrap/tests/expected/@Test/return_TestPtr.cpp +++ /dev/null @@ -1,15 +0,0 @@ -// automatically generated by wrap -#include -#include -using namespace geometry; -typedef boost::shared_ptr SharedTest; -typedef boost::shared_ptr Shared; -void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) -{ - checkArguments("return_TestPtr",nargout,nargin-1,1); - Shared obj = unwrap_shared_ptr(in[0], "Test"); - boost::shared_ptr 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"); -} diff --git a/wrap/tests/expected/@Test/return_TestPtr.m b/wrap/tests/expected/@Test/return_TestPtr.m deleted file mode 100644 index 937c85fcc..000000000 --- a/wrap/tests/expected/@Test/return_TestPtr.m +++ /dev/null @@ -1,4 +0,0 @@ -% result = obj.return_TestPtr(value) -function result = return_TestPtr(obj,value) - error('need to compile return_TestPtr.cpp'); -end diff --git a/wrap/tests/expected/@Test/return_bool.cpp b/wrap/tests/expected/@Test/return_bool.cpp deleted file mode 100644 index e570d8dc2..000000000 --- a/wrap/tests/expected/@Test/return_bool.cpp +++ /dev/null @@ -1,13 +0,0 @@ -// automatically generated by wrap -#include -#include -using namespace geometry; -typedef boost::shared_ptr Shared; -void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) -{ - checkArguments("return_bool",nargout,nargin-1,1); - Shared obj = unwrap_shared_ptr(in[0], "Test"); - bool value = unwrap< bool >(in[1]); - bool result = obj->return_bool(value); - out[0] = wrap< bool >(result); -} diff --git a/wrap/tests/expected/@Test/return_bool.m b/wrap/tests/expected/@Test/return_bool.m deleted file mode 100644 index 358cb9750..000000000 --- a/wrap/tests/expected/@Test/return_bool.m +++ /dev/null @@ -1,4 +0,0 @@ -% result = obj.return_bool(value) -function result = return_bool(obj,value) - error('need to compile return_bool.cpp'); -end diff --git a/wrap/tests/expected/@Test/return_double.cpp b/wrap/tests/expected/@Test/return_double.cpp deleted file mode 100644 index 4a6322a72..000000000 --- a/wrap/tests/expected/@Test/return_double.cpp +++ /dev/null @@ -1,13 +0,0 @@ -// automatically generated by wrap -#include -#include -using namespace geometry; -typedef boost::shared_ptr Shared; -void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) -{ - checkArguments("return_double",nargout,nargin-1,1); - Shared obj = unwrap_shared_ptr(in[0], "Test"); - double value = unwrap< double >(in[1]); - double result = obj->return_double(value); - out[0] = wrap< double >(result); -} diff --git a/wrap/tests/expected/@Test/return_double.m b/wrap/tests/expected/@Test/return_double.m deleted file mode 100644 index 681371f39..000000000 --- a/wrap/tests/expected/@Test/return_double.m +++ /dev/null @@ -1,4 +0,0 @@ -% result = obj.return_double(value) -function result = return_double(obj,value) - error('need to compile return_double.cpp'); -end diff --git a/wrap/tests/expected/@Test/return_field.cpp b/wrap/tests/expected/@Test/return_field.cpp deleted file mode 100644 index a631635e3..000000000 --- a/wrap/tests/expected/@Test/return_field.cpp +++ /dev/null @@ -1,13 +0,0 @@ -// automatically generated by wrap -#include -#include -using namespace geometry; -typedef boost::shared_ptr Shared; -void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) -{ - checkArguments("return_field",nargout,nargin-1,1); - Shared obj = unwrap_shared_ptr(in[0], "Test"); - Test& t = *unwrap_shared_ptr< Test >(in[1], "Test"); - bool result = obj->return_field(t); - out[0] = wrap< bool >(result); -} diff --git a/wrap/tests/expected/@Test/return_field.m b/wrap/tests/expected/@Test/return_field.m deleted file mode 100644 index e2894c381..000000000 --- a/wrap/tests/expected/@Test/return_field.m +++ /dev/null @@ -1,4 +0,0 @@ -% result = obj.return_field(t) -function result = return_field(obj,t) - error('need to compile return_field.cpp'); -end diff --git a/wrap/tests/expected/@Test/return_int.cpp b/wrap/tests/expected/@Test/return_int.cpp deleted file mode 100644 index f909405eb..000000000 --- a/wrap/tests/expected/@Test/return_int.cpp +++ /dev/null @@ -1,13 +0,0 @@ -// automatically generated by wrap -#include -#include -using namespace geometry; -typedef boost::shared_ptr Shared; -void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) -{ - checkArguments("return_int",nargout,nargin-1,1); - Shared obj = unwrap_shared_ptr(in[0], "Test"); - int value = unwrap< int >(in[1]); - int result = obj->return_int(value); - out[0] = wrap< int >(result); -} diff --git a/wrap/tests/expected/@Test/return_int.m b/wrap/tests/expected/@Test/return_int.m deleted file mode 100644 index 779e9feb2..000000000 --- a/wrap/tests/expected/@Test/return_int.m +++ /dev/null @@ -1,4 +0,0 @@ -% result = obj.return_int(value) -function result = return_int(obj,value) - error('need to compile return_int.cpp'); -end diff --git a/wrap/tests/expected/@Test/return_matrix1.cpp b/wrap/tests/expected/@Test/return_matrix1.cpp deleted file mode 100644 index 1cc75d3d4..000000000 --- a/wrap/tests/expected/@Test/return_matrix1.cpp +++ /dev/null @@ -1,13 +0,0 @@ -// automatically generated by wrap -#include -#include -using namespace geometry; -typedef boost::shared_ptr Shared; -void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) -{ - checkArguments("return_matrix1",nargout,nargin-1,1); - Shared obj = unwrap_shared_ptr(in[0], "Test"); - Matrix value = unwrap< Matrix >(in[1]); - Matrix result = obj->return_matrix1(value); - out[0] = wrap< Matrix >(result); -} diff --git a/wrap/tests/expected/@Test/return_matrix1.m b/wrap/tests/expected/@Test/return_matrix1.m deleted file mode 100644 index d6d9791f9..000000000 --- a/wrap/tests/expected/@Test/return_matrix1.m +++ /dev/null @@ -1,4 +0,0 @@ -% result = obj.return_matrix1(value) -function result = return_matrix1(obj,value) - error('need to compile return_matrix1.cpp'); -end diff --git a/wrap/tests/expected/@Test/return_matrix2.cpp b/wrap/tests/expected/@Test/return_matrix2.cpp deleted file mode 100644 index 10c9e8647..000000000 --- a/wrap/tests/expected/@Test/return_matrix2.cpp +++ /dev/null @@ -1,13 +0,0 @@ -// automatically generated by wrap -#include -#include -using namespace geometry; -typedef boost::shared_ptr Shared; -void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) -{ - checkArguments("return_matrix2",nargout,nargin-1,1); - Shared obj = unwrap_shared_ptr(in[0], "Test"); - Matrix value = unwrap< Matrix >(in[1]); - Matrix result = obj->return_matrix2(value); - out[0] = wrap< Matrix >(result); -} diff --git a/wrap/tests/expected/@Test/return_matrix2.m b/wrap/tests/expected/@Test/return_matrix2.m deleted file mode 100644 index 584b365b8..000000000 --- a/wrap/tests/expected/@Test/return_matrix2.m +++ /dev/null @@ -1,4 +0,0 @@ -% result = obj.return_matrix2(value) -function result = return_matrix2(obj,value) - error('need to compile return_matrix2.cpp'); -end diff --git a/wrap/tests/expected/@Test/return_pair.cpp b/wrap/tests/expected/@Test/return_pair.cpp deleted file mode 100644 index 0fc359df6..000000000 --- a/wrap/tests/expected/@Test/return_pair.cpp +++ /dev/null @@ -1,15 +0,0 @@ -// automatically generated by wrap -#include -#include -using namespace geometry; -typedef boost::shared_ptr Shared; -void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) -{ - checkArguments("return_pair",nargout,nargin-1,2); - Shared obj = unwrap_shared_ptr(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); -} diff --git a/wrap/tests/expected/@Test/return_pair.m b/wrap/tests/expected/@Test/return_pair.m deleted file mode 100644 index 2e892210c..000000000 --- a/wrap/tests/expected/@Test/return_pair.m +++ /dev/null @@ -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 diff --git a/wrap/tests/expected/@Test/return_ptrs.cpp b/wrap/tests/expected/@Test/return_ptrs.cpp deleted file mode 100644 index c6c6f9655..000000000 --- a/wrap/tests/expected/@Test/return_ptrs.cpp +++ /dev/null @@ -1,19 +0,0 @@ -// automatically generated by wrap -#include -#include -using namespace geometry; -typedef boost::shared_ptr SharedTest; -typedef boost::shared_ptr SharedTest; -typedef boost::shared_ptr Shared; -void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) -{ - checkArguments("return_ptrs",nargout,nargin-1,2); - Shared obj = unwrap_shared_ptr(in[0], "Test"); - boost::shared_ptr p1 = unwrap_shared_ptr< Test >(in[1], "Test"); - boost::shared_ptr 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"); -} diff --git a/wrap/tests/expected/@Test/return_ptrs.m b/wrap/tests/expected/@Test/return_ptrs.m deleted file mode 100644 index a7af4b73c..000000000 --- a/wrap/tests/expected/@Test/return_ptrs.m +++ /dev/null @@ -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 diff --git a/wrap/tests/expected/@Test/return_size_t.cpp b/wrap/tests/expected/@Test/return_size_t.cpp deleted file mode 100644 index 9a6fc8598..000000000 --- a/wrap/tests/expected/@Test/return_size_t.cpp +++ /dev/null @@ -1,13 +0,0 @@ -// automatically generated by wrap -#include -#include -using namespace geometry; -typedef boost::shared_ptr 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(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); -} diff --git a/wrap/tests/expected/@Test/return_size_t.m b/wrap/tests/expected/@Test/return_size_t.m deleted file mode 100644 index 2fae64028..000000000 --- a/wrap/tests/expected/@Test/return_size_t.m +++ /dev/null @@ -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 diff --git a/wrap/tests/expected/@Test/return_string.cpp b/wrap/tests/expected/@Test/return_string.cpp deleted file mode 100644 index 3253e62ed..000000000 --- a/wrap/tests/expected/@Test/return_string.cpp +++ /dev/null @@ -1,13 +0,0 @@ -// automatically generated by wrap -#include -#include -using namespace geometry; -typedef boost::shared_ptr Shared; -void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) -{ - checkArguments("return_string",nargout,nargin-1,1); - Shared obj = unwrap_shared_ptr(in[0], "Test"); - string value = unwrap< string >(in[1]); - string result = obj->return_string(value); - out[0] = wrap< string >(result); -} diff --git a/wrap/tests/expected/@Test/return_string.m b/wrap/tests/expected/@Test/return_string.m deleted file mode 100644 index 67fb5f10d..000000000 --- a/wrap/tests/expected/@Test/return_string.m +++ /dev/null @@ -1,4 +0,0 @@ -% result = obj.return_string(value) -function result = return_string(obj,value) - error('need to compile return_string.cpp'); -end diff --git a/wrap/tests/expected/@Test/return_vector1.cpp b/wrap/tests/expected/@Test/return_vector1.cpp deleted file mode 100644 index 48ecbb643..000000000 --- a/wrap/tests/expected/@Test/return_vector1.cpp +++ /dev/null @@ -1,13 +0,0 @@ -// automatically generated by wrap -#include -#include -using namespace geometry; -typedef boost::shared_ptr Shared; -void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) -{ - checkArguments("return_vector1",nargout,nargin-1,1); - Shared obj = unwrap_shared_ptr(in[0], "Test"); - Vector value = unwrap< Vector >(in[1]); - Vector result = obj->return_vector1(value); - out[0] = wrap< Vector >(result); -} diff --git a/wrap/tests/expected/@Test/return_vector1.m b/wrap/tests/expected/@Test/return_vector1.m deleted file mode 100644 index 461c51618..000000000 --- a/wrap/tests/expected/@Test/return_vector1.m +++ /dev/null @@ -1,4 +0,0 @@ -% result = obj.return_vector1(value) -function result = return_vector1(obj,value) - error('need to compile return_vector1.cpp'); -end diff --git a/wrap/tests/expected/@Test/return_vector2.cpp b/wrap/tests/expected/@Test/return_vector2.cpp deleted file mode 100644 index 984ba259c..000000000 --- a/wrap/tests/expected/@Test/return_vector2.cpp +++ /dev/null @@ -1,13 +0,0 @@ -// automatically generated by wrap -#include -#include -using namespace geometry; -typedef boost::shared_ptr Shared; -void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) -{ - checkArguments("return_vector2",nargout,nargin-1,1); - Shared obj = unwrap_shared_ptr(in[0], "Test"); - Vector value = unwrap< Vector >(in[1]); - Vector result = obj->return_vector2(value); - out[0] = wrap< Vector >(result); -} diff --git a/wrap/tests/expected/@Test/return_vector2.m b/wrap/tests/expected/@Test/return_vector2.m deleted file mode 100644 index f3c77dd85..000000000 --- a/wrap/tests/expected/@Test/return_vector2.m +++ /dev/null @@ -1,4 +0,0 @@ -% result = obj.return_vector2(value) -function result = return_vector2(obj,value) - error('need to compile return_vector2.cpp'); -end diff --git a/wrap/tests/expected/Makefile b/wrap/tests/expected/Makefile deleted file mode 100644 index 92dece353..000000000 --- a/wrap/tests/expected/Makefile +++ /dev/null @@ -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) - - diff --git a/wrap/tests/expected/Point2.m b/wrap/tests/expected/Point2.m new file mode 100644 index 000000000..95f46a2dd --- /dev/null +++ b/wrap/tests/expected/Point2.m @@ -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 diff --git a/wrap/tests/expected/Point3.m b/wrap/tests/expected/Point3.m new file mode 100644 index 000000000..7a1045a86 --- /dev/null +++ b/wrap/tests/expected/Point3.m @@ -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 diff --git a/wrap/tests/expected/Point3_StaticFunctionRet.cpp b/wrap/tests/expected/Point3_StaticFunctionRet.cpp deleted file mode 100644 index 696af326a..000000000 --- a/wrap/tests/expected/Point3_StaticFunctionRet.cpp +++ /dev/null @@ -1,14 +0,0 @@ -// automatically generated by wrap -#include -#include -using namespace geometry; -typedef boost::shared_ptr SharedPoint3; -typedef boost::shared_ptr 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"); -} diff --git a/wrap/tests/expected/Point3_StaticFunctionRet.m b/wrap/tests/expected/Point3_StaticFunctionRet.m deleted file mode 100644 index bdfd32b4b..000000000 --- a/wrap/tests/expected/Point3_StaticFunctionRet.m +++ /dev/null @@ -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 diff --git a/wrap/tests/expected/Point3_staticFunction.cpp b/wrap/tests/expected/Point3_staticFunction.cpp deleted file mode 100644 index f25c8f4ea..000000000 --- a/wrap/tests/expected/Point3_staticFunction.cpp +++ /dev/null @@ -1,12 +0,0 @@ -// automatically generated by wrap -#include -#include -using namespace geometry; -typedef boost::shared_ptr Shareddouble; -typedef boost::shared_ptr 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); -} diff --git a/wrap/tests/expected/Point3_staticFunction.m b/wrap/tests/expected/Point3_staticFunction.m deleted file mode 100644 index 23885f71e..000000000 --- a/wrap/tests/expected/Point3_staticFunction.m +++ /dev/null @@ -1,5 +0,0 @@ -% automatically generated by wrap -function result = Point3_staticFunction() -% usage: x = Point3_staticFunction() - error('need to compile Point3_staticFunction.cpp'); -end diff --git a/wrap/tests/expected/Test.m b/wrap/tests/expected/Test.m new file mode 100644 index 000000000..2c914502a --- /dev/null +++ b/wrap/tests/expected/Test.m @@ -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 diff --git a/wrap/tests/expected/geometry_wrapper.cpp b/wrap/tests/expected/geometry_wrapper.cpp new file mode 100644 index 000000000..e2c866083 --- /dev/null +++ b/wrap/tests/expected/geometry_wrapper.cpp @@ -0,0 +1,621 @@ +// automatically generated by wrap +#include +#include +#include + +#include +#include +#include + +typedef std::set*> Collector_Point2; +static Collector_Point2 collector_Point2; +typedef std::set*> Collector_Point3; +static Collector_Point3 collector_Point3; +typedef std::set*> 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 Shared; + + Shared *self = *reinterpret_cast (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 Shared; + + Shared *self = new Shared(new Point2()); + collector_Point2.insert(self); + out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL); + *reinterpret_cast (mxGetData(out[0])) = self; +} + +void Point2_constructor_2(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + mexAtExit(&_deleteAllObjects); + typedef boost::shared_ptr 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 (mxGetData(out[0])) = self; +} + +void Point2_deconstructor_3(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + typedef boost::shared_ptr Shared; + checkArguments("delete_Point2",nargout,nargin,1); + Shared *self = *reinterpret_cast(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 Shared; + checkArguments("argChar",nargout,nargin-1,1); + Shared obj = unwrap_shared_ptr(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 Shared; + checkArguments("argUChar",nargout,nargin-1,1); + Shared obj = unwrap_shared_ptr(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 Shared; + checkArguments("dim",nargout,nargin-1,0); + Shared obj = unwrap_shared_ptr(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 Shared; + checkArguments("returnChar",nargout,nargin-1,0); + Shared obj = unwrap_shared_ptr(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 SharedVectorNotEigen; + typedef boost::shared_ptr Shared; + checkArguments("vectorConfusion",nargout,nargin-1,0); + Shared obj = unwrap_shared_ptr(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 Shared; + checkArguments("x",nargout,nargin-1,0); + Shared obj = unwrap_shared_ptr(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 Shared; + checkArguments("y",nargout,nargin-1,0); + Shared obj = unwrap_shared_ptr(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 Shared; + + Shared *self = *reinterpret_cast (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 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 (mxGetData(out[0])) = self; +} + +void Point3_deconstructor_13(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ +using namespace geometry; + typedef boost::shared_ptr Shared; + checkArguments("delete_Point3",nargout,nargin,1); + Shared *self = *reinterpret_cast(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 Shared; + checkArguments("norm",nargout,nargin-1,0); + Shared obj = unwrap_shared_ptr(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 SharedPoint3; + typedef boost::shared_ptr 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 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 Shared; + + Shared *self = *reinterpret_cast (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 Shared; + + Shared *self = new Shared(new Test()); + collector_Test.insert(self); + out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL); + *reinterpret_cast (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 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 (mxGetData(out[0])) = self; +} + +void Test_deconstructor_20(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ +using namespace geometry; + typedef boost::shared_ptr Shared; + checkArguments("delete_Test",nargout,nargin,1); + Shared *self = *reinterpret_cast(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 Shared; + checkArguments("arg_EigenConstRef",nargout,nargin-1,1); + Shared obj = unwrap_shared_ptr(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 SharedTest; + typedef boost::shared_ptr SharedTest; + typedef boost::shared_ptr Shared; + checkArguments("create_MixedPtrs",nargout,nargin-1,0); + Shared obj = unwrap_shared_ptr(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 SharedTest; + typedef boost::shared_ptr SharedTest; + typedef boost::shared_ptr Shared; + checkArguments("create_ptrs",nargout,nargin-1,0); + Shared obj = unwrap_shared_ptr(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 Shared; + checkArguments("print",nargout,nargin-1,0); + Shared obj = unwrap_shared_ptr(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 SharedPoint2; + typedef boost::shared_ptr Shared; + checkArguments("return_Point2Ptr",nargout,nargin-1,1); + Shared obj = unwrap_shared_ptr(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 SharedTest; + typedef boost::shared_ptr Shared; + checkArguments("return_Test",nargout,nargin-1,1); + Shared obj = unwrap_shared_ptr(in[0], "Test"); + boost::shared_ptr 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 SharedTest; + typedef boost::shared_ptr Shared; + checkArguments("return_TestPtr",nargout,nargin-1,1); + Shared obj = unwrap_shared_ptr(in[0], "Test"); + boost::shared_ptr 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 Shared; + checkArguments("return_bool",nargout,nargin-1,1); + Shared obj = unwrap_shared_ptr(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 Shared; + checkArguments("return_double",nargout,nargin-1,1); + Shared obj = unwrap_shared_ptr(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 Shared; + checkArguments("return_field",nargout,nargin-1,1); + Shared obj = unwrap_shared_ptr(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 Shared; + checkArguments("return_int",nargout,nargin-1,1); + Shared obj = unwrap_shared_ptr(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 Shared; + checkArguments("return_matrix1",nargout,nargin-1,1); + Shared obj = unwrap_shared_ptr(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 Shared; + checkArguments("return_matrix2",nargout,nargin-1,1); + Shared obj = unwrap_shared_ptr(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 Shared; + checkArguments("return_pair",nargout,nargin-1,2); + Shared obj = unwrap_shared_ptr(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 SharedTest; + typedef boost::shared_ptr SharedTest; + typedef boost::shared_ptr Shared; + checkArguments("return_ptrs",nargout,nargin-1,2); + Shared obj = unwrap_shared_ptr(in[0], "Test"); + boost::shared_ptr p1 = unwrap_shared_ptr< Test >(in[1], "Test"); + boost::shared_ptr 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 Shared; + checkArguments("return_size_t",nargout,nargin-1,1); + Shared obj = unwrap_shared_ptr(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 Shared; + checkArguments("return_string",nargout,nargin-1,1); + Shared obj = unwrap_shared_ptr(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 Shared; + checkArguments("return_vector1",nargout,nargin-1,1); + Shared obj = unwrap_shared_ptr(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 Shared; + checkArguments("return_vector2",nargout,nargin-1,1); + Shared obj = unwrap_shared_ptr(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(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); +} diff --git a/wrap/tests/expected/make_geometry.m b/wrap/tests/expected/make_geometry.m deleted file mode 100644 index d77459ed8..000000000 --- a/wrap/tests/expected/make_geometry.m +++ /dev/null @@ -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 diff --git a/wrap/tests/expected/new_Point2.cpp b/wrap/tests/expected/new_Point2.cpp deleted file mode 100644 index b24642ad4..000000000 --- a/wrap/tests/expected/new_Point2.cpp +++ /dev/null @@ -1,41 +0,0 @@ -// automatically generated by wrap -#include -#include -typedef boost::shared_ptr Shared; - -static std::set collector; - -void cleanup(void) { - for(std::set::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(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 (mxGetPr(out[0])) = self; - } -} diff --git a/wrap/tests/expected/new_Point2.m b/wrap/tests/expected/new_Point2.m deleted file mode 100644 index 9a6edd425..000000000 --- a/wrap/tests/expected/new_Point2.m +++ /dev/null @@ -1,4 +0,0 @@ -% automatically generated by wrap -function result = new_Point2(obj,x,y) - error('need to compile new_Point2.cpp'); -end diff --git a/wrap/tests/expected/new_Point3.cpp b/wrap/tests/expected/new_Point3.cpp deleted file mode 100644 index 2e715263b..000000000 --- a/wrap/tests/expected/new_Point3.cpp +++ /dev/null @@ -1,41 +0,0 @@ -// automatically generated by wrap -#include -#include -using namespace geometry; -typedef boost::shared_ptr Shared; - -static std::set collector; - -void cleanup(void) { - for(std::set::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(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 (mxGetPr(out[0])) = self; - } -} diff --git a/wrap/tests/expected/new_Point3.m b/wrap/tests/expected/new_Point3.m deleted file mode 100644 index 9cca5daa5..000000000 --- a/wrap/tests/expected/new_Point3.m +++ /dev/null @@ -1,4 +0,0 @@ -% automatically generated by wrap -function result = new_Point3(obj,x,y,z) - error('need to compile new_Point3.cpp'); -end diff --git a/wrap/tests/expected/new_Test.cpp b/wrap/tests/expected/new_Test.cpp deleted file mode 100644 index 57ac1a4ea..000000000 --- a/wrap/tests/expected/new_Test.cpp +++ /dev/null @@ -1,42 +0,0 @@ -// automatically generated by wrap -#include -#include -using namespace geometry; -typedef boost::shared_ptr Shared; - -static std::set collector; - -void cleanup(void) { - for(std::set::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(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 (mxGetPr(out[0])) = self; - } -} diff --git a/wrap/tests/expected/new_Test.m b/wrap/tests/expected/new_Test.m deleted file mode 100644 index ec9a13f63..000000000 --- a/wrap/tests/expected/new_Test.m +++ /dev/null @@ -1,4 +0,0 @@ -% automatically generated by wrap -function result = new_Test(obj,a,b) - error('need to compile new_Test.cpp'); -end diff --git a/wrap/tests/expected_namespaces/@ClassD/ClassD.m b/wrap/tests/expected_namespaces/@ClassD/ClassD.m deleted file mode 100644 index 90fbf48a4..000000000 --- a/wrap/tests/expected_namespaces/@ClassD/ClassD.m +++ /dev/null @@ -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 diff --git a/wrap/tests/expected_namespaces/@ns1ClassA/ns1ClassA.m b/wrap/tests/expected_namespaces/@ns1ClassA/ns1ClassA.m deleted file mode 100644 index 727e020ae..000000000 --- a/wrap/tests/expected_namespaces/@ns1ClassA/ns1ClassA.m +++ /dev/null @@ -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 diff --git a/wrap/tests/expected_namespaces/@ns1ClassB/ns1ClassB.m b/wrap/tests/expected_namespaces/@ns1ClassB/ns1ClassB.m deleted file mode 100644 index 19b0a73b9..000000000 --- a/wrap/tests/expected_namespaces/@ns1ClassB/ns1ClassB.m +++ /dev/null @@ -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 diff --git a/wrap/tests/expected_namespaces/@ns2ClassA/memberFunction.cpp b/wrap/tests/expected_namespaces/@ns2ClassA/memberFunction.cpp deleted file mode 100644 index 70d0a7968..000000000 --- a/wrap/tests/expected_namespaces/@ns2ClassA/memberFunction.cpp +++ /dev/null @@ -1,12 +0,0 @@ -// automatically generated by wrap -#include -#include -#include -typedef boost::shared_ptr Shared; -void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) -{ - checkArguments("memberFunction",nargout,nargin-1,0); - Shared obj = unwrap_shared_ptr(in[0], "ns2::ClassA"); - double result = obj->memberFunction(); - out[0] = wrap< double >(result); -} diff --git a/wrap/tests/expected_namespaces/@ns2ClassA/memberFunction.m b/wrap/tests/expected_namespaces/@ns2ClassA/memberFunction.m deleted file mode 100644 index 41587c2bc..000000000 --- a/wrap/tests/expected_namespaces/@ns2ClassA/memberFunction.m +++ /dev/null @@ -1,4 +0,0 @@ -% result = obj.memberFunction() -function result = memberFunction(obj) - error('need to compile memberFunction.cpp'); -end diff --git a/wrap/tests/expected_namespaces/@ns2ClassA/ns2ClassA.m b/wrap/tests/expected_namespaces/@ns2ClassA/ns2ClassA.m deleted file mode 100644 index 27de74dc3..000000000 --- a/wrap/tests/expected_namespaces/@ns2ClassA/ns2ClassA.m +++ /dev/null @@ -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 diff --git a/wrap/tests/expected_namespaces/@ns2ClassA/nsArg.cpp b/wrap/tests/expected_namespaces/@ns2ClassA/nsArg.cpp deleted file mode 100644 index 498d90649..000000000 --- a/wrap/tests/expected_namespaces/@ns2ClassA/nsArg.cpp +++ /dev/null @@ -1,13 +0,0 @@ -// automatically generated by wrap -#include -#include -#include -typedef boost::shared_ptr Shared; -void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) -{ - checkArguments("nsArg",nargout,nargin-1,1); - Shared obj = unwrap_shared_ptr(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); -} diff --git a/wrap/tests/expected_namespaces/@ns2ClassA/nsArg.m b/wrap/tests/expected_namespaces/@ns2ClassA/nsArg.m deleted file mode 100644 index 1e3f5865d..000000000 --- a/wrap/tests/expected_namespaces/@ns2ClassA/nsArg.m +++ /dev/null @@ -1,4 +0,0 @@ -% result = obj.nsArg(arg) -function result = nsArg(obj,arg) - error('need to compile nsArg.cpp'); -end diff --git a/wrap/tests/expected_namespaces/@ns2ClassA/nsReturn.cpp b/wrap/tests/expected_namespaces/@ns2ClassA/nsReturn.cpp deleted file mode 100644 index 996bf8913..000000000 --- a/wrap/tests/expected_namespaces/@ns2ClassA/nsReturn.cpp +++ /dev/null @@ -1,15 +0,0 @@ -// automatically generated by wrap -#include -#include -#include -typedef boost::shared_ptr SharedClassB; -typedef boost::shared_ptr Shared; -void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) -{ - checkArguments("nsReturn",nargout,nargin-1,1); - Shared obj = unwrap_shared_ptr(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"); -} diff --git a/wrap/tests/expected_namespaces/@ns2ClassA/nsReturn.m b/wrap/tests/expected_namespaces/@ns2ClassA/nsReturn.m deleted file mode 100644 index f1f74b614..000000000 --- a/wrap/tests/expected_namespaces/@ns2ClassA/nsReturn.m +++ /dev/null @@ -1,4 +0,0 @@ -% result = obj.nsReturn(q) -function result = nsReturn(obj,q) - error('need to compile nsReturn.cpp'); -end diff --git a/wrap/tests/expected_namespaces/@ns2ClassC/ns2ClassC.m b/wrap/tests/expected_namespaces/@ns2ClassC/ns2ClassC.m deleted file mode 100644 index 2425b59bd..000000000 --- a/wrap/tests/expected_namespaces/@ns2ClassC/ns2ClassC.m +++ /dev/null @@ -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 diff --git a/wrap/tests/expected_namespaces/@ns2ns3ClassB/ns2ns3ClassB.m b/wrap/tests/expected_namespaces/@ns2ns3ClassB/ns2ns3ClassB.m deleted file mode 100644 index de7f7a3ca..000000000 --- a/wrap/tests/expected_namespaces/@ns2ns3ClassB/ns2ns3ClassB.m +++ /dev/null @@ -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 diff --git a/wrap/tests/expected_namespaces/ClassD.m b/wrap/tests/expected_namespaces/ClassD.m new file mode 100644 index 000000000..fcedbdc1c --- /dev/null +++ b/wrap/tests/expected_namespaces/ClassD.m @@ -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 diff --git a/wrap/tests/expected_namespaces/Makefile b/wrap/tests/expected_namespaces/Makefile deleted file mode 100644 index 1cb09b8b9..000000000 --- a/wrap/tests/expected_namespaces/Makefile +++ /dev/null @@ -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) - - diff --git a/wrap/tests/expected_namespaces/make_testNamespaces.m b/wrap/tests/expected_namespaces/make_testNamespaces.m deleted file mode 100644 index 5cf086db8..000000000 --- a/wrap/tests/expected_namespaces/make_testNamespaces.m +++ /dev/null @@ -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 diff --git a/wrap/tests/expected_namespaces/new_ClassD.cpp b/wrap/tests/expected_namespaces/new_ClassD.cpp deleted file mode 100644 index d7a7e4908..000000000 --- a/wrap/tests/expected_namespaces/new_ClassD.cpp +++ /dev/null @@ -1,36 +0,0 @@ -// automatically generated by wrap -#include -#include -typedef boost::shared_ptr Shared; - -static std::set collector; - -void cleanup(void) { - for(std::set::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(in[1]); - - if(nc == 0) - self = new Shared(new ClassD()); - collector.insert(self); - out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL); - *reinterpret_cast (mxGetPr(out[0])) = self; - } -} diff --git a/wrap/tests/expected_namespaces/new_ClassD.m b/wrap/tests/expected_namespaces/new_ClassD.m deleted file mode 100644 index d12bfffb1..000000000 --- a/wrap/tests/expected_namespaces/new_ClassD.m +++ /dev/null @@ -1,4 +0,0 @@ -% automatically generated by wrap -function result = new_ClassD(obj) - error('need to compile new_ClassD.cpp'); -end diff --git a/wrap/tests/expected_namespaces/new_ns1ClassA.cpp b/wrap/tests/expected_namespaces/new_ns1ClassA.cpp deleted file mode 100644 index 2554eafc1..000000000 --- a/wrap/tests/expected_namespaces/new_ns1ClassA.cpp +++ /dev/null @@ -1,36 +0,0 @@ -// automatically generated by wrap -#include -#include -typedef boost::shared_ptr Shared; - -static std::set collector; - -void cleanup(void) { - for(std::set::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(in[1]); - - if(nc == 0) - self = new Shared(new ns1::ClassA()); - collector.insert(self); - out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL); - *reinterpret_cast (mxGetPr(out[0])) = self; - } -} diff --git a/wrap/tests/expected_namespaces/new_ns1ClassA.m b/wrap/tests/expected_namespaces/new_ns1ClassA.m deleted file mode 100644 index 4412baae1..000000000 --- a/wrap/tests/expected_namespaces/new_ns1ClassA.m +++ /dev/null @@ -1,4 +0,0 @@ -% automatically generated by wrap -function result = new_ns1ClassA(obj) - error('need to compile new_ns1ClassA.cpp'); -end diff --git a/wrap/tests/expected_namespaces/new_ns1ClassB.cpp b/wrap/tests/expected_namespaces/new_ns1ClassB.cpp deleted file mode 100644 index bc1dd313c..000000000 --- a/wrap/tests/expected_namespaces/new_ns1ClassB.cpp +++ /dev/null @@ -1,37 +0,0 @@ -// automatically generated by wrap -#include -#include -#include -typedef boost::shared_ptr Shared; - -static std::set collector; - -void cleanup(void) { - for(std::set::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(in[1]); - - if(nc == 0) - self = new Shared(new ns1::ClassB()); - collector.insert(self); - out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL); - *reinterpret_cast (mxGetPr(out[0])) = self; - } -} diff --git a/wrap/tests/expected_namespaces/new_ns1ClassB.m b/wrap/tests/expected_namespaces/new_ns1ClassB.m deleted file mode 100644 index b75d6b9bf..000000000 --- a/wrap/tests/expected_namespaces/new_ns1ClassB.m +++ /dev/null @@ -1,4 +0,0 @@ -% automatically generated by wrap -function result = new_ns1ClassB(obj) - error('need to compile new_ns1ClassB.cpp'); -end diff --git a/wrap/tests/expected_namespaces/new_ns2ClassA.cpp b/wrap/tests/expected_namespaces/new_ns2ClassA.cpp deleted file mode 100644 index 57faabc79..000000000 --- a/wrap/tests/expected_namespaces/new_ns2ClassA.cpp +++ /dev/null @@ -1,37 +0,0 @@ -// automatically generated by wrap -#include -#include -#include -typedef boost::shared_ptr Shared; - -static std::set collector; - -void cleanup(void) { - for(std::set::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(in[1]); - - if(nc == 0) - self = new Shared(new ns2::ClassA()); - collector.insert(self); - out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL); - *reinterpret_cast (mxGetPr(out[0])) = self; - } -} diff --git a/wrap/tests/expected_namespaces/new_ns2ClassA.m b/wrap/tests/expected_namespaces/new_ns2ClassA.m deleted file mode 100644 index b3b9201d6..000000000 --- a/wrap/tests/expected_namespaces/new_ns2ClassA.m +++ /dev/null @@ -1,4 +0,0 @@ -% automatically generated by wrap -function result = new_ns2ClassA(obj) - error('need to compile new_ns2ClassA.cpp'); -end diff --git a/wrap/tests/expected_namespaces/new_ns2ClassC.cpp b/wrap/tests/expected_namespaces/new_ns2ClassC.cpp deleted file mode 100644 index e836a80fd..000000000 --- a/wrap/tests/expected_namespaces/new_ns2ClassC.cpp +++ /dev/null @@ -1,36 +0,0 @@ -// automatically generated by wrap -#include -#include -typedef boost::shared_ptr Shared; - -static std::set collector; - -void cleanup(void) { - for(std::set::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(in[1]); - - if(nc == 0) - self = new Shared(new ns2::ClassC()); - collector.insert(self); - out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL); - *reinterpret_cast (mxGetPr(out[0])) = self; - } -} diff --git a/wrap/tests/expected_namespaces/new_ns2ClassC.m b/wrap/tests/expected_namespaces/new_ns2ClassC.m deleted file mode 100644 index 0f7ffb26f..000000000 --- a/wrap/tests/expected_namespaces/new_ns2ClassC.m +++ /dev/null @@ -1,4 +0,0 @@ -% automatically generated by wrap -function result = new_ns2ClassC(obj) - error('need to compile new_ns2ClassC.cpp'); -end diff --git a/wrap/tests/expected_namespaces/new_ns2ns3ClassB.cpp b/wrap/tests/expected_namespaces/new_ns2ns3ClassB.cpp deleted file mode 100644 index af1a25922..000000000 --- a/wrap/tests/expected_namespaces/new_ns2ns3ClassB.cpp +++ /dev/null @@ -1,37 +0,0 @@ -// automatically generated by wrap -#include -#include -#include -typedef boost::shared_ptr Shared; - -static std::set collector; - -void cleanup(void) { - for(std::set::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(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 (mxGetPr(out[0])) = self; - } -} diff --git a/wrap/tests/expected_namespaces/new_ns2ns3ClassB.m b/wrap/tests/expected_namespaces/new_ns2ns3ClassB.m deleted file mode 100644 index 707e159f0..000000000 --- a/wrap/tests/expected_namespaces/new_ns2ns3ClassB.m +++ /dev/null @@ -1,4 +0,0 @@ -% automatically generated by wrap -function result = new_ns2ns3ClassB(obj) - error('need to compile new_ns2ns3ClassB.cpp'); -end diff --git a/wrap/tests/expected_namespaces/ns1ClassA.m b/wrap/tests/expected_namespaces/ns1ClassA.m new file mode 100644 index 000000000..5ee717612 --- /dev/null +++ b/wrap/tests/expected_namespaces/ns1ClassA.m @@ -0,0 +1,30 @@ +% automatically generated by wrap +classdef ns1ClassA < handle + properties + self = 0 + end + methods + function obj = ns1ClassA(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(1); + else + error('Arguments do not match any overload of ns1ClassA constructor'); + end + end + + function delete(obj) + testNamespaces_wrapper(2, obj.self); + end + + function display(obj), obj.print(''); end + + function disp(obj), obj.display; end + + end + + methods(Static = true) + end +end diff --git a/wrap/tests/expected_namespaces/ns1ClassB.m b/wrap/tests/expected_namespaces/ns1ClassB.m new file mode 100644 index 000000000..bc6dc0198 --- /dev/null +++ b/wrap/tests/expected_namespaces/ns1ClassB.m @@ -0,0 +1,30 @@ +% automatically generated by wrap +classdef ns1ClassB < handle + properties + self = 0 + end + methods + function obj = ns1ClassB(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(4); + else + error('Arguments do not match any overload of ns1ClassB constructor'); + end + end + + function delete(obj) + testNamespaces_wrapper(5, obj.self); + end + + function display(obj), obj.print(''); end + + function disp(obj), obj.display; end + + end + + methods(Static = true) + end +end diff --git a/wrap/tests/expected_namespaces/ns2ClassA.m b/wrap/tests/expected_namespaces/ns2ClassA.m new file mode 100644 index 000000000..38a161f07 --- /dev/null +++ b/wrap/tests/expected_namespaces/ns2ClassA.m @@ -0,0 +1,62 @@ +% automatically generated by wrap +classdef ns2ClassA < handle + properties + self = 0 + end + methods + function obj = ns2ClassA(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(7); + else + error('Arguments do not match any overload of ns2ClassA constructor'); + end + end + + function delete(obj) + testNamespaces_wrapper(8, obj.self); + end + + function display(obj), obj.print(''); end + + function disp(obj), obj.display; end + + function varargout = memberFunction(self, varargin) + if length(varargin) == 0 + varargout{1} = testNamespaces_wrapper(9, self, varargin{:}); + else + error('Arguments do not match any overload of function ns2ClassA.memberFunction'); + end + end + + function varargout = nsArg(self, varargin) + if length(varargin) == 1 && isa(varargin{1},'ns1ClassB') + varargout{1} = testNamespaces_wrapper(10, self, varargin{:}); + else + error('Arguments do not match any overload of function ns2ClassA.nsArg'); + end + end + + function varargout = nsReturn(self, varargin) + if length(varargin) == 1 && isa(varargin{1},'double') + varargout{1} = testNamespaces_wrapper(11, self, varargin{:}); + else + error('Arguments do not match any overload of function ns2ClassA.nsReturn'); + end + end + + end + + methods(Static = true) + function varargout = Afunction(varargin) + if length(varargin) == 0 + varargout{1} = testNamespaces_wrapper(12, varargin{:}); + else + error('Arguments do not match any overload of function ns2ClassA.Afunction'); + end + end + + end +end diff --git a/wrap/tests/expected_namespaces/ns2ClassA_afunction.cpp b/wrap/tests/expected_namespaces/ns2ClassA_afunction.cpp deleted file mode 100644 index 6c903c946..000000000 --- a/wrap/tests/expected_namespaces/ns2ClassA_afunction.cpp +++ /dev/null @@ -1,12 +0,0 @@ -// automatically generated by wrap -#include -#include -#include -typedef boost::shared_ptr Shareddouble; -typedef boost::shared_ptr Shared; -void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) -{ - checkArguments("ns2ClassA_afunction",nargout,nargin,0); - double result = ns2::ClassA::afunction(); - out[0] = wrap< double >(result); -} diff --git a/wrap/tests/expected_namespaces/ns2ClassA_afunction.m b/wrap/tests/expected_namespaces/ns2ClassA_afunction.m deleted file mode 100644 index f41203ba1..000000000 --- a/wrap/tests/expected_namespaces/ns2ClassA_afunction.m +++ /dev/null @@ -1,5 +0,0 @@ -% automatically generated by wrap -function result = ns2ClassA_afunction() -% usage: x = ns2ClassA_afunction() - error('need to compile ns2ClassA_afunction.cpp'); -end diff --git a/wrap/tests/expected_namespaces/ns2ClassC.m b/wrap/tests/expected_namespaces/ns2ClassC.m new file mode 100644 index 000000000..647351e2f --- /dev/null +++ b/wrap/tests/expected_namespaces/ns2ClassC.m @@ -0,0 +1,30 @@ +% automatically generated by wrap +classdef ns2ClassC < handle + properties + self = 0 + end + methods + function obj = ns2ClassC(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(17); + else + error('Arguments do not match any overload of ns2ClassC constructor'); + end + end + + function delete(obj) + testNamespaces_wrapper(18, obj.self); + end + + function display(obj), obj.print(''); end + + function disp(obj), obj.display; end + + end + + methods(Static = true) + end +end diff --git a/wrap/tests/expected_namespaces/ns2ns3ClassB.m b/wrap/tests/expected_namespaces/ns2ns3ClassB.m new file mode 100644 index 000000000..3df2f52e1 --- /dev/null +++ b/wrap/tests/expected_namespaces/ns2ns3ClassB.m @@ -0,0 +1,30 @@ +% automatically generated by wrap +classdef ns2ns3ClassB < handle + properties + self = 0 + end + methods + function obj = ns2ns3ClassB(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(14); + else + error('Arguments do not match any overload of ns2ns3ClassB constructor'); + end + end + + function delete(obj) + testNamespaces_wrapper(15, obj.self); + end + + function display(obj), obj.print(''); end + + function disp(obj), obj.display; end + + end + + methods(Static = true) + end +end diff --git a/wrap/tests/expected_namespaces/testNamespaces_wrapper.cpp b/wrap/tests/expected_namespaces/testNamespaces_wrapper.cpp new file mode 100644 index 000000000..7d910c9cc --- /dev/null +++ b/wrap/tests/expected_namespaces/testNamespaces_wrapper.cpp @@ -0,0 +1,369 @@ +// automatically generated by wrap +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +typedef std::set*> Collector_ns1ClassA; +static Collector_ns1ClassA collector_ns1ClassA; +typedef std::set*> Collector_ns1ClassB; +static Collector_ns1ClassB collector_ns1ClassB; +typedef std::set*> Collector_ns2ClassA; +static Collector_ns2ClassA collector_ns2ClassA; +typedef std::set*> Collector_ns2ns3ClassB; +static Collector_ns2ns3ClassB collector_ns2ns3ClassB; +typedef std::set*> Collector_ns2ClassC; +static Collector_ns2ClassC collector_ns2ClassC; +typedef std::set*> Collector_ClassD; +static Collector_ClassD collector_ClassD; +void _deleteAllObjects() +{ + for(Collector_ns1ClassA::iterator iter = collector_ns1ClassA.begin(); + iter != collector_ns1ClassA.end(); ) { + delete *iter; + collector_ns1ClassA.erase(iter++); + } + for(Collector_ns1ClassB::iterator iter = collector_ns1ClassB.begin(); + iter != collector_ns1ClassB.end(); ) { + delete *iter; + collector_ns1ClassB.erase(iter++); + } + for(Collector_ns2ClassA::iterator iter = collector_ns2ClassA.begin(); + iter != collector_ns2ClassA.end(); ) { + delete *iter; + collector_ns2ClassA.erase(iter++); + } + for(Collector_ns2ns3ClassB::iterator iter = collector_ns2ns3ClassB.begin(); + iter != collector_ns2ns3ClassB.end(); ) { + delete *iter; + collector_ns2ns3ClassB.erase(iter++); + } + for(Collector_ns2ClassC::iterator iter = collector_ns2ClassC.begin(); + iter != collector_ns2ClassC.end(); ) { + delete *iter; + collector_ns2ClassC.erase(iter++); + } + for(Collector_ClassD::iterator iter = collector_ClassD.begin(); + iter != collector_ClassD.end(); ) { + delete *iter; + collector_ClassD.erase(iter++); + } +} +void ns1ClassA_constructor_0(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + mexAtExit(&_deleteAllObjects); + typedef boost::shared_ptr Shared; + + Shared *self = *reinterpret_cast (mxGetData(in[0])); + collector_ns1ClassA.insert(self); +} +void ns1ClassA_constructor_1(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + mexAtExit(&_deleteAllObjects); + typedef boost::shared_ptr Shared; + + Shared *self = new Shared(new ns1::ClassA()); + collector_ns1ClassA.insert(self); + out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL); + *reinterpret_cast (mxGetData(out[0])) = self; +} + +void ns1ClassA_deconstructor_2(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + typedef boost::shared_ptr Shared; + checkArguments("delete_ns1ClassA",nargout,nargin,1); + Shared *self = *reinterpret_cast(mxGetData(in[0])); + Collector_ns1ClassA::iterator item; + item = collector_ns1ClassA.find(self); + if(item != collector_ns1ClassA.end()) { + delete self; + collector_ns1ClassA.erase(item); + } +} + +void ns1ClassB_constructor_3(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + mexAtExit(&_deleteAllObjects); + typedef boost::shared_ptr Shared; + + Shared *self = *reinterpret_cast (mxGetData(in[0])); + collector_ns1ClassB.insert(self); +} +void ns1ClassB_constructor_4(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + mexAtExit(&_deleteAllObjects); + typedef boost::shared_ptr Shared; + + Shared *self = new Shared(new ns1::ClassB()); + collector_ns1ClassB.insert(self); + out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL); + *reinterpret_cast (mxGetData(out[0])) = self; +} + +void ns1ClassB_deconstructor_5(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + typedef boost::shared_ptr Shared; + checkArguments("delete_ns1ClassB",nargout,nargin,1); + Shared *self = *reinterpret_cast(mxGetData(in[0])); + Collector_ns1ClassB::iterator item; + item = collector_ns1ClassB.find(self); + if(item != collector_ns1ClassB.end()) { + delete self; + collector_ns1ClassB.erase(item); + } +} + +void ns2ClassA_constructor_6(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + mexAtExit(&_deleteAllObjects); + typedef boost::shared_ptr Shared; + + Shared *self = *reinterpret_cast (mxGetData(in[0])); + collector_ns2ClassA.insert(self); +} +void ns2ClassA_constructor_7(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + mexAtExit(&_deleteAllObjects); + typedef boost::shared_ptr Shared; + + Shared *self = new Shared(new ns2::ClassA()); + collector_ns2ClassA.insert(self); + out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL); + *reinterpret_cast (mxGetData(out[0])) = self; +} + +void ns2ClassA_deconstructor_8(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + typedef boost::shared_ptr Shared; + checkArguments("delete_ns2ClassA",nargout,nargin,1); + Shared *self = *reinterpret_cast(mxGetData(in[0])); + Collector_ns2ClassA::iterator item; + item = collector_ns2ClassA.find(self); + if(item != collector_ns2ClassA.end()) { + delete self; + collector_ns2ClassA.erase(item); + } +} + +void ns2ClassA_memberFunction_9(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + typedef boost::shared_ptr Shared; + checkArguments("memberFunction",nargout,nargin-1,0); + Shared obj = unwrap_shared_ptr(in[0], "ns2::ClassA"); + double result = obj->memberFunction(); + out[0] = wrap< double >(result); +} + +void ns2ClassA_nsArg_10(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + typedef boost::shared_ptr Shared; + checkArguments("nsArg",nargout,nargin-1,1); + Shared obj = unwrap_shared_ptr(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); +} + +void ns2ClassA_nsReturn_11(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + typedef boost::shared_ptr SharedClassB; + typedef boost::shared_ptr Shared; + checkArguments("nsReturn",nargout,nargin-1,1); + Shared obj = unwrap_shared_ptr(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_shared_ptr(ret,"ns2ns3ClassB"); +} + +void ns2ClassA_afunction_12(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + typedef boost::shared_ptr Shared; + checkArguments("ns2ClassA.afunction",nargout,nargin,0); + double result = ns2::ClassA::afunction(); + out[0] = wrap< double >(result); +} + +void ns2ns3ClassB_constructor_13(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + mexAtExit(&_deleteAllObjects); + typedef boost::shared_ptr Shared; + + Shared *self = *reinterpret_cast (mxGetData(in[0])); + collector_ns2ns3ClassB.insert(self); +} +void ns2ns3ClassB_constructor_14(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + mexAtExit(&_deleteAllObjects); + typedef boost::shared_ptr Shared; + + Shared *self = new Shared(new ns2::ns3::ClassB()); + collector_ns2ns3ClassB.insert(self); + out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL); + *reinterpret_cast (mxGetData(out[0])) = self; +} + +void ns2ns3ClassB_deconstructor_15(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + typedef boost::shared_ptr Shared; + checkArguments("delete_ns2ns3ClassB",nargout,nargin,1); + Shared *self = *reinterpret_cast(mxGetData(in[0])); + Collector_ns2ns3ClassB::iterator item; + item = collector_ns2ns3ClassB.find(self); + if(item != collector_ns2ns3ClassB.end()) { + delete self; + collector_ns2ns3ClassB.erase(item); + } +} + +void ns2ClassC_constructor_16(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + mexAtExit(&_deleteAllObjects); + typedef boost::shared_ptr Shared; + + Shared *self = *reinterpret_cast (mxGetData(in[0])); + collector_ns2ClassC.insert(self); +} +void ns2ClassC_constructor_17(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + mexAtExit(&_deleteAllObjects); + typedef boost::shared_ptr Shared; + + Shared *self = new Shared(new ns2::ClassC()); + collector_ns2ClassC.insert(self); + out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL); + *reinterpret_cast (mxGetData(out[0])) = self; +} + +void ns2ClassC_deconstructor_18(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + typedef boost::shared_ptr Shared; + checkArguments("delete_ns2ClassC",nargout,nargin,1); + Shared *self = *reinterpret_cast(mxGetData(in[0])); + Collector_ns2ClassC::iterator item; + item = collector_ns2ClassC.find(self); + if(item != collector_ns2ClassC.end()) { + delete self; + collector_ns2ClassC.erase(item); + } +} + +void ClassD_constructor_19(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + mexAtExit(&_deleteAllObjects); + typedef boost::shared_ptr Shared; + + Shared *self = *reinterpret_cast (mxGetData(in[0])); + collector_ClassD.insert(self); +} +void ClassD_constructor_20(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + mexAtExit(&_deleteAllObjects); + typedef boost::shared_ptr Shared; + + Shared *self = new Shared(new ClassD()); + collector_ClassD.insert(self); + out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL); + *reinterpret_cast (mxGetData(out[0])) = self; +} + +void ClassD_deconstructor_21(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + typedef boost::shared_ptr Shared; + checkArguments("delete_ClassD",nargout,nargin,1); + Shared *self = *reinterpret_cast(mxGetData(in[0])); + Collector_ClassD::iterator item; + item = collector_ClassD.find(self); + if(item != collector_ClassD.end()) { + delete self; + collector_ClassD.erase(item); + } +} + +void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + mstream mout; + std::streambuf *outbuf = std::cout.rdbuf(&mout); + + int id = unwrap(in[0]); + + switch(id) { + case 0: + ns1ClassA_constructor_0(nargout, out, nargin-1, in+1); + break; + case 1: + ns1ClassA_constructor_1(nargout, out, nargin-1, in+1); + break; + case 2: + ns1ClassA_deconstructor_2(nargout, out, nargin-1, in+1); + break; + case 3: + ns1ClassB_constructor_3(nargout, out, nargin-1, in+1); + break; + case 4: + ns1ClassB_constructor_4(nargout, out, nargin-1, in+1); + break; + case 5: + ns1ClassB_deconstructor_5(nargout, out, nargin-1, in+1); + break; + case 6: + ns2ClassA_constructor_6(nargout, out, nargin-1, in+1); + break; + case 7: + ns2ClassA_constructor_7(nargout, out, nargin-1, in+1); + break; + case 8: + ns2ClassA_deconstructor_8(nargout, out, nargin-1, in+1); + break; + case 9: + ns2ClassA_memberFunction_9(nargout, out, nargin-1, in+1); + break; + case 10: + ns2ClassA_nsArg_10(nargout, out, nargin-1, in+1); + break; + case 11: + ns2ClassA_nsReturn_11(nargout, out, nargin-1, in+1); + break; + case 12: + ns2ClassA_afunction_12(nargout, out, nargin-1, in+1); + break; + case 13: + ns2ns3ClassB_constructor_13(nargout, out, nargin-1, in+1); + break; + case 14: + ns2ns3ClassB_constructor_14(nargout, out, nargin-1, in+1); + break; + case 15: + ns2ns3ClassB_deconstructor_15(nargout, out, nargin-1, in+1); + break; + case 16: + ns2ClassC_constructor_16(nargout, out, nargin-1, in+1); + break; + case 17: + ns2ClassC_constructor_17(nargout, out, nargin-1, in+1); + break; + case 18: + ns2ClassC_deconstructor_18(nargout, out, nargin-1, in+1); + break; + case 19: + ClassD_constructor_19(nargout, out, nargin-1, in+1); + break; + case 20: + ClassD_constructor_20(nargout, out, nargin-1, in+1); + break; + case 21: + ClassD_deconstructor_21(nargout, out, nargin-1, in+1); + break; + } + + std::cout.rdbuf(outbuf); +} diff --git a/wrap/tests/testWrap.cpp b/wrap/tests/testWrap.cpp index 2a0b5e259..9f9f29688 100644 --- a/wrap/tests/testWrap.cpp +++ b/wrap/tests/testWrap.cpp @@ -63,11 +63,11 @@ TEST( wrap, check_exception ) { CHECK_EXCEPTION(Module("/alsonotarealpath", "geometry",enable_verbose), CantOpenFile); // clean out previous generated code - fs::remove_all("actual_deps"); + fs::remove_all("actual_deps"); string path = topdir + "/wrap/tests"; Module module(path.c_str(), "testDependencies",enable_verbose); - CHECK_EXCEPTION(module.matlab_code("mex", "actual_deps", "mexa64", headerPath, "-O5"), DependencyMissing); + CHECK_EXCEPTION(module.matlab_code("actual_deps", headerPath), DependencyMissing); } /* ************************************************************************* */ @@ -116,10 +116,13 @@ TEST( wrap, parse ) { EXPECT(assert_equal("x", a1.name)); // check method - Method m1 = cls.methods.front(); - EXPECT(assert_equal("double", m1.returnVal.type1)); + CHECK(cls.methods.find("norm") != cls.methods.end()); + Method m1 = cls.methods.find("norm")->second; + LONGS_EQUAL(1, m1.returnVals.size()); + EXPECT(assert_equal("double", m1.returnVals.front().type1)); EXPECT(assert_equal("norm", m1.name)); - EXPECT_LONGS_EQUAL(0, m1.args.size()); + LONGS_EQUAL(1, m1.argLists.size()); + EXPECT_LONGS_EQUAL(0, m1.argLists.front().size()); EXPECT(m1.is_const_); } @@ -136,10 +139,12 @@ TEST( wrap, parse ) { EXPECT(assert_equal(exp_includes, testCls.includes)); // function to parse: pair return_pair (Vector v, Matrix A) const; - Method m2 = testCls.methods.front(); - EXPECT(m2.returnVal.isPair); - EXPECT(m2.returnVal.category1 == ReturnValue::EIGEN); - EXPECT(m2.returnVal.category2 == ReturnValue::EIGEN); + CHECK(testCls.methods.find("return_pair") != testCls.methods.end()); + Method m2 = testCls.methods.find("return_pair")->second; + LONGS_EQUAL(1, m2.returnVals.size()); + EXPECT(m2.returnVals.front().isPair); + EXPECT(m2.returnVals.front().category1 == ReturnValue::EIGEN); + EXPECT(m2.returnVals.front().category2 == ReturnValue::EIGEN); } } @@ -202,7 +207,6 @@ TEST( wrap, parse_namespaces ) { strvec exp_includes; exp_includes += ""; EXPECT(assert_equal(exp_includes, cls.includes)); } - } /* ************************************************************************* */ @@ -213,38 +217,21 @@ TEST( wrap, matlab_code_namespaces ) { string path = topdir + "/wrap"; // clean out previous generated code - fs::remove_all("actual_namespaces"); + fs::remove_all("actual_namespaces"); // emit MATLAB code - string exp_path = path + "/tests/expected_namespaces/"; - string act_path = "actual_namespaces/"; - module.matlab_code("mex", "actual_namespaces", "mexa64", headerPath, "-O5"); + string exp_path = path + "/tests/expected_namespaces/"; + string act_path = "actual_namespaces/"; + module.matlab_code("actual_namespaces", headerPath); - EXPECT(files_equal(exp_path + "new_ClassD.cpp" , act_path + "new_ClassD.cpp" )); - EXPECT(files_equal(exp_path + "new_ClassD.m" , act_path + "new_ClassD.m" )); - EXPECT(files_equal(exp_path + "new_ns1ClassA.cpp" , act_path + "new_ns1ClassA.cpp" )); - EXPECT(files_equal(exp_path + "new_ns1ClassA.m" , act_path + "new_ns1ClassA.m" )); - EXPECT(files_equal(exp_path + "new_ns1ClassB.cpp" , act_path + "new_ns1ClassB.cpp" )); - EXPECT(files_equal(exp_path + "new_ns1ClassB.m" , act_path + "new_ns1ClassB.m" )); - EXPECT(files_equal(exp_path + "new_ns2ClassA.cpp" , act_path + "new_ns2ClassA.cpp" )); - EXPECT(files_equal(exp_path + "new_ns2ClassA.m" , act_path + "new_ns2ClassA.m" )); - EXPECT(files_equal(exp_path + "new_ns2ClassC.cpp" , act_path + "new_ns2ClassC.cpp" )); - EXPECT(files_equal(exp_path + "new_ns2ClassC.m" , act_path + "new_ns2ClassC.m" )); - EXPECT(files_equal(exp_path + "new_ns2ns3ClassB.cpp" , act_path + "new_ns2ns3ClassB.cpp" )); - EXPECT(files_equal(exp_path + "new_ns2ns3ClassB.m" , act_path + "new_ns2ns3ClassB.m" )); - EXPECT(files_equal(exp_path + "ns2ClassA_afunction.cpp" , act_path + "ns2ClassA_afunction.cpp" )); - EXPECT(files_equal(exp_path + "ns2ClassA_afunction.m" , act_path + "ns2ClassA_afunction.m" )); - EXPECT(files_equal(exp_path + "@ns2ClassA/memberFunction.cpp", act_path + "@ns2ClassA/memberFunction.cpp")); - EXPECT(files_equal(exp_path + "@ns2ClassA/memberFunction.m" , act_path + "@ns2ClassA/memberFunction.m" )); - EXPECT(files_equal(exp_path + "@ns2ClassA/ns2ClassA.m" , act_path + "@ns2ClassA/ns2ClassA.m" )); - EXPECT(files_equal(exp_path + "@ns2ClassA/nsArg.cpp" , act_path + "@ns2ClassA/nsArg.cpp" )); - EXPECT(files_equal(exp_path + "@ns2ClassA/nsArg.m" , act_path + "@ns2ClassA/nsArg.m" )); - EXPECT(files_equal(exp_path + "@ns2ClassA/nsReturn.cpp" , act_path + "@ns2ClassA/nsReturn.cpp" )); - EXPECT(files_equal(exp_path + "@ns2ClassA/nsReturn.m" , act_path + "@ns2ClassA/nsReturn.m" )); - - EXPECT(files_equal(exp_path + "make_testNamespaces.m", act_path + "make_testNamespaces.m")); - EXPECT(files_equal(exp_path + "Makefile" , act_path + "Makefile" )); + EXPECT(files_equal(exp_path + "ClassD.m" , act_path + "ClassD.m" )); + EXPECT(files_equal(exp_path + "ns1ClassA.m" , act_path + "ns1ClassA.m" )); + EXPECT(files_equal(exp_path + "ns1ClassB.m" , act_path + "ns1ClassB.m" )); + EXPECT(files_equal(exp_path + "ns2ClassA.m" , act_path + "ns2ClassA.m" )); + EXPECT(files_equal(exp_path + "ns2ClassC.m" , act_path + "ns2ClassC.m" )); + EXPECT(files_equal(exp_path + "ns2ns3ClassB.m" , act_path + "ns2ns3ClassB.m" )); + EXPECT(files_equal(exp_path + "testNamespaces_wrapper.cpp" , act_path + "testNamespaces_wrapper.cpp" )); } /* ************************************************************************* */ @@ -255,87 +242,18 @@ TEST( wrap, matlab_code ) { string path = topdir + "/wrap"; // clean out previous generated code - fs::remove_all("actual"); + fs::remove_all("actual"); // emit MATLAB code // make_geometry will not compile, use make testwrap to generate real make - module.matlab_code("mex", "actual", "mexa64", headerPath, "-O5"); - string epath = path + "/tests/expected/"; - string apath = "actual/"; - - EXPECT(files_equal(epath + "Makefile" , apath + "Makefile" )); - EXPECT(files_equal(epath + "make_geometry.m" , apath + "make_geometry.m" )); - EXPECT(files_equal(epath + "new_Point2.cpp" , apath + "new_Point2.cpp" )); - EXPECT(files_equal(epath + "new_Point2.m" , apath + "new_Point2.m" )); - EXPECT(files_equal(epath + "new_Point3.cpp" , apath + "new_Point3.cpp" )); - EXPECT(files_equal(epath + "new_Point3.m" , apath + "new_Point3.m" )); - EXPECT(files_equal(epath + "new_Test.cpp" , apath + "new_Test.cpp" )); - EXPECT(files_equal(epath + "new_Test.m" , apath + "new_Test.m" )); - - EXPECT(files_equal(epath + "Point3_staticFunction.cpp" , apath + "Point3_staticFunction.cpp" )); - EXPECT(files_equal(epath + "Point3_staticFunction.m" , apath + "Point3_staticFunction.m" )); - EXPECT(files_equal(epath + "Point3_StaticFunctionRet.cpp" , apath + "Point3_StaticFunctionRet.cpp" )); - EXPECT(files_equal(epath + "Point3_StaticFunctionRet.m" , apath + "Point3_StaticFunctionRet.m" )); - - EXPECT(files_equal(epath + "@Point2/argChar.cpp" , apath + "@Point2/argChar.cpp" )); - EXPECT(files_equal(epath + "@Point2/argChar.m" , apath + "@Point2/argChar.m" )); - EXPECT(files_equal(epath + "@Point2/argUChar.cpp" , apath + "@Point2/argUChar.cpp" )); - EXPECT(files_equal(epath + "@Point2/argUChar.m" , apath + "@Point2/argUChar.m" )); - EXPECT(files_equal(epath + "@Point2/dim.cpp" , apath + "@Point2/dim.cpp" )); - EXPECT(files_equal(epath + "@Point2/dim.m" , apath + "@Point2/dim.m" )); - EXPECT(files_equal(epath + "@Point2/Point2.m" , apath + "@Point2/Point2.m" )); - EXPECT(files_equal(epath + "@Point2/returnChar.cpp" , apath + "@Point2/returnChar.cpp" )); - EXPECT(files_equal(epath + "@Point2/returnChar.m" , apath + "@Point2/returnChar.m" )); - EXPECT(files_equal(epath + "@Point2/vectorConfusion.cpp" , apath + "@Point2/vectorConfusion.cpp" )); - EXPECT(files_equal(epath + "@Point2/vectorConfusion.m" , apath + "@Point2/vectorConfusion.m" )); - EXPECT(files_equal(epath + "@Point2/x.cpp" , apath + "@Point2/x.cpp" )); - EXPECT(files_equal(epath + "@Point2/x.m" , apath + "@Point2/x.m" )); - EXPECT(files_equal(epath + "@Point2/y.cpp" , apath + "@Point2/y.cpp" )); - EXPECT(files_equal(epath + "@Point2/y.m" , apath + "@Point2/y.m" )); - EXPECT(files_equal(epath + "@Point3/norm.cpp" , apath + "@Point3/norm.cpp" )); - EXPECT(files_equal(epath + "@Point3/norm.m" , apath + "@Point3/norm.m" )); - EXPECT(files_equal(epath + "@Point3/Point3.m" , apath + "@Point3/Point3.m" )); - - EXPECT(files_equal(epath + "@Test/arg_EigenConstRef.cpp" , apath + "@Test/arg_EigenConstRef.cpp" )); - EXPECT(files_equal(epath + "@Test/arg_EigenConstRef.m" , apath + "@Test/arg_EigenConstRef.m" )); - EXPECT(files_equal(epath + "@Test/create_MixedPtrs.cpp" , apath + "@Test/create_MixedPtrs.cpp" )); - EXPECT(files_equal(epath + "@Test/create_MixedPtrs.m" , apath + "@Test/create_MixedPtrs.m" )); - EXPECT(files_equal(epath + "@Test/create_ptrs.cpp" , apath + "@Test/create_ptrs.cpp" )); - EXPECT(files_equal(epath + "@Test/create_ptrs.m" , apath + "@Test/create_ptrs.m" )); - EXPECT(files_equal(epath + "@Test/print.cpp" , apath + "@Test/print.cpp" )); - EXPECT(files_equal(epath + "@Test/print.m" , apath + "@Test/print.m" )); - EXPECT(files_equal(epath + "@Test/return_bool.cpp" , apath + "@Test/return_bool.cpp" )); - EXPECT(files_equal(epath + "@Test/return_bool.m" , apath + "@Test/return_bool.m" )); - EXPECT(files_equal(epath + "@Test/return_double.cpp" , apath + "@Test/return_double.cpp" )); - EXPECT(files_equal(epath + "@Test/return_double.m" , apath + "@Test/return_double.m" )); - EXPECT(files_equal(epath + "@Test/return_field.cpp" , apath + "@Test/return_field.cpp" )); - EXPECT(files_equal(epath + "@Test/return_field.m" , apath + "@Test/return_field.m" )); - EXPECT(files_equal(epath + "@Test/return_int.cpp" , apath + "@Test/return_int.cpp" )); - EXPECT(files_equal(epath + "@Test/return_int.m" , apath + "@Test/return_int.m" )); - EXPECT(files_equal(epath + "@Test/return_matrix1.cpp" , apath + "@Test/return_matrix1.cpp" )); - EXPECT(files_equal(epath + "@Test/return_matrix1.m" , apath + "@Test/return_matrix1.m" )); - EXPECT(files_equal(epath + "@Test/return_matrix2.cpp" , apath + "@Test/return_matrix2.cpp" )); - EXPECT(files_equal(epath + "@Test/return_matrix2.m" , apath + "@Test/return_matrix2.m" )); - EXPECT(files_equal(epath + "@Test/return_pair.cpp" , apath + "@Test/return_pair.cpp" )); - EXPECT(files_equal(epath + "@Test/return_pair.m" , apath + "@Test/return_pair.m" )); - EXPECT(files_equal(epath + "@Test/return_Point2Ptr.cpp" , apath + "@Test/return_Point2Ptr.cpp" )); - EXPECT(files_equal(epath + "@Test/return_Point2Ptr.m" , apath + "@Test/return_Point2Ptr.m" )); - EXPECT(files_equal(epath + "@Test/return_ptrs.cpp" , apath + "@Test/return_ptrs.cpp" )); - EXPECT(files_equal(epath + "@Test/return_ptrs.m" , apath + "@Test/return_ptrs.m" )); - EXPECT(files_equal(epath + "@Test/return_size_t.cpp" , apath + "@Test/return_size_t.cpp" )); - EXPECT(files_equal(epath + "@Test/return_size_t.m" , apath + "@Test/return_size_t.m" )); - EXPECT(files_equal(epath + "@Test/return_string.cpp" , apath + "@Test/return_string.cpp" )); - EXPECT(files_equal(epath + "@Test/return_string.m" , apath + "@Test/return_string.m" )); - EXPECT(files_equal(epath + "@Test/return_Test.cpp" , apath + "@Test/return_Test.cpp" )); - EXPECT(files_equal(epath + "@Test/return_Test.m" , apath + "@Test/return_Test.m" )); - EXPECT(files_equal(epath + "@Test/return_TestPtr.cpp" , apath + "@Test/return_TestPtr.cpp" )); - EXPECT(files_equal(epath + "@Test/return_TestPtr.m" , apath + "@Test/return_TestPtr.m" )); - EXPECT(files_equal(epath + "@Test/return_vector1.cpp" , apath + "@Test/return_vector1.cpp" )); - EXPECT(files_equal(epath + "@Test/return_vector1.m" , apath + "@Test/return_vector1.m" )); - EXPECT(files_equal(epath + "@Test/return_vector2.cpp" , apath + "@Test/return_vector2.cpp" )); - EXPECT(files_equal(epath + "@Test/return_vector2.m" , apath + "@Test/return_vector2.m" )); - EXPECT(files_equal(epath + "@Test/Test.m" , apath + "@Test/Test.m" )); + module.matlab_code("actual", headerPath); + string epath = path + "/tests/expected/"; + string apath = "actual/"; + EXPECT(files_equal(epath + "geometry_wrapper.cpp" , apath + "geometry_wrapper.cpp" )); + EXPECT(files_equal(epath + "Point2.m" , apath + "Point2.m" )); + EXPECT(files_equal(epath + "Point3.m" , apath + "Point3.m" )); + EXPECT(files_equal(epath + "Test.m" , apath + "Test.m" )); } /* ************************************************************************* */