[omniORB] Any::NP_length()

Renzo Tomaselli renzo.tomaselli@tecnotp.it
Wed, 20 Oct 1999 09:52:09 +0200


Sai-Lai Lo writes:

> If you are thinking of externalise an Any, my advice is to marshal the Any
> value into a MemBufferedStream and extract the content as a sequence of
> Octet. There is no portable way to do so I'm afraid. If you need code
> example, please search the archive.

Not at all, I already wrote a package to externalize an Any through
recursion over a DynAny and it works; an Any is converted to/from a byte
block. It's fully portable and the only point remaining concerns performance
with sequences of atomic types (for sequence<octet> it's really painful)
which involves a few modifications on actual DynAny implementation (please
see my latest posting on this subject).
On the other hand I noticed as a sequence length is marshalled into a stream
with elements themselves, so type unsafe Any extraction is once more useless
for optimized sequence handling; so let's forget about  Any::NP_length().
Thanks,
                                             Renzo Tomaselli
---------------------------------------------------------------------------
TecnoTP s.n.c. Special Information System Design
Maso Pelauchi I38050 Ronchi Valsugana,  Trento TN  ITALY
Tel. +39 0461 773164      Fax. +39 0461 771514
e-mail: renzo.tomaselli@tecnotp.it
---------------------------------------------------------------------------