------------------------------------------------------------------------------ ------------------------------------------------------------------------------ -- Cheddar is a GNU GPL real-time scheduling analysis tool. -- This program provides services to automatically check schedulability and -- other performance criteria of real-time architecture models. -- -- Copyright (C) 2002-2020, Frank Singhoff, Alain Plantec, Jerome Legrand, -- Hai Nam Tran, Stephane Rubini -- -- The Cheddar project was started in 2002 by -- Frank Singhoff, Lab-STICC UMR 6285, Université de Bretagne Occidentale -- -- Cheddar has been published in the "Agence de Protection des Programmes/France" in 2008. -- Since 2008, Ellidiss technologies also contributes to the development of -- Cheddar and provides industrial support. -- -- The full list of contributors and sponsors can be found in AUTHORS.txt and SPONSORS.txt -- -- This program 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; either version 2 of the License, or -- (at your option) any later version. -- -- This program 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 this program; if not, write to the Free Software -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- -- -- Contact : cheddar@listes.univ-brest.fr -- ------------------------------------------------------------------------------ -- Last update : -- $Rev$ -- $Date$ -- $Author: singhoff $ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ with ada.strings.unbounded; use ada.strings.unbounded; with unbounded_strings; use unbounded_strings; generic type element (<>) is private; type element_ptr is access element; with procedure put (e : in element_ptr); with procedure free (e : in out element_ptr); with function copy (e : in element_ptr) return element_ptr; with function xml_string (e : in element_ptr) return Unbounded_String; package access_lists is type cell is private; type list is private; type list_ptr is access list; type iterator is private; type iterator_ptr is access iterator; element_not_found : exception; procedure initialize (l : in out list); procedure add (l : in out list; e : in element_ptr); procedure put (l : in list); procedure put (l : in list_ptr); -- Remove from "L" the element "E" -- procedure delete (l : in out list; e : in element_ptr); -- Delete from "L" all elements stored into "E" -- procedure delete (l : in out list; e : in list); -- Delete all elements of the list -- procedure delete (l : in out list); procedure duplicate (src : in list; dest : in out list); procedure duplicate (src : in list; dest : in out list; complete : Boolean := False); function is_empty (l : in list) return Boolean; function get_number_of_elements (l : in list) return Natural; function get_head (l : in list) return element_ptr; function get_tail (l : in list) return element_ptr; -- Move the current iterator to the next or previous element -- procedure next_element (l : in list; my_iterator : in out iterator); procedure previous_element (l : in list; my_iterator : in out iterator); -- Get the current element pointed by the iterator -- procedure current_element (l : in list; return_element : out element_ptr; my_iterator : in iterator); -- Initiliaze an iterator the the head or the tail of a list -- procedure reset_tail_iterator (l : in list; my_iterator : in out iterator); procedure reset_head_iterator (l : in list; my_iterator : in out iterator); -- the element is the tail of the head of a list ? -- function is_tail_element (l : in list; my_iterator : in iterator) return Boolean; function is_head_element (l : in list; my_iterator : in iterator) return Boolean; -- the element is in the list ? -- function element_in_list (e : in element_ptr; l : in list) return Boolean; function element_in_list (e : in element; l : in list) return Boolean; -- Produce XML for all elements of a list -- function xml_string (obj : in list) return Unbounded_String; private type cell_ptr is access cell; type cell is record next : cell_ptr; previous : cell_ptr; info : element_ptr; end record; type list is record head : cell_ptr; tail : cell_ptr; end record; type iterator is record current : cell_ptr; end record; end access_lists;