ocarina-me_aadl-printers.adb 2.94 KB
Newer Older
1
2
3
4
5
6
7
8
------------------------------------------------------------------------------
--                                                                          --
--                           OCARINA COMPONENTS                             --
--                                                                          --
--             O C A R I N A . M E _ A A D L . P R I N T E R S              --
--                                                                          --
--                                 B o d y                                  --
--                                                                          --
yoogx's avatar
yoogx committed
9
--    Copyright (C) 2005-2009 Telecom ParisTech, 2010-2016 ESA & ISAE.      --
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
--                                                                          --
-- Ocarina  is free software; you can redistribute it and/or modify under   --
-- terms of the  GNU General Public License as published  by the Free Soft- --
-- ware  Foundation;  either version 3,  or (at your option) any later ver- --
-- sion. 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.                     --
--                                                                          --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception,   --
-- version 3.1, as published by the Free Software Foundation.               --
--                                                                          --
-- You should have received a copy of the GNU General Public License and    --
-- a copy of the GCC Runtime Library Exception along with this program;     --
-- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
-- <http://www.gnu.org/licenses/>.                                          --
26
--                                                                          --
jhugues's avatar
jhugues committed
27
28
--                 Ocarina is maintained by the TASTE project               --
--                      (taste-users@lists.tuxfamily.org)                   --
29
30
31
--                                                                          --
------------------------------------------------------------------------------

yoogx's avatar
yoogx committed
32
with GNAT.OS_Lib;             use GNAT.OS_Lib;
33

yoogx's avatar
yoogx committed
34
with Ocarina.Output;          use Ocarina.Output;
yoogx's avatar
yoogx committed
35
36
with Ocarina.Options;         use Ocarina.Options;
with Outfiles;                use Outfiles;
37
38
39
40
41
42
43
44

package body Ocarina.ME_AADL.Printers is

   ---------------------
   -- Print_AADL_Tree --
   ---------------------

   procedure Print_AADL_Tree (Node : Node_Id; W : W_Node_Spg) is
yoogx's avatar
yoogx committed
45
      Fd : File_Descriptor;
46
47
   begin
      if Output_Filename /= No_Name then
yoogx's avatar
yoogx committed
48
         Fd := Set_Output (Output_Filename);
49
50
51
      end if;
      W.all (Node);
      Set_Standard_Output;
yoogx's avatar
yoogx committed
52
      Release_Output (Fd);
53
54
55
   end Print_AADL_Tree;

end Ocarina.ME_AADL.Printers;