/test/language/unclassified/uw/aux_uw01question_node.e
Specman e | 72 lines | 43 code | 7 blank | 22 comment | 0 complexity | cef751653045fc014464f031bb591658 MD5 | raw file
1note 2 description: 3 "nodes representing yes/no questions (properties)" 4 status: 5 "See notice at end of class" 6 author: 7 "Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de>" 8 version: 9 "$Revision$" 10 last_modification: 11 "$Date$" 12class AUX_UW01QUESTION_NODE 13 14inherit 15 AUX_UW01YES_NO_NODE 16 rename make_simple as make_simple_yes_no, 17 make_full as make_full_yes_no, 18 description as property 19 end 20 21create {ANY} 22 make_simple, make_full 23 24feature {ANY} 25 make_simple (prop: STRING) 26 -- set up node with property `prop' 27 require 28 good_property: prop /= Void and then prop.count > 0 29 do 30 make_simple_yes_no(prop) 31 end 32 33 make_full (y, n, p: AUX_UW01YES_NO_NODE; prop: STRING) 34 -- set up node with property `prop', yes link `y', 35 -- no link `n', and parent `p' 36 require 37 good_property: prop /= Void and then prop.count > 0 38 do 39 make_full_yes_no(y, n, p, prop) 40 end 41 42 execute 43 -- perform action 44 do 45 extra_io.print_multi({ARRAY[STRING] 1, << property, language.s5 >> }) 46 end 47 48 read_answer 49 -- ask question 50 do 51 extra_io.read_yes_no(language.s6) 52 last_answer := extra_io.last_boolean 53 end 54 55end -- class AUX_UW01QUESTION_NODE 56-- Copyright (C) 1998-2017: by Ulrich Windl 57-- Copyright (C) 1998-2017: by Klinikum der Universit�t Regensburg, 58-- D-93042 Regensburg 59-- 60-- This program is free software; you can redistribute it and/or modify 61-- it under the terms of the GNU General Public License as published by 62-- the Free Software Foundation; either version 2 of the License, or 63-- (at your option) any later version. 64-- 65-- This program is distributed in the hope that it will be useful, 66-- but WITHOUT ANY WARRANTY; without even the implied warranty of 67-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 68-- GNU General Public License for more details. 69-- 70-- You should have received a copy of the GNU General Public License 71-- along with this program; if not, write to the Free Software 72-- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA