/src/tools/wrappers-generator/wrapper_class.e
Specman e | 49 lines | 26 code | 7 blank | 16 comment | 2 complexity | 7ec5de2bc2499cde22a7061587e3bf94 MD5 | raw file
1deferred class WRAPPER_CLASS 2 -- A node of an Gcc-Xml file reprenting an entity wrappable by a 3 -- Liberty class also containing the wrapper features of child 4 -- and/or related nodes. 5 6inherit 7 WRAPPABLE_NODE 8 -- To make sure that it is a correct class name 9 redefine compute_eiffel_name 10 end 11 12feature {ANY} 13 emit_wrapper 14 deferred 15 ensure emitted 16 end 17 18 compute_eiffel_name 19 do 20 if has_assigned_name then 21 cached_eiffel_name := eiffel_class_name(assigned_name, suffix) 22 elseif is_named then 23 cached_eiffel_name := eiffel_class_name(c_string_name, suffix) 24 else 25 create cached_eiffel_name.make_from_string(once "ANONYMOUS_GCCXML_ELEMENT_AT_L@(1)_R@(2)" # &line # &column) 26 end 27 -- TODO: 2016-02-08 PR this is becoming an horrible spaghetti code! 28 end 29 30 suffix: STRING 31 deferred 32 end 33 34feature {} -- Implementation 35 output: TERMINAL_OUTPUT_STREAM 36 37end -- class WRAPPER_CLASS 38 39-- Copyright (C) 2008-2017: Paolo Redaelli 40-- wrappers-generator is free software: you can redistribute it and/or modify it 41-- under the terms of the GNU General Public License as publhed by the Free 42-- Software Foundation, either version 2 of the License, or (at your option) 43-- any later version. 44-- wrappers-generator is distributed in the hope that it will be useful, but 45-- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 46-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 47-- more details. 48-- You should have received a copy of the GNU General Public License along with 49-- th program. If not, see <http://www.gnu.org/licenses/>.