/src/tools/semantics/types/impl/liberty_unknown_type.e
Specman e | 80 lines | 47 code | 13 blank | 20 comment | 0 complexity | cf9a7d39ef17b66a8e0819beaae5302c 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_UNKNOWN_TYPE 16 -- 17 -- An unknown type, i.e. we know nothing about it except its name (happens when the corresponding source 18 -- cannot be found). 19 -- 20 -- Should be used only for some unresolved export clients. 21 -- 22 23inherit 24 LIBERTY_TYPE 25 undefine is_equal 26 end 27 28insert 29 SINGLETON 30 redefine out_in_tagged_out_memory 31 end 32 33creation {LIBERTY_TYPE_RESOLVER} 34 make 35 36feature {ANY} 37 known_type: LIBERTY_KNOWN_TYPE is 38 do 39 check Result = Void end 40 end 41 42 is_known: BOOLEAN is False 43 44 full_name: FIXED_STRING 45 46 hash_code: INTEGER is 19741215 47 48 out_in_tagged_out_memory is 49 do 50 tagged_out_memory.append(once "{unknown type ") 51 tagged_out_memory.append(full_name) 52 tagged_out_memory.extend('}') 53 end 54 55 specialized_in (a_type: LIBERTY_ACTUAL_TYPE): like Current is 56 do 57 Result := Current 58 end 59 60feature {LIBERTY_KNOWN_TYPE} 61 full_name_in (buffer: STRING) is 62 do 63 buffer.append(full_name) 64 end 65 66feature {} 67 make (a_full_name: like full_name) is 68 require 69 a_full_name /= Void 70 do 71 full_name := a_full_name 72 ensure 73 full_name = a_full_name 74 end 75 76invariant 77 full_name /= Void 78 not is_reachable 79 80end -- class LIBERTY_UNKNOWN_TYPE