help-octave
[Top][All Lists]
Advanced

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

Re: How to derive from 'octave_base_value' ?


From: John W. Eaton
Subject: Re: How to derive from 'octave_base_value' ?
Date: Thu, 2 Apr 2009 16:04:44 -0400

On  2-Apr-2009, Søren Hauberg wrote:

| søn, 29 03 2009 kl. 19:03 -0400, skrev John W. Eaton:
| > On 22-Mar-2009, Søren Hauberg wrote:
| > 
| > | søn, 22 03 2009 kl. 20:53 +0100, skrev Jaroslav Hajek:
| > | > I think your derived class must override octave_base_value::is_defined.
| > | 
| > | Thanks, that was the missing part.
| > 
| > and earlier you wrote:
| > 
| > | I'd like to create a new type in Octave that simply holds a pointer to
| > | some object in an external library. The attached code implements a very
| > | simple type in Octave that just holds a string. This was the simplest
| > | possible type I could think of. I compile the code with
| > 
| > Does this solution (using octave_value) give you the copying semantics
| > that you want?
| 
| This sounds like a trick question :-) I think it does what I want, but
| my current code is quite poorly tested, so I'm not sure. Is there
| anything I should be looking out for?

I was just wondering if the default copy-on-write semantics of the
octave_valeu class caused trouble for you.  Or maybe it doesn't matter
if you just have a scalar object?  I'm not sure.  I just remember
running into trouble when trying to wrap pointers for COMEDI objects
because I really needed reference/pointer/handle semantics for that.

jwe



reply via email to

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