/src/tools/semantics/code/entities/liberty_current.e
Specman e | 74 lines | 48 code | 11 blank | 15 comment | 0 complexity | 161093ff8f0a22649102b6cdb4de8b87 MD5 | raw file
1-- This file is part of Liberty Eiffel. 2-- 3-- Liberty Eiffel is free software: you can redistribute it and/or modify 4-- it under the terms of the GNU General Public License as published by 5-- the Free Software Foundation, version 3 of the License. 6-- 7-- Liberty Eiffel is distributed in the hope that it will be useful, 8-- but WITHOUT ANY WARRANTY; without even the implied warranty of 9-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10-- GNU General Public License for more details. 11-- 12-- You should have received a copy of the GNU General Public License 13-- along with Liberty Eiffel. If not, see <http://www.gnu.org/licenses/>. 14-- 15class LIBERTY_CURRENT 16 17inherit 18 LIBERTY_ENTITY 19 redefine out_in_tagged_out_memory 20 end 21 22create {LIBERTY_ACTUAL_TYPE} 23 make 24 25feature {ANY} 26 name: FIXED_STRING is 27 once 28 Result := "Current".intern 29 end 30 31 out_in_tagged_out_memory is 32 do 33 tagged_out_memory.append(name) 34 end 35 36 result_type: LIBERTY_ACTUAL_TYPE 37 38 specialized_in (a_type: LIBERTY_ACTUAL_TYPE): like Current is 39 do 40 Result := a_type.current_entity 41 end 42 43feature {LIBERTY_REACHABLE, LIBERTY_REACHABLE_COLLECTION_MARKER} 44 mark_reachable_code (mark: INTEGER) is 45 do 46 -- nothing 47 end 48 49feature {} 50 make (type: like result_type; a_position: like position) is 51 require 52 type /= Void 53 a_position /= Void 54 do 55 position := a_position 56 result_type := type 57 ensure 58 position = a_position 59 result_type = type 60 end 61 62feature {ANY} 63 accept (v: VISITOR) is 64 local 65 v0: LIBERTY_CURRENT_VISITOR 66 do 67 v0 ::= v 68 v0.visit_liberty_current(Current) 69 end 70 71invariant 72 result_type /= Void 73 74end