1 ------------------------------------------------------------------------------
3 -- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
5 -- S Y S T E M . S T R I N G S . S T R E A M _ O P S --
9 -- Copyright (C) 2009, Free Software Foundation, Inc. --
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 3, 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. --
18 -- As a special exception under Section 7 of GPL version 3, you are granted --
19 -- additional permissions described in the GCC Runtime Library Exception, --
20 -- version 3.1, as published by the Free Software Foundation. --
22 -- You should have received a copy of the GNU General Public License and --
23 -- a copy of the GCC Runtime Library Exception along with this program; --
24 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
25 -- <http://www.gnu.org/licenses/>. --
27 -- GNAT was originally developed by the GNAT team at New York University. --
28 -- Extensive contributions were provided by Ada Core Technologies Inc. --
30 ------------------------------------------------------------------------------
32 -- This package provides subprogram implementations of stream attributes for
33 -- the following types:
36 -- Ada.Wide_Wide_String
38 -- The compiler will generate references to the subprograms in this package
39 -- when expanding stream attributes for the above mentioned types. Example:
41 -- String'Output (Some_Stream, Some_String);
43 -- will be expanded into:
45 -- String_Output (Some_Stream, Some_String);
47 -- String_Output_Blk_IO (Some_Stream, Some_String);
53 package System
.Strings
.Stream_Ops
is
55 ------------------------------
56 -- String stream operations --
57 ------------------------------
60 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class)
63 function String_Input_Blk_IO
64 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class)
67 procedure String_Output
68 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class;
71 procedure String_Output_Blk_IO
72 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class;
76 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class;
79 procedure String_Read_Blk_IO
80 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class;
83 procedure String_Write
84 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class;
87 procedure String_Write_Blk_IO
88 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class;
91 -----------------------------------
92 -- Wide_String stream operations --
93 -----------------------------------
95 function Wide_String_Input
96 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class)
99 function Wide_String_Input_Blk_IO
100 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class)
103 procedure Wide_String_Output
104 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class;
107 procedure Wide_String_Output_Blk_IO
108 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class;
111 procedure Wide_String_Read
112 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class;
113 Item
: out Wide_String);
115 procedure Wide_String_Read_Blk_IO
116 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class;
117 Item
: out Wide_String);
119 procedure Wide_String_Write
120 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class;
123 procedure Wide_String_Write_Blk_IO
124 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class;
127 ----------------------------------------
128 -- Wide_Wide_String stream operations --
129 ----------------------------------------
131 function Wide_Wide_String_Input
132 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class)
133 return Wide_Wide_String
;
135 function Wide_Wide_String_Input_Blk_IO
136 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class)
137 return Wide_Wide_String
;
139 procedure Wide_Wide_String_Output
140 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class;
141 Item
: Wide_Wide_String
);
143 procedure Wide_Wide_String_Output_Blk_IO
144 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class;
145 Item
: Wide_Wide_String
);
147 procedure Wide_Wide_String_Read
148 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class;
149 Item
: out Wide_Wide_String
);
151 procedure Wide_Wide_String_Read_Blk_IO
152 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class;
153 Item
: out Wide_Wide_String
);
155 procedure Wide_Wide_String_Write
156 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class;
157 Item
: Wide_Wide_String
);
159 procedure Wide_Wide_String_Write_Blk_IO
160 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class;
161 Item
: Wide_Wide_String
);
163 end System
.Strings
.Stream_Ops
;