Any::type

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.

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



Searchable topic ID:   rcor_modan5
Last updated: Jun 21, 2007 8:07:48 PM CDT    WebSphere Business Integration Server Foundation, Version 5.0.2
http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?topic=/com.ibm.wasee.doc/info/ee/corba/ref/rcor_modan5.html

Library | Support | Terms of Use | Feedback