0% found this document useful (0 votes)
168 views8 pages

CORBA Datatypes

This document provides information about CORBA types including: - Basic CORBA types like numeric, character, string, and object reference types. - More complex types like structures, unions, arrays, sequences, and "any" values. - How IDL types map to programming language types in languages like Java, C++, and others. - Background information on CORBA, ORBs, IDL, and code examples of IDL type mappings.

Uploaded by

Alex Beno
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
168 views8 pages

CORBA Datatypes

This document provides information about CORBA types including: - Basic CORBA types like numeric, character, string, and object reference types. - More complex types like structures, unions, arrays, sequences, and "any" values. - How IDL types map to programming language types in languages like Java, C++, and others. - Background information on CORBA, ORBs, IDL, and code examples of IDL type mappings.

Uploaded by

Alex Beno
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd

Introduction to CORBA types

IDL = Interface Definition Language ORB = Object Request Broker

Basic:

Numeric (integer, floating and fixed point, and enumerated). Characters and strings, including wide characters. Object references - handles to CORBA objects.

Complex:

Structures and unions, which parallel C/C++ structs and unions. Arrays - runtime fixed-length, possibly multi-dimensional stores of multiple data elements. Sequences - runtime variable-length stores of multiple data elements. "any" values store values of any data type, along with the type information necessary to make use of that data type. The upcoming CORBA 2.3 specification will add "object by value" capabilities, which will allow expressing much more complex data relationships such as graphs.

CORBA Primitive Types


CORBA Type boolean char double long double float long wide char octet short long long unsigned short unsigned long unsigned long long string wide string fixed sequence array Bytes 1 1 8 16 4 4 2 1 2 8 2 4 8 Java Mapping boolean char double double float int char byte short long short int long string string BigDecimal array array Bytes 1 2 8 8 4 4 2 1 2 8 2 4 8

Bindings
Ada Java C Lisp C++ PL_I COBOL Python CORBA Scripting Language Smalltalk PHP CAML SWI-Prolog

Background information
[Link] [Link] ORB/IDL diagrams [Link] 4375
AnySeq AttrDescriptionSeq AttributeDescription AttributeMode BooleanSeq CharSeq ConstantDescription ContainedSeq ContextIdentifier ContextIdSeq DefinitionKind DomainManagersList DoubleSeq EnumMemberSeq ExcDescriptionSeq ExceptionDefSeq ExceptionDescription Flags FloatSeq Identifier Initializer InitializerSeq InterfaceDefSeq InterfaceDescription InvalidPolicies ModuleDescription OctetSeq OpDescriptionSeq OperationDescription OperationMode ORBid ParameterDescription ParameterMode ParDescriptionSeq PolicyError PolicyErrorCode PolicyList PolicyType PolicyTypeSeq PrimitiveKind RepositoryId RepositoryIdSeq ScopedName ServiceDetail ServiceDetailType ServiceInformation ServiceOption ServiceType SetOverrideType ShortSeq StringValue StructMember StructMemberSeq TCKind TypeDescription ULongLongSeq ULongSeq UnionMember UnionMemberSeq UShortSeq ValueDefSeq ValueDescription ValueMember ValueMemberSeq ValueModifier VersionSpec Visibility WCharSeq WStringValue

Primitive C++ Type


Boolean

C++ Definition
typedef unsigned char Boolean;

(Valid values are 1 for true or 0 for false.)


Boolean_out Char Char_out Double Double_out Float Float_out Long Long_out LongDouble LongDouble_out LongLong LongLong_out Octet Octet_out Short Short_out ULong ULong_out ULongLong ULongLong_out UShort UShort_out WChar WChar_out typedef Boolean& Boolean_out; typedef unsigned char Char; typedef Char& Char_out; typedef double Double; typedef Double& Double_out; typedef float Float; typedef Float& Float_out; typedef long Long; typedef Long& Long_out; typedef long double LongDouble; typedef LongDouble& LongDouble_out; typedef ... LongLong; typedef LongLong& LongLong_out; typedef unsigned char Octet; typedef Octet& Octet_out; typedef short Short; typedef Short& Short_out; typedef unsigned long ULong; typedef ULong& ULong_out; typedef ... ULongLong; typedef ULongLong& ULongLong_out; typedef unsigned short UShort; typedef UShort& UShort_out; typedef wchar_t WChar; typedef WChar& WChar_out;

[Link]
IDL Type boolean char wchar octet short / unsigned short long / unsigned long Java boolean char char byte short int

long long / unsigned long long float double

long float double

[Link] Available CORBA data types: Basic:


Numeric (integer, floating and fixed point, and enumerated). Characters and strings, including wide characters. Object references - handles to CORBA objects.

Complex

Structures and unions, which parallel C/C++ structs and unions. Arrays - runtime fixed-length, possibly multi-dimensional stores of multiple data elements. Sequences - runtime variable-length stores of multiple data elements. "any" values store values of any data type, along with the type information necessary to make use of that data type. The upcoming CORBA 2.3 specification will add "object by value" capabilities, which will allow expressing much more complex data relationships such as graphs.

[Link]

IDL Construct module interface (non-abstract) interface (abstract) constant (not within an interface) boolean char, wchar octet package

Java Construct

signature interface and an operations interface, helper class, holder class signature interface, helper class, holder class public interface boolean char byte

string, wstring short, unsigned short long, unsigned long long long, unsigned long long float double fixed enum, struct, union sequence, array exception readonly attribute readwrite attribute operation

[Link] short int long float double [Link] class array class accessor method accessor and modifer methods method

Here is a sample IDL definition containing an array, a bounded sequence, and an unbounded sequence:
module ArrayModule { struct SomeStructure { long longArray[15]; sequence <boolean> unboundedBools; sequence <char, 15> boundedChars; }; };

The arrays would be defined in Java as


public int[] longArray; public boolean[] unboundedBools; public char[] boundedChars;

[Link] byte sizes [Link] [Link]

mappings

You might also like