note description: "Representation for an attribute entry in an instance of ATTR_TABLE." legal: "See notice at end of class." status: "See notice at end of class." class ATTR_ENTRY inherit ENTRY redefine is_attribute end create make feature {NONE} -- Creation make (t: like type; tid: like type_id; fid: like feature_id; d: BOOLEAN; cid: like class_id) -- Initialize an object using -- • result type `t` -- • type ID `tid` -- • feature ID `fid` -- • `d` tells if the associated class is deferred -- • class ID `cid` require is_valid_type_id: system.class_types.valid_index (tid) has_type_id: attached system.class_type_of_id (tid) as context_class_type valid_type_for_type_id: t.is_valid_context_type (context_class_type.type) do type := t type_id := tid feature_id := fid is_polymorphic := not d class_id := cid ensure type = t type_id = tid feature_id = fid not is_deferred is_polymorphic /= d class_id = cid end feature -- Dead code removal is_attribute: BOOLEAN -- Is the entry associated with an attribute? do Result := True end feature -- from ATTR_ENTRY workbench_offset: INTEGER -- Offset of attribute in object structure require is_attribute: is_attribute local s: SKELETON do s := System.class_type_of_id (type_id).skeleton s.search_feature_id (feature_id) Result := s.workbench_offset end feature -- Status report has_body: BOOLEAN -- Does this attribute has an explicit body? is_initialization_required: BOOLEAN -- Is initialization of an attribute required? do Result := has_body and then type.is_initialization_required end feature -- Status setting set_has_body -- Set `has_body' to True. do has_body := True end note copyright: "Copyright (c) 1984-2019, Eiffel Software" license: "GPL version 2 (see http://www.eiffel.com/licensing/gpl.txt)" licensing_options: "http://www.eiffel.com/licensing" copying: "[ This file is part of Eiffel Software's Eiffel Development Environment. Eiffel Software's Eiffel Development Environment is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2 of the License (available at the URL listed under "license" above). Eiffel Software's Eiffel Development Environment is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Eiffel Software's Eiffel Development Environment; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ]" source: "[ Eiffel Software 5949 Hollister Ave., Goleta, CA 93117 USA Telephone 805-685-1006, Fax 805-685-6869 Website http://www.eiffel.com Customer support http://support.eiffel.com ]" end