![]() |
Overview Accesses the TypeCode contained by an Any. Original class CORBA::Any
Intended Usage
This method is intended to be used to access the TypeCode associated with an Any (the TypeCode that describes the data held by the Any). The caller must subsequently release the TypeCode using CORBA::release(TypeCode_ptr).
In many cases, Any objects can be used without explicit manipulation of TypeCodes, using the type-safe insertion/extraction operators defined for Any. The type() method is for situations in which the type-safe Any interface is not applicable, or to determine the type of variable needed for extraction.
IDL Syntax
TypeCode_ptr type() const;
Return value
- CORBA::TypeCode_ptr
- The TypeCode contained by the Any. The caller must subsequently release the TypeCode using CORBA::release(TypeCode_ptr).
Example
#include "corba.h" ... CORBA::TypeCode_ptr tcp; CORBA::Any constAnyVar6; constAnyVar6 <<= (corba::short)(6); tcp="constAnyVar6.type();" ...
Related reference... | |
CORBA module in Object Request Broker | |
Parent: CORBA module: Any Class | |
Any::_nil | |
Any::operator<< | |
Any::operator>> | |
Any::replace | |