[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to instantiate a user-class from octfile?
From: |
Mike Miller |
Subject: |
Re: How to instantiate a user-class from octfile? |
Date: |
Fri, 20 May 2016 17:43:58 -0700 |
User-agent: |
Mutt/1.6.0 (2016-04-01) |
On Thu, May 19, 2016 at 23:47:12 -0700, Colin Macdonald wrote:
> Hi all,
>
> Suppose I have an m-file classdef "Myclass" which I can instantiate using:
>
> x = Myclass("hello")
>
> How would I make `x` within an oct-file (in C++)?
A way would be something like
octave_value_list ret = feval ("Myclass", ovl ("hello"), 1);
octave_value x = ret(0);
I don't know if it's the only way, but pretty straightforward.
--
mike