gtsam/wrap
Alex Cunningham ead8247bd7 Added namespace support to return classes 2011-12-08 20:51:17 +00:00
..
tests Added namespace support to return classes 2011-12-08 20:51:17 +00:00
Argument.cpp Added namespace support to arguments 2011-12-08 20:51:15 +00:00
Argument.h Added namespace support to arguments 2011-12-08 20:51:15 +00:00
Class.cpp Added codegen for namespace handling, examples exercising namespaces 2011-12-08 20:51:13 +00:00
Class.h Added codegen for namespace handling, examples exercising namespaces 2011-12-08 20:51:13 +00:00
Constructor.cpp Added codegen for namespace handling, examples exercising namespaces 2011-12-08 20:51:13 +00:00
Constructor.h Added codegen for namespace handling, examples exercising namespaces 2011-12-08 20:51:13 +00:00
Makefile.am Adding support for mex extensions in wrap, configure scripts slightly broken 2011-12-05 20:54:41 +00:00
Method.cpp Added codegen for namespace handling, examples exercising namespaces 2011-12-08 20:51:13 +00:00
Method.h Added codegen for namespace handling, examples exercising namespaces 2011-12-08 20:51:13 +00:00
Module.cpp Added namespace support to return classes 2011-12-08 20:51:17 +00:00
Module.h Fixed ambiguity issues with returning non-ptr classes, added new copies of functions to gtsam.h and depreciated old ones 2011-12-07 03:05:37 +00:00
README Added static function parsing to wrap, included Expmap/Logmap in geometric objects. Static functions appear to still crash matlab, however. 2011-12-02 02:32:18 +00:00
ReturnValue.cpp Added namespace support to return classes 2011-12-08 20:51:17 +00:00
ReturnValue.h Added namespace support to return classes 2011-12-08 20:51:17 +00:00
StaticMethod.cpp Added codegen for namespace handling, examples exercising namespaces 2011-12-08 20:51:13 +00:00
StaticMethod.h Added codegen for namespace handling, examples exercising namespaces 2011-12-08 20:51:13 +00:00
matlab.h wrap: fixed errors in static function matlab codegen, added mechanism to allow for returning classes without shared_ptr 2011-12-07 03:05:30 +00:00
pop_actor.h Parsing for namespaces now works in all tests 2011-12-08 20:51:08 +00:00
utilities.cpp Limited namespace handling in wrap parser 2011-12-08 20:50:38 +00:00
utilities.h Added dependency checking to wrapper. Wrapper will now throw an exception if an object depends on another object which has not been wrapped. Tests for dependency checking added. Moved geometry.h to tests folder. 2011-12-07 17:55:38 +00:00
wrap.cpp Adding support for mex extensions in wrap, configure scripts slightly broken 2011-12-05 20:54:41 +00:00

README

Frank Dellaert
October 2011

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.

The classes and methods to be warpped 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
- Classes are created by special constructors, e.g., new_GaussianFactorGraph_.cpp.
	These constructors are called from the MATLAB class @GaussianFactorGraph.
	new_GaussianFactorGraph_ calls wrap_constructed in matlab.h, see documentation there
	
METHOD (AND CONSTRUCTOR) ARGUMENTS
- Simple argument types of methods, such as "double", will be converted in the
  mex warppers by calling unwrap<double>, defined in matlab.h
- Vector and Matrix arguments are normally passed by reference in GTSAM, but
  in gtsam.h you need to pretend they are passed by value, to trigger the 
  generation of the correct conversion routines unwrap<Vector> and unwrap<Matrix>
- 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