//Ada Language, v1.2 - OMG IDL Summary File //Object Management Group, Inc. //Copyright 1994, 1995, 1999 Objective Interface Systems, Inc. //Copyright 2001, Object Management Group, Inc. // //The companies listed above have granted to the Object Management Group, Inc. //(OMG) a nonexclusive, royalty-free, paid up, worldwide license to copy and //distribute this document and to modify this document and distribute copies of //the modified version. Each of the copyright holders listed above has agreed //that no person shall be deemed to have infringed the copyright in the included //material of any such copyright holder by reason of having used the //specification set forth herein or having conformed any computer software to //the specification. // //This file contains OMG IDL from the Ada Language, v1.2 specification. //OMG regularly publishes a summary file that contains all the "code" parts of //an OMG formal document. Every formal document line that is IDL, PIDL, or //language code is included in the summary file. The reason for such a listing //is to give readers an electronic version of the "code" so that they can //extract pieces of it. Readers might want to test an example, include it in //their own code, or use it for documentation purposes. Having the code lines //available electronically means there is less likelihood of a transcription //error. // // IDL - file barn.idl typedef long measure; interface Feed { attribute measure weight; }; interface Animal { enum State {SLEEPING, AWAKE}; boolean eat(inout Feed bag); // returns true if animal is full attribute State alertness; readonly attribute Animal parent; }; interface Horse : Animal{ void trot(in short distance); }; interface Asset { ... void op1(); void op2(); ... }; interface Vehicle { ... void op3(); void op4(); ... }; interface Tank : Vehicle, Asset { ... }; // IDL module ExampleB { interface Printer{ typedef sequence ULongSeq; void print(in ULongSeq data); }; valuetype WeightedBinaryTree supports Printer { public long weight; private WeightedBinaryTree left; private WeightedBinaryTree right; factory createWBT(in long w); ULongSeq preOrder(); ULongSeq postOrder(); }; }; File cultivation.idl: #include "barn.idl" interface Plow { long row(); void attach(in short blade); void harness(in Horse power); }; File chicken.idl: #ifndef CHICKEN #define CHICKEN interface Chicken; #include "egg.idl" interface Chicken { Egg lay(); }; #endif File egg.idl: #ifndef EGG #define EGG interface Egg; #include "chicken.idl" interface Egg { Chicken hatch(); }; #endif // IDL module Example { valuetype LongSeq sequence; interface Bar { void doit(in LongSeq seq1); }; };