CORBA The Interface Definition Language - PowerPoint PPT Presentation

1 / 15
About This Presentation
Title:

CORBA The Interface Definition Language

Description:

Attribute - a special data holder variable with access methods. CORBA ... constants, types, attributes, operations. interface BasicOrders ... – PowerPoint PPT presentation

Number of Views:197
Avg rating:3.0/5.0
Slides: 16
Provided by: dia79
Category:

less

Transcript and Presenter's Notes

Title: CORBA The Interface Definition Language


1
CORBAThe Interface Definition Language
1
Appendix 1
  • Interface Definition Language
  • IDL to Java Mapping

2
CORBAThe Interface Definition Language
2
1998 CTIT, Nikolay Diakov
3
CORBAThe Interface Definition Language
3
Types, Modules Scoping
  • What are Types for?
  • Every variable or parameter must be typed
  • There is a special type any
  • What is Scoping for?
  • Scope to module, interface, operation
  • Scoping operator "" imports

1998 CTIT, Nikolay Diakov
4
CORBAThe Interface Definition Language
4
  • 1. IDL Basic (Primitive) Types
  • Integer
  • short, long, long long
  • signed unsigned
  • Floating point
  • float, double, long double, fixed
  • char, boolean, octet
  • The special Any
  • CORBA Object Reference

1998 CTIT, Nikolay Diakov
5
CORBAThe Interface Definition Language
5
  • 2. IDL Structured (Constructed) Types
  • Structs
  • Unions
  • Enums
  • Sequences
  • Strings
  • Arrays

1998 CTIT, Nikolay Diakov
6
CORBAThe Interface Definition Language
6
Struct Declaration Example
struct PaymentOrder float Price string GoodyN
ame string Authorization
1998 CTIT, Nikolay Diakov
7
CORBAThe Interface Definition Language
7
Enum, struct, sequence declarations example
enum ItemTypes food, clothes, other struct
GOODSinfo long id StoreAccess StoreAccessRe
ference float TotalSales float TotalTaxes
typedef sequence ltGOODSinfogt GOODSlist
1998 CTIT, Nikolay Diakov
8
CORBAThe Interface Definition Language
8
  • 3. Interfaces, Operations, Attributes
  • Interface
  • groups operations
  • it is the unit of inheritance
  • and can extend one or more already defined
    interfaces
  • Operation
  • has a return value, operation name, list of
    parameters, exceptions, oneway declaration
  • Attribute - a special data holder variable with
    access methods

1998 CTIT, Nikolay Diakov
9
CORBAThe Interface Definition Language
9
Interface Example
Module OnlineOrdersystem typedef string
OrderNameType interface Identification
typedef short PIN long doPIN (in long uid,
in PIN cardpin, out OrderNameType
name)
1998 CTIT, Nikolay Diakov
10
CORBAThe Interface Definition Language
10
  • 4. Name Scoping and Inheritance
  • In IDL you can derive a new interface from one or
    more existing interfaces - this way inheriting
    all their elements
  • And you can extend with new elements
  • constants, types, attributes, operations
  • interface BasicOrders
  • long BasicPayment (in long arg1)
  • interface ExtendedOrdersBasicOrders
  • void AdvancePaymentSystem (in short arg2)

1998 CTIT, Nikolay Diakov
11
CORBAThe Interface Definition Language
11
  • Exceptions
  • CORBA declares some standard exceptions
  • Custom exception can be defined this way

exception CreditCardInvalid ORDEROrderNumber
item
1998 CTIT, Nikolay Diakov
12
CORBAIDL to Programming Language Mapping
12
1998 CTIT, Nikolay Diakov
13
CORBAIDL to Programming Language Mapping
13
  • Translates from OMG IDL constructs to programming
    language constructs
  • Special IDL compiler generate stubs for the
    client and skeletons for the server objects

1998 CTIT, Nikolay Diakov
14
CORBAIDL to Java Mapping
14
  • IDL Modules map to Java Packages
  • Interfaces map to public Java Interfaces
    Helper and Holder Java classes
  • IDL Operations map to Java methods
  • the integral types (Integer, float) map to the
    corresponding Java integral types
  • exceptions map to Java exceptions

1998 CTIT, Nikolay Diakov
15
CORBAIDL to Java Mapping (Example)
15
And, a slightly enhanced IDL Declaration (to show
parameter passing) interface example1 long
op1 ( in long arg1, out long arg2, inout
long arg3) produces the following Java public
interface example1 int op1 ( int
arg1, IntHolder arg2, IntHolder arg3)
1998 CTIT, Nikolay Diakov
Write a Comment
User Comments (0)
About PowerShow.com