1
-------------------------------------------------------------------------------
3
-- This unit is part of the @Asis2@ ASIS secondary library.
5
-- <STRONG>Copyright (c) 2002, 2003 by Thomas Wolf.</STRONG>
7
-- AdaBrowse is free software; you can redistribute it and/or modify it
8
-- under the terms of the GNU General Public License as published by the
9
-- Free Software Foundation; either version 2, or (at your option) any
10
-- later version. AdaBrowse is distributed in the hope that it will be
11
-- useful, but <EM>without any warranty</EM>; without even the implied
12
-- warranty of <EM>merchantability or fitness for a particular purpose.</EM>
13
-- See the GNU General Public License for more details. You should have
14
-- received a copy of the GNU General Public License with this distribution,
15
-- see file "<A HREF="GPL.txt">GPL.txt</A>". If not, write to the Free
16
-- Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
20
-- As a special exception from the GPL, if other files instantiate generics
21
-- from this unit, or you link this unit with other files to produce an
22
-- executable, this unit does not by itself cause the resulting executable
23
-- to be covered by the GPL. This exception does not however invalidate any
24
-- other reasons why the executable file might be covered by the GPL.
28
-- Thomas Wolf (TW) <E_MAIL>
32
-- Utility routines for container elements, i.e. packages and task or
33
-- protected declarations or definitions.
37
-- 04-JUN-2003 TW First release as part of @AdaBrowse@.
38
-- 18-JUL-2003 TW Created from operations in @AD.Queries@.
40
-------------------------------------------------------------------------------
42
pragma License (Modified_GPL);
46
package Asis2.Container_Elements is
48
pragma Elaborate_Body;
51
(Element : in Asis.Element)
53
-- Returns @True@ if @Element@ has an explicit private part. This is a
54
-- wrapper around @Asis.Declarations.Is_Private_Present@ and
55
-- @Asis.Definitions.Is_Private_Present@. Returns @False@ if no explicit
56
-- @private@ keyword is present, or the @Element@ isn't appropriate.
58
-- Appropriate elements:
60
-- Declaration_Kinds :
61
-- A_Package_Declaration
62
-- A_Generic_Package_Declaration
63
-- A_Task_Type_Declaration
64
-- A_Single_Task_Declaration
65
-- A_Protected_Type_Declaration
66
-- A_Single_Protected_Declaration
70
-- A_Protected_Definition
72
function Visible_Items
73
(Element : in Asis.Element;
74
Include_Pragmas : in Boolean := False)
75
return Asis.Declarative_Item_List;
76
-- Returns the list of items declared in the visible part of a (generic)
77
-- package, task (type), or protected type or object. This is a wrapper
78
-- around @Asis.Declarations.Visible_Part_Declarative_Items@ and
79
-- @Asis.Definitions.Visible_Part_Items@.
81
-- Appropriate elements:
83
-- Declaration_Kinds :
84
-- A_Package_Declaration
85
-- A_Generic_Package_Declaration
86
-- A_Task_Type_Declaration
87
-- A_Single_Task_Declaration
88
-- A_Protected_Type_Declaration
89
-- A_Single_Protected_Declaration
93
-- A_Protected_Definition
95
function Private_Items
96
(Element : in Asis.Element;
97
Include_Pragmas : in Boolean := False)
98
return Asis.Declarative_Item_List;
99
-- Returns the list of items declared in the private part of a (generic)
100
-- package, task (type), or protected type or object. This is a wrapper
101
-- around @Asis.Declarations.Private_Part_Declarative_Items@ and
102
-- @Asis.Definitions.Private_Part_Items@.
104
-- Appropriate elements:
106
-- Declaration_Kinds :
107
-- A_Package_Declaration
108
-- A_Generic_Package_Declaration
109
-- A_Task_Type_Declaration
110
-- A_Single_Task_Declaration
111
-- A_Protected_Type_Declaration
112
-- A_Single_Protected_Declaration
114
-- Definition_Kinds :
116
-- A_Protected_Definition
118
end Asis2.Container_Elements;