[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: CORBA typedef sequence
From: Simon Hausmann <tronical () gmx ! net>
Date: 1999-08-03 9:54:43
[Download RAW message or body]
On Mon, 2 Aug 1999, Rik Hemsley wrote:
>
> Hi,
>
> If I have something like this in my idl:
> typedef sequence<Group> GroupList;
>
> Then how should I go about iterating over this sequence ?
>
> In my code I can do this:
> GroupList * gl = object->groupList();
This creates a memory leak.
Better use:
GroupList_var gl = object->groupList();
> But I would like to be able to get something like vector<Group> so I can
> actually use the thing. GroupList gets defined as an IfaceSequenceTmpl
> which isn't really very useful. I can't even manage to get to the data :)
CORBA::ULong len = gl->length();
for ( CORBA::ULong i = 0; i < len; i++ )
doSomething( gl[ i ] );
Bye,
Simon
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic