GitHub - rymut/mexcppclass: MEX function and a library for wrapping, managing and using C++ resources objects, function and classes within MATLAB.
MEX function and a library for wrapping, managing and using C++ resources objects, function and classes within MATLAB.
% Create wrapper handle
handle = mexcppclass('create', 'ClassName=LibraryName.so')
% Create object constructor
mexcppclass('call', handle, 'create');
% Call simple methods
mexcppclass('call', handle, 'setvalue', 10);
v = mexcppclass('call', handle, 'getvalue');
% destroy object and wrapper
mexcppclass('destroy', handle);
See test/unit/testmodule.hpp and test/unit/testmodule.cpp for as a reference
point.