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