Fwd: RE: [omniORB] sequence mapping in C++

Thierry DESCOMBES descombt at ipnl.in2p3.fr
Tue Mar 2 10:53:21 GMT 2004


>Date: Tue, 02 Mar 2004 10:51:40 +0100
>To: "Ulf Stoermer" <ulf at emi.yamaha.co.jp>
>From: Thierry DESCOMBES <descombt at ipnl.in2p3.fr>
>Subject: RE: [omniORB] sequence mapping in C++
>
>Yes... You are right... I forget :
>seq->length( seq->length() + 1 );
>in the example I have rewritten.
>But the problem is not here... It seems that the problem comes from the 
>allocation of the SeqAdcEventData into a function.
>Cheers
>Thierry
>
>At 18:58 02/03/2004 +0900, Ulf Stoermer wrote:
>>Salut Thierry,
>>
>>I wonder that it works at all.
>>See, you never set the length of SeqAdcEventData
>>
>> >      SeqAdcEventData *seq=new SeqAdcEventData(1000);
>>
>>Even though this line will reserve some memory for you but
>>your're not allowed to use the sequence until you set the length of it.
>>
>>So before doing
>>
>> >        (*seq)[i]=currentAdcEventData;
>>
>>
>>you should increase the length by something like this
>>seq->length( seq->length() + 1 );
>>
>>The book by Henning/Vinoski is not absolutely clear about this,
>>so you rather have to read between the lines.
>>
>>Hope this helps.
>>Cheers
>>
>>Ulf





More information about the omniORB-list mailing list