From f5fedd1ddd7a19ab7e24cd3cfdfee793020a7fc6 Mon Sep 17 00:00:00 2001 From: manus Date: Fri, 6 May 2011 23:28:40 +0000 Subject: [PATCH] Author:manus Date:2011-05-06T23:28:40.000000Z git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@888 abb3cda0-5349-4a8f-a601-0c33ac3a8c38 --- .../scoop-examples/observer-pattern.wiki | 6 ++++++ .../eiffelstore-interface-layer/selection-access.wiki | 3 +-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/documentation/current/solutions/concurrent-computing/concurrent-eiffel-scoop/scoop-examples/observer-pattern.wiki b/documentation/current/solutions/concurrent-computing/concurrent-eiffel-scoop/scoop-examples/observer-pattern.wiki index 204dd110..81b9f495 100644 --- a/documentation/current/solutions/concurrent-computing/concurrent-eiffel-scoop/scoop-examples/observer-pattern.wiki +++ b/documentation/current/solutions/concurrent-computing/concurrent-eiffel-scoop/scoop-examples/observer-pattern.wiki @@ -14,5 +14,11 @@ You should understand that the example doesn't really parse code. Rather, it jus =Highlights= +The name of this example is Observer pattern, but it's not a classic example of the [http://en.wikipedia.org/wiki/Observer_pattern Observer design pattern] as commonly known. But it does have elements of the observer pattern that we will see. + +The important classes here are DEGREE_5, EIFFEL_PARSER_POOL, and EIFFEL_PARSER. DEGREE_5 represents Eiffel compilation degree five, parsing of classes. In the example, DEGREE_5 uses an instance of EIFFEL_PARSER_POOL to manage a pool of instances of EIFFEL_PARSER which actually do the parsing. The EIFFEL_PARSERs are declared separate so that they can work concurrently, parsing different files (of course, remember that in this example the parsing is just simulated). + +When DEGREE_5 creates the EIFFEL_PARSER_POOL, it provides a maximum number of parsers to be held in the pool and a function agent which the pool can use to create a new parser instance. Then when DEGREE_5 asks the pool to parse a file, it provides references to the file itself and two procedure agents: one for pre-parse processing and one for post-parse processing. + diff --git a/documentation/current/solutions/database-access/eiffelstore/eiffelstore-tutorial/eiffelstore-interface-layer/selection-access.wiki b/documentation/current/solutions/database-access/eiffelstore/eiffelstore-tutorial/eiffelstore-interface-layer/selection-access.wiki index be80f707..50a99f7e 100644 --- a/documentation/current/solutions/database-access/eiffelstore/eiffelstore-tutorial/eiffelstore-interface-layer/selection-access.wiki +++ b/documentation/current/solutions/database-access/eiffelstore/eiffelstore-tutorial/eiffelstore-interface-layer/selection-access.wiki @@ -100,8 +100,7 @@ A DB_RESULT object merely carries data retrieved from the database. You have to ... - create tuple - tuple.copy (selection.cursor) + create tuple.make_from_cursor (selection.cursor) if tuple.count >= 2 and then tuple.column_name (2).is_equal ("Firstname") then io.putstring (tuple.item (2).out) end