diff --git a/wrap/tests/expected/+gtsam/Point2.m b/wrap/tests/expected/+gtsam/Point2.m new file mode 100644 index 000000000..308b35d9a --- /dev/null +++ b/wrap/tests/expected/+gtsam/Point2.m @@ -0,0 +1,90 @@ +%class Point2, see Doxygen page for details +%at http://research.cc.gatech.edu/borg/sites/edu.borg/html/index.html +% +%-------Constructors------- +%Point2() +%Point2(double x, double y) +% +%-------Methods------- +%argChar(char a) : returns void +%argUChar(unsigned char a) : returns void +%dim() : returns int +%returnChar() : returns char +%vectorConfusion() : returns VectorNotEigen +%x() : returns double +%y() : returns double +% +classdef Point2 < handle + properties + ptr_gtsamPoint2 = 0 + end + methods + function obj = Point2(varargin) + if nargin == 2 && isa(varargin{1}, 'uint64') && varargin{1} == uint64(5139824614673773682) + my_ptr = varargin{2}; + geometry_wrapper(0, my_ptr); + elseif nargin == 0 + my_ptr = geometry_wrapper(1); + elseif nargin == 2 && isa(varargin{1},'double') && isa(varargin{2},'double') + my_ptr = geometry_wrapper(2, varargin{1}, varargin{2}); + else + error('Arguments do not match any overload of gtsam.Point2 constructor'); + end + obj.ptr_gtsamPoint2 = my_ptr; + end + + function delete(obj) + geometry_wrapper(3, obj.ptr_gtsamPoint2); + end + + function display(obj), obj.print(''); end + %DISPLAY Calls print on the object + function disp(obj), obj.display; end + %DISP Calls print on the object + function varargout = argChar(this, varargin) + % ARGCHAR usage: argChar(char a) : returns void + % Doxygen can be found at http://research.cc.gatech.edu/borg/sites/edu.borg/html/index.html + geometry_wrapper(4, this, varargin{:}); + end + + function varargout = argUChar(this, varargin) + % ARGUCHAR usage: argUChar(unsigned char a) : returns void + % Doxygen can be found at http://research.cc.gatech.edu/borg/sites/edu.borg/html/index.html + geometry_wrapper(5, this, varargin{:}); + end + + function varargout = dim(this, varargin) + % DIM usage: dim() : returns int + % Doxygen can be found at http://research.cc.gatech.edu/borg/sites/edu.borg/html/index.html + varargout{1} = geometry_wrapper(6, this, varargin{:}); + end + + function varargout = returnChar(this, varargin) + % RETURNCHAR usage: returnChar() : returns char + % Doxygen can be found at http://research.cc.gatech.edu/borg/sites/edu.borg/html/index.html + varargout{1} = geometry_wrapper(7, this, varargin{:}); + end + + function varargout = vectorConfusion(this, varargin) + % VECTORCONFUSION usage: vectorConfusion() : returns VectorNotEigen + % Doxygen can be found at http://research.cc.gatech.edu/borg/sites/edu.borg/html/index.html + varargout{1} = geometry_wrapper(8, this, varargin{:}); + end + + function varargout = x(this, varargin) + % X usage: x() : returns double + % Doxygen can be found at http://research.cc.gatech.edu/borg/sites/edu.borg/html/index.html + varargout{1} = geometry_wrapper(9, this, varargin{:}); + end + + function varargout = y(this, varargin) + % Y usage: y() : returns double + % Doxygen can be found at http://research.cc.gatech.edu/borg/sites/edu.borg/html/index.html + varargout{1} = geometry_wrapper(10, this, varargin{:}); + end + + end + + methods(Static = true) + end +end diff --git a/wrap/tests/expected/+gtsam/Point3.m b/wrap/tests/expected/+gtsam/Point3.m new file mode 100644 index 000000000..a9a28c14c --- /dev/null +++ b/wrap/tests/expected/+gtsam/Point3.m @@ -0,0 +1,93 @@ +%class Point3, see Doxygen page for details +%at http://research.cc.gatech.edu/borg/sites/edu.borg/html/index.html +% +%-------Constructors------- +%Point3(double x, double y, double z) +% +%-------Methods------- +%norm() : returns double +% +%-------Static Methods------- +%StaticFunctionRet(double z) : returns gtsam::Point3 +%staticFunction() : returns double +% +%-------Serialization Interface------- +%string_serialize() : returns string +%string_deserialize(string serialized) : returns Point3 +% +classdef Point3 < handle + properties + ptr_gtsamPoint3 = 0 + end + methods + function obj = Point3(varargin) + if nargin == 2 && isa(varargin{1}, 'uint64') && varargin{1} == uint64(5139824614673773682) + my_ptr = varargin{2}; + geometry_wrapper(11, my_ptr); + elseif nargin == 3 && isa(varargin{1},'double') && isa(varargin{2},'double') && isa(varargin{3},'double') + my_ptr = geometry_wrapper(12, varargin{1}, varargin{2}, varargin{3}); + else + error('Arguments do not match any overload of gtsam.Point3 constructor'); + end + obj.ptr_gtsamPoint3 = my_ptr; + end + + function delete(obj) + geometry_wrapper(13, obj.ptr_gtsamPoint3); + end + + function display(obj), obj.print(''); end + %DISPLAY Calls print on the object + function disp(obj), obj.display; end + %DISP Calls print on the object + function varargout = norm(this, varargin) + % NORM usage: norm() : returns double + % Doxygen can be found at http://research.cc.gatech.edu/borg/sites/edu.borg/html/index.html + varargout{1} = geometry_wrapper(14, this, varargin{:}); + end + + function varargout = string_serialize(this, varargin) + % STRING_SERIALIZE usage: string_serialize() : returns string + % Doxygen can be found at http://research.cc.gatech.edu/borg/sites/edu.borg/html/index.html + if length(varargin) == 0 + varargout{1} = geometry_wrapper(15, this, varargin{:}); + else + error('Arguments do not match any overload of function gtsam.Point3.string_serialize'); + end + end + + function sobj = saveobj(obj) + % SAVEOBJ Saves the object to a matlab-readable format + sobj = obj.string_serialize(); + end + end + + methods(Static = true) + function varargout = StaticFunctionRet(varargin) + % STATICFUNCTIONRET usage: StaticFunctionRet(double z) : returns gtsam::Point3 + % Doxygen can be found at http://research.cc.gatech.edu/borg/sites/edu.borg/html/index.html + varargout{1} = geometry_wrapper(16, varargin{:}); + end + + function varargout = StaticFunction(varargin) + % STATICFUNCTION usage: staticFunction() : returns double + % Doxygen can be found at http://research.cc.gatech.edu/borg/sites/edu.borg/html/index.html + varargout{1} = geometry_wrapper(17, varargin{:}); + end + + function varargout = string_deserialize(varargin) + % STRING_DESERIALIZE usage: string_deserialize() : returns gtsam.Point3 + % Doxygen can be found at http://research.cc.gatech.edu/borg/sites/edu.borg/html/index.html + if length(varargin) == 1 + varargout{1} = geometry_wrapper(18, varargin{:}); + else + error('Arguments do not match any overload of function gtsam.Point3.string_deserialize'); + end + end + + function obj = loadobj(sobj) + % LOADOBJ Saves the object to a matlab-readable format + obj = gtsam.Point3.string_deserialize(sobj); + end + end +end diff --git a/wrap/tests/expected/MyBase.m b/wrap/tests/expected/MyBase.m new file mode 100644 index 000000000..34d3cb4c0 --- /dev/null +++ b/wrap/tests/expected/MyBase.m @@ -0,0 +1,35 @@ +%class MyBase, see Doxygen page for details +%at http://research.cc.gatech.edu/borg/sites/edu.borg/html/index.html +% +classdef MyBase < handle + properties + ptr_MyBase = 0 + end + methods + function obj = MyBase(varargin) + if (nargin == 2 || (nargin == 3 && strcmp(varargin{3}, 'void'))) && isa(varargin{1}, 'uint64') && varargin{1} == uint64(5139824614673773682) + if nargin == 2 + my_ptr = varargin{2}; + else + my_ptr = geometry_wrapper(43, varargin{2}); + end + geometry_wrapper(42, my_ptr); + else + error('Arguments do not match any overload of MyBase constructor'); + end + obj.ptr_MyBase = my_ptr; + end + + function delete(obj) + geometry_wrapper(44, obj.ptr_MyBase); + end + + function display(obj), obj.print(''); end + %DISPLAY Calls print on the object + function disp(obj), obj.display; end + %DISP Calls print on the object + end + + methods(Static = true) + end +end diff --git a/wrap/tests/expected/MyFactorPosePoint2.m b/wrap/tests/expected/MyFactorPosePoint2.m new file mode 100644 index 000000000..496a2c1e8 --- /dev/null +++ b/wrap/tests/expected/MyFactorPosePoint2.m @@ -0,0 +1,36 @@ +%class MyFactorPosePoint2, see Doxygen page for details +%at http://research.cc.gatech.edu/borg/sites/edu.borg/html/index.html +% +%-------Constructors------- +%MyFactorPosePoint2(size_t key1, size_t key2, double measured, Base noiseModel) +% +classdef MyFactorPosePoint2 < handle + properties + ptr_MyFactorPosePoint2 = 0 + end + methods + function obj = MyFactorPosePoint2(varargin) + if nargin == 2 && isa(varargin{1}, 'uint64') && varargin{1} == uint64(5139824614673773682) + my_ptr = varargin{2}; + geometry_wrapper(75, my_ptr); + elseif nargin == 4 && isa(varargin{1},'numeric') && isa(varargin{2},'numeric') && isa(varargin{3},'double') && isa(varargin{4},'gtsam.noiseModel.Base') + my_ptr = geometry_wrapper(76, varargin{1}, varargin{2}, varargin{3}, varargin{4}); + else + error('Arguments do not match any overload of MyFactorPosePoint2 constructor'); + end + obj.ptr_MyFactorPosePoint2 = my_ptr; + end + + function delete(obj) + geometry_wrapper(77, obj.ptr_MyFactorPosePoint2); + end + + function display(obj), obj.print(''); end + %DISPLAY Calls print on the object + function disp(obj), obj.display; end + %DISP Calls print on the object + end + + methods(Static = true) + end +end diff --git a/wrap/tests/expected/MyTemplatePoint2.m b/wrap/tests/expected/MyTemplatePoint2.m new file mode 100644 index 000000000..e6adb3d2c --- /dev/null +++ b/wrap/tests/expected/MyTemplatePoint2.m @@ -0,0 +1,156 @@ +%class MyTemplatePoint2, see Doxygen page for details +%at http://research.cc.gatech.edu/borg/sites/edu.borg/html/index.html +% +%-------Constructors------- +%MyTemplatePoint2() +% +%-------Methods------- +%accept_T(Point2 value) : returns void +%accept_Tptr(Point2 value) : returns void +%create_MixedPtrs() : returns pair< gtsam::Point2, gtsam::Point2 > +%create_ptrs() : returns pair< gtsam::Point2, gtsam::Point2 > +%return_T(Point2 value) : returns gtsam::Point2 +%return_Tptr(Point2 value) : returns gtsam::Point2 +%return_ptrs(Point2 p1, Point2 p2) : returns pair< gtsam::Point2, gtsam::Point2 > +%templatedMethodMatrix(Matrix t) : returns void +%templatedMethodPoint2(Point2 t) : returns void +%templatedMethodPoint3(Point3 t) : returns void +%templatedMethodVector(Vector t) : returns void +% +classdef MyTemplatePoint2 < MyBase + properties + ptr_MyTemplatePoint2 = 0 + end + methods + function obj = MyTemplatePoint2(varargin) + if (nargin == 2 || (nargin == 3 && strcmp(varargin{3}, 'void'))) && isa(varargin{1}, 'uint64') && varargin{1} == uint64(5139824614673773682) + if nargin == 2 + my_ptr = varargin{2}; + else + my_ptr = geometry_wrapper(46, varargin{2}); + end + base_ptr = geometry_wrapper(45, my_ptr); + elseif nargin == 0 + [ my_ptr, base_ptr ] = geometry_wrapper(47); + else + error('Arguments do not match any overload of MyTemplatePoint2 constructor'); + end + obj = obj@MyBase(uint64(5139824614673773682), base_ptr); + obj.ptr_MyTemplatePoint2 = my_ptr; + end + + function delete(obj) + geometry_wrapper(48, obj.ptr_MyTemplatePoint2); + end + + function display(obj), obj.print(''); end + %DISPLAY Calls print on the object + function disp(obj), obj.display; end + %DISP Calls print on the object + function varargout = accept_T(this, varargin) + % ACCEPT_T usage: accept_T(Point2 value) : returns void + % Doxygen can be found at http://research.cc.gatech.edu/borg/sites/edu.borg/html/index.html + if length(varargin) == 1 && isa(varargin{1},'gtsam.Point2') + geometry_wrapper(49, this, varargin{:}); + else + error('Arguments do not match any overload of function MyTemplatePoint2.accept_T'); + end + end + + function varargout = accept_Tptr(this, varargin) + % ACCEPT_TPTR usage: accept_Tptr(Point2 value) : returns void + % Doxygen can be found at http://research.cc.gatech.edu/borg/sites/edu.borg/html/index.html + if length(varargin) == 1 && isa(varargin{1},'gtsam.Point2') + geometry_wrapper(50, this, varargin{:}); + else + error('Arguments do not match any overload of function MyTemplatePoint2.accept_Tptr'); + end + end + + function varargout = create_MixedPtrs(this, varargin) + % CREATE_MIXEDPTRS usage: create_MixedPtrs() : returns pair< gtsam::Point2, gtsam::Point2 > + % Doxygen can be found at http://research.cc.gatech.edu/borg/sites/edu.borg/html/index.html + [ varargout{1} varargout{2} ] = geometry_wrapper(51, this, varargin{:}); + end + + function varargout = create_ptrs(this, varargin) + % CREATE_PTRS usage: create_ptrs() : returns pair< gtsam::Point2, gtsam::Point2 > + % Doxygen can be found at http://research.cc.gatech.edu/borg/sites/edu.borg/html/index.html + [ varargout{1} varargout{2} ] = geometry_wrapper(52, this, varargin{:}); + end + + function varargout = return_T(this, varargin) + % RETURN_T usage: return_T(Point2 value) : returns gtsam::Point2 + % Doxygen can be found at http://research.cc.gatech.edu/borg/sites/edu.borg/html/index.html + if length(varargin) == 1 && isa(varargin{1},'gtsam.Point2') + varargout{1} = geometry_wrapper(53, this, varargin{:}); + else + error('Arguments do not match any overload of function MyTemplatePoint2.return_T'); + end + end + + function varargout = return_Tptr(this, varargin) + % RETURN_TPTR usage: return_Tptr(Point2 value) : returns gtsam::Point2 + % Doxygen can be found at http://research.cc.gatech.edu/borg/sites/edu.borg/html/index.html + if length(varargin) == 1 && isa(varargin{1},'gtsam.Point2') + varargout{1} = geometry_wrapper(54, this, varargin{:}); + else + error('Arguments do not match any overload of function MyTemplatePoint2.return_Tptr'); + end + end + + function varargout = return_ptrs(this, varargin) + % RETURN_PTRS usage: return_ptrs(Point2 p1, Point2 p2) : returns pair< gtsam::Point2, gtsam::Point2 > + % Doxygen can be found at http://research.cc.gatech.edu/borg/sites/edu.borg/html/index.html + if length(varargin) == 2 && isa(varargin{1},'gtsam.Point2') && isa(varargin{2},'gtsam.Point2') + [ varargout{1} varargout{2} ] = geometry_wrapper(55, this, varargin{:}); + else + error('Arguments do not match any overload of function MyTemplatePoint2.return_ptrs'); + end + end + + function varargout = templatedMethodMatrix(this, varargin) + % TEMPLATEDMETHODMATRIX usage: templatedMethodMatrix(Matrix t) : returns void + % Doxygen can be found at http://research.cc.gatech.edu/borg/sites/edu.borg/html/index.html + if length(varargin) == 1 && isa(varargin{1},'double') + geometry_wrapper(56, this, varargin{:}); + else + error('Arguments do not match any overload of function MyTemplatePoint2.templatedMethod'); + end + end + + function varargout = templatedMethodPoint2(this, varargin) + % TEMPLATEDMETHODPOINT2 usage: templatedMethodPoint2(Point2 t) : returns void + % Doxygen can be found at http://research.cc.gatech.edu/borg/sites/edu.borg/html/index.html + if length(varargin) == 1 && isa(varargin{1},'gtsam.Point2') + geometry_wrapper(57, this, varargin{:}); + else + error('Arguments do not match any overload of function MyTemplatePoint2.templatedMethod'); + end + end + + function varargout = templatedMethodPoint3(this, varargin) + % TEMPLATEDMETHODPOINT3 usage: templatedMethodPoint3(Point3 t) : returns void + % Doxygen can be found at http://research.cc.gatech.edu/borg/sites/edu.borg/html/index.html + if length(varargin) == 1 && isa(varargin{1},'gtsam.Point3') + geometry_wrapper(58, this, varargin{:}); + else + error('Arguments do not match any overload of function MyTemplatePoint2.templatedMethod'); + end + end + + function varargout = templatedMethodVector(this, varargin) + % TEMPLATEDMETHODVECTOR usage: templatedMethodVector(Vector t) : returns void + % Doxygen can be found at http://research.cc.gatech.edu/borg/sites/edu.borg/html/index.html + if length(varargin) == 1 && isa(varargin{1},'double') + geometry_wrapper(59, this, varargin{:}); + else + error('Arguments do not match any overload of function MyTemplatePoint2.templatedMethod'); + end + end + + end + + methods(Static = true) + end +end diff --git a/wrap/tests/expected/MyTemplatePoint3.m b/wrap/tests/expected/MyTemplatePoint3.m new file mode 100644 index 000000000..9819b5ee1 --- /dev/null +++ b/wrap/tests/expected/MyTemplatePoint3.m @@ -0,0 +1,156 @@ +%class MyTemplatePoint3, see Doxygen page for details +%at http://research.cc.gatech.edu/borg/sites/edu.borg/html/index.html +% +%-------Constructors------- +%MyTemplatePoint3() +% +%-------Methods------- +%accept_T(Point3 value) : returns void +%accept_Tptr(Point3 value) : returns void +%create_MixedPtrs() : returns pair< gtsam::Point3, gtsam::Point3 > +%create_ptrs() : returns pair< gtsam::Point3, gtsam::Point3 > +%return_T(Point3 value) : returns gtsam::Point3 +%return_Tptr(Point3 value) : returns gtsam::Point3 +%return_ptrs(Point3 p1, Point3 p2) : returns pair< gtsam::Point3, gtsam::Point3 > +%templatedMethodMatrix(Matrix t) : returns void +%templatedMethodPoint2(Point2 t) : returns void +%templatedMethodPoint3(Point3 t) : returns void +%templatedMethodVector(Vector t) : returns void +% +classdef MyTemplatePoint3 < MyBase + properties + ptr_MyTemplatePoint3 = 0 + end + methods + function obj = MyTemplatePoint3(varargin) + if (nargin == 2 || (nargin == 3 && strcmp(varargin{3}, 'void'))) && isa(varargin{1}, 'uint64') && varargin{1} == uint64(5139824614673773682) + if nargin == 2 + my_ptr = varargin{2}; + else + my_ptr = geometry_wrapper(61, varargin{2}); + end + base_ptr = geometry_wrapper(60, my_ptr); + elseif nargin == 0 + [ my_ptr, base_ptr ] = geometry_wrapper(62); + else + error('Arguments do not match any overload of MyTemplatePoint3 constructor'); + end + obj = obj@MyBase(uint64(5139824614673773682), base_ptr); + obj.ptr_MyTemplatePoint3 = my_ptr; + end + + function delete(obj) + geometry_wrapper(63, obj.ptr_MyTemplatePoint3); + end + + function display(obj), obj.print(''); end + %DISPLAY Calls print on the object + function disp(obj), obj.display; end + %DISP Calls print on the object + function varargout = accept_T(this, varargin) + % ACCEPT_T usage: accept_T(Point3 value) : returns void + % Doxygen can be found at http://research.cc.gatech.edu/borg/sites/edu.borg/html/index.html + if length(varargin) == 1 && isa(varargin{1},'gtsam.Point3') + geometry_wrapper(64, this, varargin{:}); + else + error('Arguments do not match any overload of function MyTemplatePoint3.accept_T'); + end + end + + function varargout = accept_Tptr(this, varargin) + % ACCEPT_TPTR usage: accept_Tptr(Point3 value) : returns void + % Doxygen can be found at http://research.cc.gatech.edu/borg/sites/edu.borg/html/index.html + if length(varargin) == 1 && isa(varargin{1},'gtsam.Point3') + geometry_wrapper(65, this, varargin{:}); + else + error('Arguments do not match any overload of function MyTemplatePoint3.accept_Tptr'); + end + end + + function varargout = create_MixedPtrs(this, varargin) + % CREATE_MIXEDPTRS usage: create_MixedPtrs() : returns pair< gtsam::Point3, gtsam::Point3 > + % Doxygen can be found at http://research.cc.gatech.edu/borg/sites/edu.borg/html/index.html + [ varargout{1} varargout{2} ] = geometry_wrapper(66, this, varargin{:}); + end + + function varargout = create_ptrs(this, varargin) + % CREATE_PTRS usage: create_ptrs() : returns pair< gtsam::Point3, gtsam::Point3 > + % Doxygen can be found at http://research.cc.gatech.edu/borg/sites/edu.borg/html/index.html + [ varargout{1} varargout{2} ] = geometry_wrapper(67, this, varargin{:}); + end + + function varargout = return_T(this, varargin) + % RETURN_T usage: return_T(Point3 value) : returns gtsam::Point3 + % Doxygen can be found at http://research.cc.gatech.edu/borg/sites/edu.borg/html/index.html + if length(varargin) == 1 && isa(varargin{1},'gtsam.Point3') + varargout{1} = geometry_wrapper(68, this, varargin{:}); + else + error('Arguments do not match any overload of function MyTemplatePoint3.return_T'); + end + end + + function varargout = return_Tptr(this, varargin) + % RETURN_TPTR usage: return_Tptr(Point3 value) : returns gtsam::Point3 + % Doxygen can be found at http://research.cc.gatech.edu/borg/sites/edu.borg/html/index.html + if length(varargin) == 1 && isa(varargin{1},'gtsam.Point3') + varargout{1} = geometry_wrapper(69, this, varargin{:}); + else + error('Arguments do not match any overload of function MyTemplatePoint3.return_Tptr'); + end + end + + function varargout = return_ptrs(this, varargin) + % RETURN_PTRS usage: return_ptrs(Point3 p1, Point3 p2) : returns pair< gtsam::Point3, gtsam::Point3 > + % Doxygen can be found at http://research.cc.gatech.edu/borg/sites/edu.borg/html/index.html + if length(varargin) == 2 && isa(varargin{1},'gtsam.Point3') && isa(varargin{2},'gtsam.Point3') + [ varargout{1} varargout{2} ] = geometry_wrapper(70, this, varargin{:}); + else + error('Arguments do not match any overload of function MyTemplatePoint3.return_ptrs'); + end + end + + function varargout = templatedMethodMatrix(this, varargin) + % TEMPLATEDMETHODMATRIX usage: templatedMethodMatrix(Matrix t) : returns void + % Doxygen can be found at http://research.cc.gatech.edu/borg/sites/edu.borg/html/index.html + if length(varargin) == 1 && isa(varargin{1},'double') + geometry_wrapper(71, this, varargin{:}); + else + error('Arguments do not match any overload of function MyTemplatePoint3.templatedMethod'); + end + end + + function varargout = templatedMethodPoint2(this, varargin) + % TEMPLATEDMETHODPOINT2 usage: templatedMethodPoint2(Point2 t) : returns void + % Doxygen can be found at http://research.cc.gatech.edu/borg/sites/edu.borg/html/index.html + if length(varargin) == 1 && isa(varargin{1},'gtsam.Point2') + geometry_wrapper(72, this, varargin{:}); + else + error('Arguments do not match any overload of function MyTemplatePoint3.templatedMethod'); + end + end + + function varargout = templatedMethodPoint3(this, varargin) + % TEMPLATEDMETHODPOINT3 usage: templatedMethodPoint3(Point3 t) : returns void + % Doxygen can be found at http://research.cc.gatech.edu/borg/sites/edu.borg/html/index.html + if length(varargin) == 1 && isa(varargin{1},'gtsam.Point3') + geometry_wrapper(73, this, varargin{:}); + else + error('Arguments do not match any overload of function MyTemplatePoint3.templatedMethod'); + end + end + + function varargout = templatedMethodVector(this, varargin) + % TEMPLATEDMETHODVECTOR usage: templatedMethodVector(Vector t) : returns void + % Doxygen can be found at http://research.cc.gatech.edu/borg/sites/edu.borg/html/index.html + if length(varargin) == 1 && isa(varargin{1},'double') + geometry_wrapper(74, this, varargin{:}); + else + error('Arguments do not match any overload of function MyTemplatePoint3.templatedMethod'); + end + end + + end + + methods(Static = true) + end +end diff --git a/wrap/tests/expected/Test.m b/wrap/tests/expected/Test.m index 1afd15efe..352312789 100644 --- a/wrap/tests/expected/Test.m +++ b/wrap/tests/expected/Test.m @@ -7,10 +7,10 @@ % %-------Methods------- %arg_EigenConstRef(Matrix value) : returns void -%create_MixedPtrs() : returns pair< Test, SharedTest > -%create_ptrs() : returns pair< SharedTest, SharedTest > +%create_MixedPtrs() : returns pair< Test, Test > +%create_ptrs() : returns pair< Test, Test > %print() : returns void -%return_Point2Ptr(bool value) : returns Point2 +%return_Point2Ptr(bool value) : returns gtsam::Point2 %return_Test(Test value) : returns Test %return_TestPtr(Test value) : returns Test %return_bool(bool value) : returns bool @@ -20,7 +20,7 @@ %return_matrix1(Matrix value) : returns Matrix %return_matrix2(Matrix value) : returns Matrix %return_pair(Vector v, Matrix A) : returns pair< Vector, Matrix > -%return_ptrs(Test p1, Test p2) : returns pair< SharedTest, SharedTest > +%return_ptrs(Test p1, Test p2) : returns pair< Test, Test > %return_size_t(size_t value) : returns size_t %return_string(string value) : returns string %return_vector1(Vector value) : returns Vector @@ -64,13 +64,13 @@ classdef Test < handle end function varargout = create_MixedPtrs(this, varargin) - % CREATE_MIXEDPTRS usage: create_MixedPtrs() : returns pair< Test, SharedTest > + % CREATE_MIXEDPTRS usage: create_MixedPtrs() : returns pair< Test, Test > % Doxygen can be found at http://research.cc.gatech.edu/borg/sites/edu.borg/html/index.html [ varargout{1} varargout{2} ] = geometry_wrapper(24, this, varargin{:}); end function varargout = create_ptrs(this, varargin) - % CREATE_PTRS usage: create_ptrs() : returns pair< SharedTest, SharedTest > + % CREATE_PTRS usage: create_ptrs() : returns pair< Test, Test > % Doxygen can be found at http://research.cc.gatech.edu/borg/sites/edu.borg/html/index.html [ varargout{1} varargout{2} ] = geometry_wrapper(25, this, varargin{:}); end @@ -82,7 +82,7 @@ classdef Test < handle end function varargout = return_Point2Ptr(this, varargin) - % RETURN_POINT2PTR usage: return_Point2Ptr(bool value) : returns Point2 + % RETURN_POINT2PTR usage: return_Point2Ptr(bool value) : returns gtsam::Point2 % Doxygen can be found at http://research.cc.gatech.edu/borg/sites/edu.borg/html/index.html varargout{1} = geometry_wrapper(27, this, varargin{:}); end @@ -166,7 +166,7 @@ classdef Test < handle end function varargout = return_ptrs(this, varargin) - % RETURN_PTRS usage: return_ptrs(Test p1, Test p2) : returns pair< SharedTest, SharedTest > + % RETURN_PTRS usage: return_ptrs(Test p1, Test p2) : returns pair< Test, Test > % Doxygen can be found at http://research.cc.gatech.edu/borg/sites/edu.borg/html/index.html if length(varargin) == 2 && isa(varargin{1},'Test') && isa(varargin{2},'Test') [ varargout{1} varargout{2} ] = geometry_wrapper(37, this, varargin{:}); diff --git a/wrap/tests/expected/aGlobalFunction.m b/wrap/tests/expected/aGlobalFunction.m index 94e9b4a67..2e725c658 100644 --- a/wrap/tests/expected/aGlobalFunction.m +++ b/wrap/tests/expected/aGlobalFunction.m @@ -1,6 +1,6 @@ function varargout = aGlobalFunction(varargin) if length(varargin) == 0 - varargout{1} = geometry_wrapper(42, varargin{:}); + varargout{1} = geometry_wrapper(78, varargin{:}); else error('Arguments do not match any overload of function aGlobalFunction'); end diff --git a/wrap/tests/expected/geometry_wrapper.cpp b/wrap/tests/expected/geometry_wrapper.cpp index b34112718..158e326bc 100644 --- a/wrap/tests/expected/geometry_wrapper.cpp +++ b/wrap/tests/expected/geometry_wrapper.cpp @@ -8,16 +8,27 @@ #include +typedef MyTemplate MyTemplatePoint2; +typedef MyTemplate MyTemplatePoint3; +typedef MyFactor MyFactorPosePoint2; -BOOST_CLASS_EXPORT_GUID(Point2, "Point2"); -BOOST_CLASS_EXPORT_GUID(Point3, "Point3"); +BOOST_CLASS_EXPORT_GUID(gtsam::Point2, "gtsamPoint2"); +BOOST_CLASS_EXPORT_GUID(gtsam::Point3, "gtsamPoint3"); -typedef std::set*> Collector_Point2; -static Collector_Point2 collector_Point2; -typedef std::set*> Collector_Point3; -static Collector_Point3 collector_Point3; +typedef std::set*> Collector_gtsamPoint2; +static Collector_gtsamPoint2 collector_gtsamPoint2; +typedef std::set*> Collector_gtsamPoint3; +static Collector_gtsamPoint3 collector_gtsamPoint3; typedef std::set*> Collector_Test; static Collector_Test collector_Test; +typedef std::set*> Collector_MyBase; +static Collector_MyBase collector_MyBase; +typedef std::set*> Collector_MyTemplatePoint2; +static Collector_MyTemplatePoint2 collector_MyTemplatePoint2; +typedef std::set*> Collector_MyTemplatePoint3; +static Collector_MyTemplatePoint3 collector_MyTemplatePoint3; +typedef std::set*> Collector_MyFactorPosePoint2; +static Collector_MyFactorPosePoint2 collector_MyFactorPosePoint2; void _deleteAllObjects() { @@ -25,16 +36,16 @@ void _deleteAllObjects() std::streambuf *outbuf = std::cout.rdbuf(&mout); bool anyDeleted = false; - { for(Collector_Point2::iterator iter = collector_Point2.begin(); - iter != collector_Point2.end(); ) { + { for(Collector_gtsamPoint2::iterator iter = collector_gtsamPoint2.begin(); + iter != collector_gtsamPoint2.end(); ) { delete *iter; - collector_Point2.erase(iter++); + collector_gtsamPoint2.erase(iter++); anyDeleted = true; } } - { for(Collector_Point3::iterator iter = collector_Point3.begin(); - iter != collector_Point3.end(); ) { + { for(Collector_gtsamPoint3::iterator iter = collector_gtsamPoint3.begin(); + iter != collector_gtsamPoint3.end(); ) { delete *iter; - collector_Point3.erase(iter++); + collector_gtsamPoint3.erase(iter++); anyDeleted = true; } } { for(Collector_Test::iterator iter = collector_Test.begin(); @@ -43,6 +54,30 @@ void _deleteAllObjects() collector_Test.erase(iter++); anyDeleted = true; } } + { for(Collector_MyBase::iterator iter = collector_MyBase.begin(); + iter != collector_MyBase.end(); ) { + delete *iter; + collector_MyBase.erase(iter++); + anyDeleted = true; + } } + { for(Collector_MyTemplatePoint2::iterator iter = collector_MyTemplatePoint2.begin(); + iter != collector_MyTemplatePoint2.end(); ) { + delete *iter; + collector_MyTemplatePoint2.erase(iter++); + anyDeleted = true; + } } + { for(Collector_MyTemplatePoint3::iterator iter = collector_MyTemplatePoint3.begin(); + iter != collector_MyTemplatePoint3.end(); ) { + delete *iter; + collector_MyTemplatePoint3.erase(iter++); + anyDeleted = true; + } } + { for(Collector_MyFactorPosePoint2::iterator iter = collector_MyFactorPosePoint2.begin(); + iter != collector_MyFactorPosePoint2.end(); ) { + delete *iter; + collector_MyFactorPosePoint2.erase(iter++); + anyDeleted = true; + } } if(anyDeleted) cout << "WARNING: Wrap modules with variables in the workspace have been reloaded due to\n" @@ -55,6 +90,9 @@ void _geometry_RTTIRegister() { const mxArray *alreadyCreated = mexGetVariablePtr("global", "gtsam_geometry_rttiRegistry_created"); if(!alreadyCreated) { std::map types; + types.insert(std::make_pair(typeid(MyBase).name(), "MyBase")); + types.insert(std::make_pair(typeid(MyTemplatePoint2).name(), "MyTemplatePoint2")); + types.insert(std::make_pair(typeid(MyTemplatePoint3).name(), "MyTemplatePoint3")); mxArray *registry = mexGetVariable("global", "gtsamwrap_rttiRegistry"); if(!registry) @@ -78,191 +116,191 @@ void _geometry_RTTIRegister() { } } -void Point2_collectorInsertAndMakeBase_0(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +void gtsamPoint2_collectorInsertAndMakeBase_0(int nargout, mxArray *out[], int nargin, const mxArray *in[]) { mexAtExit(&_deleteAllObjects); - typedef boost::shared_ptr Shared; + typedef boost::shared_ptr Shared; Shared *self = *reinterpret_cast (mxGetData(in[0])); - collector_Point2.insert(self); + collector_gtsamPoint2.insert(self); } -void Point2_constructor_1(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +void gtsamPoint2_constructor_1(int nargout, mxArray *out[], int nargin, const mxArray *in[]) { mexAtExit(&_deleteAllObjects); - typedef boost::shared_ptr Shared; + typedef boost::shared_ptr Shared; - Shared *self = new Shared(new Point2()); - collector_Point2.insert(self); + Shared *self = new Shared(new gtsam::Point2()); + collector_gtsamPoint2.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[]) +void gtsamPoint2_constructor_2(int nargout, mxArray *out[], int nargin, const mxArray *in[]) { mexAtExit(&_deleteAllObjects); - typedef boost::shared_ptr Shared; + 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); + Shared *self = new Shared(new gtsam::Point2(x,y)); + collector_gtsamPoint2.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[]) +void gtsamPoint2_deconstructor_3(int nargout, mxArray *out[], int nargin, const mxArray *in[]) { - typedef boost::shared_ptr Shared; - checkArguments("delete_Point2",nargout,nargin,1); + typedef boost::shared_ptr Shared; + checkArguments("delete_gtsamPoint2",nargout,nargin,1); Shared *self = *reinterpret_cast(mxGetData(in[0])); - Collector_Point2::iterator item; - item = collector_Point2.find(self); - if(item != collector_Point2.end()) { + Collector_gtsamPoint2::iterator item; + item = collector_gtsamPoint2.find(self); + if(item != collector_gtsamPoint2.end()) { delete self; - collector_Point2.erase(item); + collector_gtsamPoint2.erase(item); } } -void Point2_argChar_4(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +void gtsamPoint2_argChar_4(int nargout, mxArray *out[], int nargin, const mxArray *in[]) { - typedef boost::shared_ptr Shared; + typedef boost::shared_ptr Shared; checkArguments("argChar",nargout,nargin-1,1); - Shared obj = unwrap_shared_ptr(in[0], "ptr_Point2"); + Shared obj = unwrap_shared_ptr(in[0], "ptr_gtsamPoint2"); char a = unwrap< char >(in[1]); obj->argChar(a); } -void Point2_argUChar_5(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +void gtsamPoint2_argUChar_5(int nargout, mxArray *out[], int nargin, const mxArray *in[]) { - typedef boost::shared_ptr Shared; + typedef boost::shared_ptr Shared; checkArguments("argUChar",nargout,nargin-1,1); - Shared obj = unwrap_shared_ptr(in[0], "ptr_Point2"); + Shared obj = unwrap_shared_ptr(in[0], "ptr_gtsamPoint2"); unsigned char a = unwrap< unsigned char >(in[1]); obj->argUChar(a); } -void Point2_dim_6(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +void gtsamPoint2_dim_6(int nargout, mxArray *out[], int nargin, const mxArray *in[]) { - typedef boost::shared_ptr Shared; + typedef boost::shared_ptr Shared; checkArguments("dim",nargout,nargin-1,0); - Shared obj = unwrap_shared_ptr(in[0], "ptr_Point2"); + Shared obj = unwrap_shared_ptr(in[0], "ptr_gtsamPoint2"); out[0] = wrap< int >(obj->dim()); } -void Point2_returnChar_7(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +void gtsamPoint2_returnChar_7(int nargout, mxArray *out[], int nargin, const mxArray *in[]) { - typedef boost::shared_ptr Shared; + typedef boost::shared_ptr Shared; checkArguments("returnChar",nargout,nargin-1,0); - Shared obj = unwrap_shared_ptr(in[0], "ptr_Point2"); + Shared obj = unwrap_shared_ptr(in[0], "ptr_gtsamPoint2"); out[0] = wrap< char >(obj->returnChar()); } -void Point2_vectorConfusion_8(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +void gtsamPoint2_vectorConfusion_8(int nargout, mxArray *out[], int nargin, const mxArray *in[]) { typedef boost::shared_ptr SharedVectorNotEigen; - typedef boost::shared_ptr Shared; + typedef boost::shared_ptr Shared; checkArguments("vectorConfusion",nargout,nargin-1,0); - Shared obj = unwrap_shared_ptr(in[0], "ptr_Point2"); + Shared obj = unwrap_shared_ptr(in[0], "ptr_gtsamPoint2"); out[0] = wrap_shared_ptr(SharedVectorNotEigen(new VectorNotEigen(obj->vectorConfusion())),"VectorNotEigen", false); } -void Point2_x_9(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +void gtsamPoint2_x_9(int nargout, mxArray *out[], int nargin, const mxArray *in[]) { - typedef boost::shared_ptr Shared; + typedef boost::shared_ptr Shared; checkArguments("x",nargout,nargin-1,0); - Shared obj = unwrap_shared_ptr(in[0], "ptr_Point2"); + Shared obj = unwrap_shared_ptr(in[0], "ptr_gtsamPoint2"); out[0] = wrap< double >(obj->x()); } -void Point2_y_10(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +void gtsamPoint2_y_10(int nargout, mxArray *out[], int nargin, const mxArray *in[]) { - typedef boost::shared_ptr Shared; + typedef boost::shared_ptr Shared; checkArguments("y",nargout,nargin-1,0); - Shared obj = unwrap_shared_ptr(in[0], "ptr_Point2"); + Shared obj = unwrap_shared_ptr(in[0], "ptr_gtsamPoint2"); out[0] = wrap< double >(obj->y()); } -void Point3_collectorInsertAndMakeBase_11(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +void gtsamPoint3_collectorInsertAndMakeBase_11(int nargout, mxArray *out[], int nargin, const mxArray *in[]) { mexAtExit(&_deleteAllObjects); - typedef boost::shared_ptr Shared; + typedef boost::shared_ptr Shared; Shared *self = *reinterpret_cast (mxGetData(in[0])); - collector_Point3.insert(self); + collector_gtsamPoint3.insert(self); } -void Point3_constructor_12(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +void gtsamPoint3_constructor_12(int nargout, mxArray *out[], int nargin, const mxArray *in[]) { mexAtExit(&_deleteAllObjects); - typedef boost::shared_ptr Shared; + 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); + Shared *self = new Shared(new gtsam::Point3(x,y,z)); + collector_gtsamPoint3.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[]) +void gtsamPoint3_deconstructor_13(int nargout, mxArray *out[], int nargin, const mxArray *in[]) { - typedef boost::shared_ptr Shared; - checkArguments("delete_Point3",nargout,nargin,1); + typedef boost::shared_ptr Shared; + checkArguments("delete_gtsamPoint3",nargout,nargin,1); Shared *self = *reinterpret_cast(mxGetData(in[0])); - Collector_Point3::iterator item; - item = collector_Point3.find(self); - if(item != collector_Point3.end()) { + Collector_gtsamPoint3::iterator item; + item = collector_gtsamPoint3.find(self); + if(item != collector_gtsamPoint3.end()) { delete self; - collector_Point3.erase(item); + collector_gtsamPoint3.erase(item); } } -void Point3_norm_14(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +void gtsamPoint3_norm_14(int nargout, mxArray *out[], int nargin, const mxArray *in[]) { - typedef boost::shared_ptr Shared; + typedef boost::shared_ptr Shared; checkArguments("norm",nargout,nargin-1,0); - Shared obj = unwrap_shared_ptr(in[0], "ptr_Point3"); + Shared obj = unwrap_shared_ptr(in[0], "ptr_gtsamPoint3"); out[0] = wrap< double >(obj->norm()); } -void Point3_string_serialize_15(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +void gtsamPoint3_string_serialize_15(int nargout, mxArray *out[], int nargin, const mxArray *in[]) { - typedef boost::shared_ptr Shared; + typedef boost::shared_ptr Shared; checkArguments("string_serialize",nargout,nargin-1,0); - Shared obj = unwrap_shared_ptr(in[0], "ptr_Point3"); - std::ostringstream out_archive_stream; + Shared obj = unwrap_shared_ptr(in[0], "ptr_gtsamPoint3"); + ostringstream out_archive_stream; boost::archive::text_oarchive out_archive(out_archive_stream); out_archive << *obj; out[0] = wrap< string >(out_archive_stream.str()); } -void Point3_StaticFunctionRet_16(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +void gtsamPoint3_StaticFunctionRet_16(int nargout, mxArray *out[], int nargin, const mxArray *in[]) { - typedef boost::shared_ptr SharedPoint3; - typedef boost::shared_ptr Shared; - checkArguments("Point3.StaticFunctionRet",nargout,nargin,1); + typedef boost::shared_ptr SharedPoint3; + typedef boost::shared_ptr Shared; + checkArguments("gtsamPoint3.StaticFunctionRet",nargout,nargin,1); double z = unwrap< double >(in[0]); - out[0] = wrap_shared_ptr(SharedPoint3(new Point3(Point3::StaticFunctionRet(z))),"Point3", false); + out[0] = wrap_shared_ptr(SharedPoint3(new gtsam::Point3(gtsam::Point3::StaticFunctionRet(z))),"gtsam.Point3", false); } -void Point3_staticFunction_17(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +void gtsamPoint3_staticFunction_17(int nargout, mxArray *out[], int nargin, const mxArray *in[]) { - typedef boost::shared_ptr Shared; - checkArguments("Point3.staticFunction",nargout,nargin,0); - out[0] = wrap< double >(Point3::staticFunction()); + typedef boost::shared_ptr Shared; + checkArguments("gtsamPoint3.staticFunction",nargout,nargin,0); + out[0] = wrap< double >(gtsam::Point3::staticFunction()); } -void Point3_string_deserialize_18(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +void gtsamPoint3_string_deserialize_18(int nargout, mxArray *out[], int nargin, const mxArray *in[]) { - typedef boost::shared_ptr Shared; - checkArguments("Point3.string_deserialize",nargout,nargin,1); + typedef boost::shared_ptr Shared; + checkArguments("gtsamPoint3.string_deserialize",nargout,nargin,1); string serialized = unwrap< string >(in[0]); - std::istringstream in_archive_stream(serialized); + istringstream in_archive_stream(serialized); boost::archive::text_iarchive in_archive(in_archive_stream); - Shared output(new Point3()); + Shared output(new gtsam::Point3()); in_archive >> *output; - out[0] = wrap_shared_ptr(output,"Point3", false); + out[0] = wrap_shared_ptr(output,"gtsam.Point3", false); } void Test_collectorInsertAndMakeBase_19(int nargout, mxArray *out[], int nargin, const mxArray *in[]) { @@ -353,12 +391,12 @@ void Test_print_26(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void Test_return_Point2Ptr_27(int nargout, mxArray *out[], int nargin, const mxArray *in[]) { - typedef boost::shared_ptr SharedPoint2; + typedef boost::shared_ptr SharedPoint2; typedef boost::shared_ptr Shared; checkArguments("return_Point2Ptr",nargout,nargin-1,1); Shared obj = unwrap_shared_ptr(in[0], "ptr_Test"); bool value = unwrap< bool >(in[1]); - out[0] = wrap_shared_ptr(obj->return_Point2Ptr(value),"Point2", false); + out[0] = wrap_shared_ptr(obj->return_Point2Ptr(value),"gtsam.Point2", false); } void Test_return_Test_28(int nargout, mxArray *out[], int nargin, const mxArray *in[]) @@ -497,18 +535,410 @@ void Test_return_vector2_41(int nargout, mxArray *out[], int nargin, const mxArr out[0] = wrap< Vector >(obj->return_vector2(value)); } -void aGlobalFunction_42(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +void MyBase_collectorInsertAndMakeBase_42(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + mexAtExit(&_deleteAllObjects); + typedef boost::shared_ptr Shared; + + Shared *self = *reinterpret_cast (mxGetData(in[0])); + collector_MyBase.insert(self); +} + +void MyBase_upcastFromVoid_43(int nargout, mxArray *out[], int nargin, const mxArray *in[]) { + mexAtExit(&_deleteAllObjects); + typedef boost::shared_ptr Shared; + boost::shared_ptr *asVoid = *reinterpret_cast**> (mxGetData(in[0])); + out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL); + Shared *self = new Shared(boost::static_pointer_cast(*asVoid)); + *reinterpret_cast(mxGetData(out[0])) = self; +} + +void MyBase_deconstructor_44(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + typedef boost::shared_ptr Shared; + checkArguments("delete_MyBase",nargout,nargin,1); + Shared *self = *reinterpret_cast(mxGetData(in[0])); + Collector_MyBase::iterator item; + item = collector_MyBase.find(self); + if(item != collector_MyBase.end()) { + delete self; + collector_MyBase.erase(item); + } +} + +void MyTemplatePoint2_collectorInsertAndMakeBase_45(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + mexAtExit(&_deleteAllObjects); + typedef boost::shared_ptr Shared; + + Shared *self = *reinterpret_cast (mxGetData(in[0])); + collector_MyTemplatePoint2.insert(self); + + typedef boost::shared_ptr SharedBase; + out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL); + *reinterpret_cast(mxGetData(out[0])) = new SharedBase(*self); +} + +void MyTemplatePoint2_upcastFromVoid_46(int nargout, mxArray *out[], int nargin, const mxArray *in[]) { + mexAtExit(&_deleteAllObjects); + typedef boost::shared_ptr Shared; + boost::shared_ptr *asVoid = *reinterpret_cast**> (mxGetData(in[0])); + out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL); + Shared *self = new Shared(boost::static_pointer_cast(*asVoid)); + *reinterpret_cast(mxGetData(out[0])) = self; +} + +void MyTemplatePoint2_constructor_47(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + mexAtExit(&_deleteAllObjects); + typedef boost::shared_ptr Shared; + + Shared *self = new Shared(new MyTemplatePoint2()); + collector_MyTemplatePoint2.insert(self); + out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL); + *reinterpret_cast (mxGetData(out[0])) = self; + + typedef boost::shared_ptr SharedBase; + out[1] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL); + *reinterpret_cast(mxGetData(out[1])) = new SharedBase(*self); +} + +void MyTemplatePoint2_deconstructor_48(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + typedef boost::shared_ptr Shared; + checkArguments("delete_MyTemplatePoint2",nargout,nargin,1); + Shared *self = *reinterpret_cast(mxGetData(in[0])); + Collector_MyTemplatePoint2::iterator item; + item = collector_MyTemplatePoint2.find(self); + if(item != collector_MyTemplatePoint2.end()) { + delete self; + collector_MyTemplatePoint2.erase(item); + } +} + +void MyTemplatePoint2_accept_T_49(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + typedef boost::shared_ptr Shared; + checkArguments("accept_T",nargout,nargin-1,1); + Shared obj = unwrap_shared_ptr(in[0], "ptr_MyTemplatePoint2"); + gtsam::Point2& value = *unwrap_shared_ptr< gtsam::Point2 >(in[1], "ptr_gtsamPoint2"); + obj->accept_T(value); +} + +void MyTemplatePoint2_accept_Tptr_50(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + typedef boost::shared_ptr Shared; + checkArguments("accept_Tptr",nargout,nargin-1,1); + Shared obj = unwrap_shared_ptr(in[0], "ptr_MyTemplatePoint2"); + boost::shared_ptr value = unwrap_shared_ptr< gtsam::Point2 >(in[1], "ptr_gtsamPoint2"); + obj->accept_Tptr(value); +} + +void MyTemplatePoint2_create_MixedPtrs_51(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + typedef boost::shared_ptr SharedPoint2; + typedef boost::shared_ptr SharedPoint2; + typedef boost::shared_ptr Shared; + checkArguments("create_MixedPtrs",nargout,nargin-1,0); + Shared obj = unwrap_shared_ptr(in[0], "ptr_MyTemplatePoint2"); + pair< gtsam::Point2, SharedPoint2 > pairResult = obj->create_MixedPtrs(); + out[0] = wrap_shared_ptr(SharedPoint2(new gtsam::Point2(pairResult.first)),"gtsam.Point2", false); + out[1] = wrap_shared_ptr(pairResult.second,"gtsam.Point2", false); +} + +void MyTemplatePoint2_create_ptrs_52(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + typedef boost::shared_ptr SharedPoint2; + typedef boost::shared_ptr SharedPoint2; + typedef boost::shared_ptr Shared; + checkArguments("create_ptrs",nargout,nargin-1,0); + Shared obj = unwrap_shared_ptr(in[0], "ptr_MyTemplatePoint2"); + pair< SharedPoint2, SharedPoint2 > pairResult = obj->create_ptrs(); + out[0] = wrap_shared_ptr(pairResult.first,"gtsam.Point2", false); + out[1] = wrap_shared_ptr(pairResult.second,"gtsam.Point2", false); +} + +void MyTemplatePoint2_return_T_53(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + typedef boost::shared_ptr SharedPoint2; + typedef boost::shared_ptr Shared; + checkArguments("return_T",nargout,nargin-1,1); + Shared obj = unwrap_shared_ptr(in[0], "ptr_MyTemplatePoint2"); + boost::shared_ptr value = unwrap_shared_ptr< gtsam::Point2 >(in[1], "ptr_gtsamPoint2"); + out[0] = wrap_shared_ptr(SharedPoint2(new gtsam::Point2(obj->return_T(value))),"gtsam.Point2", false); +} + +void MyTemplatePoint2_return_Tptr_54(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + typedef boost::shared_ptr SharedPoint2; + typedef boost::shared_ptr Shared; + checkArguments("return_Tptr",nargout,nargin-1,1); + Shared obj = unwrap_shared_ptr(in[0], "ptr_MyTemplatePoint2"); + boost::shared_ptr value = unwrap_shared_ptr< gtsam::Point2 >(in[1], "ptr_gtsamPoint2"); + out[0] = wrap_shared_ptr(obj->return_Tptr(value),"gtsam.Point2", false); +} + +void MyTemplatePoint2_return_ptrs_55(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + typedef boost::shared_ptr SharedPoint2; + typedef boost::shared_ptr SharedPoint2; + typedef boost::shared_ptr Shared; + checkArguments("return_ptrs",nargout,nargin-1,2); + Shared obj = unwrap_shared_ptr(in[0], "ptr_MyTemplatePoint2"); + boost::shared_ptr p1 = unwrap_shared_ptr< gtsam::Point2 >(in[1], "ptr_gtsamPoint2"); + boost::shared_ptr p2 = unwrap_shared_ptr< gtsam::Point2 >(in[2], "ptr_gtsamPoint2"); + pair< SharedPoint2, SharedPoint2 > pairResult = obj->return_ptrs(p1,p2); + out[0] = wrap_shared_ptr(pairResult.first,"gtsam.Point2", false); + out[1] = wrap_shared_ptr(pairResult.second,"gtsam.Point2", false); +} + +void MyTemplatePoint2_templatedMethod_56(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + typedef boost::shared_ptr Shared; + checkArguments("templatedMethodMatrix",nargout,nargin-1,1); + Shared obj = unwrap_shared_ptr(in[0], "ptr_MyTemplatePoint2"); + Matrix& t = *unwrap_shared_ptr< Matrix >(in[1], "ptr_Matrix"); + obj->templatedMethod(t); +} + +void MyTemplatePoint2_templatedMethod_57(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + typedef boost::shared_ptr Shared; + checkArguments("templatedMethodPoint2",nargout,nargin-1,1); + Shared obj = unwrap_shared_ptr(in[0], "ptr_MyTemplatePoint2"); + gtsam::Point2& t = *unwrap_shared_ptr< gtsam::Point2 >(in[1], "ptr_gtsamPoint2"); + obj->templatedMethod(t); +} + +void MyTemplatePoint2_templatedMethod_58(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + typedef boost::shared_ptr Shared; + checkArguments("templatedMethodPoint3",nargout,nargin-1,1); + Shared obj = unwrap_shared_ptr(in[0], "ptr_MyTemplatePoint2"); + gtsam::Point3& t = *unwrap_shared_ptr< gtsam::Point3 >(in[1], "ptr_gtsamPoint3"); + obj->templatedMethod(t); +} + +void MyTemplatePoint2_templatedMethod_59(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + typedef boost::shared_ptr Shared; + checkArguments("templatedMethodVector",nargout,nargin-1,1); + Shared obj = unwrap_shared_ptr(in[0], "ptr_MyTemplatePoint2"); + Vector& t = *unwrap_shared_ptr< Vector >(in[1], "ptr_Vector"); + obj->templatedMethod(t); +} + +void MyTemplatePoint3_collectorInsertAndMakeBase_60(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + mexAtExit(&_deleteAllObjects); + typedef boost::shared_ptr Shared; + + Shared *self = *reinterpret_cast (mxGetData(in[0])); + collector_MyTemplatePoint3.insert(self); + + typedef boost::shared_ptr SharedBase; + out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL); + *reinterpret_cast(mxGetData(out[0])) = new SharedBase(*self); +} + +void MyTemplatePoint3_upcastFromVoid_61(int nargout, mxArray *out[], int nargin, const mxArray *in[]) { + mexAtExit(&_deleteAllObjects); + typedef boost::shared_ptr Shared; + boost::shared_ptr *asVoid = *reinterpret_cast**> (mxGetData(in[0])); + out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL); + Shared *self = new Shared(boost::static_pointer_cast(*asVoid)); + *reinterpret_cast(mxGetData(out[0])) = self; +} + +void MyTemplatePoint3_constructor_62(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + mexAtExit(&_deleteAllObjects); + typedef boost::shared_ptr Shared; + + Shared *self = new Shared(new MyTemplatePoint3()); + collector_MyTemplatePoint3.insert(self); + out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL); + *reinterpret_cast (mxGetData(out[0])) = self; + + typedef boost::shared_ptr SharedBase; + out[1] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL); + *reinterpret_cast(mxGetData(out[1])) = new SharedBase(*self); +} + +void MyTemplatePoint3_deconstructor_63(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + typedef boost::shared_ptr Shared; + checkArguments("delete_MyTemplatePoint3",nargout,nargin,1); + Shared *self = *reinterpret_cast(mxGetData(in[0])); + Collector_MyTemplatePoint3::iterator item; + item = collector_MyTemplatePoint3.find(self); + if(item != collector_MyTemplatePoint3.end()) { + delete self; + collector_MyTemplatePoint3.erase(item); + } +} + +void MyTemplatePoint3_accept_T_64(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + typedef boost::shared_ptr Shared; + checkArguments("accept_T",nargout,nargin-1,1); + Shared obj = unwrap_shared_ptr(in[0], "ptr_MyTemplatePoint3"); + gtsam::Point3& value = *unwrap_shared_ptr< gtsam::Point3 >(in[1], "ptr_gtsamPoint3"); + obj->accept_T(value); +} + +void MyTemplatePoint3_accept_Tptr_65(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + typedef boost::shared_ptr Shared; + checkArguments("accept_Tptr",nargout,nargin-1,1); + Shared obj = unwrap_shared_ptr(in[0], "ptr_MyTemplatePoint3"); + boost::shared_ptr value = unwrap_shared_ptr< gtsam::Point3 >(in[1], "ptr_gtsamPoint3"); + obj->accept_Tptr(value); +} + +void MyTemplatePoint3_create_MixedPtrs_66(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + typedef boost::shared_ptr SharedPoint3; + typedef boost::shared_ptr SharedPoint3; + typedef boost::shared_ptr Shared; + checkArguments("create_MixedPtrs",nargout,nargin-1,0); + Shared obj = unwrap_shared_ptr(in[0], "ptr_MyTemplatePoint3"); + pair< gtsam::Point3, SharedPoint3 > pairResult = obj->create_MixedPtrs(); + out[0] = wrap_shared_ptr(SharedPoint3(new gtsam::Point3(pairResult.first)),"gtsam.Point3", false); + out[1] = wrap_shared_ptr(pairResult.second,"gtsam.Point3", false); +} + +void MyTemplatePoint3_create_ptrs_67(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + typedef boost::shared_ptr SharedPoint3; + typedef boost::shared_ptr SharedPoint3; + typedef boost::shared_ptr Shared; + checkArguments("create_ptrs",nargout,nargin-1,0); + Shared obj = unwrap_shared_ptr(in[0], "ptr_MyTemplatePoint3"); + pair< SharedPoint3, SharedPoint3 > pairResult = obj->create_ptrs(); + out[0] = wrap_shared_ptr(pairResult.first,"gtsam.Point3", false); + out[1] = wrap_shared_ptr(pairResult.second,"gtsam.Point3", false); +} + +void MyTemplatePoint3_return_T_68(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + typedef boost::shared_ptr SharedPoint3; + typedef boost::shared_ptr Shared; + checkArguments("return_T",nargout,nargin-1,1); + Shared obj = unwrap_shared_ptr(in[0], "ptr_MyTemplatePoint3"); + boost::shared_ptr value = unwrap_shared_ptr< gtsam::Point3 >(in[1], "ptr_gtsamPoint3"); + out[0] = wrap_shared_ptr(SharedPoint3(new gtsam::Point3(obj->return_T(value))),"gtsam.Point3", false); +} + +void MyTemplatePoint3_return_Tptr_69(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + typedef boost::shared_ptr SharedPoint3; + typedef boost::shared_ptr Shared; + checkArguments("return_Tptr",nargout,nargin-1,1); + Shared obj = unwrap_shared_ptr(in[0], "ptr_MyTemplatePoint3"); + boost::shared_ptr value = unwrap_shared_ptr< gtsam::Point3 >(in[1], "ptr_gtsamPoint3"); + out[0] = wrap_shared_ptr(obj->return_Tptr(value),"gtsam.Point3", false); +} + +void MyTemplatePoint3_return_ptrs_70(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + typedef boost::shared_ptr SharedPoint3; + typedef boost::shared_ptr SharedPoint3; + typedef boost::shared_ptr Shared; + checkArguments("return_ptrs",nargout,nargin-1,2); + Shared obj = unwrap_shared_ptr(in[0], "ptr_MyTemplatePoint3"); + boost::shared_ptr p1 = unwrap_shared_ptr< gtsam::Point3 >(in[1], "ptr_gtsamPoint3"); + boost::shared_ptr p2 = unwrap_shared_ptr< gtsam::Point3 >(in[2], "ptr_gtsamPoint3"); + pair< SharedPoint3, SharedPoint3 > pairResult = obj->return_ptrs(p1,p2); + out[0] = wrap_shared_ptr(pairResult.first,"gtsam.Point3", false); + out[1] = wrap_shared_ptr(pairResult.second,"gtsam.Point3", false); +} + +void MyTemplatePoint3_templatedMethod_71(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + typedef boost::shared_ptr Shared; + checkArguments("templatedMethodMatrix",nargout,nargin-1,1); + Shared obj = unwrap_shared_ptr(in[0], "ptr_MyTemplatePoint3"); + Matrix& t = *unwrap_shared_ptr< Matrix >(in[1], "ptr_Matrix"); + obj->templatedMethod(t); +} + +void MyTemplatePoint3_templatedMethod_72(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + typedef boost::shared_ptr Shared; + checkArguments("templatedMethodPoint2",nargout,nargin-1,1); + Shared obj = unwrap_shared_ptr(in[0], "ptr_MyTemplatePoint3"); + gtsam::Point2& t = *unwrap_shared_ptr< gtsam::Point2 >(in[1], "ptr_gtsamPoint2"); + obj->templatedMethod(t); +} + +void MyTemplatePoint3_templatedMethod_73(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + typedef boost::shared_ptr Shared; + checkArguments("templatedMethodPoint3",nargout,nargin-1,1); + Shared obj = unwrap_shared_ptr(in[0], "ptr_MyTemplatePoint3"); + gtsam::Point3& t = *unwrap_shared_ptr< gtsam::Point3 >(in[1], "ptr_gtsamPoint3"); + obj->templatedMethod(t); +} + +void MyTemplatePoint3_templatedMethod_74(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + typedef boost::shared_ptr Shared; + checkArguments("templatedMethodVector",nargout,nargin-1,1); + Shared obj = unwrap_shared_ptr(in[0], "ptr_MyTemplatePoint3"); + Vector& t = *unwrap_shared_ptr< Vector >(in[1], "ptr_Vector"); + obj->templatedMethod(t); +} + +void MyFactorPosePoint2_collectorInsertAndMakeBase_75(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + mexAtExit(&_deleteAllObjects); + typedef boost::shared_ptr Shared; + + Shared *self = *reinterpret_cast (mxGetData(in[0])); + collector_MyFactorPosePoint2.insert(self); +} + +void MyFactorPosePoint2_constructor_76(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + mexAtExit(&_deleteAllObjects); + typedef boost::shared_ptr Shared; + + size_t key1 = unwrap< size_t >(in[0]); + size_t key2 = unwrap< size_t >(in[1]); + double measured = unwrap< double >(in[2]); + boost::shared_ptr noiseModel = unwrap_shared_ptr< gtsam::noiseModel::Base >(in[3], "ptr_gtsamnoiseModelBase"); + Shared *self = new Shared(new MyFactorPosePoint2(key1,key2,measured,noiseModel)); + collector_MyFactorPosePoint2.insert(self); + out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL); + *reinterpret_cast (mxGetData(out[0])) = self; +} + +void MyFactorPosePoint2_deconstructor_77(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +{ + typedef boost::shared_ptr Shared; + checkArguments("delete_MyFactorPosePoint2",nargout,nargin,1); + Shared *self = *reinterpret_cast(mxGetData(in[0])); + Collector_MyFactorPosePoint2::iterator item; + item = collector_MyFactorPosePoint2.find(self); + if(item != collector_MyFactorPosePoint2.end()) { + delete self; + collector_MyFactorPosePoint2.erase(item); + } +} + +void aGlobalFunction_78(int nargout, mxArray *out[], int nargin, const mxArray *in[]) { checkArguments("aGlobalFunction",nargout,nargin,0); out[0] = wrap< Vector >(aGlobalFunction()); } -void overloadedGlobalFunction_43(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +void overloadedGlobalFunction_79(int nargout, mxArray *out[], int nargin, const mxArray *in[]) { checkArguments("overloadedGlobalFunction",nargout,nargin,1); int a = unwrap< int >(in[0]); out[0] = wrap< Vector >(overloadedGlobalFunction(a)); } -void overloadedGlobalFunction_44(int nargout, mxArray *out[], int nargin, const mxArray *in[]) +void overloadedGlobalFunction_80(int nargout, mxArray *out[], int nargin, const mxArray *in[]) { checkArguments("overloadedGlobalFunction",nargout,nargin,2); int a = unwrap< int >(in[0]); @@ -528,61 +958,61 @@ void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) try { switch(id) { case 0: - Point2_collectorInsertAndMakeBase_0(nargout, out, nargin-1, in+1); + gtsamPoint2_collectorInsertAndMakeBase_0(nargout, out, nargin-1, in+1); break; case 1: - Point2_constructor_1(nargout, out, nargin-1, in+1); + gtsamPoint2_constructor_1(nargout, out, nargin-1, in+1); break; case 2: - Point2_constructor_2(nargout, out, nargin-1, in+1); + gtsamPoint2_constructor_2(nargout, out, nargin-1, in+1); break; case 3: - Point2_deconstructor_3(nargout, out, nargin-1, in+1); + gtsamPoint2_deconstructor_3(nargout, out, nargin-1, in+1); break; case 4: - Point2_argChar_4(nargout, out, nargin-1, in+1); + gtsamPoint2_argChar_4(nargout, out, nargin-1, in+1); break; case 5: - Point2_argUChar_5(nargout, out, nargin-1, in+1); + gtsamPoint2_argUChar_5(nargout, out, nargin-1, in+1); break; case 6: - Point2_dim_6(nargout, out, nargin-1, in+1); + gtsamPoint2_dim_6(nargout, out, nargin-1, in+1); break; case 7: - Point2_returnChar_7(nargout, out, nargin-1, in+1); + gtsamPoint2_returnChar_7(nargout, out, nargin-1, in+1); break; case 8: - Point2_vectorConfusion_8(nargout, out, nargin-1, in+1); + gtsamPoint2_vectorConfusion_8(nargout, out, nargin-1, in+1); break; case 9: - Point2_x_9(nargout, out, nargin-1, in+1); + gtsamPoint2_x_9(nargout, out, nargin-1, in+1); break; case 10: - Point2_y_10(nargout, out, nargin-1, in+1); + gtsamPoint2_y_10(nargout, out, nargin-1, in+1); break; case 11: - Point3_collectorInsertAndMakeBase_11(nargout, out, nargin-1, in+1); + gtsamPoint3_collectorInsertAndMakeBase_11(nargout, out, nargin-1, in+1); break; case 12: - Point3_constructor_12(nargout, out, nargin-1, in+1); + gtsamPoint3_constructor_12(nargout, out, nargin-1, in+1); break; case 13: - Point3_deconstructor_13(nargout, out, nargin-1, in+1); + gtsamPoint3_deconstructor_13(nargout, out, nargin-1, in+1); break; case 14: - Point3_norm_14(nargout, out, nargin-1, in+1); + gtsamPoint3_norm_14(nargout, out, nargin-1, in+1); break; case 15: - Point3_string_serialize_15(nargout, out, nargin-1, in+1); + gtsamPoint3_string_serialize_15(nargout, out, nargin-1, in+1); break; case 16: - Point3_StaticFunctionRet_16(nargout, out, nargin-1, in+1); + gtsamPoint3_StaticFunctionRet_16(nargout, out, nargin-1, in+1); break; case 17: - Point3_staticFunction_17(nargout, out, nargin-1, in+1); + gtsamPoint3_staticFunction_17(nargout, out, nargin-1, in+1); break; case 18: - Point3_string_deserialize_18(nargout, out, nargin-1, in+1); + gtsamPoint3_string_deserialize_18(nargout, out, nargin-1, in+1); break; case 19: Test_collectorInsertAndMakeBase_19(nargout, out, nargin-1, in+1); @@ -654,13 +1084,121 @@ void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[]) Test_return_vector2_41(nargout, out, nargin-1, in+1); break; case 42: - aGlobalFunction_42(nargout, out, nargin-1, in+1); + MyBase_collectorInsertAndMakeBase_42(nargout, out, nargin-1, in+1); break; case 43: - overloadedGlobalFunction_43(nargout, out, nargin-1, in+1); + MyBase_upcastFromVoid_43(nargout, out, nargin-1, in+1); break; case 44: - overloadedGlobalFunction_44(nargout, out, nargin-1, in+1); + MyBase_deconstructor_44(nargout, out, nargin-1, in+1); + break; + case 45: + MyTemplatePoint2_collectorInsertAndMakeBase_45(nargout, out, nargin-1, in+1); + break; + case 46: + MyTemplatePoint2_upcastFromVoid_46(nargout, out, nargin-1, in+1); + break; + case 47: + MyTemplatePoint2_constructor_47(nargout, out, nargin-1, in+1); + break; + case 48: + MyTemplatePoint2_deconstructor_48(nargout, out, nargin-1, in+1); + break; + case 49: + MyTemplatePoint2_accept_T_49(nargout, out, nargin-1, in+1); + break; + case 50: + MyTemplatePoint2_accept_Tptr_50(nargout, out, nargin-1, in+1); + break; + case 51: + MyTemplatePoint2_create_MixedPtrs_51(nargout, out, nargin-1, in+1); + break; + case 52: + MyTemplatePoint2_create_ptrs_52(nargout, out, nargin-1, in+1); + break; + case 53: + MyTemplatePoint2_return_T_53(nargout, out, nargin-1, in+1); + break; + case 54: + MyTemplatePoint2_return_Tptr_54(nargout, out, nargin-1, in+1); + break; + case 55: + MyTemplatePoint2_return_ptrs_55(nargout, out, nargin-1, in+1); + break; + case 56: + MyTemplatePoint2_templatedMethod_56(nargout, out, nargin-1, in+1); + break; + case 57: + MyTemplatePoint2_templatedMethod_57(nargout, out, nargin-1, in+1); + break; + case 58: + MyTemplatePoint2_templatedMethod_58(nargout, out, nargin-1, in+1); + break; + case 59: + MyTemplatePoint2_templatedMethod_59(nargout, out, nargin-1, in+1); + break; + case 60: + MyTemplatePoint3_collectorInsertAndMakeBase_60(nargout, out, nargin-1, in+1); + break; + case 61: + MyTemplatePoint3_upcastFromVoid_61(nargout, out, nargin-1, in+1); + break; + case 62: + MyTemplatePoint3_constructor_62(nargout, out, nargin-1, in+1); + break; + case 63: + MyTemplatePoint3_deconstructor_63(nargout, out, nargin-1, in+1); + break; + case 64: + MyTemplatePoint3_accept_T_64(nargout, out, nargin-1, in+1); + break; + case 65: + MyTemplatePoint3_accept_Tptr_65(nargout, out, nargin-1, in+1); + break; + case 66: + MyTemplatePoint3_create_MixedPtrs_66(nargout, out, nargin-1, in+1); + break; + case 67: + MyTemplatePoint3_create_ptrs_67(nargout, out, nargin-1, in+1); + break; + case 68: + MyTemplatePoint3_return_T_68(nargout, out, nargin-1, in+1); + break; + case 69: + MyTemplatePoint3_return_Tptr_69(nargout, out, nargin-1, in+1); + break; + case 70: + MyTemplatePoint3_return_ptrs_70(nargout, out, nargin-1, in+1); + break; + case 71: + MyTemplatePoint3_templatedMethod_71(nargout, out, nargin-1, in+1); + break; + case 72: + MyTemplatePoint3_templatedMethod_72(nargout, out, nargin-1, in+1); + break; + case 73: + MyTemplatePoint3_templatedMethod_73(nargout, out, nargin-1, in+1); + break; + case 74: + MyTemplatePoint3_templatedMethod_74(nargout, out, nargin-1, in+1); + break; + case 75: + MyFactorPosePoint2_collectorInsertAndMakeBase_75(nargout, out, nargin-1, in+1); + break; + case 76: + MyFactorPosePoint2_constructor_76(nargout, out, nargin-1, in+1); + break; + case 77: + MyFactorPosePoint2_deconstructor_77(nargout, out, nargin-1, in+1); + break; + case 78: + aGlobalFunction_78(nargout, out, nargin-1, in+1); + break; + case 79: + overloadedGlobalFunction_79(nargout, out, nargin-1, in+1); + break; + case 80: + overloadedGlobalFunction_80(nargout, out, nargin-1, in+1); break; } } catch(const std::exception& e) { diff --git a/wrap/tests/expected/overloadedGlobalFunction.m b/wrap/tests/expected/overloadedGlobalFunction.m index 5b086b15e..04b12e081 100644 --- a/wrap/tests/expected/overloadedGlobalFunction.m +++ b/wrap/tests/expected/overloadedGlobalFunction.m @@ -1,8 +1,8 @@ function varargout = overloadedGlobalFunction(varargin) if length(varargin) == 1 && isa(varargin{1},'numeric') - varargout{1} = geometry_wrapper(43, varargin{:}); + varargout{1} = geometry_wrapper(79, varargin{:}); elseif length(varargin) == 2 && isa(varargin{1},'numeric') && isa(varargin{2},'double') - varargout{1} = geometry_wrapper(44, varargin{:}); + varargout{1} = geometry_wrapper(80, varargin{:}); else error('Arguments do not match any overload of function overloadedGlobalFunction'); end