IDL Interface Definition Language IDL products IDL interface
- Slides: 14
IDL Interface Definition Language
IDL products IDL interface definition Client Dynam ic Interfa ce Server IDL stub s Static Dynami skeleto c ns skeleto Object adapter ns Object Request Broker Interface repositor y
Main IDL elements • • Modules Interfaces Data types Constants Attributes Operations Exceptions
IDL data types • Basic types • short long float boolean. . . • Derived types • using the typedef keyword • Structured types • enum struct union • Variable types: • dynamic arrays, string • The Any type array
Basic types and constants • • Integer: [unsigned] short long Reals: float double 8 bits: char octet boolean Generic: any const double Pi = 3. 1415926 ; const string Msg = “This is a message” ; const unsigned long Mask =(1<<5)|(1<<7) ;
Structured types enum Credit. Card {Master, Visa, none}; struct Person. Record { string name ; short age ; } union Customer switch (Credit. Card) { case Master: string card. Number ; . . . }
Arrays, sequences, and strings // arrays typedef long. Vect [30]; typedef long. Array [2][10]; // sequences typedef sequence <short> short. Seq; typedef sequence <short, 20> short. Seq 20; // strings typedef string <1024> bounded. String;
Module declaration module <name> { <type declarations> <constant declarations> <exception declarations> <interface declarations> }
Interface declaration interface <name> [: inheritance] { <type declarations> <constant declarations> <exception declarations> <attribute declarations> <method declarations> }
Method declaration <return type> <name> (<parameters>) [raises <exceptions>] [context] ; • Method parameters can be: – in: sent to the server – out: received from the server – inout: both directions
Attribute declaration attribute string name ; readonly attribute short age ; • Attributes: • are declared as variables • get and set methods are provided
An interface definition example module Animals { // Interface for a dog interface Dog : Animal { // a public attribute integer age; // an exception that can be raised exception not. Interested (string why);
An interface definition example // public methods void Bark (in short duration) raises (not. Interested) ; void Sit (in string local) raises (not. Interested) ; void Play (in Dog friend) raises (not. Interested) ; boolean Alive () ; } }
IDL - exemplo module Escola { interface Curso; // declarado, mas não definido interface Estudante { attribute string nome; attribute unsigned long matricula; exception Classe. Lotada; void registra (in Curso curso) raises (Classe. Lotada); exception Req. Incompleto; void gradua ( ) raises (Req. Incompleto); typedef sequence<Curso> Lista. Cursos; Lista. Cursos cursos_registrados(); } }
- Idl interactive data language
- Fisher's functional vs innovative products
- Coke vs pepsi sales
- Interface in interface java
- User led through interaction via series of questions
- Office interface vs industrial interface
- An interface
- Prime meridian globe
- Idl image processing
- Corba introduction
- Konsis
- Idl tracking
- Franca idl
- Raqueo
- Where is 180 longitude