--------------------------------------------- ----------------------------------- -- -- -- OCARINA COMPONENTS -- -- -- -- O C A R I N A . D I A . P A R S E R . T R A N S L A T E -- -- -- -- S p e c -- -- -- -- Copyright (C) 2005-2006, 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) -- -- -- ------------------------------------------------------------------------------ with Ocarina.Entities.Components; with Ocarina.Dia.Parser.Core; package Ocarina.Dia.Parser.Translate is ------------------------------------------- -- to keep tracks of the nodes created -- ------------------------------------------- type Ocarina_Node_Name_Array is array (Integer range <>) of String (1 .. 30); type Ocarina_Node_Name_Array_Access is access Ocarina_Node_Name_Array; type Ocarina_Node_Id_Array is array (Integer range <>) of Types.Node_Id; type Ocarina_Node_Id_Array_Access is access Ocarina_Node_Id_Array; type Ocarina_Node_List is record ItemsName : Ocarina_Node_Name_Array_Access := null; ItemsId : Ocarina_Node_Id_Array_Access := null; Last : Integer := -1; end record; Ocarina_Null_List : constant Ocarina_Node_List := (null, null, -1); ONL : Ocarina_Node_List := Ocarina_Null_List; function OItemName (Index : Integer) return String; function OItemId (Index : Integer) return Types.Node_Id; function OLength return Integer; procedure OAppend (S : String; I : Types.Node_Id); --------------- -- Translate -- --------------- function Translate (NL : Ocarina.Dia.Parser.Core.Node_List) return Types.Node_Id; -- This function translates the internal representation of the -- AADL tree from a Dia document into the Ocarina representation. -- Returns the Root Node_Id ------------------ -- CC_Node_Type -- ------------------ function CC_Node_Type (Node_Type_Arg : Ocarina.Dia.Parser.Core.Node_Type) return Ocarina.Entities.Components.Component_Category; -- returns the Component_Category associated with the Node_Type -------------------- -- Get_Identifier -- -------------------- function Get_Identifier (Entity : Node_Id; Name : Name_Id) return Node_Id; -- returns an identifier end Ocarina.Dia.Parser.Translate;