/[eiffelstudio]/trunk/eweasel/tests/final131/test2.e
ViewVC logotype

Contents of /trunk/eweasel/tests/final131/test2.e

Parent Directory Parent Directory | Revision Log Revision Log


Revision 103152 - (show annotations)
Sun May 12 17:35:41 2019 UTC (4 months ago) by alexk
File size: 724 byte(s)
Added an example to test how removed classes are dealt with SED-storable.
1 class
2 TEST
3
4 inherit
5 SED_STORABLE_FACILITIES
6
7 create
8 make
9
10 feature {NONE} -- Creation
11
12 make
13 local
14 a: A
15 b: B
16 f: RAW_FILE
17 do
18 if attached a then
19 a.do_nothing
20 end
21 ;(create {B}).do_nothing
22 ;(create {CELL [detachable A]}.put (Void)).do_nothing
23 create f.make_open_read ("../data.dat")
24 if not attached retrieved (create {SED_MEDIUM_READER_WRITER}.make_for_reading (f), True) as x then
25 io.put_string ("Cannot retrieve an object.%N")
26 elseif attached {CELL [A]} x as y then
27 io.put_string ("Retrieved object successfully: " + y.item.generating_type.name + ".%N")
28 else
29 io.put_string ("Retrieved incompatible object: " + x.generating_type.name + ".%N")
30 end
31 f.close
32 end
33
34 end

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.23