Prev Up Next
Go backward to IDL Modules and Scoping
Go up to Top
Go forward to Raising Exceptions in IDL Operations

Defining IDL Interfaces

An IDL interface describes the functions that an object supports in a distributed application. Interface definitions provide all of the information that clients need to access the object across a network.

Consider the example of an interface that describes objects which implement bank accounts in a distributed application.


     module Finance { 
       interface Account { 
         // The account owner and balance. 
            readonly attribute string owner; 
            readonly attribute float balance; 
         // Operations available on the account. 
            void makeDeposit(in float amount, 
                             out float newBalance); 
            void makeWithdrawal(in float amount, 
            out float newBalance); 
       }; 
     }; 

The definition of interface Account includes both attributes and operations.

These are the main elements of any IDL interface definition.

  • Attributes in IDL Interface Definitions
  • Operations in IDL Interface Definitions

  •  

    Prev Up Next