I'm making public (under MIT license) a C++ template library & cmake scripts that I use to write max externals in C++:
This is not a release but "developer preview", there isn't much of documentation save for a dummy "hello_maxxx" object which demonstrates what it takes to build an external with max++. The library depends on several boost headers and boost::regex library. The code is available in the git repository at gitorious, you can browse the sources online at:
or download the archive with the latest sources (or any older version) going to the link on the right hand side of that page.
The library is pretty minimalist, its main purpose is to automatically generate all the class / methods registration code - i.e. if you have a C++ class Foo with a method bar(long x), you just tell something like: ...(("bar",bar))... and the clever macro/template thing knows to call class_addmethod(Wrapper(Foo), wrapper(Foo::bar), "bar", A_LONG, 0); where Wrapper(Foo) and wrapper(Foo::bar) are generated behind the scenes and A_LONG is figured out from the wrapped method prototype. If the method prototype looks like the it expects A_GIMME, then that's what it'll get.
Basically, I wanted to avoid boiler plate programming, so I hid all the boiler plates and logic to generate them under the hood of the maxxx.hpp header. All I need to do now is declare the class as MXX_CLASS(Foo) instead of class Foo and register it in main() with something like:
1); // 1 outlet
At the moment the library doesn't use proxies, so objects made with it can accept only numbers in non-leftmost inlets.
For a better illustration see:
Any comments, questions and suggestions are appreciated.