C++ Extraction from CORBA::Any

This section provides sample code that shows how a variety of data types are extracted from a CORBA::Any. Some special cases of extraction are discussed in more detail at the end of this section.

Extraction of Basic Types

Extraction of most (but not all) basic types T is accomplished using the following operator:

// C++
CORBA::Boolean operator>>=(const CORBA::Any&, T&);     // Simple extraction

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

Extraction of Compound Types

Extraction of most (but not all) compound types T is accomplished using the following operator:

// C++
void operator>>=(const CORBA::Any&, const T*&);     // Read-only extraction

This is sufficient for ...

Get Pure CORBA now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.