90 likes | 195 Views
Principles of Object-Oriented Software Development. Interface Definition Language. Interface Definition Language. Introduction Example Types and values Operations and exceptioons Interfaces and inheritance Language bindings. Interface Definition Language. IDL.
E N D
Principles of Object-Oriented Software Development Interface Definition Language
Interface Definition Language Introduction Example Types and values Operations and exceptioons Interfaces and inheritance Language bindings
Interface Definition Language IDL • modules -- for clustering • interfaces -- correspond with objects • attributes -- may be readonly • operations -- best effort invocation • exceptions -- for handling failure Language bindings C, Smalltalk, C++, Java
Example module universe { universe.idl interface world { void hello(); void ask(in string x); string tell(); oneway void halt(); }; };
Types and values Basic Types integers, reals, booleans, enum, string, any Constructed Types struct, union, sequence, array, interface Object References interface + operations
Operations and exceptions Operations in, out, inout -- parameter attributes Exceptions exception out_of_range { long count; } interface writer { void position(in long pos) raises(out_of_range); }
Interfaces and inheritance Interfaces and inheritance no overriding, no overloading Multiple (interface) inheritance interface A { }; interface B { }; interface C : A { }; interface D : B, A { };
interface iterator { iterator Object next(); };
Language bindings • types, references, access, ORB and BOA support The Object interface interface Object { PIDL InterfaceDef get_interface(); Object duplicate(); ... }