[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: low level I/O (GPIB, USBTMC, VXI11)

From: Richard
Subject: Re: low level I/O (GPIB, USBTMC, VXI11)
Date: Sun, 25 Nov 2012 15:43:22 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121026 Thunderbird/16.0.2

On 25/11/2012 15:29, c. wrote:
On 25 Nov 2012, at 12:49, Richard wrote:

I suspect he wants to do something like this:

There is nothing special to be done to link C++ with Octave,
Octave itself is written in C++ so classes have no need to be "encapsulated"
in an oct file you can just use them as in any other C++ program.


Really? so i can have a C++ class, and call it and its methods from an m-file in Octave, and have it persist like a real C++ object from one call of its methods to the next?

This is not possible with plain mex files in Matlab because you must create an instance of a C++ class which will be destroyed once the mex file completes (which is the problem that using handle classes in the linked example solves). As I understood it Octave has the same limitation, but since it does not yet have classdef, there is no way to do the same thing. I'd be very interested hear if there was though, or that I have misunderstood something about oct files.


The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]