1
------------------------------------------------------------------------------
2
--                                                                          --
3
--                           OCARINA COMPONENTS                             --
4
--                                                                          --
5
--                  OCARINA.BE_AADL.COMPONENTS.PROTOTYPES                   --
6
--                                                                          --
7
--                                 B o d y                                  --
8
--                                                                          --
9
--               Copyright (C) 2008-2009 Telecom ParisTech,                 --
10
--                 2010-2019 ESA & ISAE, 2019-2020 OpenAADL                 --
11
--                                                                          --
12
-- Ocarina  is free software; you can redistribute it and/or modify under   --
13
-- terms of the  GNU General Public License as published  by the Free Soft- --
14
-- ware  Foundation;  either version 3,  or (at your option) any later ver- --
15
-- sion. Ocarina is distributed in the hope that it will be useful, but     --
16
-- WITHOUT ANY WARRANTY; without even the implied warranty of               --
17
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                     --
18
--                                                                          --
19
-- As a special exception under Section 7 of GPL version 3, you are granted --
20
-- additional permissions described in the GCC Runtime Library Exception,   --
21
-- version 3.1, as published by the Free Software Foundation.               --
22
--                                                                          --
23
-- You should have received a copy of the GNU General Public License and    --
24
-- a copy of the GCC Runtime Library Exception along with this program;     --
25
-- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
26
-- <http://www.gnu.org/licenses/>.                                          --
27
--                                                                          --
28
--                    Ocarina is maintained by OpenAADL team                --
29
--                              (info@openaadl.org)                         --
30
--                                                                          --
31
------------------------------------------------------------------------------
32

33
with Ocarina.Output;
34

35
with Ocarina.ME_AADL.AADL_Tree.Nodes;
36
with Ocarina.BE_AADL.Identifiers;
37

38
package body Ocarina.BE_AADL.Components.Prototypes is
39

40
   use Ocarina.Output;
41
   use Ocarina.ME_AADL.AADL_Tree.Nodes;
42
   use Ocarina.BE_AADL.Identifiers;
43

44
   ---------------------
45
   -- Print_Prototype --
46
   ---------------------
47

48 1
   procedure Print_Prototype (Node : Node_Id) is
49
      pragma Assert (Kind (Node) = K_Prototype);
50 1
      Class_Ref : constant Node_Id := Entity_Ref (Node);
51

52
   begin
53 1
      Write_Indentation;
54 1
      Print_Item_Refined_To (Node);
55 1
      Write_Space;
56 1
      Print_Component_Category (Category (Node));
57

58 1
      if Present (Class_Ref) then
59 1
         Write_Space;
60 1
         Print_Entity_Reference (Class_Ref);
61
      end if;
62

63 1
      Print_Token (T_Semicolon);
64 1
      Write_Eol;
65 1
   end Print_Prototype;
66

67
   ------------------------------
68
   -- Print_Prototype_Bindings --
69
   ------------------------------
70

71 1
   procedure Print_Prototype_Bindings (Node : Node_Id) is
72
      pragma Assert (Kind (Node) = K_Binding_Prototype);
73 1
      Class_Ref : constant Node_Id := Entity_Ref (Node);
74

75
   begin
76 1
      Print_Identifier (Identifier (Node));
77 1
      Write_Space;
78 1
      Print_Token (T_Association);
79 1
      Write_Space;
80 1
      Print_Component_Category (Category (Node));
81

82 1
      if Present (Class_Ref) then
83 1
         Write_Space;
84 1
         Print_Entity_Reference (Class_Ref);
85
      end if;
86

87 1
   end Print_Prototype_Bindings;
88

89
end Ocarina.BE_AADL.Components.Prototypes;

Read our documentation on viewing source code .

Loading