note description: "System level server file counter." legal: "See notice at end of class." status: "See notice at end of class." class FILE_COUNTER inherit COMPILER_COUNTER redefine append end create make feature -- Initialization append (other: like Current) -- Append ids generated by `other' to `Current' and -- renumber the resulting set of ids. local i: INTEGER do Precursor (other) if attached other.precompiled_offsets as other_offsets then create precompiled_offsets.make_filled (precompiled_offset, 1, other_offsets.count + 1) across other_offsets as other_offset from i := 1 loop precompiled_offsets [i] := other_offset.item i := i + 1 end else create precompiled_offsets.make_filled (precompiled_offset, 1, 1) end end feature -- Access compilation_id (id: INTEGER): INTEGER -- Compilation_id corresponding to `id'. require precompiled_offsets_set: precompiled_offsets /= Void local i, nb: INTEGER found: BOOLEAN do from i := precompiled_offsets.lower nb := precompiled_offsets.upper until i > nb or found loop found := id <= precompiled_offsets.item (i) if found then Result := i end i := i + 1 end ensure found: Result > 0 end feature -- Precompiled_offsets precompiled_offsets: ARRAY [INTEGER] -- Offset for each precompiled library. ;note date: "$Date$" revision: "$Revision$" copyright: "Copyright (c) 1984-2018, 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