GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - rymut/mexcppclass: MEX function and a library for wrapping, managing and using C++ resources objects, function and classes within MATLAB.

BranchesTags
Open more actions menu

Latest commit

 

History

2 Commits
2 Commits

Folders and files

NameName
Last commit message
Last commit date
cmake
cmake
 
 
include/mexcppclass
include/mexcppclass
 
 
source
source
 
 
test
test
 
 
CMakeLists.txt
CMakeLists.txt
 
 
COPYRIGHT.md
COPYRIGHT.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
VERSION
VERSION
 
 

Repository files navigation

mexcppclass

MEX function and a library for wrapping, managing and using C++ resources objects, function and classes within MATLAB.

Usage

  1. Compile cppmexclass mex function.
  2. Create resource wrapper and export create/destory functions.
    Wrapper and functions can reside inside mexcppclass mex function or can
    reside inside a shared library:
    • wrapper for C++ resource which implements mexcppclass::ModuleInterface,
    • write and export functions for creating wrapper instance
      void Destroy<ClassName>ModuleInterface(mexcppclass::ModuleInterface *obj)
      and destroying wrapper instance
      void Destroy<ClassName>ModuleInterface(mexcppclass::ModuleInterface *obj).
  3. Put created .(dll|so) library and mexcppclass mex
    in the same directory. Object can be accessed by Matlab by use of commands:
% 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);

Example

See test/unit/testmodule.hpp and test/unit/testmodule.cpp for as a reference
point.

Alternative solutions/projects/examples

  • https://github.com/chappjc/MATLAB.git
  • http://www.ee.columbia.edu/~mim/meap/paMat/mexhandle/

About

MEX function and a library for wrapping, managing and using C++ resources objects, function and classes within MATLAB.

Topics

c-plus-pluscmakematlabmexmex-filesshared-libraries

Resources

Readme
Apache-2.0 license
Activity

Stars

1 star

Watchers

1 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.