PageRenderTime 21ms CodeModel.GetById 18ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/src/lib/sequencer/ready_description.e

http://github.com/tybor/Liberty
Specman e | 66 lines | 36 code | 6 blank | 24 comment | 0 complexity | f553c22cae7cad204f182cc59acb6eee MD5 | raw file
 1-- This file is part of a Liberty Eiffel library.
 2-- See the full copyright at the end.
 3--
 4class READY_DESCRIPTION
 5obsolete "Please use EVENTS_SET instead"
 6
 7inherit
 8   EVENTS_SET
 9      export
10         {ANY} after, at, when_data, is_data, when_free, is_free, when_connection, is_connection
11      end
12
13creation {ANY}
14   make
15
16feature {ANY}
17   after_from_now (timeout_ms: INTEGER) is
18         -- `timeout_ms' is the max time in milliseconds to wait from now.
19      require
20         timeout_ms >= 0
21         not queryable
22      local
23         t: TIME_EVENTS
24      do
25         expect(t.in_time(timeout_ms))
26      end
27
28   when_binary_data (file: BINARY_FILE_READ) is
29      require
30         file /= Void
31         file.is_connected
32         not queryable
33      do
34         when_data(file)
35      end
36
37   is_binary_data (file: BINARY_FILE_READ): BOOLEAN is
38      require
39         file /= Void
40         file.is_connected
41         queryable
42      do
43         Result := is_data(file)
44      end
45
46end -- class READY_DESCRIPTION
47--
48-- Copyright (c) 2009 by all the people cited in the AUTHORS file.
49--
50-- Permission is hereby granted, free of charge, to any person obtaining a copy
51-- of this software and associated documentation files (the "Software"), to deal
52-- in the Software without restriction, including without limitation the rights
53-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
54-- copies of the Software, and to permit persons to whom the Software is
55-- furnished to do so, subject to the following conditions:
56--
57-- The above copyright notice and this permission notice shall be included in
58-- all copies or substantial portions of the Software.
59--
60-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
61-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
62-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
63-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
64-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
65-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
66-- THE SOFTWARE.