A.4 Mapping of Datatypes

29.198-013GPPOpen Service Access (OSA) Application Programming Interface (API)Part 1: OverviewRelease 9TS

A.4.1 Basic Datatypes

In IDL, the data type String is typedefed (see Note below) from the CORBA primitive string. This CORBA primitive is made up of a length and a variable array of byte.

NOTE: A typedef is a type definition declaration in IDL.

TpBoolean maps to a CORBA boolean, TpInt32 to a CORBA long, TpFloat to a CORBA float, and TpOctet to a CORBA octet.

A.4.2 Constants

All constants are mapped to a CORBA const of type TpInt32.

Example 2: const TpInt32 P_TASK_REFUSED = 14;

A.4.3 Collections

In OMG IDL, collections (Numbered Set and Numbered List) map to a sequence of the data type. A CORBA sequence is implicitly made of a length and a variable array of elements of the same type.

Example 3: typedef sequence<TpSessionID> TpSessionIDSet;

Collection types can be implemented (for example, in C++) as a structure containing an integer for the number part, and an array for the data part.

Example 4: The TpAddressSet data type may be defined in C++ as:

typedef struct {

short number;

TpAddress address [];

} TpAddressSet;

The array "address" is allocated dynamically with the exact number of required TpAddress elements based on "number".

A.4.4 Sequences

In OMG IDL sequences map to a CORBA Struct.

Example 5: struct TpAddress {
TpAddressPlan Plan;
TpString AddrString;
TpString Name;
TpAddressPresentation Presentation;
TpAddressScreening Screening;
TpString SubAddressString;

A.4.5 Enumerations

In OMG IDL enumerations map to a CORBA enum.

Example 6: enum TpAddressScreening {

A.4.6 Choices

A choice maps to a CORBA union. For entries that do not have a corresponding type (defined as NULL in the specification) no union entry is generated. These entries are grouped in the default clause where NULL is replaced by short and the entry name (Undefined) by the name Dummy. When there are no NULL entries, the default clause is not generated.

Example 7: union TpCallAdditionalErrorInfo switch (TpCallErrorType) {
case P_CALL_ERROR_INVALID_ADDRESS: TpAddressError CallErrorInvalidAddress;
default: short Dummy;

Example 8: union TpCallChargeOrder switch(TpCallChargeOrderCategory) {
case P_CALL_CHARGE_TRANSPARENT: TpOctetSet TransparentCharge;