Interfaces

The purpose of IDL is to define interfaces and their operations. To avoid name clashes when using several IDL declarations together, the module is used as a naming scope. Modules can contain nested modules. Interfaces open a new naming scope containing data type declarations, constants, attributes, and operations:

//EmployeeHiring.idl
Module EmployeeHiring {
interface Employee();
}

The process of setting up a reference to one module from another can be defined with outer::inner as ::EmployeeHiring::Employee:

Module outer{
Module inner {
interface inside{};
};
interface outside {
inner::inside get_inside();
};
};

The get_inside() operation is for returning the object reference for the ::outer::inner::inside interface.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset