diff --git a/wrap/Argument.cpp b/wrap/Argument.cpp index ffac23a9d..85073715d 100644 --- a/wrap/Argument.cpp +++ b/wrap/Argument.cpp @@ -30,7 +30,7 @@ string Argument::matlabClass(const string& delim) const { string result; BOOST_FOREACH(const string& ns, namespaces) result += ns + delim; - if (type=="string" || type=="unsigned char") + if (type=="string" || type=="unsigned char" || type=="char") return result + "char"; if (type=="bool" || type=="int" || type=="size_t" || type=="Vector" || type=="Matrix") return result + "double"; diff --git a/wrap/README b/wrap/README index 6e7acc863..92fd1967c 100644 --- a/wrap/README +++ b/wrap/README @@ -1,14 +1,17 @@ Frank Dellaert October 2011 -The wrap library wraps the GTSAM library into a MATLAB toolbox. +The wrap library wraps the GTSAM library into a MATLAB toolbox. It was designed to be more general than just wrapping GTSAM, but a small amount of GTSAM specific code exists in matlab.h, the include file that is included by the -mex files. In addition, the current makefile (Oct 11) is GTSAM specific. +mex files. The GTSAM-specific functionality consists primarily of handling of +Eigen Matrix and Vector classes. + +For notes on creating a wrap interface, see gtsam.h for what features can be +wrapped into a toolbox, as well as the current state of the toolbox for gtsam. +For more technical details on the interface, please read comments in matlab.h -The classes and methods to be wrapped are specified in gtsam.h -This tool will not wrap arbitrary methods. Please read comments in matlab.h Some good things to know: OBJECT CREATION @@ -24,7 +27,5 @@ METHOD (AND CONSTRUCTOR) ARGUMENTS generation of the correct conversion routines unwrap and unwrap - passing classes as arguments works, provided they are passed by reference. This triggers a call to unwrap_shared_ptr -- GTSAM specific: keys will be cast automatically from strings via GTSAM_magic. This - allows us to not have to declare all key types in MATLAB. Just replace key arguments with - the (non-const, non-reference) string type + \ No newline at end of file diff --git a/wrap/tests/expected_namespaces/@ClassD/ClassD.m b/wrap/tests/expected_namespaces/@ClassD/ClassD.m index 8b78750d9..9e3ddf132 100644 --- a/wrap/tests/expected_namespaces/@ClassD/ClassD.m +++ b/wrap/tests/expected_namespaces/@ClassD/ClassD.m @@ -9,7 +9,7 @@ classdef ClassD < handle if nargin ~= 13 && obj.self == 0, error('ClassD constructor failed'); end end function delete(obj) - delete_ClassD(obj) + delete_ClassD(obj); end function display(obj), obj.print(''); end function disp(obj), obj.display; end