[omniORB] typed BLOBs as sequence<octet>

Haarek Ryeng Haarek.Ryeng@datarespons.no
Mon, 26 Nov 2001 17:43:18 +0100


Is it safe to assume that the OmniORB client app. receives a contiguous data buffer when receiving a sequence<octet>?
Client ex.:
MySeq = GetData(); // sequence<octet>
NonIDLTranslateable* p = (NonIDLTranslateable*) MySeq.get_buffer();
for(the length of the sequence)
{
 cout << p->someElement << endl;
 p++; // WILL THIS BE SAFE????????
}

Henning & Vinoski says at page 186 (Advanced CORBA programming with C++ - Mapping for Sequences): "The mapping does not guarantee that sequence elements occupy a contiguous region of memory. ..."
(Or does this only happen after a reallocation (call to length(x) modifier)? )

If this is the case, then how is it possible to transfere BLOBs (Binary Large OBjects) between CORBA apps, and safely traverse the buffer?

--
Haarek Ryeng
Senior Software Development Engineer
Data Respons AS, Sandviksvn. 26,N-1323 HOEVIK, Norway.
Tel: +47 67112071 Mob: +47 90196734

   Embedded Computers & Realtime Professionals
             www.datarespons.no