C++ Insertion into CORBA::Any

This section provides sample code that shows how a variety of data types are inserted into a CORBA::Any. Some special cases of insertion are discussed in more detail as they arise.

Insertion of Basic Types

Insertion of most basic types T is accomplished using the following operator:

// C++
void operator<<=(CORBA::Any&, T);     // Copying insertion

This is sufficient for most data types T that are normally passed by value, such as short, long, and float.

Insertion of Compound Types

Insertion of most compound types T is accomplished using the following pair of operators:

// C++
void operator<<=(CORBA::Any&, const T&);     // Copying insertion
void operator<<=(CORBA::Any&, T*);           // Consuming insertion

These two operators give ...

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.