octave-maintainers
[Top][All Lists]
Advanced

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

Re: Implementation of libpointer


From: John W. Eaton
Subject: Re: Implementation of libpointer
Date: Tue, 24 Sep 2013 09:40:48 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12

On 09/24/2013 05:57 AM, Reza Housseini wrote:
Hello

I try to implement the libpointer function [1]. It is used for example
in the calllib function [2]. Therefore a new type declaration is needed
and I was wondering where and how to implement them. Is it correct that
it need to be placed in libinterp/octave-value? And should it be some
derived struct class, with fixed size, like:

     class
     octave_pointer : public octave_struct
     {
       ...
     }

Or inherit directly from octave_map?

If you want to create a new value type in Octave, then it ultimately needs to be derived from octave_base_value. So deriving from octave_struct could work. It could also be derived directly from octave_base_value and contain an octave_scalar_map object (or can a libpointer object have non-scalar dimensions?)

But since it appears that the libpointer object only ever contains two fields, maybe it should just be a separate kind of object that doesn't use a structure for its implementation.

Is libpointer a handle class object in Matlab? If so, you'll have some difficulty getting full compatibility

If you are working on calllib and would eventually like for it to be a part of Octave, maybe it would be helpful if you would share your code with us so we could provide some early feedback.

jwe



reply via email to

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