[Top][All Lists]

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

Re: stroring pointers from oct-files

From: c.
Subject: Re: stroring pointers from oct-files
Date: Mon, 5 Nov 2012 11:06:00 +0100

On 5 Nov 2012, at 07:48, c. wrote:

> Alternatively you could define a new class derived from octave_value and 
> store your pointer there.
> examples are available in many octave-forge packages, for example:
> main/instrument-control/src/i2c/i2c_class.h
> main/instrument-control/src/parallel/parallel_class.h
> main/instrument-control/src/serial/serial_class.h
> or 
> main/openmpi_ext/src/simple.h
> HTH,
> c.


My comment was probably not clear enough, sorry.
I was not suggesting to create an Octave object representing a pointer.

I was suggesting to create a class that contains all methods required for 
interacting with the pointer and stores 
the pointer as a private property. 

The user should then be able to interact with objects of this new class only 
through methods that are "exposed" as 
interpreted language functions, and it would be possible to make shure that 
they only perform "safe" operations.

I think that is the approaach taken by the instrument-control package, but I 
only had a very quick look at it, 
probably Andrius or Juan Pablo can be more precise with this respect.

BTW, Pantxo, have you had a look at the "instrument-control" package? Can't you 
use that package directly to interact 
with your hardware?


reply via email to

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