Delete all lines containing "$Revision:".
[gcc.git] / gcc / ada / exp_strm.ads
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- E X P _ S T R M --
6 -- --
7 -- S p e c --
8 -- --
9 -- --
10 -- Copyright (C) 1992-1999 Free Software Foundation, Inc. --
11 -- --
12 -- GNAT is free software; you can redistribute it and/or modify it under --
13 -- terms of the GNU General Public License as published by the Free Soft- --
14 -- ware Foundation; either version 2, or (at your option) any later ver- --
15 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
16 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
17 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
18 -- for more details. You should have received a copy of the GNU General --
19 -- Public License distributed with GNAT; see file COPYING. If not, write --
20 -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
21 -- MA 02111-1307, USA. --
22 -- --
23 -- GNAT was originally developed by the GNAT team at New York University. --
24 -- It is now maintained by Ada Core Technologies Inc (http://www.gnat.com). --
25 -- --
26 ------------------------------------------------------------------------------
27
28 -- Routines to build stream subprograms for composite types
29
30 with Types; use Types;
31
32 package Exp_Strm is
33
34 function Build_Elementary_Input_Call (N : Node_Id) return Node_Id;
35 -- Build call to Read attribute function for elementary type. Also used
36 -- for Input attributes for elementary types with an appropriate extra
37 -- assignment statement. N is the attribute reference node.
38
39 function Build_Elementary_Write_Call (N : Node_Id) return Node_Id;
40 -- Build call to Write attribute function for elementary type. Also used
41 -- for Output attributes for elementary types (since the effect of the
42 -- two attributes is identical for elementary types). N is the attribute
43 -- reference node.
44
45 function Build_Stream_Attr_Profile
46 (Loc : Source_Ptr;
47 Typ : Entity_Id;
48 Nam : Name_Id)
49 return List_Id;
50 -- Builds the parameter profile for the stream attribute identified by
51 -- the given name (which is the underscore version, e.g. Name_uWrite to
52 -- identify the Write attribute). This is used for the tagged case to
53 -- build the spec for the primitive operation.
54
55 -- The following routines build procedures and functions for stream
56 -- attributes applied to composite types. For each of these routines,
57 -- Loc is used to provide the location for the constructed subprogram
58 -- declaration. Typ is the base type to which the subprogram applies
59 -- (i.e. the base type of the stream attribute prefix). The returned
60 -- results are the declaration and name (entity) of the subprogram.
61
62 procedure Build_Array_Input_Function
63 (Loc : Source_Ptr;
64 Typ : Entity_Id;
65 Decl : out Node_Id;
66 Fnam : out Entity_Id);
67 -- Build function for Input attribute for array type
68
69 procedure Build_Array_Output_Procedure
70 (Loc : Source_Ptr;
71 Typ : Entity_Id;
72 Decl : out Node_Id;
73 Pnam : out Entity_Id);
74 -- Build procedure for Output attribute for array type
75
76 procedure Build_Array_Read_Procedure
77 (Nod : Node_Id;
78 Typ : Entity_Id;
79 Decl : out Node_Id;
80 Pnam : out Entity_Id);
81 -- Build procedure for Read attribute for array type. Nod provides the
82 -- Sloc value for generated code.
83
84 procedure Build_Array_Write_Procedure
85 (Nod : Node_Id;
86 Typ : Entity_Id;
87 Decl : out Node_Id;
88 Pnam : out Entity_Id);
89 -- Build procedure for Write attribute for array type. Nod provides the
90 -- Sloc value for generated code.
91
92 procedure Build_Mutable_Record_Read_Procedure
93 (Loc : Source_Ptr;
94 Typ : Entity_Id;
95 Decl : out Node_Id;
96 Pnam : out Entity_Id);
97 -- Build procedure to Read a record with default discriminants.
98 -- Discriminants must be read explicitly (RM 13.13.2(9)) in the
99 -- same manner as is done for 'Input.
100
101 procedure Build_Mutable_Record_Write_Procedure
102 (Loc : Source_Ptr;
103 Typ : Entity_Id;
104 Decl : out Node_Id;
105 Pnam : out Entity_Id);
106 -- Build procedure to write a record with default discriminants.
107 -- Discriminants must be written explicitly (RM 13.13.2(9)) in
108 -- the same manner as is done for 'Output.
109
110 procedure Build_Record_Or_Elementary_Input_Function
111 (Loc : Source_Ptr;
112 Typ : Entity_Id;
113 Decl : out Node_Id;
114 Fnam : out Entity_Id);
115 -- Build function for Input attribute for record type or for an
116 -- elementary type (the latter is used only in the case where a
117 -- user defined Read routine is defined, since in other cases,
118 -- Input calls the appropriate runtime library routine directly.
119
120 procedure Build_Record_Or_Elementary_Output_Procedure
121 (Loc : Source_Ptr;
122 Typ : Entity_Id;
123 Decl : out Node_Id;
124 Pnam : out Entity_Id);
125 -- Build procedure for Output attribute for record type or for an
126 -- elementary type (the latter is used only in the case where a
127 -- user defined Write routine is defined, since in other cases,
128 -- Output calls the appropriate runtime library routine directly.
129
130 procedure Build_Record_Read_Procedure
131 (Loc : Source_Ptr;
132 Typ : Entity_Id;
133 Decl : out Node_Id;
134 Pnam : out Entity_Id);
135 -- Build procedure for Read attribute for record type
136
137 procedure Build_Record_Write_Procedure
138 (Loc : Source_Ptr;
139 Typ : Entity_Id;
140 Decl : out Node_Id;
141 Pnam : out Entity_Id);
142 -- Build procedure for Write attribute for record type
143
144 end Exp_Strm;