--------------------------------------------- ----------------------------------- -- -- -- OCARINA COMPONENTS -- -- -- -- O C A R I N A . D I A . P A R S E R . C O R E . N O D E S -- -- -- -- S p e c -- -- -- -- Copyright (C) 2005-2007, GET-Telecom Paris. -- -- -- -- Ocarina is free software; you can redistribute it and/or modify -- -- it under terms of the GNU General Public License as published by the -- -- Free Software Foundation; either version 2, or (at your option) any -- -- later version. Ocarina 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 distributed with Ocarina; see file COPYING. -- -- If not, write to the Free Software Foundation, 51 Franklin Street, Fifth -- -- Floor, Boston, MA 02111-1301, USA. -- -- -- -- As a special exception, if other files instantiate generics from this -- -- unit, or you link this unit with other files to produce an executable, -- -- this unit does not by itself cause the resulting executable to be -- -- covered by the GNU General Public License. This exception does not -- -- however invalidate any other reasons why the executable file might be -- -- covered by the GNU Public License. -- -- -- -- Ocarina is maintained by the Ocarina team -- -- (ocarina-users@listes.enst.fr) -- -- -- ------------------------------------------------------------------------------ -- This package implements the parsing of the different nodes that -- appear in a Dia implementation, and several other useful functions on -- nodes such as printing with DOM.Core; package Ocarina.Dia.Parser.Core.Nodes is function Item (List : node_list; Index : Integer) return node; -- Return index-nth element in the list (starting from 0) If Index -- is greated than or equal to the number of items -- in the list, -- null is returned. function Length (List : node_list) return Integer; -- Return the number of elements in the list. function Print_Node_Type (Node_Type_Arg : node_type) return String; -- Returns a string representing a node type (for debugging) procedure Print_Node (N : node); -- Prints a node to the screen (for debugging purposes) Not_Matching : exception; -- Exception raised when a XML Node doesn't match any known object function Match_Type (S : String) return node_type; -- returns the Node_Type associated with S; -- raises Not_Matching -- if nothing matches the input string Missing_Attribute : exception; -- Raised when a dia:object doesn't have the proper attributes function Get_Node (XMLN : DOM.Core.node; Id : Natural) return node; -- Reads from the XML/DIA document and returns the next AADL object function Get_Node_Name (N : node) return String; -- Returns the Name of the Node function Count_Ports (N : node) return Natural; -- Returns the number of ports on that node function Count_Connections (N : node) return Natural; -- Returns the number of connection points on that node function Get_Node_Id (N : node) return Natural; -- Returns the Id of the node function Get_Node_By_Id (Id : Unbounded_String; List : node_list) return node; -- returns the Node associated with the id function Has_Implementation_Arrow (N : node; List : node_list) return node; -- retuns true if the node is at the beginning of an -- implementation arrow. end Ocarina.Dia.Parser.Core.Nodes;