[39] TYPECODE UPDATED!
(Part of the CORBA FAQ, Copyright © 1996-99)


[39.1] WHAT IS A TYPECODE? NEW!

[Recently created (10/1999). Click here to go to the next FAQ in the “chain” of recent changes]

A typecode is a type, whose values represent the types of other things. It is a meta-type. For example, a given typecode might have the value of XXX, which represents the type “float”. In details of XXX are not particularly important.

TopBottomPrevious sectionNext section ]


[39.2] DO ALL TYPES HAVE A TYPECODE? NEW!

[Recently created (10/1999). Click here to go to the next FAQ in the “chain” of recent changes]

Yes.

TopBottomPrevious sectionNext section ]


[39.3] WHAT ARE THE TYPECODES FOR THE BUILT-IN IDL TYPES? NEW!

[Recently created (10/1999). Click here to go to the next FAQ in the “chain” of recent changes]

This depends on the language mapping. For example, in C++, there is a const instance of the TypeCode class for each of the built-in types.

TopBottomPrevious sectionNext section ]


[39.4] WHAT ARE THE TYPECODES FOR THE USER-DEFINED TYPES? NEW!

[Recently created (10/1999). Click here to go to the next FAQ in the “chain” of recent changes]

Sticking with the above C++ example, there is a const instance of the TypeCode class for each user type. The IDL compiler generates this.

TopBottomPrevious sectionNext section ]


[39.5] HOW DO I GET AN OBJECT’S TYPECODE NEW!

[Recently created (10/1999). Click here to go to the next FAQ in the “chain” of recent changes]

An interface’s typecode can be determined by calling _get_interface() on the object reference (IOR). This will return an InterfaceDef (Interface Definition) reference from the Interface Repository (IFR).

The typecode for things like float and string are well known in the language mapping. The typecode for things like structs are generated by the IDL compiler.

An any supports a call to determine its typecode. Note, the complete support for this requires Dynamic Anys.

TopBottomPrevious sectionNext section ]


E-Mail E-mail us
CORBA FAQTable of ContentsExhaustiveAlphabeticalSubject indexAbout the authors©TMDownload your own copy ]
Revised Oct 27, 1999