Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.
|
|
Pierre
Posts:
8
Registered:
2/3/11
|
|
Re: Making C++ objects persistent between mex calls, and robust.
Posted:
Feb 15, 2011 7:52 AM
|
|
"Oliver Woodford" wrote in message <iierod$9kp$1@fred.mathworks.com>... > "Pierre" wrote: > > I also managed to figure out how to alter properties of handle objects immediately from a mex file: Invoking mxSetProperty() on a const_cast of the concerned prhs[i] seems to work just fine. > > I'd love to hear why you need to do that. It sounds interesting!
Let's say I'm a little design-fanatic and always try to get the most out of languages in order to keep code and solutions elegant at a maximum... and this simply includes altering handle objects as handle objects are supposed to behave from mex code too. (There's a doubt whether the effort of searching clean solutions to similar problems would ever pay off compared to simply using the first workaround which comes to one's head, but it's a question of personal honour regarding code quality. ;) )
|
|
|
|