help-octave
[Top][All Lists]
Advanced

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

Re: Octave/C++


From: Raphael Schneider
Subject: Re: Octave/C++
Date: Fri, 22 Jul 2005 13:47:39 +0200
User-agent: KMail/1.8.1

Hi,

On Friday 22 July 2005 11:32, Mike Morley wrote:
> However: I'm not entirely sure how to do this - is it, for example,
> possible to have a robot_link object that persists for the entire Octave
> program? Would I be able to create a function that mimics rlink.command
> (COMMAND_NAME, var) that takes COMMAND_NAME and var in as arguments, or
> would I have to create a function for each specific command?
This is possible. What you have to do is to decide inside the main oct-file 
function which (sub-)function should be called an then call this function. I 
realized it with an array of function-name, pointer to the function and 
number of input parameters (to check if all needed parameters are given) and 
just compare the command-name with the name stored in the array and then call 
the function.

To see how I implemented it, you can download the source code of my libRASCH 
project (www.librasch.org; a library to access physiological signals stored 
in different data formats) and look at 'interfaces/octave/ra_octave.[h|cc]' 
which implements the octave interface for libRASCH.

Hope this helps
Raphael



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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