----------------------------------------------- --------------------------------- -- -- -- OCARINA COMPONENTS -- -- -- -- O C A R I N A . B U I L D E R . N A M E S P A C E S -- -- -- -- 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 Types; with Locations; package Ocarina.Builder.Namespaces is function Add_Declaration (Namespace : Types.Node_Id; Element : Types.Node_Id) return Boolean; -- Insert any component, property_set, package or port_group into -- the AADL specification. Namespace must reference the node -- created with Initialize_Unnamed_Namespace or a package -- specification. Return True if the element was correctly -- inserted, else False function Initialize_Unnamed_Namespace (Loc : Locations.Location) return Types.Node_Id; -- Create the AADL specification node, which corresponds to the -- top level of the AADL description. This function must be -- invoked first, as all the other elements of the description -- will be added to this one. Loc is the location of the AADL -- specification in the parsed text. Return a reference to the -- newly created node if everything went right, else False. function Add_New_Package (Loc : Locations.Location; Pack_Name : Types.Node_Id; Namespace : Types.Node_Id) return Types.Node_Id; -- Checks if a package of that name already exists. If so, return -- this one, else create a new one and return it. Loc is the -- location of the package specification in the parsed -- text. Pack_Name is a Node_Id referencing an identifier which -- contains the name of the package. Namespace must reference the -- top level AADL specification node. function Add_Property_Association (Pack : Types.Node_Id; Property_Association : Types.Node_Id) return Boolean; -- Add a property association to the list of the package -- properties, without checking for homonyms or whatever. This -- function should be only used by other functions of the core -- API. Namespace must reference a package specification. Return -- True if the property was added, else False. end Ocarina.Builder.Namespaces;