Fixed handling of char in wrap, updated README
parent
73b4f35e02
commit
a07e4a7368
|
@ -30,7 +30,7 @@ string Argument::matlabClass(const string& delim) const {
|
||||||
string result;
|
string result;
|
||||||
BOOST_FOREACH(const string& ns, namespaces)
|
BOOST_FOREACH(const string& ns, namespaces)
|
||||||
result += ns + delim;
|
result += ns + delim;
|
||||||
if (type=="string" || type=="unsigned char")
|
if (type=="string" || type=="unsigned char" || type=="char")
|
||||||
return result + "char";
|
return result + "char";
|
||||||
if (type=="bool" || type=="int" || type=="size_t" || type=="Vector" || type=="Matrix")
|
if (type=="bool" || type=="int" || type=="size_t" || type=="Vector" || type=="Matrix")
|
||||||
return result + "double";
|
return result + "double";
|
||||||
|
|
13
wrap/README
13
wrap/README
|
@ -5,10 +5,13 @@ 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
|
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
|
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:
|
Some good things to know:
|
||||||
|
|
||||||
OBJECT CREATION
|
OBJECT CREATION
|
||||||
|
@ -24,7 +27,5 @@ METHOD (AND CONSTRUCTOR) ARGUMENTS
|
||||||
generation of the correct conversion routines unwrap<Vector> and unwrap<Matrix>
|
generation of the correct conversion routines unwrap<Vector> and unwrap<Matrix>
|
||||||
- passing classes as arguments works, provided they are passed by reference.
|
- passing classes as arguments works, provided they are passed by reference.
|
||||||
This triggers a call to unwrap_shared_ptr
|
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
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ classdef ClassD < handle
|
||||||
if nargin ~= 13 && obj.self == 0, error('ClassD constructor failed'); end
|
if nargin ~= 13 && obj.self == 0, error('ClassD constructor failed'); end
|
||||||
end
|
end
|
||||||
function delete(obj)
|
function delete(obj)
|
||||||
delete_ClassD(obj)
|
delete_ClassD(obj);
|
||||||
end
|
end
|
||||||
function display(obj), obj.print(''); end
|
function display(obj), obj.print(''); end
|
||||||
function disp(obj), obj.display; end
|
function disp(obj), obj.display; end
|
||||||
|
|
Loading…
Reference in New Issue