OSDN Git Service

2008-08-22 Robert Dewar <dewar@adacore.com>
[pf3gnuchains/gcc-fork.git] / gcc / ada / s-ststop.ads
1 ------------------------------------------------------------------------------
2 --                                                                          --
3 --                 GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS                 --
4 --                                                                          --
5 --              S Y S T E M . S T R I N G S . S T R E A M _ O P S           --
6 --                                                                          --
7 --                                 S p e c                                  --
8 --                                                                          --
9 --             Copyright (C) 2008, Free Software Foundation, Inc.           --
10 --                                                                          --
11 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
12 -- terms of the  GNU General Public License as published  by the Free Soft- --
13 -- ware  Foundation;  either version 2,  or (at your option) any later ver- --
14 -- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
17 -- for  more details.  You should have  received  a copy of the GNU General --
18 -- Public License  distributed with GNAT;  see file COPYING.  If not, write --
19 -- to  the  Free Software Foundation,  51  Franklin  Street,  Fifth  Floor, --
20 -- Boston, MA 02110-1301, USA.                                              --
21 --                                                                          --
22 -- As a special exception,  if other files  instantiate  generics from this --
23 -- unit, or you link  this unit with other files  to produce an executable, --
24 -- this  unit  does not  by itself cause  the resulting  executable  to  be --
25 -- covered  by the  GNU  General  Public  License.  This exception does not --
26 -- however invalidate  any other reasons why  the executable file  might be --
27 -- covered by the  GNU Public License.                                      --
28 --                                                                          --
29 -- GNAT was originally developed  by the GNAT team at  New York University. --
30 -- Extensive contributions were provided by Ada Core Technologies Inc.      --
31 --                                                                          --
32 ------------------------------------------------------------------------------
33
34 --  This package provides subprogram implementations of stream attributes for
35 --  the following types:
36 --     Ada.String
37 --     Ada.Wide_String
38 --     Ada.Wide_Wide_String
39 --
40 --  The compiler will generate references to the subprograms in this package
41 --  when expanding stream attributes for the above mentioned types. Example:
42 --
43 --     String'Output (Some_Stream, Some_String);
44 --
45 --  will be expanded into:
46 --
47 --     String_Output (Some_Stream, Some_String);
48 --       or
49 --     String_Output_Blk_IO (Some_Stream, Some_String);
50
51 pragma Warnings (Off);
52 pragma Compiler_Unit;
53 pragma Warnings (On);
54
55 with Ada.Streams;
56
57 package System.Strings.Stream_Ops is
58
59    ------------------------------
60    -- String stream operations --
61    ------------------------------
62
63    function String_Input
64      (Strm : access Ada.Streams.Root_Stream_Type'Class)
65       return String;
66
67    function String_Input_Blk_IO
68      (Strm : access Ada.Streams.Root_Stream_Type'Class)
69       return String;
70
71    procedure String_Output
72      (Strm : access Ada.Streams.Root_Stream_Type'Class;
73       Item : String);
74
75    procedure String_Output_Blk_IO
76      (Strm : access Ada.Streams.Root_Stream_Type'Class;
77       Item : String);
78
79    procedure String_Read
80      (Strm : access Ada.Streams.Root_Stream_Type'Class;
81       Item : out String);
82
83    procedure String_Read_Blk_IO
84      (Strm : access Ada.Streams.Root_Stream_Type'Class;
85       Item : out String);
86
87    procedure String_Write
88      (Strm : access Ada.Streams.Root_Stream_Type'Class;
89       Item : String);
90
91    procedure String_Write_Blk_IO
92      (Strm : access Ada.Streams.Root_Stream_Type'Class;
93       Item : String);
94
95    -----------------------------------
96    -- Wide_String stream operations --
97    -----------------------------------
98
99    function Wide_String_Input
100      (Strm : access Ada.Streams.Root_Stream_Type'Class)
101       return Wide_String;
102
103    function Wide_String_Input_Blk_IO
104      (Strm : access Ada.Streams.Root_Stream_Type'Class)
105       return Wide_String;
106
107    procedure Wide_String_Output
108      (Strm : access Ada.Streams.Root_Stream_Type'Class;
109       Item : Wide_String);
110
111    procedure Wide_String_Output_Blk_IO
112      (Strm : access Ada.Streams.Root_Stream_Type'Class;
113       Item : Wide_String);
114
115    procedure Wide_String_Read
116      (Strm : access Ada.Streams.Root_Stream_Type'Class;
117       Item : out Wide_String);
118
119    procedure Wide_String_Read_Blk_IO
120      (Strm : access Ada.Streams.Root_Stream_Type'Class;
121       Item : out Wide_String);
122
123    procedure Wide_String_Write
124      (Strm : access Ada.Streams.Root_Stream_Type'Class;
125       Item : Wide_String);
126
127    procedure Wide_String_Write_Blk_IO
128      (Strm : access Ada.Streams.Root_Stream_Type'Class;
129       Item : Wide_String);
130
131    ----------------------------------------
132    -- Wide_Wide_String stream operations --
133    ----------------------------------------
134
135    function Wide_Wide_String_Input
136      (Strm : access Ada.Streams.Root_Stream_Type'Class)
137       return Wide_Wide_String;
138
139    function Wide_Wide_String_Input_Blk_IO
140      (Strm : access Ada.Streams.Root_Stream_Type'Class)
141       return Wide_Wide_String;
142
143    procedure Wide_Wide_String_Output
144      (Strm : access Ada.Streams.Root_Stream_Type'Class;
145       Item : Wide_Wide_String);
146
147    procedure Wide_Wide_String_Output_Blk_IO
148      (Strm : access Ada.Streams.Root_Stream_Type'Class;
149       Item : Wide_Wide_String);
150
151    procedure Wide_Wide_String_Read
152      (Strm : access Ada.Streams.Root_Stream_Type'Class;
153       Item : out Wide_Wide_String);
154
155    procedure Wide_Wide_String_Read_Blk_IO
156      (Strm : access Ada.Streams.Root_Stream_Type'Class;
157       Item : out Wide_Wide_String);
158
159    procedure Wide_Wide_String_Write
160      (Strm : access Ada.Streams.Root_Stream_Type'Class;
161       Item : Wide_Wide_String);
162
163    procedure Wide_Wide_String_Write_Blk_IO
164      (Strm : access Ada.Streams.Root_Stream_Type'Class;
165       Item : Wide_Wide_String);
166
167 end System.Strings.Stream_Ops;