mirror of
https://github.com/EiffelSoftware/eiffel-org.git
synced 2025-12-06 06:42:03 +01:00
Author:admin
Date:2008-09-19T07:54:43.000000Z git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@25 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
[[Property:title|Software Installation]]
|
||||
[[Property:weight|-2]]
|
||||
[[Property:uuid|90bc1970-bd1d-9707-3030-a4a9f613524a]]
|
||||
For detailed installation instructions please follow the link for the product your are installing.
|
||||
|
||||
==[[Software Installation for EiffelStudio 6.2|EiffelStudio 6.3]]==
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
[[Property:title|EiffelStudio 6.2 for FreeBSD]]
|
||||
[[Property:link_title|FreeBSD]]
|
||||
[[Property:weight|1]]
|
||||
[[Property:uuid|b26ddd99-521b-6a10-79e6-e2a5d30f907c]]
|
||||
==Requirements==
|
||||
|
||||
{|
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
[[Property:title|EiffelStudio 6.2 for HP Tru64 UNIX]]
|
||||
[[Property:link_title|HP Tru64 UNIX]]
|
||||
[[Property:weight|4]]
|
||||
[[Property:uuid|f9ef1897-fa95-1c62-d905-54111ad234f1]]
|
||||
==Requirements==
|
||||
|
||||
{|
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
[[Property:title|EiffelStudio 6.2 for HP-UX]]
|
||||
[[Property:link_title|HP-UX]]
|
||||
[[Property:weight|3]]
|
||||
[[Property:uuid|c1982828-16bf-8984-bd8a-18df4b48cf27]]
|
||||
==Requirements==
|
||||
|
||||
{|
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
[[Property:title|EiffelStudio 6.2 for Linux]]
|
||||
[[Property:link_title|Linux]]
|
||||
[[Property:weight|5]]
|
||||
[[Property:uuid|db132d4c-7c65-59c0-6f9f-731b81c37373]]
|
||||
==Requirements==
|
||||
|
||||
{|
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
[[Property:title|EiffelStudio 6.2 for LinuxPPC]]
|
||||
[[Property:link_title|LinuxPPC]]
|
||||
[[Property:weight|6]]
|
||||
[[Property:uuid|6b1c2e2b-9512-3f71-9007-63f45be705aa]]
|
||||
==Requirements==
|
||||
|
||||
{|
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
[[Property:title|EiffelStudio 6.2 for Mac OS X]]
|
||||
[[Property:link_title|Mac OS X]]
|
||||
[[Property:weight|0]]
|
||||
[[Property:uuid|7cf4e0e5-0858-58bb-351e-52becea59ede]]
|
||||
==Requirements==
|
||||
|
||||
{|
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
[[Property:title|EiffelStudio 6.2 for SGI Irix]]
|
||||
[[Property:link_title|SGI Irix]]
|
||||
[[Property:weight|8]]
|
||||
[[Property:uuid|f8de85e3-0786-071c-3ece-bbde6656dc20]]
|
||||
==Requirements==
|
||||
|
||||
{|
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
[[Property:title|EiffelStudio 6.2 for Solaris]]
|
||||
[[Property:link_title|Solaris]]
|
||||
[[Property:weight|9]]
|
||||
[[Property:uuid|3b85b8dc-c2b8-021a-f4bc-a8d19ad63b81]]
|
||||
==Requirements==
|
||||
|
||||
{|
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
[[Property:title|Software Installation for EiffelStudio 6.2]]
|
||||
[[Property:link_title|Software Installation for EiffelStudio]]
|
||||
[[Property:weight|0]]
|
||||
[[Property:uuid|b92cecd4-4a0c-e2f5-b63e-5d01d39ba990]]
|
||||
Select the operating system you are using for detailed installation instructions:
|
||||
|
||||
* [[EiffelStudio 6.2 for Mac OS X|Apple Mac OS X]]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
[[Property:title|EiffelStudio 6.2 for Windows]]
|
||||
[[Property:link_title|Windows]]
|
||||
[[Property:weight|7]]
|
||||
[[Property:uuid|d177e0bc-63e6-63b3-7fdb-5e7136945e21]]
|
||||
==Requirements==
|
||||
|
||||
{|
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
[[Property:title|Third Party Tools Installalation Help]]
|
||||
[[Property:link_title|Third Party Tools Installation Help]]
|
||||
[[Property:weight|1]]
|
||||
[[Property:uuid|5896dc5f-a3dd-2535-e2c3-81593363d8e9]]
|
||||
Here you can find help for installing third party tools and programs which may be necessary for your Eiffel programming needs.
|
||||
*
|
||||
==[http://dev.eiffel.com/Installing_Microsoft_C_compiler Free Microsoft C Compiler ]==
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
[[Property:title|11 Agents]]
|
||||
[[Property:link_title|ET: Agents]]
|
||||
[[Property:weight|-3]]
|
||||
[[Property:uuid|ba49a80d-5ddf-8b30-4943-528974fd0ddd]]
|
||||
Our last mechanism, agents, adds one final level of expressive power to the framework describe so far. Agents apply object-oriented concepts to the modeling of operations.
|
||||
|
||||
==Objects for operations==
|
||||
|
||||
@@ -9,11 +9,11 @@ Eiffel directly implements the ideas of Design by Contract™ , which enhance
|
||||
A system -- a software system in particular, but the ideas are more general -- is made of a number of cooperating components. Design by Contract™ states that their cooperation should be based on precise specifications -- contracts -- describing each party's expectations and guarantees.
|
||||
|
||||
An Eiffel contract is similar to a real-life contract between two people or two companies, which it is convenient to express in the form of tables listing the expectations and guarantees. Here for example is how we could sketch the contract between a homeowner and the telephone company:
|
||||
{|
|
||||
{| border="1"
|
||||
|-
|
||||
| <code>provide_service</code>|| style="width=10%;"
|
||||
| '''OBLIGATIONS'''|| style="width=35%;"
|
||||
| '''BENEFITS'''|| style="width=35%;"
|
||||
| <code>provide_service</code>|| style="width=10%"
|
||||
| '''OBLIGATIONS'''|| style="width=35%"
|
||||
| '''BENEFITS'''|| style="width=35%"
|
||||
|-
|
||||
| '''Client'''
|
||||
| (Satisfy precondition:) <br/>
|
||||
@@ -93,7 +93,7 @@ The precondition of a routine expresses conditions that the routine is imposing
|
||||
The postcondition of a routine expresses what the routine guaranteed to its clients for calls satisfying the precondition. The notation <code> old expression </code>, valid in postconditions ( <code> ensure </code> clauses) only, denotes the value that <code> expression </code> had on entry to the routine.
|
||||
|
||||
The precondition and postcondition state the terms of the contract between the routine and its clients, similar to the earlier example of a human contract:
|
||||
{|
|
||||
{| border="1"
|
||||
|-
|
||||
| <code>deposit</code>|| style="width=10%;"
|
||||
| '''OBLIGATIONS'''|| style="width=35%;"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
[[Property:title|6 The Dynamic Structure: Execution Model]]
|
||||
[[Property:link_title|ET: The Dynamic Structure: Execution Model]]
|
||||
[[Property:weight|-10]]
|
||||
[[Property:uuid|1f3f2707-9129-4dca-76c7-157143d7ae74]]
|
||||
A system with a certain static structure describes a set of possible executions. The run-time model governs the structure of the data ( <code> objects </code>) created during such executions.
|
||||
|
||||
The properties of the run-time model are not just of interest to implementers; they also involve concepts directly relevant to the needs of system modelers and analysts at the most abstract levels.
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
[[Property:title|Eiffel Tutorial Copyright]]
|
||||
[[Property:link_title|ET: Eiffel Tutorial Copyright]]
|
||||
[[Property:weight|0]]
|
||||
[[Property:uuid|105e9956-f168-b060-a6be-e78b221f269a]]
|
||||
====MANUAL IDENTIFICATION AND COPYRIGHT====
|
||||
|
||||
Title: An Eiffel Tutorial, Eiffel Software Technical Report TR-EI-66/TU.
|
||||
|
||||
Publication history
|
||||
|
||||
First published July 2001. Corresponds to release 5.0 of the EiffelStudio environment.
|
||||
|
||||
Author
|
||||
|
||||
Software credits
|
||||
|
||||
See acknowledgments in book <span> [http://www.eiffel.com/doc/page.html Eiffel: The Language] </span>.
|
||||
|
||||
Cover design
|
||||
|
||||
Rich Ayling.
|
||||
|
||||
Copyright notice and proprietary information
|
||||
|
||||
Copyright Interactive Software Engineering Inc. (Eiffel Software), 2001. May not be reproduced in any form (including electronic storage) without the written permission of Eiffel Software . "Eiffel Power" and the Eiffel Power logo are trademarks of Eiffel Software .
|
||||
|
||||
All uses of the product documented here are subject to the terms and conditions of the Eiffel Software Eiffel user license. Any other use or duplication is a violation of the applicable laws on copyright, trade secrets and intellectual property.
|
||||
|
||||
Special duplication permission for educational institutions
|
||||
|
||||
Degree-granting educational institutions using Eiffel Software Eiffel for teaching purposes as part of the <span> [http://www.eiffel.com/educators/resources.html Eiffel University Partnership Program] </span> may be permitted under certain conditions to copy specific parts of this book. Contact Eiffel Software for details.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
[[Property:title|2 General Properties]]
|
||||
[[Property:link_title|ET: General Properties]]
|
||||
[[Property:weight|-14]]
|
||||
[[Property:uuid|1ad0b1d5-7ac6-9f55-92ec-ba6f42aee690]]
|
||||
Here is an overview of the facilities supported by Eiffel: <br/>
|
||||
* Completely ''object-oriented'' approach. Eiffel is a full-fledged application of object technology, not a "hybrid" of O-O and traditional concepts.
|
||||
* ''External interfaces''. Eiffel is a software composition tool and is easily interfaced with software written in such languages as C, C++, Java and C#.
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
[[Property:title|7 Genericity and Arrays]]
|
||||
[[Property:link_title|ET: Genericity and Arrays]]
|
||||
[[Property:weight|-9]]
|
||||
[[Property:uuid|7f3bd1d7-357e-031d-9faa-b00594aa9ae0]]
|
||||
Some of the classes that we will need, particularly in libraries, are '''container''' classes, describing data structures made of a number of objects of the same or similar types. Examples of containers include arrays, stacks and lists. The class <code> DEPOSIT_LIST </code> posited in earlier examples describes containers.
|
||||
|
||||
It is not hard, with the mechanisms seen so far, to write the class <code> DEPOSIT_LIST </code>, which would include such features as <code> count </code> (query returning the number of deposit objects in the list) and <code> put </code> (command to insert a new deposit object).
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
[[Property:title|4 Hello World]]
|
||||
[[Property:link_title|ET: Hello World]]
|
||||
[[Property:weight|-12]]
|
||||
[[Property:uuid|5b286f94-dd63-1169-a64e-74b5f8c5ef14]]
|
||||
When discovering any approach to software construction, however ambitious its goals, it is reassuring to see first a small example of the big picture -- a complete program to print the famous "Hello World" string. Here is how to perform this fascinating task in the Eiffel notation.
|
||||
|
||||
You write a class <code> HELLO </code> with a single procedure, say <code> make </code>, also serving as creation procedure. If you like short texts, here is a minimal version:
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
[[Property:title|9 Inheritance]]
|
||||
[[Property:link_title|ET: Inheritance]]
|
||||
[[Property:weight|-7]]
|
||||
[[Property:uuid|c90e6ee3-b39d-48e5-2321-a34e12fd5327]]
|
||||
Inheritance is a powerful and attractive technique. A look at either the practice or literature shows, however, that it is not always well applied. Eiffel has made a particular effort to tame inheritance for the benefit of modelers and software developers. Many of the techniques are original with Eiffel. Paul Dubois has written (comp.lang.python Usenet newsgroup, 23 March 1997): there are two things that [Eiffel] got right that nobody else got right anywhere else: support for design by contract, and multiple inheritance. Everyone should understand these "correct answers" if only to understand how to work around the limitations in other languages.
|
||||
|
||||
==Basic inheritance structure==
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
[[Property:title|13 To Learn More]]
|
||||
[[Property:link_title|ET: To Learn More]]
|
||||
[[Property:weight|-1]]
|
||||
[[Property:uuid|74a5c826-8f21-8cf2-4f2c-dee4ee28ead5]]
|
||||
Beyond this introduction, you will find the following two books essential to a mastery of the method and language: <br/>
|
||||
* <span> [http://eiffel.com/doc/oosc/ Object-Oriented Software Construction] </span>, Bertrand Meyer, Prentice Hall, 2nd edition 1997. (Make sure to get the second edition.) About object technology in general; presents the method behind Eiffel.
|
||||
* <span> [http://eiffel.com/doc/ Eiffel: The Language] </span>, Bertrand Meyer, Prentice Hall, 1992. Language manual and reference.
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
[[Property:title|12 Lexical Conventions and Style Rules]]
|
||||
[[Property:link_title|ET: Lexical Conventions and Style Rules]]
|
||||
[[Property:weight|-2]]
|
||||
[[Property:uuid|60fdf029-8626-166d-cc4f-9069aacdda7f]]
|
||||
Eiffel software texts are free-format: distribution into lines is not semantically significant, and any number of successive space and line-return characters is equivalent to just one space. The style rules suggest indenting software texts as illustrated by the examples in this chapter.
|
||||
|
||||
Successive declarations or instructions may be separated by semicolons. Eiffel's syntax has been so designed, however, that (except in rare cases) '''the semicolon is optional'''. Omitting semicolons for elements appearing on separate lines lightens text and is the recommended practice since semicolons, as used by most programming languages, just obscure the text by distracting attention from the actual contents. Do use semicolons if you occasionally include successive elements on a single line.
|
||||
|
||||
63 names -- all unabbreviated single English words, except for <code> elseif </code> which is made of two words -- are reserved, meaning that you cannot use them to declare new entities. Here is the list:
|
||||
{|
|
||||
{| border="1"
|
||||
|-
|
||||
| <code>agent</code>
|
||||
| <code>alias</code>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
[[Property:title|10 Other Mechanisms]]
|
||||
[[Property:link_title|ET: Other Mechanisms]]
|
||||
[[Property:weight|-4]]
|
||||
[[Property:uuid|c0a01664-194c-4e84-0517-8e7c1ca61dec]]
|
||||
We now examine a few important mechanisms that complement the preceding picture: shared objects; constants; instructions; and lexical conventions.
|
||||
|
||||
==Once routines and shared objects==
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
[[Property:title|1 Overview]]
|
||||
[[Property:link_title|ET: Overview]]
|
||||
[[Property:weight|-15]]
|
||||
[[Property:uuid|0eaddff9-5d72-87fc-663a-2fc8a9152c25]]
|
||||
Eiffel is a method and language for the efficient description and development of quality systems.
|
||||
|
||||
As a language, Eiffel is more than a programming language. It covers not just programming in the restricted sense of implementation but the whole spectrum of software development: <br/>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
[[Property:title|3 The Software Process in Eiffel]]
|
||||
[[Property:link_title|ET: The Software Process in Eiffel]]
|
||||
[[Property:weight|-13]]
|
||||
[[Property:uuid|eef7f31a-25de-93cc-9a33-41d991c51ccb]]
|
||||
Eiffel, as noted, supports the entire lifecycle. The underlying view of the system development lifecycle is radically different not only from the traditional "Waterfall" model (implying a sequence of discrete steps, such as analysis, global design, detailed design, implementation, separated by major changes of method and notation) but also from its more recent variants such as the spiral model or "rapid prototyping", which remain predicated on a synchronous, full-product process, and retain the gaps between successive steps.
|
||||
|
||||
Clearly, not everyone using Eiffel will follow to the letter the principles outlined below; in fact, some highly competent and successful Eiffel developers may disagree with some of them and use a different process model. In the author's mind, however, these principles fit best with the language and the rest of the method, even if practical developments may fall short of applying their ideal form.
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
[[Property:title|5 The Static Picture: System Organization]]
|
||||
[[Property:link_title|ET: The Static Picture: System Organization]]
|
||||
[[Property:weight|-11]]
|
||||
[[Property:uuid|46d3f41e-d41c-a443-4574-403dfebb60aa]]
|
||||
We now look at the overall organization of Eiffel software.
|
||||
|
||||
References to Eiffel Software's libraries appearing in subsequent examples include: '''EiffelBase''', the fundamental open-source library covering data structures and algorithms; the '''kernel library''', a subset of EiffelBase covering the most basic notions such as arrays and strings; and '''EiffelVision 2''', an advanced graphics and GUI library providing full compatibility across platforms (Unix, Windows, OpenVMS) with native look-and-feel on each.
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
[[Property:link_title|Tutorial]]
|
||||
[[Property:weight|2]]
|
||||
[[Property:uuid|4dbc41e2-ecfc-8c50-9288-fce30f4abd90]]
|
||||
From this tutorial you should get a solid understanding of what Eiffel is all about and why it is different from other technologies. Still more detail is available in [http://www.eiffel.com/doc/oosc/ Object-oriented Software Construction, 2nd Edition].
|
||||
From this tutorial you should get a broad understanding of what Eiffel is all about and why it is different from other technologies. Still more detail is available in [http://www.eiffel.com/doc/oosc/ Object-oriented Software Construction, 2nd Edition].
|
||||
|
||||
|
||||
@@ -6,10 +6,11 @@
|
||||
|
||||
Here you can learn about the Eiffel development method and Eiffel the language.
|
||||
|
||||
At the heart of the Eiffel Development Framework is the Eiffel method. Everything else, the language, the tools, the libraries exist because of the method. The method is laid out in detail in [http://www.eiffel.com/doc/oosc/ Object-oriented Software Construction, 2nd Edition]. But you will find some introductory material here. An "invitation" to Eiffel which is fairly short, and a tutorial which is more detailed.
|
||||
At the heart of the Eiffel Development Framework is the Eiffel method. Everything else, the language, the tools, the libraries exist because of the method.
|
||||
|
||||
In order for us to communicate effectively about the activities of the method we must some way to record the products of those activities. That is what Eiffel the language does for us ... with the added benefit that, ultimately, we implement whole running software systems in the language.
|
||||
In order for us to communicate effectively about the activities of the method we must have some way to record the products of those activities. That is what Eiffel the language does for us ... with the added benefit that, ultimately, we implement whole running software systems in the language.
|
||||
|
||||
The method is laid out in wonderful detail in [http://www.eiffel.com/doc/oosc/ Object-oriented Software Construction, 2nd Edition]. But, if you're just getting started, you will find some good introductory material on this page. The invitation to Eiffel is fairly short introduction to the method and language. and the tutorial gives a more detailed look.
|
||||
|
||||
|
||||
* An [[Invitation to Eiffel|Invitation to Eiffel]]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
[[Property:title|12 Combining Genericity and Inheritance]]
|
||||
[[Property:link_title|I2E: Combining Genericity and Inheritance]]
|
||||
[[Property:weight|-3]]
|
||||
[[Property:uuid|912e4c38-9add-e478-59c3-5c10aa75d784]]
|
||||
Genericity and inheritance, the two fundamental mechanisms for generalizing classes, may be combined in two fruitful ways.
|
||||
|
||||
The first technique yields '''polymorphic data structures'''. Assume that in the generic class <code> LIST [ G ] </code> the insertion procedure <code> put </code> has a formal argument of type <code> G </code>, representing the element to be inserted. Then with a declaration such as
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
[[Property:title|13 Deferred Classes and Seamless Development]]
|
||||
[[Property:link_title|I2E: Deferred Classes and Seamless Development]]
|
||||
[[Property:weight|-2]]
|
||||
[[Property:uuid|b3264238-f160-a6fc-0b03-adcd80b1f55a]]
|
||||
The inheritance mechanism includes one more major notion: deferred features and classes.
|
||||
|
||||
Declaring a feature <code> f </code> as deferred in a class <code> C </code> expresses that there is no default implementation of <code> f </code> in <code> C </code>; such implementations will appear in eventual descendants of <code> C </code>. A class that has one or more deferred routines is itself said to be deferred. A non-deferred routine or class -- like all those seen until now -- is said to be '''effective'''.
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
[[Property:title|6 Design by Contract and Assertions]]
|
||||
[[Property:link_title|I2E: Design by Contract and Assertions]]
|
||||
[[Property:weight|-9]]
|
||||
[[Property:uuid|f563aa75-3a5a-5110-b4f1-07da5448f668]]
|
||||
If classes are to deserve their definition as abstract data type implementations, they must be known not just by the available operations, but also by the formal properties of these operations, which did not yet appear in the preceding example.
|
||||
|
||||
==The role of assertions==
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
[[Property:title|2 Design Principles]]
|
||||
[[Property:link_title|I2E: Design Principles]]
|
||||
[[Property:weight|-13]]
|
||||
[[Property:uuid|529659bd-ec13-5805-87f2-2fd9318ad442]]
|
||||
The aim of Eiffel is to help specify, design, implement and modify quality software. This goal of quality in software is a combination of many factors; the language design concentrated on the three factors which, in the current state of the industry, are in direct need of improvements: reusability, extendibility and reliability. Also important were other factors such as efficiency, openness and portability.
|
||||
|
||||
'''Reusability''' is the ability to produce components that may serve in many different applications. Central to the Eiffel approach is the presence of predefined libraries such as EiffelBase, and the language's support for the production of new libraries.
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
[[Property:title|8 Event-Driven Programming and Agents]]
|
||||
[[Property:link_title|I2E: Event-Driven Programming and Agents]]
|
||||
[[Property:weight|-7]]
|
||||
[[Property:uuid|16fdab60-ae42-1bb8-f4bb-89e34d18a842]]
|
||||
The division of roles in object technology is clear: of the two principal constituents of a system, object types and operations, the first dominates. Classes, representing object types, determines the structure of the software; every routine, representing an operations, belongs to a class.
|
||||
|
||||
In some circumstances it is useful to define an object that denotes an operation. This is especially useful if you want to build an object structure that refers to operations, so that you can later traverse the structure and execute the operations encountered. A typical application is '''event-driven programming''' for Graphical User Interfaces (GUI), including Web programming. In GUI programming you will want to record properties of the form
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
[[Property:title|7 Exceptions]]
|
||||
[[Property:link_title|I2E: Exceptions]]
|
||||
[[Property:weight|-8]]
|
||||
[[Property:uuid|e3e10dac-0dd7-bbe1-240c-6a6985c7376a]]
|
||||
Whenever there is a contract, the risk exists that someone will break it. This is where exceptions come in.
|
||||
|
||||
Exceptions -- contract violations -- may arise from several causes. One is an assertion violation, if you've selected run-time assertion monitoring. Another is a signal triggered by the hardware or operating system to indicate an abnormal condition such as arithmetic overflow, or an attempt to create a new object when there's not enough memory available.
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
[[Property:title|9 Genericity]]
|
||||
[[Property:link_title|I2E: Genericity]]
|
||||
[[Property:weight|-6]]
|
||||
[[Property:uuid|091c0b65-73de-b454-b3f2-d8752983780e]]
|
||||
Building software components (classes) as implementations of abstract data types yields systems with a solid architecture but does not in itself ensure reusability and extendibility. Two key techniques address the problem: generosity (unconstrained or constrained) and inheritance. Let us look first at the unconstrained form.
|
||||
|
||||
To make a class generic is to give it '''formal generic parameters''' representing as unknown types, as in these examples from EiffelBase, an open-source library covering basic data structures and algorithms:
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
[[Property:title|10 Inheritance]]
|
||||
[[Property:link_title|I2E: Inheritance]]
|
||||
[[Property:weight|-5]]
|
||||
[[Property:uuid|acf84989-0e7c-f2f7-427a-19e7fce404ce]]
|
||||
Inheritance, the other fundamental generalization mechanism, makes it possible to define a new class by combination and specialization of existing classes rather than from scratch.
|
||||
|
||||
The following simple example, from the Data Structure Library in EiffelBase, is typical. <code> LIST </code>, as noted, describes lists in any representation. One such representation if the lists have a fixed number of elements uses an array. We may define the corresponding class by combination of <code> LIST </code> and <code> ARRAY </code>, as follows:
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
[[Property:title|Invitation to Eiffel Copyright]]
|
||||
[[Property:link_title|I2E: Invitation to Eiffel Copyright]]
|
||||
[[Property:weight|0]]
|
||||
[[Property:uuid|ce7b4af4-b669-9fec-92e1-c24c4f089336]]
|
||||
Title: Invitation to Eiffel, Eiffel Software Technical Report TR-EI-67/IV.
|
||||
|
||||
==Publication history==
|
||||
First published 1987. Some revisions (in particular Web versions) have used the title "Eiffel in a Nutshell" <br/>
|
||||
This version: July 2001. Introduces coverage of agents; several other improvements. Corresponds to release 5.0 of the EiffelStudio environment.
|
||||
==Author==
|
||||
Bertrand Meyer
|
||||
==Software Credits==
|
||||
See acknowledgments in book [http://www.eiffel.com/doc/page.html Eiffel: The Language] .
|
||||
==Cover Design==
|
||||
Rich Ayling.
|
||||
==Copyright notice and proprietary information==
|
||||
Copyright Interactive Software Engineering Inc. (Eiffel Software), 2001. May not be reproduced in any form (including electronic storage) without the written permission of Eiffel Software . "Eiffel Power" and the Eiffel Power logo are trademarks of Eiffel Software . All uses of the product documented here are subject to the terms and conditions of the Eiffel Software Eiffel user license. Any other use or duplication is a violation of the applicable laws on copyright, trade secrets and intellectual property.
|
||||
==Special duplication permission for educational institutions==
|
||||
Degree-granting educational institutions using Eiffel Software Eiffel for teaching purposes as part of the [http://www.eiffel.com/educators/resources.html Eiffel University Partnership Program] may be permitted under certain conditions to copy specific parts of this book. Contact Eiffel Software for details.
|
||||
{{info|About Eiffel Software (Interactive Software Engineering) helps you produce software better, faster and cheaper. Eiffel Software provides a wide range of products and services based on object technology, including Eiffel Software Eiffel, a complete development environment for the full system life cycle. Eiffel Software's training courses, available worldwide, cover key management and technical topics. Eiffel Software's consultants are available to address your project needs at all levels. Eiffel Software's TOOLS (Technology of Object-Oriented Languages and Systems) conferences, [http://www.tools-conferences.com http://www.tools-conferences.com] , are the meeting point for anyone interested in the software technologies of the future. Eiffel Software originated one of the earliest . NET products and offers a full range of . NET services and training at [http://www.dotnetexperts.com http://www.dotnetexperts.com] . }}
|
||||
|
||||
==For more information==
|
||||
Interactive Software Engineering Inc. <br/>
|
||||
Eiffel Software Building, <br/>
|
||||
356 Storke Road, <br/>
|
||||
Goleta, <br/>
|
||||
CA, 93117 <br/>
|
||||
USA. <br/>
|
||||
<br/>
|
||||
Telephone 805-685-1006, <br/>
|
||||
Fax 805-685-6869
|
||||
==Internet and email==
|
||||
Eiffel Software maintains a rich source of information at [http://eiffel.com http://eiffel.com] , with more than 1200 Web pages including online documentation, downloadable files, product descriptions, links to Eiffel Software partners, University Partnership program, mailing list archives, announcements, press coverage, Frequently Asked Questions, Support pages, and much more. Visit [http://www.eiffel.com/general/contact_details.html http://www.eiffel.com/general/contact_details.html] to request information about products and services. To subscribe to the Eiffel Software Eiffel user list, go to [http://groups.eiffel.com/join http://groups.eiffel.com/join] .
|
||||
==Support programs==
|
||||
Eiffel Software offers a variety of support options tailored to the diverse needs of its customers. See [http://support.eiffel.com http://support.eiffel.com] for details.
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
[[Property:title|3 Object-Oriented Design]]
|
||||
[[Property:link_title|I2E: Object-Oriented Design]]
|
||||
[[Property:weight|-12]]
|
||||
[[Property:uuid|e0a1f24e-5dd7-e5f8-8be8-8da32cc6a91c]]
|
||||
To achieve reusability, extendibility and reliability, the principles of object-oriented design provide the best known technical answer.
|
||||
|
||||
An in-depth discussion of these principles fall beyond the scope of this introduction but here is a short definition:
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
[[Property:title|11 Polymorphism and Dynamic Binding]]
|
||||
[[Property:link_title|I2E: Polymorphism and Dynamic Binding]]
|
||||
[[Property:weight|-4]]
|
||||
[[Property:uuid|1c3221be-0237-1c9a-407d-652a4084de12]]
|
||||
Inheritance is not just a module combination and enrichment mechanism. It also enables the definition of flexible entities that may become attached to objects of various forms at run time, a property known as polymorphism.
|
||||
|
||||
This remarkable facility must be reconciled with static typing. The language convention is simple: an assignment of the form <code> a </code> <code> : </code> <code> b </code> is permitted not only if <code> a </code> and <code> b </code> are of the same type, but more generally if <code> a </code> and <code> b </code> are of reference types <code> A </code> and <code> B </code>, based on classes <code> A </code> and <code> B </code> such that <code> B </code> is a descendant of <code> A </code>.
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
[[Property:title|14 Putting a System Together]]
|
||||
[[Property:link_title|I2E: Putting a System Together]]
|
||||
[[Property:weight|-1]]
|
||||
[[Property:uuid|97460714-8ae1-a7cb-8216-235827045ea6]]
|
||||
We have now studied the constituents of Eiffel software. It remains to see how you can combine these elements into executable '''systems''' (the Eiffel concept closest to the traditional notion of program) and libraries.
|
||||
|
||||
How do you get an executable system? All you need is to <br/>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
[[Property:title|5 Types]]
|
||||
[[Property:link_title|I2E: Types]]
|
||||
[[Property:weight|-10]]
|
||||
[[Property:uuid|344a9fdc-3346-5e2d-5fdd-77464e92f72f]]
|
||||
Eiffel is strongly typed for readability and reliability. Every entity is declared of a certain type, which may be either a reference type or an expanded type.
|
||||
|
||||
Any type <code> T </code> is based on a class, which defines the operations that will be applicable to instances of <code> T </code>. The difference between the two categories of type affects the semantics of an entity <code> x </code> declared of type <code> T </code>: for a reference type, the most common case, possible values for <code> x </code> are references to objects; for an expanded type, the values are objects. In both cases, the type rules guarantee that the objects will be instances of <code> T </code>.
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
[[Property:title|1 What Must I Know First?]]
|
||||
[[Property:link_title|I2E: What Must I Know First?]]
|
||||
[[Property:weight|-14]]
|
||||
[[Property:uuid|f40b4a30-87f7-2c27-b6e7-ef2f2a74661b]]
|
||||
This Invitation assumes that you have some experience of software development, but that's all. Previous exposure to object technology is not required. If you've had it, it will help; but if it has all been to notations like UML or programming languages like C++ and Java, you should not let it guide your study of this Invitation. Although Eiffel shares a number of properties with these other approaches, it takes a fresh path to object technology, based on a small number of simple, far-reaching concepts.
|
||||
|
||||
Once you are familiar with the basic ideas you may want to try them with EiffelStudio, which provides a direct implementation of the Eiffel concepts, available in a completely portable way across Windows, Linux, many versions of Unix and OpenVMS.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[[Property:title|Invitation to Eiffel]]
|
||||
[[Property:weight|-15]]
|
||||
[[Property:uuid|7a606387-2653-b122-b4ef-e283a389656e]]
|
||||
The Invitation to Eiffel is a short set of pages that should give you the "essence" of what Eiffel is all about, without taking too much of your time. Enjoy this profoundly different way of thinking about developing software! When you are done, move on to the more detailed Eiffel tutorial.
|
||||
The Invitation to Eiffel is a short set of pages that should provide you with the essence the Eiffel way, without taking too much of your time. Enjoy this profoundly different way of thinking about developing software! When you are done, move on to the more detailed Eiffel tutorial.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
[[Property:title|EiffelCOM Content]]
|
||||
[[Property:link_title|EiffelCOM Interface Content]]
|
||||
[[Property:weight|-2]]
|
||||
[[Property:uuid|a6543000-6009-970e-8a68-a6f3b18c1fc6]]
|
||||
The EiffelCOM library includes the following clusters:
|
||||
* A [[ref:libraries/com/reference/index|Constants]] cluster provides standard COM constants and enumerations.
|
||||
* A [[Interfaces|Interfaces]] cluster includes wrappers for standard interfaces that the EiffelCOM wizard does not generate and deferred classes: [[ref:libraries/com/reference/ecom_interface_chart|ECOM_INTERFACE]] , [[ref:libraries/com/reference/ecom_queriable_chart|ECOM_QUERIABLE]] , and [[ref:libraries/com/reference/ecom_stub_chart|ECOM_STUB]] .
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[Property:title|Interfaces]]
|
||||
[[Property:weight|0]]
|
||||
[[Property:uuid|7f65c561-cac3-6870-5d1c-6f73beeed872]]
|
||||
COM interfaces have several facets. First, an interface is a deferred, or an abstract, class. This means that an interface is a specification of a type. Second, an interface pointer represents a COM object, which is callable by a client application. An object can expose several interfaces, or represent several types.
|
||||
|
||||
==ECOM_INTERFACE==
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[Property:title|Structures]]
|
||||
[[Property:weight|1]]
|
||||
[[Property:uuid|fc2071f0-213c-cc88-4914-833b598ceb83]]
|
||||
The [[ref:libraries/com/reference/index|Structures]] cluster includes wrappers for data structures useful when using the COM technology.
|
||||
|
||||
==ECOM_ARRAY==
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[Property:title|EiffelCOM Library]]
|
||||
[[Property:weight|8]]
|
||||
[[Property:uuid|b5c66d71-515f-3c73-9c67-c50e4a8d6685]]
|
||||
Type: Library <br/>
|
||||
Platform: Windows <br/>
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[Property:title|Access Type]]
|
||||
[[Property:weight|5]]
|
||||
[[Property:uuid|0d049617-9737-7cc8-810a-9f6f9ca603ec]]
|
||||
Regardless of its location, a COM components can be accessed either directly through interface's virtual table or through OLE Automation.
|
||||
==Automation==
|
||||
Accessing a COM component through Automation means using a well known interface to access to a group of methods and properties. This interface is called IDispatch, and it includes the method <eiffel>invoke</eiffel> that allows to call a method, set or get a property on the Automation server. One advantage of that approach is that the interface has a known virtual table layout. As a result, Windows can include a built-in marshaler for that interface (See [[Deeper into COM|Marshaling]] for information on what a marshaler is). The supported types (known as Automation types) and their Eiffel equivalents are listed in the following table:
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
[[Property:title|Generalities]]
|
||||
[[Property:link_title|COM Concepts]]
|
||||
[[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/>
|
||||
[[EiffelCOM Wizard|EiffelCOM wizard]] <br/>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[Property:title|COM Interfaces]]
|
||||
[[Property:weight|2]]
|
||||
[[Property:uuid|1dbc3fb2-cf0b-b129-1102-ba01e26d8f74]]
|
||||
Interfaces are at the heart of any COM component. Interfaces are described in the definition file of a component. They consist of a group of semantically related functions that can be accessed by the clients of the component. Although they are a specification, they also have a physical representation. A client can request a pointer on an interface and access the component functions through that pointer. Interfaces are the only possible way to access functions from a component. They enforce information hiding by providing only the public functions to the client.
|
||||
|
||||
Interfaces also define the type of a component. Each interface corresponds to a specific view of the component. It can be compared to polymorphism in the Object Oriented world. Whenever an interface from a component is requested, only the functions defined on that interface are accessible as if the component was polymorphically cast into an object of the type of that interface.
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[Property:title|The Component Location]]
|
||||
[[Property:weight|4]]
|
||||
[[Property:uuid|083c0120-2eda-9353-ceae-f63e7f407341]]
|
||||
<div>
|
||||
==Types of Components==
|
||||
ActiveX, DirectX, OCX, COM+, ADO+, ASP etc. who never heard of these technologies? They all represent yet another use of the COM standard. This paragraph will focus on categorizing COM components according to their own properties as well as the context in which they are used. The categorization will define how the EiffelCOM wizard should be used to wrap or create a component. </div>The first criteria that defines the type of component is from where it will be accessed: will the component be loaded in the client process or will the component be a remote server for a distributed application? In the former case, the component is compiled as a Dynamic Link Libraries (DLL) while in the latter case it is a standard executable. <div>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[Property:title|EiffelCOM: Introduction]]
|
||||
[[Property:weight|0]]
|
||||
[[Property:uuid|adadc51d-3dec-320a-9405-0842eacca4f7]]
|
||||
This chapter covers enough information about COM for Eiffel developers to use the EiffelCOM wizard in an effective way. It does not cover all of COM since it would require an entire book but presents the main concepts needed to understand how to build an EiffelCOM system.
|
||||
|
||||
Briefly said, the Component Object Model is a Microsoft binary standard that establishes how two binary units can access each other at runtime. Such binary units can run in the same process, in different processes on the same machine, or even on different machines. Components can be implemented in any language as long as the compiler produces COM standard compliant binaries.
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
[[Property:title|EiffelCOM]]
|
||||
[[Property:link_title|COM and Eiffel]]
|
||||
[[Property:weight|-15]]
|
||||
[[Property:uuid|32e79152-1e8f-43cd-e014-a83aab18e440]]
|
||||
* [[EiffelCOM: Introduction|Introduction]]
|
||||
* [[Generalities|Generalities]]
|
||||
* [[COM Interfaces|Interfaces]]
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[Property:title|EiffelCOM Wizard]]
|
||||
[[Property:weight|4]]
|
||||
[[Property:uuid|49d5c1b9-14f8-5bea-6641-50e9cf6715cf]]
|
||||
Type: Wizard <br/>
|
||||
Platform: Windows
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[Property:title|Eiffel for ASP.NET Documentation]]
|
||||
[[Property:weight|6]]
|
||||
[[Property:uuid|158e298e-e4b3-3246-651c-557f2f630957]]
|
||||
CodeDom is a Microsoft .NET technology which allows representing source code programatically so that it may be rendered in different languages. The Eiffel CodeDom Provider is installed through Eiffel for ASP.NET which is available for download for free on the Eiffel Software web site ( [http://www.eiffel.com http://www.eiffel.com] ). <br/>
|
||||
The following documents cover different aspects of the Eiffel CodeDom Provider:
|
||||
* [[Writing ASP.NET pages in Eiffel|Writing ASP.NET pages in Eiffel]] covers topics related to writing Eiffel pages in ASP.NET.
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[Property:title|.NET]]
|
||||
[[Property:weight|-15]]
|
||||
[[Property:uuid|55eda2f0-0c60-f08c-b141-913e31a49c2f]]
|
||||
* [[.NET Installation instructions|Installation instructions]]
|
||||
* [[Building a .NET application|Building a .NET application]]
|
||||
* [[The Eiffel for .NET language|Eiffel for .NET language description]]
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[Property:title|ResourceBench]]
|
||||
[[Property:weight|1]]
|
||||
[[Property:uuid|a39ba4ef-460f-eab7-080d-c83d91546484]]
|
||||
Type: Tool <br/>
|
||||
Platform: Any <br/>
|
||||
Version: 5.4 <br/>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
[[Property:title|WEL Library]]
|
||||
[[Property:link_title|WEL]]
|
||||
[[Property:weight|-13]]
|
||||
[[Property:uuid|a8f57de5-a0eb-262e-a825-95a706392640]]
|
||||
Type: Library <br/>
|
||||
Platform: Windows <br/>
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[Property:title|EiffelBase Sample: Calculator]]
|
||||
[[Property:weight|0]]
|
||||
[[Property:uuid|12c3409d-165b-b1df-e26a-b05d49969661]]
|
||||
This sample consists of a command line reverse Polish notation (RPN) calculator.
|
||||
|
||||
{{note| '''Note:''' A RPN calculator works slightly differently from standard calculators. It consists of a stack of numbers. Operations are applied to the two numbers on top of the stack. The result is then put on top of the stack so that it can be used in the next operation. This sample refers to the top of the stack as ''Accumulator''.
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
[[Property:title|EiffelBase Samples]]
|
||||
[[Property:weight|3]]
|
||||
[[Property:uuid|5095bbdf-0dd6-7d7b-68d4-59a8293950ee]]
|
||||
* [[EiffelBase Sample: Calculator|Calculator]]
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[Property:title|EiffelBase, Abstract Container Structures: The Taxonomy]]
|
||||
[[Property:weight|0]]
|
||||
[[Property:uuid|15ec3e87-45c6-ab53-ddad-d1348a9d8d75]]
|
||||
A container data structure (or container in the sequel) is an object which serves to store and access collections of objects, called the '''items''' of the container. All classes describing containers are descendants of the deferred class [[ref:libraries/base/reference/container_chart|CONTAINER]] .
|
||||
|
||||
A container can be studied from three viewpoints: access, storage and traversal.
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[Property:title|EiffelBase Data Structures, Lists]]
|
||||
[[Property:weight|1]]
|
||||
[[Property:uuid|23f540e0-16d5-807c-30af-74d3416a5709]]
|
||||
Many applications need sequential structures, also called linear structures, in particular lists and circular chains. Apart from three classes describing individual list cells, all the classes involved are descendants of class [[ref:/libraries/base/reference/linear_chart|LINEAR]] , one of the deferred classes describing general traversal properties and introduced in the chapter that described the general data structure taxonomy. More precisely, all but one of the classes of interest for the present discussion are descendants, direct or indirect, from a class called [[ref:/libraries/base/reference/chain_chart|CHAIN]] which describes general sequential structures possessing a cursor as well as insertion properties. The exception is class [[ref:/libraries/base/reference/countable_sequence_chart|COUNTABLE_SEQUENCE]] , which describes infinite structures; all the others describe finite structures. <br/>
|
||||
[[ref:/libraries/base/reference/chain_chart|CHAIN]] is an heir of [[ref:/libraries/base/reference/sequence_chart|SEQUENCE]] , which describes a more general notion of sequence. [[ref:/libraries/base/reference/sequence_chart|SEQUENCE]] is a descendant of [[ref:/libraries/base/reference/linear_chart|LINEAR]] . There are two main categories of sequential structures: some, called circular chains, are cyclic; others, called lists, are not. Another distinction exists between dynamic structures, which may be extended at will, and fixed ones, which have a bounded capacity. <br/>
|
||||
In all of the structures under review you may insert two or more occurrences of a given item in such a way that the occurrences are distinguishable. In other words, the structures are bags rather than just sets, although it is possible to use them to implement sets.
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[Property:title|EiffelBase, Dispensers]]
|
||||
[[Property:weight|2]]
|
||||
[[Property:uuid|4f65d62b-940b-c3c2-557e-d709a2a1bcaf]]
|
||||
A dispenser is called that way because of the image of a vending machine (a dispenser) of a rather primitive nature, in which there is only one button. If you press the button and the dispenser is not empty, you get one of its items in the exit tray at the bottom, but you do not choose that item: the machine does. There is also an input slot at the top, into which you may deposit new items; but you have no control over the order in which successive button press operations will retrieve these items.
|
||||
|
||||
The deferred class [[ref:/libraries/base/reference/dispenser_chart|DISPENSER]] provides the facilities which will be shared by all specialized classes. In fact, the interface of all dispenser classes is nearly identical, with the exception of a few extra possibilities offered by priority queues. Many kinds of dispenser are possible, each defined by the relation that the machine defines between the order in which items are inserted and the order in which they arereturned. The Base libraries support three important categories - stacks, queues, and priority queues:
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[Property:title|EiffelBase, Iteration]]
|
||||
[[Property:weight|6]]
|
||||
[[Property:uuid|9c0313bf-571d-0c8d-5c49-8bd99f86bed5]]
|
||||
The classes of the Iteration cluster encapsulate control structures representing common traversal operations.
|
||||
|
||||
=Iterators and Agents=
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[Property:title|EiffelBase, Sets]]
|
||||
[[Property:weight|4]]
|
||||
[[Property:uuid|44d33f46-cfa9-2aca-6b4f-2d9d91723d85]]
|
||||
Sets are containers where successive occurrences of the same item are not distinguished: inserting the same item twice has the same observable effect as inserting it once.
|
||||
|
||||
==Deferred classes==
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[Property:title|EiffelBase, Tables]]
|
||||
[[Property:weight|5]]
|
||||
[[Property:uuid|194a63a2-e440-18dc-c9d5-6959dbe169fb]]
|
||||
Hash tables are a convenient mechanism tostore and retrieve objects identified by unique keys.
|
||||
==Why use hash tables?==
|
||||
The main advantage of hash tables is the efficiency of the basic operations: store ( [[ref:libraries/base/reference/hash_table_chart|put]] ) and retrieve ( [[ref:libraries/base/reference/hash_table_chart|item]] , [[ref:libraries/base/reference/hash_table_chart|remove]] ). <br/>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[Property:title|EiffelBase, Trees]]
|
||||
[[Property:weight|3]]
|
||||
[[Property:uuid|8357fc1a-a089-c846-aee8-18b8fb26c288]]
|
||||
Trees and their immediate generalization, forests, are useful for any system that manipulates hierarchically organized information. The range of applications is broad, from abstract syntax trees in compilers through document structures in text processing systems to company organization charts in business software. <br/>
|
||||
Trees, in particular binary trees and their variants, also provide convenient implementations of container data structures.
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[Property:title|EiffelBase Data Structures Overview]]
|
||||
[[Property:weight|1]]
|
||||
[[Property:uuid|195085fd-0b2f-8211-3d70-81c32cc13566]]
|
||||
The data structures cluster of EiffelBase includes classes that cover a wide range of data structures classes for you to reuse in your systems. The cluster is divided into a number of subclusters. Each subcluster contains one or more '''deferred''' classes, which provide the general high-level abstractions; other classes in the cluster inherit from the deferred ones.
|
||||
|
||||
The highest-level class is [[ref:libraries/base/reference/container_chart| CONTAINER]] , with the following heirs:
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[Property:title|EiffelBase, The Kernel]]
|
||||
[[Property:weight|0]]
|
||||
[[Property:uuid|f6229125-dd7e-a50d-5b97-3ad7cd6071d5]]
|
||||
In addition to basic concepts close to the language level, the Kernel covers such common needs as '''input''' and '''output''', '''storage''' and '''retrieval''' of objects on persistent storage, fine control over '''exception handling''' and '''memory management''', and access to '''operating system facilities'''. The kernel can be divided into 5 logical clusters of classes:
|
||||
* The first cluster contains the universal class defining facilities accessible to all other classes: [[ref:/libraries/base/reference/any_chart|ANY]] . Every developer-defined class is a descendant of this class.
|
||||
* The second cluster includes classes whose facilities are directly related to language concepts:
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[Property:title|EiffelBase Support Cluster]]
|
||||
[[Property:weight|2]]
|
||||
[[Property:uuid|f9c2a003-9836-6688-db1f-5aa31313b317]]
|
||||
The support cluster offers some commonly needed functionality that do not belong to the kernel.
|
||||
|
||||
==Conversions, mathematical properties and ASCII characters==
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
[[Property:title|EiffelBase]]
|
||||
[[Property:weight|1]]
|
||||
[[Property:uuid|0153c1de-bf88-fa0d-52a5-e50ffcc4e8c8]]
|
||||
EiffelBase, covered by the open-source [[IFELL|IFFEL license]] , is one of the principal contributions of Eiffel: a library of fundamental structures and algorithms covering the basics of computing, and resulting from a "Linnaean" effort at a general-purpose taxonomy of computing structures. EiffelBase is one of the most carefully designed and extensively used libraries in the object-oriented industry.
|
||||
|
||||
The EiffelBase library includes:
|
||||
* A [[EiffelBase, The Kernel|Kernel]] that defines the core classes of all Eiffel systems.
|
||||
* A [[EiffelBase Data Structures Overview|Data Structures]] cluster including classes for all the major data structures (sets, lists, tables etc...)
|
||||
* A [[EiffelBase Support Cluster|Support]] cluster that provide access to the environment, basic math operations and a few other helper classes.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
[[Property:weight|-15]]
|
||||
[[Property:uuid|be2b9c40-f2ff-d6dc-738d-b240deb69407]]
|
||||
* EiffelBase
|
||||
**EiffelBase Tutorial http://ise181.ise/book/documentation/eiffelbase
|
||||
**[[EiffelBase|EiffelBase Tutorial]]
|
||||
**EiffelBase class reference
|
||||
**EiffelBase samples http://ise181.ise/book/documentation/eiffelbase-samples
|
||||
**[[EiffelBase Samples|EiffelBase samples]]
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[Property:title|Compilation of multithreaded systems]]
|
||||
[[Property:weight|3]]
|
||||
[[Property:uuid|24e474b5-3cb7-16ff-365f-73be8e73bd56]]
|
||||
==Settings==
|
||||
* Set the option multithreaded in the project settings under Advanced.
|
||||
* Do not use a non-multi-threaded precompiled library. The corresponding multi-threaded libraries of base, WEL and Vision2 should be located in $ISE_EIFFEL/precomp/spec/$PLATFORM/ with the mt prefix.
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[Property:title|Multithread FAQ]]
|
||||
[[Property:weight|6]]
|
||||
[[Property:uuid|a0e1ddf6-cc19-b6f8-0e05-075908ddd347]]
|
||||
===I've launched several threads and they do not seem to be executed:===
|
||||
|
||||
The thread that launched the several threads may be dead before its children.
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[Property:title|Thread library overview]]
|
||||
[[Property:weight|1]]
|
||||
[[Property:uuid|2bdeeb91-1917-f443-ebfc-4f877107edd7]]
|
||||
This is only a quick overview of the [[EiffelThread Library|Thread library]] . The reference of this library should give all its content.
|
||||
|
||||
==Creating and launching threads: the class THREAD (deferred)==
|
||||
@@ -40,7 +41,7 @@ To run the thread, use the feature <eiffel>launch</eiffel> from <eiffel>THREAD</
|
||||
<code> my_thread.launch</code>
|
||||
On the Eiffel side, the procedure <eiffel>execute</eiffel> will be launched. This procedures deferred in class <eiffel>THREAD</eiffel>, you have to define it in <eiffel>MY_THREAD</eiffel>.
|
||||
On the C side, a C thread will be created and launched.
|
||||
{{warning| '''Caution''': you may call <eiffel>join_all</eiffel> and the end of the execution of the parent thread if you do not want it to die before its child, otherwise they may prematurely terminate.
|
||||
{{warning| '''Caution''': you may call <eiffel>join_all</eiffel> and the end of the execution of the parent thread if you do not want it to die before its child, otherwise they may prematurely terminate. }}
|
||||
==The class MUTEX==
|
||||
|
||||
The implementation of the class <eiffel>MUTEX</eiffel> is mapped on the C standard thread library. An instance of class <eiffel>MUTEX</eiffel> can be shared between different thread.
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[Property:title|EiffelThread]]
|
||||
[[Property:weight|0]]
|
||||
[[Property:uuid|d1e4c873-3e04-f49a-f6d2-6b9845f1e109]]
|
||||
The EiffelThread library includes the main components needed to build multithreaded systems. <br/>
|
||||
See:
|
||||
* [[EiffelThread: Introduction|Introduction]]
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
[[Property:title|Multi-threading]]
|
||||
[[Property:link_title|Concurrent computing]]
|
||||
[[Property:weight|-10]]
|
||||
[[Property:uuid|7c7a399a-076f-fd13-9b5f-f110c212e2e8]]
|
||||
== Multi-threading ==
|
||||
* [[Threads|Threads tutorial]]
|
||||
* EiffelThread class reference
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[Property:title|Esql Sample]]
|
||||
[[Property:weight|0]]
|
||||
[[Property:uuid|04d03117-fdb2-8b73-677f-9b1a0c333dc4]]
|
||||
This sample consists of a command line SQL parser. SQL statements are filtered through a monitor and sent to the RDBMS.
|
||||
|
||||
==Compiling==
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
[[Property:title|EiffelStore Samples]]
|
||||
[[Property:weight|3]]
|
||||
[[Property:uuid|65a0aab3-bc1d-28b8-a6f0-6d71b4c6d54d]]
|
||||
=EiffelStore Samples=
|
||||
|
||||
The following basic examples showcases the different EiffelStore capabilities:
|
||||
* [[Esql Sample|esql]] : A command line SQL parser: very useful to test your Database connection!
|
||||
* [[Selector Sample|select]] : A basic example to perform smart database queries.
|
||||
* [[Inserter Sample|insert]] : A basic example to easily insert data in your database.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[Property:title|Inserter Sample]]
|
||||
[[Property:weight|2]]
|
||||
[[Property:uuid|fa0b8601-ca7a-b1cc-384d-f366be33ac40]]
|
||||
This sample lets the user insert a DB_BOOK object in your database using EiffelStore insertion facilities.
|
||||
|
||||
==Compiling==
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[Property:title|Selector Sample]]
|
||||
[[Property:weight|1]]
|
||||
[[Property:uuid|3d608710-5537-04e4-fa89-a608ee6864cd]]
|
||||
This sample creates a <eiffel>DB_BOOK</eiffel> table in your database, enters sample data in it and lets you select rows from this table with author's name.
|
||||
|
||||
==Compiling==
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[Property:title|EiffelStore DataView Cluster]]
|
||||
[[Property:weight|3]]
|
||||
[[Property:uuid|75f8cc72-7ccf-28a4-f6b2-beeb2219dc43]]
|
||||
==1. Introduction==
|
||||
|
||||
DataView cluster helps the programmer creating a GUI for a RDBMS. It gives a basic solution for a RDBMS GUI and also enables the developer to customize his GUI from this basic interface.
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[Property:title|Data structures creation]]
|
||||
[[Property:weight|1]]
|
||||
[[Property:uuid|d8845cb9-2581-f85d-aad1-460816711356]]
|
||||
==1. Overview==
|
||||
|
||||
EiffelStore enables to create data structures mapped to your own database. This part describes how the EiffelStore wizard generates these structures mapped to your database and how you can map your own classes to your database with EiffelStore.
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[Property:title|Data structures use]]
|
||||
[[Property:weight|0]]
|
||||
[[Property:uuid|25885469-d6c8-5d1c-bbf8-c5fca5524d36]]
|
||||
==1. Overview==
|
||||
|
||||
EiffelStore affords a context that optimizes and facilitates the use of the classes that maps your database content.
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[Property:title|EiffelStore Generation Cluster]]
|
||||
[[Property:weight|2]]
|
||||
[[Property:uuid|f443ed73-14bb-9a3a-b7c7-35c2660e7784]]
|
||||
The EiffelStore library lets the user associate database elements with Eiffel objects. These database elements are basically database table rows, database view rows or more generally sets of database attribute values. The easiest way to manipulate database elements is to insert their content into Eiffel objects and to work on these Eiffel objects as database elements.
|
||||
|
||||
A first solution to implement this is to use some adaptable structures that will fit to any database element. This is done in EiffelStore through the [[ref:libraries/store/reference/db_tuple_flatshort|DB_TUPLE]] class, which contains mainly an [[ref:libraries/base/reference/array_chart|ARRAY]] [[[ref:libraries/base/reference/string_8_chart|STRING]] ] containing element attribute names and an [[ref:libraries/base/reference/array_chart|ARRAY]] [[[ref:libraries/base/reference/any_chart|ANY]] ] containing element attribute values. This solution has one major drawback: any static checking is impossible: the developer cannot be sure at compile time of the nature of a [[ref:libraries/store/reference/db_tuple_flatshort|DB_TUPLE]] , i.e. what it represents, and cannot know if attributes number, names and types are correct. To overcome this problem, a second solution is to use data structures that statically fits to the expected database element, as introduced in the [[Data Object Coupling|DataObject Coupling]] section.
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[Property:title|EiffelStore Implementation Layer]]
|
||||
[[Property:weight|1]]
|
||||
[[Property:uuid|80cd0938-6837-3c17-8515-b4ac60a51d09]]
|
||||
Each interface class has an implementation counterpart that implements specific DBMS handling. The class prefix indicates clearly its layer, for instance:
|
||||
* [[ref:/libraries/store/reference/db_selection_flatshort|DB_SELECTION]] is the interface to perform a database selection query.
|
||||
* [[ref:/libraries/store/reference/database_selection_flatshort|DATABASE_SELECTION]] [[[ref:/libraries/store/reference/database_flatshort|DATABASE]] ] is its implementation.
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[Property:title|Data Modification]]
|
||||
[[Property:weight|1]]
|
||||
[[Property:uuid|ef5568ff-dc7c-4c85-0174-335fdab1bd84]]
|
||||
Use the [[ref:/libraries/store/reference/db_change_flatshort|DB_CHANGE]] class to perform any operation on your database that does not require access to a result. You can for instance modify table row content, drop table rows, create and delete tables.
|
||||
|
||||
{{note| '''Note''': Take a look at the [[Data Object Coupling|Data Storing]] capability if you want to '''insert''' table rows. }}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[Property:title|Data Object Coupling]]
|
||||
[[Property:weight|4]]
|
||||
[[Property:uuid|c51311cd-8782-0bc3-3ef7-000ea6eee37c]]
|
||||
A smart way to work with relational databases is to have Eiffel objects directly mapping relational tables. Three EiffelStore classes enable this coupling:
|
||||
* [[ref:/libraries/store/reference/db_repository_flatshort|DB_REPOSITORY]] objects [[#describe|describe a relational table]] and allow Eiffel to create objects mapping database tables.
|
||||
* [[ref:/libraries/store/reference/db_store_flatshort|DB_STORE]] works directly with [[ref:/libraries/store/reference/db_repository_flatshort|DB_REPOSITORY]] objects to [[#insert|insert data into relational tables]] .
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[Property:title|Database Connection]]
|
||||
[[Property:weight|0]]
|
||||
[[Property:uuid|2cf2cb7c-e28d-5d06-b03e-e2b17c1f6879]]
|
||||
# To connect to your database, you have to create a '''handle''': this handle actually links the interface classes with corresponding implementation classes mapped to your DBMS. This handle is implemented by the DATABASE_APPL class:
|
||||
<code>
|
||||
database_appl: DATABASE_APPL [ODBC]
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[Property:title|Database control]]
|
||||
[[Property:weight|7]]
|
||||
[[Property:uuid|432c6e51-36d5-b469-c924-eb821713256a]]
|
||||
Use the [[ref:/libraries/store/reference/db_control_flatshort|DB_CONTROL]] class to check or change database status and behavior. The main operations you are likely to use are:
|
||||
* [[#errors|Handling]] database errors.
|
||||
* [[#connection|Connecting]] to the database.
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[Property:title|Database Selection]]
|
||||
[[Property:weight|2]]
|
||||
[[Property:uuid|de759a74-b3e1-c937-e620-67526c116925]]
|
||||
Use the [[ref:/libraries/store/reference/db_selection_flatshort|DB_SELECTION]] class to select data from the database. Once you have selected the data, you can [[Selection Access|access]] it with convenience using adaptative EiffelStore structures.
|
||||
|
||||
{{note| '''Note''': Take a look at the [[Data Object Coupling|Database/Eiffel objects Coupling]] if you need information about your database structure. }}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[Property:title|EiffelStore Interface Layer]]
|
||||
[[Property:weight|0]]
|
||||
[[Property:uuid|abd6c880-e0d8-0961-8cd2-d2ca43c1ce28]]
|
||||
The Interface layer gathers a set of classes covering all the capabilities an application need to interface efficiently with a DBMS.
|
||||
|
||||
The interface affords these main capabilities:
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[Property:title|Query variables]]
|
||||
[[Property:weight|5]]
|
||||
[[Property:uuid|37222a07-a8f8-e57d-45f0-3b28cd66d660]]
|
||||
If you have to execute database queries which only differ in the expression values, you can create a template query and then bind variables into this template for each execution.
|
||||
|
||||
This mechanism can be applied for requests with a result ([[ref:/libraries/store/reference/db_selection_chart|DB_SELECTION]] ) or without ([[ref:/libraries/store/reference/db_change_chart|DB_CHANGE]] ). Hence both classes inherits from STRING_HDL that actually handle variable binding.
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[Property:title|Selection Access]]
|
||||
[[Property:weight|3]]
|
||||
[[Property:uuid|3b4fdde3-d903-55c8-0068-cee2407db280]]
|
||||
Once you have [[Database Selection|selected data]] from the database, it returns a set of rows containing queried columns values. Each row loaded with DB_SELECTION is stored in a DB_RESULT object. The easiest way to access the data is thus to refer to DB_RESULT objects themselves.
|
||||
|
||||
{{note| '''Note''': Take a look at the [[Data Object Coupling|Database/Eiffel objects Coupling]] to learn advanced data handling features. }}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[Property:title|Stored Procedures]]
|
||||
[[Property:weight|6]]
|
||||
[[Property:uuid|9979af90-07c3-8b20-448e-04454a75c801]]
|
||||
When sending requests to the database, the request is first parsed then executed. Instead of parsing many times the same requests, i.e. with only changes in expression values, most of RDBMS enable to '''precompile''' requests. These requests can then be executed as routines and are identified by a name and a signature.
|
||||
|
||||
EiffelStore lets you use stored procedures with [[ref:/libraries/store/reference/db_proc_flatshort|DB_PROC]] class to:
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
[[Property:title|EiffelStore Content]]
|
||||
[[Property:link_title|EiffelStore Tutorial]]
|
||||
[[Property:weight|1]]
|
||||
[[Property:uuid|542caa33-5dc1-d2ea-414b-b1739045edd9]]
|
||||
EiffelStore main classes are grouped into 2 main layers:
|
||||
* The [[EiffelStore Interface Layer|interface layer]] provides a high-level, unique interface for every DBMS.
|
||||
* The [[EiffelStore Implementation Layer|implementation layer]] customizes high-level routines to various DBMS handles.
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
[[Property:title|EiffelStore Library]]
|
||||
[[Property:link_title|EiffelStore]]
|
||||
[[Property:weight|1]]
|
||||
[[Property:uuid|f43ab3e6-4551-632a-384b-4964d1436730]]
|
||||
Type: Library <br/>
|
||||
Platform: Any <br/>
|
||||
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
[[Property:weight|-8]]
|
||||
[[Property:uuid|f5d26942-de52-76cc-0f41-66b959a78999]]
|
||||
== Database access ==
|
||||
* EiffelStore http://ise181.ise/book/documentation/eiffelstore-library
|
||||
** EiffelStore introduction http://ise181.ise/book/documentation/eiffelstore-introduction
|
||||
** EiffelStore tutorial http://ise181.ise/book/documentation/eiffelstore-content
|
||||
* [[EiffelStore Library|EiffelStore]]
|
||||
** [[EiffelStore introduction|EiffelStore introduction]]
|
||||
** [[EiffelStore Content|EiffelStore tutorial]]
|
||||
** EiffelStore class reference
|
||||
** EiffelStore samples http://ise181.ise/book/documentation/eiffelstore-samples
|
||||
** [[EiffelStore Samples|EiffelStore samples]]
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[Property:title|Absolute time]]
|
||||
[[Property:weight|0]]
|
||||
[[Property:uuid|195849fc-1a9c-d734-2d2b-acae78133886]]
|
||||
The classes dealing with date and those dealing with time have almost the same construction. At the top of the hierarchy are the constants and the notion of value ([[ref:libraries/time/reference/time_value_chart|TIME_VALUE]] , [[ref:libraries/time/reference/date_value_chart|DATE_VALUE]] , [[ref:libraries/time/reference/date_time_value_chart|DATE_TIME_VALUE]] ). From this notion come two kinds of heirs which are the absolute notion of time (classes [[ref:libraries/time/reference/date_chart|DATE]] , [[ref:libraries/time/reference/time_chart|TIME]] and [[ref:libraries/time/reference/date_time_chart|DATE_TIME]] ) and the notion of duration (classes [[ref:libraries/time/reference/date_duration_chart|DATE_DURATION]] , [[ref:libraries/time/reference/time_duration_chart|TIME_DURATION]] , [[ref:libraries/time/reference/date_time_duration_chart|DATE_TIME_DURATION]] ).
|
||||
|
||||
[[ref:libraries/time/reference/date_chart|DATE]] , [[ref:libraries/time/reference/time_chart|TIME]] and [[ref:libraries/time/reference/date_time_chart|DATE_TIME]] inherit from the deferred class <eiffel>ABSOLUTE</eiffel>. It implies that instances of these classes are used as absolutes. We can imagine an oriented axis on which are reported values. <eiffel>ABSOLUTE </eiffel>inherits <eiffel>COMPARABLE</eiffel>, there is a complete order inside the class and its heir. <eiffel>ABSOLUTE</eiffel> is a client of <eiffel>DURATION</eiffel>, so that each instance of <eiffel>ABSOLUTE </eiffel>is linked with the duration between the origin and itself.
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[[Property:title|DATE / TIME to STRING Conversion]]
|
||||
[[Property:weight|3]]
|
||||
[[Property:uuid|88972ba4-694b-8558-b0c8-87b1fc40afc4]]
|
||||
The following table lists format conversion codes.
|
||||
{|
|
||||
|-
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user