Updated wrap unit tests
parent
592a251a05
commit
dc036a0891
|
@ -4,7 +4,7 @@
|
||||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||||
{
|
{
|
||||||
checkArguments("argChar",nargout,nargin-1,1);
|
checkArguments("argChar",nargout,nargin-1,1);
|
||||||
shared_ptr<Point2> self = unwrap_shared_ptr< Point2 >(in[0],"Point2");
|
boost::shared_ptr<Point2> self = unwrap_shared_ptr< Point2 >(in[0],"Point2");
|
||||||
char a = unwrap< char >(in[1]);
|
char a = unwrap< char >(in[1]);
|
||||||
self->argChar(a);
|
self->argChar(a);
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||||
{
|
{
|
||||||
checkArguments("argUChar",nargout,nargin-1,1);
|
checkArguments("argUChar",nargout,nargin-1,1);
|
||||||
shared_ptr<Point2> self = unwrap_shared_ptr< Point2 >(in[0],"Point2");
|
boost::shared_ptr<Point2> self = unwrap_shared_ptr< Point2 >(in[0],"Point2");
|
||||||
unsigned char a = unwrap< unsigned char >(in[1]);
|
unsigned char a = unwrap< unsigned char >(in[1]);
|
||||||
self->argUChar(a);
|
self->argUChar(a);
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||||
{
|
{
|
||||||
checkArguments("dim",nargout,nargin-1,0);
|
checkArguments("dim",nargout,nargin-1,0);
|
||||||
shared_ptr<Point2> self = unwrap_shared_ptr< Point2 >(in[0],"Point2");
|
boost::shared_ptr<Point2> self = unwrap_shared_ptr< Point2 >(in[0],"Point2");
|
||||||
int result = self->dim();
|
int result = self->dim();
|
||||||
out[0] = wrap< int >(result);
|
out[0] = wrap< int >(result);
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||||
{
|
{
|
||||||
checkArguments("returnChar",nargout,nargin-1,0);
|
checkArguments("returnChar",nargout,nargin-1,0);
|
||||||
shared_ptr<Point2> self = unwrap_shared_ptr< Point2 >(in[0],"Point2");
|
boost::shared_ptr<Point2> self = unwrap_shared_ptr< Point2 >(in[0],"Point2");
|
||||||
char result = self->returnChar();
|
char result = self->returnChar();
|
||||||
out[0] = wrap< char >(result);
|
out[0] = wrap< char >(result);
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||||
{
|
{
|
||||||
checkArguments("vectorConfusion",nargout,nargin-1,0);
|
checkArguments("vectorConfusion",nargout,nargin-1,0);
|
||||||
shared_ptr<Point2> self = unwrap_shared_ptr< Point2 >(in[0],"Point2");
|
boost::shared_ptr<Point2> self = unwrap_shared_ptr< Point2 >(in[0],"Point2");
|
||||||
VectorNotEigen result = self->vectorConfusion();
|
VectorNotEigen result = self->vectorConfusion();
|
||||||
out[0] = wrap_shared_ptr(make_shared< VectorNotEigen >(result),"VectorNotEigen");
|
out[0] = wrap_shared_ptr(make_shared< VectorNotEigen >(result),"VectorNotEigen");
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||||
{
|
{
|
||||||
checkArguments("x",nargout,nargin-1,0);
|
checkArguments("x",nargout,nargin-1,0);
|
||||||
shared_ptr<Point2> self = unwrap_shared_ptr< Point2 >(in[0],"Point2");
|
boost::shared_ptr<Point2> self = unwrap_shared_ptr< Point2 >(in[0],"Point2");
|
||||||
double result = self->x();
|
double result = self->x();
|
||||||
out[0] = wrap< double >(result);
|
out[0] = wrap< double >(result);
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||||
{
|
{
|
||||||
checkArguments("y",nargout,nargin-1,0);
|
checkArguments("y",nargout,nargin-1,0);
|
||||||
shared_ptr<Point2> self = unwrap_shared_ptr< Point2 >(in[0],"Point2");
|
boost::shared_ptr<Point2> self = unwrap_shared_ptr< Point2 >(in[0],"Point2");
|
||||||
double result = self->y();
|
double result = self->y();
|
||||||
out[0] = wrap< double >(result);
|
out[0] = wrap< double >(result);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@ using namespace geometry;
|
||||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||||
{
|
{
|
||||||
checkArguments("norm",nargout,nargin-1,0);
|
checkArguments("norm",nargout,nargin-1,0);
|
||||||
shared_ptr<Point3> self = unwrap_shared_ptr< Point3 >(in[0],"Point3");
|
boost::shared_ptr<Point3> self = unwrap_shared_ptr< Point3 >(in[0],"Point3");
|
||||||
double result = self->norm();
|
double result = self->norm();
|
||||||
out[0] = wrap< double >(result);
|
out[0] = wrap< double >(result);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@ using namespace geometry;
|
||||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||||
{
|
{
|
||||||
checkArguments("arg_EigenConstRef",nargout,nargin-1,1);
|
checkArguments("arg_EigenConstRef",nargout,nargin-1,1);
|
||||||
shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
boost::shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||||
Matrix& value = *unwrap_shared_ptr< Matrix >(in[1], "Matrix");
|
Matrix& value = *unwrap_shared_ptr< Matrix >(in[1], "Matrix");
|
||||||
self->arg_EigenConstRef(value);
|
self->arg_EigenConstRef(value);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,8 +5,8 @@ using namespace geometry;
|
||||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||||
{
|
{
|
||||||
checkArguments("create_MixedPtrs",nargout,nargin-1,0);
|
checkArguments("create_MixedPtrs",nargout,nargin-1,0);
|
||||||
shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
boost::shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||||
pair< Test, shared_ptr<Test> > result = self->create_MixedPtrs();
|
pair< Test, boost::shared_ptr<Test> > result = self->create_MixedPtrs();
|
||||||
out[0] = wrap_shared_ptr(make_shared< Test >(result.first),"Test");
|
out[0] = wrap_shared_ptr(make_shared< Test >(result.first),"Test");
|
||||||
out[1] = wrap_shared_ptr(result.second,"Test");
|
out[1] = wrap_shared_ptr(result.second,"Test");
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,8 +5,8 @@ using namespace geometry;
|
||||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||||
{
|
{
|
||||||
checkArguments("create_ptrs",nargout,nargin-1,0);
|
checkArguments("create_ptrs",nargout,nargin-1,0);
|
||||||
shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
boost::shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||||
pair< shared_ptr<Test>, shared_ptr<Test> > result = self->create_ptrs();
|
pair< boost::shared_ptr<Test>, boost::shared_ptr<Test> > result = self->create_ptrs();
|
||||||
out[0] = wrap_shared_ptr(result.first,"Test");
|
out[0] = wrap_shared_ptr(result.first,"Test");
|
||||||
out[1] = wrap_shared_ptr(result.second,"Test");
|
out[1] = wrap_shared_ptr(result.second,"Test");
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,6 @@ using namespace geometry;
|
||||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||||
{
|
{
|
||||||
checkArguments("print",nargout,nargin-1,0);
|
checkArguments("print",nargout,nargin-1,0);
|
||||||
shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
boost::shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||||
self->print();
|
self->print();
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,8 +5,8 @@ using namespace geometry;
|
||||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||||
{
|
{
|
||||||
checkArguments("return_Point2Ptr",nargout,nargin-1,1);
|
checkArguments("return_Point2Ptr",nargout,nargin-1,1);
|
||||||
shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
boost::shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||||
bool value = unwrap< bool >(in[1]);
|
bool value = unwrap< bool >(in[1]);
|
||||||
shared_ptr<Point2> result = self->return_Point2Ptr(value);
|
boost::shared_ptr<Point2> result = self->return_Point2Ptr(value);
|
||||||
out[0] = wrap_shared_ptr(result,"Point2");
|
out[0] = wrap_shared_ptr(result,"Point2");
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,8 +5,8 @@ using namespace geometry;
|
||||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||||
{
|
{
|
||||||
checkArguments("return_Test",nargout,nargin-1,1);
|
checkArguments("return_Test",nargout,nargin-1,1);
|
||||||
shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
boost::shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||||
shared_ptr<Test> value = unwrap_shared_ptr< Test >(in[1], "Test");
|
boost::shared_ptr<Test> value = unwrap_shared_ptr< Test >(in[1], "Test");
|
||||||
Test result = self->return_Test(value);
|
Test result = self->return_Test(value);
|
||||||
out[0] = wrap_shared_ptr(make_shared< Test >(result),"Test");
|
out[0] = wrap_shared_ptr(make_shared< Test >(result),"Test");
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,8 +5,8 @@ using namespace geometry;
|
||||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||||
{
|
{
|
||||||
checkArguments("return_TestPtr",nargout,nargin-1,1);
|
checkArguments("return_TestPtr",nargout,nargin-1,1);
|
||||||
shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
boost::shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||||
shared_ptr<Test> value = unwrap_shared_ptr< Test >(in[1], "Test");
|
boost::shared_ptr<Test> value = unwrap_shared_ptr< Test >(in[1], "Test");
|
||||||
shared_ptr<Test> result = self->return_TestPtr(value);
|
boost::shared_ptr<Test> result = self->return_TestPtr(value);
|
||||||
out[0] = wrap_shared_ptr(result,"Test");
|
out[0] = wrap_shared_ptr(result,"Test");
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@ using namespace geometry;
|
||||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||||
{
|
{
|
||||||
checkArguments("return_bool",nargout,nargin-1,1);
|
checkArguments("return_bool",nargout,nargin-1,1);
|
||||||
shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
boost::shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||||
bool value = unwrap< bool >(in[1]);
|
bool value = unwrap< bool >(in[1]);
|
||||||
bool result = self->return_bool(value);
|
bool result = self->return_bool(value);
|
||||||
out[0] = wrap< bool >(result);
|
out[0] = wrap< bool >(result);
|
||||||
|
|
|
@ -5,7 +5,7 @@ using namespace geometry;
|
||||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||||
{
|
{
|
||||||
checkArguments("return_double",nargout,nargin-1,1);
|
checkArguments("return_double",nargout,nargin-1,1);
|
||||||
shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
boost::shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||||
double value = unwrap< double >(in[1]);
|
double value = unwrap< double >(in[1]);
|
||||||
double result = self->return_double(value);
|
double result = self->return_double(value);
|
||||||
out[0] = wrap< double >(result);
|
out[0] = wrap< double >(result);
|
||||||
|
|
|
@ -5,7 +5,7 @@ using namespace geometry;
|
||||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||||
{
|
{
|
||||||
checkArguments("return_field",nargout,nargin-1,1);
|
checkArguments("return_field",nargout,nargin-1,1);
|
||||||
shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
boost::shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||||
Test& t = *unwrap_shared_ptr< Test >(in[1], "Test");
|
Test& t = *unwrap_shared_ptr< Test >(in[1], "Test");
|
||||||
bool result = self->return_field(t);
|
bool result = self->return_field(t);
|
||||||
out[0] = wrap< bool >(result);
|
out[0] = wrap< bool >(result);
|
||||||
|
|
|
@ -5,7 +5,7 @@ using namespace geometry;
|
||||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||||
{
|
{
|
||||||
checkArguments("return_int",nargout,nargin-1,1);
|
checkArguments("return_int",nargout,nargin-1,1);
|
||||||
shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
boost::shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||||
int value = unwrap< int >(in[1]);
|
int value = unwrap< int >(in[1]);
|
||||||
int result = self->return_int(value);
|
int result = self->return_int(value);
|
||||||
out[0] = wrap< int >(result);
|
out[0] = wrap< int >(result);
|
||||||
|
|
|
@ -5,7 +5,7 @@ using namespace geometry;
|
||||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||||
{
|
{
|
||||||
checkArguments("return_matrix1",nargout,nargin-1,1);
|
checkArguments("return_matrix1",nargout,nargin-1,1);
|
||||||
shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
boost::shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||||
Matrix value = unwrap< Matrix >(in[1]);
|
Matrix value = unwrap< Matrix >(in[1]);
|
||||||
Matrix result = self->return_matrix1(value);
|
Matrix result = self->return_matrix1(value);
|
||||||
out[0] = wrap< Matrix >(result);
|
out[0] = wrap< Matrix >(result);
|
||||||
|
|
|
@ -5,7 +5,7 @@ using namespace geometry;
|
||||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||||
{
|
{
|
||||||
checkArguments("return_matrix2",nargout,nargin-1,1);
|
checkArguments("return_matrix2",nargout,nargin-1,1);
|
||||||
shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
boost::shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||||
Matrix value = unwrap< Matrix >(in[1]);
|
Matrix value = unwrap< Matrix >(in[1]);
|
||||||
Matrix result = self->return_matrix2(value);
|
Matrix result = self->return_matrix2(value);
|
||||||
out[0] = wrap< Matrix >(result);
|
out[0] = wrap< Matrix >(result);
|
||||||
|
|
|
@ -5,7 +5,7 @@ using namespace geometry;
|
||||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||||
{
|
{
|
||||||
checkArguments("return_pair",nargout,nargin-1,2);
|
checkArguments("return_pair",nargout,nargin-1,2);
|
||||||
shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
boost::shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||||
Vector v = unwrap< Vector >(in[1]);
|
Vector v = unwrap< Vector >(in[1]);
|
||||||
Matrix A = unwrap< Matrix >(in[2]);
|
Matrix A = unwrap< Matrix >(in[2]);
|
||||||
pair< Vector, Matrix > result = self->return_pair(v,A);
|
pair< Vector, Matrix > result = self->return_pair(v,A);
|
||||||
|
|
|
@ -5,10 +5,10 @@ using namespace geometry;
|
||||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||||
{
|
{
|
||||||
checkArguments("return_ptrs",nargout,nargin-1,2);
|
checkArguments("return_ptrs",nargout,nargin-1,2);
|
||||||
shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
boost::shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||||
shared_ptr<Test> p1 = unwrap_shared_ptr< Test >(in[1], "Test");
|
boost::shared_ptr<Test> p1 = unwrap_shared_ptr< Test >(in[1], "Test");
|
||||||
shared_ptr<Test> p2 = unwrap_shared_ptr< Test >(in[2], "Test");
|
boost::shared_ptr<Test> p2 = unwrap_shared_ptr< Test >(in[2], "Test");
|
||||||
pair< shared_ptr<Test>, shared_ptr<Test> > result = self->return_ptrs(p1,p2);
|
pair< boost::shared_ptr<Test>, boost::shared_ptr<Test> > result = self->return_ptrs(p1,p2);
|
||||||
out[0] = wrap_shared_ptr(result.first,"Test");
|
out[0] = wrap_shared_ptr(result.first,"Test");
|
||||||
out[1] = wrap_shared_ptr(result.second,"Test");
|
out[1] = wrap_shared_ptr(result.second,"Test");
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@ using namespace geometry;
|
||||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||||
{
|
{
|
||||||
checkArguments("return_size_t",nargout,nargin-1,1);
|
checkArguments("return_size_t",nargout,nargin-1,1);
|
||||||
shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
boost::shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||||
size_t value = unwrap< size_t >(in[1]);
|
size_t value = unwrap< size_t >(in[1]);
|
||||||
size_t result = self->return_size_t(value);
|
size_t result = self->return_size_t(value);
|
||||||
out[0] = wrap< size_t >(result);
|
out[0] = wrap< size_t >(result);
|
||||||
|
|
|
@ -5,7 +5,7 @@ using namespace geometry;
|
||||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||||
{
|
{
|
||||||
checkArguments("return_string",nargout,nargin-1,1);
|
checkArguments("return_string",nargout,nargin-1,1);
|
||||||
shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
boost::shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||||
string value = unwrap< string >(in[1]);
|
string value = unwrap< string >(in[1]);
|
||||||
string result = self->return_string(value);
|
string result = self->return_string(value);
|
||||||
out[0] = wrap< string >(result);
|
out[0] = wrap< string >(result);
|
||||||
|
|
|
@ -5,7 +5,7 @@ using namespace geometry;
|
||||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||||
{
|
{
|
||||||
checkArguments("return_vector1",nargout,nargin-1,1);
|
checkArguments("return_vector1",nargout,nargin-1,1);
|
||||||
shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
boost::shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||||
Vector value = unwrap< Vector >(in[1]);
|
Vector value = unwrap< Vector >(in[1]);
|
||||||
Vector result = self->return_vector1(value);
|
Vector result = self->return_vector1(value);
|
||||||
out[0] = wrap< Vector >(result);
|
out[0] = wrap< Vector >(result);
|
||||||
|
|
|
@ -5,7 +5,7 @@ using namespace geometry;
|
||||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||||
{
|
{
|
||||||
checkArguments("return_vector2",nargout,nargin-1,1);
|
checkArguments("return_vector2",nargout,nargin-1,1);
|
||||||
shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
boost::shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||||
Vector value = unwrap< Vector >(in[1]);
|
Vector value = unwrap< Vector >(in[1]);
|
||||||
Vector result = self->return_vector2(value);
|
Vector result = self->return_vector2(value);
|
||||||
out[0] = wrap< Vector >(result);
|
out[0] = wrap< Vector >(result);
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
echo on
|
echo on
|
||||||
|
|
||||||
toolboxpath = mfilename('fullpath');
|
toolboxpath = mfilename('fullpath');
|
||||||
delims = find(toolboxpath == '/');
|
delims = find(toolboxpath == '/' | toolboxpath == '\');
|
||||||
toolboxpath = toolboxpath(1:(delims(end)-1));
|
toolboxpath = toolboxpath(1:(delims(end)-1));
|
||||||
clear delims
|
clear delims
|
||||||
addpath(toolboxpath);
|
addpath(toolboxpath);
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||||
{
|
{
|
||||||
checkArguments("memberFunction",nargout,nargin-1,0);
|
checkArguments("memberFunction",nargout,nargin-1,0);
|
||||||
shared_ptr<ns2::ClassA> self = unwrap_shared_ptr< ns2::ClassA >(in[0],"ns2ClassA");
|
boost::shared_ptr<ns2::ClassA> self = unwrap_shared_ptr< ns2::ClassA >(in[0],"ns2ClassA");
|
||||||
double result = self->memberFunction();
|
double result = self->memberFunction();
|
||||||
out[0] = wrap< double >(result);
|
out[0] = wrap< double >(result);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||||
{
|
{
|
||||||
checkArguments("nsArg",nargout,nargin-1,1);
|
checkArguments("nsArg",nargout,nargin-1,1);
|
||||||
shared_ptr<ns2::ClassA> self = unwrap_shared_ptr< ns2::ClassA >(in[0],"ns2ClassA");
|
boost::shared_ptr<ns2::ClassA> self = unwrap_shared_ptr< ns2::ClassA >(in[0],"ns2ClassA");
|
||||||
ns1::ClassB& arg = *unwrap_shared_ptr< ns1::ClassB >(in[1], "ns1ClassB");
|
ns1::ClassB& arg = *unwrap_shared_ptr< ns1::ClassB >(in[1], "ns1ClassB");
|
||||||
int result = self->nsArg(arg);
|
int result = self->nsArg(arg);
|
||||||
out[0] = wrap< int >(result);
|
out[0] = wrap< int >(result);
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||||
{
|
{
|
||||||
checkArguments("nsReturn",nargout,nargin-1,1);
|
checkArguments("nsReturn",nargout,nargin-1,1);
|
||||||
shared_ptr<ns2::ClassA> self = unwrap_shared_ptr< ns2::ClassA >(in[0],"ns2ClassA");
|
boost::shared_ptr<ns2::ClassA> self = unwrap_shared_ptr< ns2::ClassA >(in[0],"ns2ClassA");
|
||||||
double q = unwrap< double >(in[1]);
|
double q = unwrap< double >(in[1]);
|
||||||
ns2::ns3::ClassB result = self->nsReturn(q);
|
ns2::ns3::ClassB result = self->nsReturn(q);
|
||||||
out[0] = wrap_shared_ptr(make_shared< ns2::ns3::ClassB >(result),"ns2ns3ClassB");
|
out[0] = wrap_shared_ptr(make_shared< ns2::ns3::ClassB >(result),"ns2ns3ClassB");
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
echo on
|
echo on
|
||||||
|
|
||||||
toolboxpath = mfilename('fullpath');
|
toolboxpath = mfilename('fullpath');
|
||||||
delims = find(toolboxpath == '/');
|
delims = find(toolboxpath == '/' | toolboxpath == '\');
|
||||||
toolboxpath = toolboxpath(1:(delims(end)-1));
|
toolboxpath = toolboxpath(1:(delims(end)-1));
|
||||||
clear delims
|
clear delims
|
||||||
addpath(toolboxpath);
|
addpath(toolboxpath);
|
||||||
|
|
Loading…
Reference in New Issue