---------------------------------- ---------------------------------------------- -- -- -- OCARINA COMPONENTS -- -- -- -- G A I A . P R O C E S S O R . M E S S A G E S -- -- -- -- B o d y -- -- -- -- 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 Namet; with Output; with Locations; with Ocarina.Debug; with Ocarina.Entities; with Ocarina.Entities.Components; with Ocarina.Entities.Properties; package body Gaia.Processor.Messages is ------------------------------- -- Display_Wrong_Entity_Kind -- ------------------------------- procedure Display_Wrong_Entity_Kind (Entity : Node_Id; Expected_Kind : Ocarina.Nodes.Node_Kind) is use Ocarina.Nodes; use Output; use Locations; use Ocarina.Debug; use Ocarina.Entities; pragma Assert (Entity /= No_Node); begin Set_Standard_Error; Write_Str (Image (Loc (Entity))); Write_Str (": "); Write_Str (Get_Name_Of_Entity (Entity)); Write_Str (" is of kind "); Write_Str (Image (Kind (Entity))); Write_Str (" while "); Write_Str (Image (Expected_Kind)); Write_Str (" is expected."); Set_Standard_Output; end Display_Wrong_Entity_Kind; -------------------------------------- -- Display_Wrong_Component_Category -- -------------------------------------- procedure Display_Wrong_Component_Category (Component : Node_Id) is use Ocarina.Nodes; use Output; use Locations; use Ocarina.Debug; use Ocarina.Entities; use Ocarina.Entities.Components; pragma Assert (Component /= No_Node and then Kind (Component) = K_Component_Instance); begin Set_Standard_Error; Write_Str (Image (Loc (Component))); Write_Str (": "); Write_Str (Get_Name_Of_Entity (Component)); Write_Str (" is of an incorrect category: "); Write_Str (Component_Category'Image (Component_Category'Val (Category (Component)))); Set_Standard_Output; end Display_Wrong_Component_Category; ------------------------------- -- Display_Unknown_Data_Type -- ------------------------------- procedure Display_Unknown_Data_Type (Data_Type_Name : Name_Id) is use Output; use Namet; begin Set_Standard_Error; Write_Str ("Warning: "); if Data_Type_Name /= No_Name then Write_Str (Get_Name_String (Data_Type_Name)); else Write_Str (""); end if; Write_Line (" is not a known predefined data type"); Set_Standard_Output; end Display_Unknown_Data_Type; --------------------------------- -- Display_Wrong_Property_Type -- --------------------------------- procedure Display_Wrong_Property_Type (Property : Node_Id) is use Output; use Ocarina.Debug; use Locations; use Ocarina.Nodes; use Ocarina.Entities; use Ocarina.Entities.Properties; begin Set_Standard_Error; Write_Str (Image (Loc (Property))); Write_Str (": "); Write_Str (Get_Name_Of_Entity (Property)); Write_Str (" is of an unexpected type: "); Write_Line (Property_Type'Image (Get_Type_Of_Property (Property))); Set_Standard_Output; end Display_Wrong_Property_Type; --------------------- -- Display_Message -- --------------------- procedure Display_Message (Msg : String) is use Output; begin Set_Standard_Error; Write_Line (Msg); Set_Standard_Output; end Display_Message; ---------------------------- -- Display_No_Port_Number -- ---------------------------- procedure Display_No_Port_Number (Process : Node_Id) is use Locations; use Ocarina.Entities; use Ocarina.Nodes; use Output; begin Set_Standard_Error; Write_Str (Image (Loc (Process))); Write_Str (": "); Write_Str (Get_Name_Of_Entity (Process)); Write_Line (" has no property port_number"); Set_Standard_Output; end Display_No_Port_Number; end Gaia.Processor.Messages;