mirror of
https://github.com/EiffelSoftware/eiffel-org.git
synced 2026-04-05 09:39:31 +02:00
Author:admin
Date:2008-09-30T16:23:49.000000Z git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@65 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
@@ -213,7 +213,7 @@ As information on any interface cannot be accessed dynamically, the description
|
||||
|
||||
==EiffelCOM==
|
||||
The idea in EiffelCOM is the way a component is accessed is implementation detail that the user should not have to deal with. Of course he should be able to choose what kind of access he wants to use but this choice should have no impact on the design of the Eiffel system itself. For that reason, the Eiffel code generated by the wizard follows the same architecture independently of the choice made for interface access and marshalling. The difference lies in the runtime where the actual calls to the components are implemented.
|
||||
{{seealso| '''See Also''' <br/>
|
||||
{{seealso|<br/>
|
||||
[[EiffelCOM Wizard|EiffelCOM wizard]] <br/>
|
||||
[[EiffelCOM Library| EiffelCOM library]] <br/>
|
||||
[[EiffelCOM: Introduction| Introduction]] <br/>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[Property:title|Coclass]]
|
||||
[[Property:weight|3]]
|
||||
[[Property:uuid|7f91f9ce-e042-1d48-9d01-f9b794269ec4]]
|
||||
We have seen that interfaces can be perceived as views of a component. This conceptual representation actually maps the implementation of an EiffelCOM component since the coclass inherits from the interfaces and implements their deferred features. Indeed, interfaces are deferred classes with all features accessible from outside deferred. The coclass is an Eiffel class that inherits from these interfaces and implements all the features. This design is not specific to Eiffel though and can be found in other languages as well. The coclass defines the behavior of the interface functions. <br/>
|
||||
|
||||
==Class Object==
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
[[Property:weight|1]]
|
||||
[[Property:uuid|9cb19fc1-3d26-5752-6232-ea23f2668c32]]
|
||||
COM is a binary standard that describes how the component can communicate with the outer-world. The component communicates through well defined interfaces. Each interface is a specification of a group of properties and methods, and it does not contain the implementation of these routines but only their specification (signatures). The actual implementation lies in the coclass. There can be different implementations of a same interface in different coclasses. Finally, each coclass can be instantiated using a class object or class factory. These three notions will be discussed further in the forthcoming paragraphs.
|
||||
{{seealso| '''See Also''' <br/>
|
||||
{{seealso|<br/>
|
||||
[[EiffelCOM Wizard|EiffelCOM wizard]] <br/>
|
||||
[[EiffelCOM Library| EiffelCOM library]] <br/>
|
||||
[[EiffelCOM: Introduction| Introduction]] <br/>
|
||||
|
||||
@@ -9,7 +9,7 @@ The COM specification requires that any interface provides access to all interfa
|
||||
|
||||
The two other functions exposed by '''IUnknown''' are '''AddRef''' and '''Release'''. These functions should be called respectively when a client gets a reference on an interface or when it discards that reference. These two functions define the lifetime of the component: each interface keeps track of clients keeping a reference on them and when no clients have references anymore, the component can be unloaded from memory. You might start worrying thinking that this business of reference counting will imply lots of headaches, memory leaks, etc. and you would be right should you choose a low-level language to implement your components. Fortunately, you will never have to implement or use these functions in Eiffel: all the processing related to IUnknown is provided by the EiffelCOM runtime. Calls to '''QueryInterface''' are done "behind the scene" and only when needed. The lifetime of the component is also taken care of by the EiffelCOM runtime.
|
||||
|
||||
{{seealso| '''See Also''' <br/>
|
||||
{{seealso|<br/>
|
||||
[[EiffelCOM Wizard|EiffelCOM wizard]] <br/>
|
||||
[[EiffelCOM Library| EiffelCOM library]] <br/>
|
||||
[[EiffelCOM: Introduction| Introduction]] <br/>
|
||||
|
||||
@@ -10,7 +10,7 @@ One main difference with out-of-process components (other than the nature of the
|
||||
</div><div>
|
||||
==Out-of-process Components==
|
||||
These components are standard executable acting as servers that can be accessed locally or over a network. Typically used in a three tier client server architecture, the major difference with in-process servers (other than the module type - executable instead of DLL) is their lifetime. In-process components are typically loaded to achieve a specific task and unloaded just after while out-of-process components are servers supposed to run continuously. The EiffelCOM wizard allows to build clients for such servers in Eiffel. It also provides the ability to create such servers. </div>
|
||||
{{seealso| '''See Also''' <br/>
|
||||
{{seealso|<br/>
|
||||
[[EiffelCOM Wizard|EiffelCOM wizard]] <br/>
|
||||
[[EiffelCOM Library| EiffelCOM library]] <br/>
|
||||
[[EiffelCOM: Introduction| Introduction]] <br/>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[Property:title|Deeper into COM]]
|
||||
[[Property:weight|6]]
|
||||
[[Property:uuid|f28ee911-1b15-260c-a290-540b9531113a]]
|
||||
The next paragraph gives some details on the COM internals. The understanding of these details are not required to use the EiffelCOM wizard but might help making better decisions when designing new EiffelCOM components.
|
||||
|
||||
==Apartments==
|
||||
|
||||
@@ -7,7 +7,7 @@ Briefly said, the Component Object Model is a Microsoft binary standard that est
|
||||
|
||||
The advantages of such an approach include an increased reusability (binary reuse), a better version management (COM standard implies that new component versions are compatible with the older ones) and a built-in runtime environment. The binary reuse aspect of COM added with the source reuse ability of Eiffel offer the developer an ideal platform to increase considerably their productivity.
|
||||
|
||||
{{seealso| '''See Also''' <br/>
|
||||
{{seealso|<br/>
|
||||
[[EiffelCOM Wizard|EiffelCOM wizard]] <br/>
|
||||
[[EiffelCOM Library| EiffelCOM library]] <br/>
|
||||
[[Generalities| Generalities]] <br/>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
[[Property:uuid|32e79152-1e8f-43cd-e014-a83aab18e440]]
|
||||
==About COM and Eiffel==
|
||||
|
||||
{{seealso| '''See Also''' <br/>
|
||||
{{seealso|<br/>
|
||||
[[EiffelCOM Wizard|EiffelCOM wizard]] <br/>
|
||||
[[EiffelCOM Library| EiffelCOM library]] }}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ To implement a client of the <eiffel>StringManipulator</eiffel> component open a
|
||||
|
||||
==Contracts==
|
||||
Contracts can be broken directly on the proxy in which case you will get a standard contract violation in the client. If contracts are broken on the server then the exception will be forwarded by the EiffelCOM runtime to the client. The feature replace_substring_user_precondition in <eiffel>MY_STRING_MANIPULATOR</eiffel> includes has some assertions.: Comment them out. Now the contract of the [[ref:libraries/base/reference/string_8_chart|<code>replace_substring </code>]] feature is wrong and erroneous calls can be made. Quick melt the changes and run the client. Enter some invalid numbers in the fields used to call this feature. After you click '''Replace''' you will see an error message box warning you that a precondition was violated on the server side. This demonstrates contracts `over the wire'. The precondition was violated in the server; this exception was caught by the EiffelCOM runtime and sent back to the client.
|
||||
{{seealso| '''See Also''' <br/>
|
||||
{{seealso|<br/>
|
||||
[[Creating a new COM component|Creating a new COM component]] <br/>
|
||||
[[Creating a new component from an Eiffel project|Creating a new component from an Eiffel Project]] }}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ where ''system_name'' is the name of the dll (e.g. string_manipulator). So to re
|
||||
cd $ISE_EIFFEL\examples\com\wizard\string_manipulator\generated\component\server\EIFGENs\default\W_code
|
||||
regsvr32 string_manipulator.dll</code>
|
||||
Once registered, follow the steps described in [[Accessing a COM component|Accessing a COM component]] to build the component's client.
|
||||
{{seealso| '''See Also''' <br/>
|
||||
{{seealso|<br/>
|
||||
[[Creating a new component from an Eiffel project|Creating a new component from an Eiffel Project]] <br/>
|
||||
[[Accessing a COM component|Accessing a COM component.]] }}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ You do not need to modify or implement any classes. The wizard produces a ready-
|
||||
{{tip|<br/>
|
||||
In most Eiffel systems functionality is spread out throughout the system. No single class exposes the full functionality of the system and can serve as a Facade to the outside world. Running the wizard on any such class would not be practical. Before starting the wizard write an Eiffel class that acts as a Facade and forwards client calls to the appropriate subsystems. Enter the Facade class name into '''Name of Eiffel facade class''' field. The wizard generates an IDL file from this class. }}
|
||||
|
||||
{{seealso| '''See Also''' <br/>
|
||||
{{seealso|<br/>
|
||||
[[Creating a new COM component|Creating a new COM component]] <br/>
|
||||
[[Accessing a COM component|Accessing a COM component.]] }}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ This chapter explains how to use the EiffelCOM wizard to create COM components a
|
||||
* [[Accessing a COM component|Accessing a COM component.]]
|
||||
|
||||
|
||||
{{seealso| '''See Also''' <br/>
|
||||
{{seealso|<br/>
|
||||
[[EiffelCOM Wizard Introduction|Introduction]] <br/>
|
||||
[[EiffelCOM Wizard Reference|EiffelCOM wizard reference]] }}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ The wizard generates code from a Type Library and additional information given b
|
||||
[[Image:introduction]]
|
||||
The wizard can automatically compile the generated C and Eiffel code. To produce a Type Library corresponding to a given IDL file the wizard relies on '''MIDL''', the Microsoft IDL compiler. You may also provide the wizard with a Type Library directly. The wizard can also be used to add a COM interface to an existing Eiffel project. For the rest of the manual a '''COM Definition File''' will refer to the input file given to the wizard (either an IDL file, a Type Library or an Eiffel project file).
|
||||
|
||||
{{seealso| '''See Also''': [[EiffelCOM Wizard Guided Tour|Guided Tour]] , [[EiffelCOM Wizard Reference|EiffelCOM wizard reference]] }}
|
||||
{{seealso|[[EiffelCOM Wizard Guided Tour|Guided Tour]] , [[EiffelCOM Wizard Reference|EiffelCOM wizard reference]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ end -- class ECOM_SERVER_COCLASS_IMP</code>
|
||||
|
||||
This class inherits from the generated Eiffel coclass and from <eiffel>ECOM_EXCEPTION</eiffel>. It redefines the feature <eiffel>coclass_feature</eiffel> from the generated coclass. This feature is part of the interface functions that can be called by clients of the component. Its implementation uses the feature<eiffel>trigger</eiffel> from <eiffel>ECOM_EXCEPTION</eiffel> to raise exceptions in case the feature cannot be executed normally (invalid argument). The EiffelCOM runtime catches the exception and maps it into an <eiffel>HRESULT</eiffel> that is sent back to the client.
|
||||
|
||||
{{seealso| '''See Also''': [[How the EiffelCOM Wizard works|How the EiffelCOM Wizard Works]] , [[Generated Files|Generated Files]] , [[Class Hierarchy|Class Hierarchy]] , [[Eiffel Project Processing|Adding a COM Interface to an Eiffel Project]] , [[Reusing a COM Component|Accessing a COM Component]] , [[Wizards: Command Line Options|Command Line Options]] }}
|
||||
{{seealso|[[How the EiffelCOM Wizard works|How the EiffelCOM Wizard Works]] , [[Generated Files|Generated Files]] , [[Class Hierarchy|Class Hierarchy]] , [[Eiffel Project Processing|Adding a COM Interface to an Eiffel Project]] , [[Reusing a COM Component|Accessing a COM Component]] , [[Wizards: Command Line Options|Command Line Options]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ The '''Interface_proxy''' folder includes Eiffel classes wrapping interfaces tha
|
||||
[[Image:implemented-interface]]
|
||||
The '''Interface_stub''' folder includes Eiffel classes implementing interfaces that may be given to the component as an argument. These classes inherit from both the deferred interface class and [[ref:libraries/com/reference/ecom_stub_chart| <eiffel>ECOM_STUB</eiffel> ]] .
|
||||
[[Image:implemented-interface-server]]
|
||||
{{seealso| '''See Also''': [[How the EiffelCOM Wizard works|How the EiffelCOM Wizard Works]] , [[Generated Files|Generated Files]] , [[Eiffel Project Processing|Adding a COM Interface to an Eiffel Project]] , [[Reusing a COM Component|Accessing a COM Component]] , [[Building a COM Component|Building a COM Component]] , [[Wizards: Command Line Options|Command Line Options]] }}
|
||||
{{seealso|[[How the EiffelCOM Wizard works|How the EiffelCOM Wizard Works]] , [[Generated Files|Generated Files]] , [[Eiffel Project Processing|Adding a COM Interface to an Eiffel Project]] , [[Reusing a COM Component|Accessing a COM Component]] , [[Building a COM Component|Building a COM Component]] , [[Wizards: Command Line Options|Command Line Options]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ There are some rules that the facade class must follow for the COM wizard to be
|
||||
* 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.
|
||||
|
||||
{{seealso| '''See Also''': [[How the EiffelCOM Wizard works|How the EiffelCOM Wizard Works]] , [[Generated Files|Generated Files]] , [[Class Hierarchy|Class Hierarchy]] , [[Eiffel Project Processing|Adding a COM Interface to an Eiffel Project]] , [[Accessing a COM component|Accessing a COM Component]] , [[Reusing a COM Component|Reusing a COM Component]] , [[Wizards: Command Line Options|Command Line Options]] }}
|
||||
{{seealso|[[How the EiffelCOM Wizard works|How the EiffelCOM Wizard Works]] , [[Generated Files|Generated Files]] , [[Class Hierarchy|Class Hierarchy]] , [[Eiffel Project Processing|Adding a COM Interface to an Eiffel Project]] , [[Accessing a COM component|Accessing a COM Component]] , [[Reusing a COM Component|Reusing a COM Component]] , [[Wizards: Command Line Options|Command Line Options]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ The EiffelCOM Wizard generates code into the specified destination folder. The f
|
||||
* Optionally, the EiffelCOM Wizard may generate a '''idl''' folder which contains the IDL file generated from the Eiffel facade class if the project consists of adding a COM interface to an existing Eiffel project.
|
||||
* The '''Server''' folder includes files used to implement a COM component. Apart from the usual C++ folders, it also includes a '''Component''' folder which contains Eiffel classes corresponding to the component's coclasses and a '''Interface_stub''' folder which contains Eiffel classes wrapping interfaces that may be given as argument to the component. This last folder may also be useful when accessing a COM component. The '''Server''' folder also includes a ECF file which can be used to compile the generated system if the project consists of creating a new component.
|
||||
|
||||
{{seealso| '''See Also''': [[How the EiffelCOM Wizard works|How the EiffelCOM Wizard Works]] , [[Class Hierarchy|Class Hierarchy]] , [[Eiffel Project Processing|Adding a COM Interface to an Eiffel Project]] , [[Reusing a COM Component|Accessing a COM Component]] , [[Building a COM Component|Building a COM Component]] , [[Wizards: Command Line Options|Command Line Options]] }}
|
||||
{{seealso|[[How the EiffelCOM Wizard works|How the EiffelCOM Wizard Works]] , [[Class Hierarchy|Class Hierarchy]] , [[Eiffel Project Processing|Adding a COM Interface to an Eiffel Project]] , [[Reusing a COM Component|Accessing a COM Component]] , [[Building a COM Component|Building a COM Component]] , [[Wizards: Command Line Options|Command Line Options]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ Optionally, EiffelStudio can be opened on the generated system by clicking the c
|
||||
|
||||
{{note|The EiffelStudio button will only be enabled if the Eiffel code was compiled. }}
|
||||
|
||||
{{seealso| '''See Also''': [[Generated Files|Generated Files]] , [[Class Hierarchy|Class Hierarchy]] , [[Eiffel Project Processing|Adding a COM Interface to an Eiffel Project]] , [[Reusing a COM Component|Accessing a COM Component]] , [[Building a COM Component|Building a COM Component]] , [[Wizards: Command Line Options|Command Line Options]] }}
|
||||
{{seealso|[[Generated Files|Generated Files]] , [[Class Hierarchy|Class Hierarchy]] , [[Eiffel Project Processing|Adding a COM Interface to an Eiffel Project]] , [[Reusing a COM Component|Accessing a COM Component]] , [[Building a COM Component|Building a COM Component]] , [[Wizards: Command Line Options|Command Line Options]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ The EiffelCOM Wizard allows the creation of Eiffel projects implementing or reus
|
||||
* [[Building a COM Component|Building a COM Component]] describes how to build a new COM component.
|
||||
* [[Wizards: Command Line Options|Command Line Options]] describes using the wizard from the command line.
|
||||
|
||||
{{seealso| '''See Also''' <br/>
|
||||
{{seealso|<br/>
|
||||
[[EiffelCOM Wizard Introduction|Introduction]] <br/>
|
||||
[[EiffelCOM Wizard Guided Tour|Guided Tour]] }}
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ feature -- Basic Operations
|
||||
|
||||
end -- class COCLASS_CLIENT</code>
|
||||
|
||||
{{seealso| '''See Also''': [[How the EiffelCOM Wizard works|How the EiffelCOM Wizard Works]] , [[Generated Files|Generated Files]] , [[Class Hierarchy|Class Hierarchy]] , [[Eiffel Project Processing|Adding a COM Interface to an Eiffel Project]] , [[Building a COM Component|Reusing a COM Component]] , [[Wizards: Command Line Options|Command Line Options]] }}
|
||||
{{seealso|[[How the EiffelCOM Wizard works|How the EiffelCOM Wizard Works]] , [[Generated Files|Generated Files]] , [[Class Hierarchy|Class Hierarchy]] , [[Eiffel Project Processing|Adding a COM Interface to an Eiffel Project]] , [[Building a COM Component|Reusing a COM Component]] , [[Wizards: Command Line Options|Command Line Options]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ The list of options is the following:
|
||||
* '''--version, -v''': Print version information.
|
||||
* '''--help, -h''': Display help on how to use the EiffelCOM Wizard command line utility.
|
||||
|
||||
{{seealso| '''See Also''': [[How the EiffelCOM Wizard works|How the EiffelCOM Wizard Works]] , [[Generated Files|Generated Files]] , [[Class Hierarchy|Class Hierarchy]] , [[Eiffel Project Processing|Adding a COM Interface to an Eiffel Project]] , [[Reusing a COM Component|Accessing a COM Component]] , [[Building a COM Component|Building a COM Component]] }}
|
||||
{{seealso|[[How the EiffelCOM Wizard works|How the EiffelCOM Wizard Works]] , [[Generated Files|Generated Files]] , [[Class Hierarchy|Class Hierarchy]] , [[Eiffel Project Processing|Adding a COM Interface to an Eiffel Project]] , [[Reusing a COM Component|Accessing a COM Component]] , [[Building a COM Component|Building a COM Component]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
Type: Wizard <br/>
|
||||
Platform: Windows
|
||||
|
||||
{{seealso| '''See Also''' <br/>
|
||||
{{seealso|<br/>
|
||||
[[EiffelCOM Library|EiffelCOM library]] }}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user