--------------------------------------------------- ----------------------------- -- -- -- OCARINA COMPONENTS -- -- -- -- O C A R I N A . E X P A N D E R . M E S S A G E S -- -- -- -- B o d y -- -- -- -- 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) -- -- -- ------------------------------------------------------------------------------ with Output; with Locations; with Ocarina.Nodes; with Ocarina.Entities; package body Ocarina.Expander.Messages is use Output; use Locations; use Ocarina.Nodes; use Ocarina.Entities; ------------------------------------- -- Display_Multiple_Instance_Roots -- ------------------------------------- procedure Display_Multiple_Instance_Roots (Root_List : Entity_List) is pragma Assert (Present (Root_List.First_Entity) and then Present (Root_List.Last_Entity)); List_Node : Node_Id; begin Set_Standard_Error; Write_Line ("The AADL model contains several root" & " systems implementations:"); List_Node := Root_List.First_Entity; while Present (List_Node) loop Write_Str (Image (Loc (List_Node))); Write_Str (": "); Write_Line (Get_Name_Of_Entity (List_Node)); List_Node := Next_Entity (List_Node); end loop; Set_Standard_Output; end Display_Multiple_Instance_Roots; ------------------------------ -- Display_No_Instance_Root -- ------------------------------ procedure Display_No_Instance_Root is begin Set_Standard_Error; Write_Line ("The AADL model contains no root system implementation"); Set_Standard_Output; end Display_No_Instance_Root; --------------------------- -- Display_No_Entity_Ref -- --------------------------- procedure Display_No_Entity_Ref (Node : Node_Id) is pragma Assert (Present (Node)); begin Set_Standard_Error; Write_Str (Image (Loc (Node))); Write_Str (Get_Name_Of_Entity (Node)); Write_Line (" is not associated with any entity"); Set_Standard_Output; end Display_No_Entity_Ref; ---------------------------------------- -- Display_Entity_Is_A_Component_Type -- ---------------------------------------- procedure Display_Entity_Is_A_Component_Type (Node : Node_Id) is pragma Assert (Present (Node)); begin Set_Standard_Error; Write_Str (Image (Loc (Node))); Write_Str (" Warning: "); Write_Str (Get_Name_Of_Entity (Node)); Write_Line (" references a component type"); Set_Standard_Output; end Display_Entity_Is_A_Component_Type; ----------------------------- -- Display_Expansion_Error -- ----------------------------- procedure Display_Expansion_Error (Node : Node_Id) is begin Set_Standard_Error; Write_Str (Image (Loc (Node))); Write_Str (": "); Write_Str (Get_Name_Of_Entity (Node)); Write_Line (" could not be properly expanded"); Set_Standard_Output; end Display_Expansion_Error; end Ocarina.Expander.Messages;