- 18.01 (released) ...
Eiffel Project Processing
The EiffelCOM Wizard can be used to add a COM interface to an existing Eiffel project. The advantage of that approach is that it doesn't require any knowledge about IDL. The EiffelCOM Wizard will take care of generating the IDL from the Eiffel facade class. The generated IDL will define one coclass containing one interface that corresponds to the contract view of the facade class.
Designing the Facade Class
The facade class should be designed so that it exposes the functionality of the Eiffel system that needs to be accessed from clients of the component. Only the public routines will be exported to the IDL and thus to clients (the class should not have any public attributes, see the list of requirements below).
There are some rules that the facade class must follow for the COM wizard to be able to generate correct IDL:
- The facade class must have a creation procedure called
makethat does not take any argument. This is the procedure that will be called by the EiffelCOM runtime to initialize the Eiffel object when a COM call arrives from a client.
- The arguments and objects returned by the public routines of the facade class must be of one of the following types:
CHARACTER_8, INTEGER_32, REAL_32, REAL_64, BOOLEAN, INTEGER_32_REF, BOOLEAN_REF, REAL_32_REF, CHARACTER_8_REF, REAL_64_REF, STRING_8, ECOM_CURRENCY, ECOM_DECIMAL, ECOM_INTERFACE, or ECOM_ARRAY. Features with arguments or return objects that are of a type not in this list are excluded from the generated IDL file and are not accessible to clients.
- The facade class should not contain any public attribute, only routines can be exported to COM clients.
- The facade class must belong to a successfully compiled Eiffel project.