help-octave
[Top][All Lists]
Advanced

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

Re: Placing structs in cell arrays


From: John Swensen
Subject: Re: Placing structs in cell arrays
Date: Tue, 13 Feb 2007 15:17:05 -0500
User-agent: Thunderbird 2.0a1 (X11/20060807)

John W. Eaton wrote:
On 13-Feb-2007, Muthiah Annamalai wrote:

| On Mon, 2007-02-12 at 23:22 -0500, John Swensen wrote:
| > I am having trouble placing a struct/Octave_map in a cell array in C++. | > Here is a snippet of my code. | > | > Matrix handleVec = args(0).matrix_value();
| >         Cell retval(num_handles);
| >         for( int i = 0 ; i < num_handles ; i++ )
| >         {
| >             handlePtr = handle::getHandle( (int)handleVec(i) );
| >             Octave_map retvalItem = handlePtr->generateStruct();
|               ^^^^^^^^^^
| Is that a octave_struct ? you want to be using? ov-struct.h

Octave_map is the underlying data type that is used by octave_struct,
similar to the way Matrix is the data type used by octave_matrix, Cell
is the data type used by octave_cell, etc.

jwe

So, I was just following the example in the DaCodaAlFine section of the wiki (http://wiki.octave.org/wiki.pl?CodaStruct) concerning using structures in C++. Is this no longer the preferred method, or was it never the preferred method?

John


reply via email to

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