Introduction to the any Type

The any type is a built-in CORBA data type that can be used as a parameter or return value of an IDL operation. It can also be nested inside other data types; for example, you could have a sequence of anys, a struct containing an any, or even an any containing an any. The following IDL fragment shows an example of its use:

//IDL
typedef sequence<any> AnySeq;

interface BlobStack {
    readonly attribute size;
    void push(in any blob);
    void pop(out any blob);
    void popNBlobs(in long n, out AnySeq blobs);
};

The BlobStack interface describes a stack whose elements can be of arbitrary type. Elements of the stack are added and removed using push() and pop(), respectively. The popNBlobs() operation returns an out parameter of ...

Get Pure CORBA now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.