Annotation of OpenXM_contrib/PHC/Ada/Math_Lib/Supports/generic_arrays_of_vector_lists_io.adb, Revision 1.1.1.1
1.1 maekawa 1: with integer_io; use integer_io;
2: with Standard_Natural_Vectors_io; use Standard_Natural_Vectors_io;
3:
4: package body Generic_Arrays_of_Vector_Lists_io is
5:
6: use Lists_io;
7:
8: procedure get ( al : in out Link_to_Array_of_Lists ) is
9: begin
10: get(Standard_Input,al);
11: end get;
12:
13: procedure get ( n : in natural; m : in Standard_Natural_Vectors.Vector;
14: al : out Array_of_Lists ) is
15: begin
16: get(Standard_Input,n,m,al);
17: end get;
18:
19: procedure get ( file : in file_type; al : in out Link_to_Array_of_Lists ) is
20:
21: n : natural;
22:
23: begin
24: get(file,n);
25: al := new Array_of_Lists(1..n);
26: declare
27: m : Standard_Natural_Vectors.Vector(1..n) := (1..n => 0);
28: begin
29: get(file,m);
30: get(file,n,m,al.all);
31: end;
32: end get;
33:
34: procedure get ( file : in file_type;
35: n : in natural; m : in Standard_Natural_Vectors.Vector;
36: al : out Array_of_Lists ) is
37: begin
38: for i in al'range loop
39: get(file,n,m(i),al(i));
40: end loop;
41: end get;
42:
43: procedure put ( al : in Array_of_Lists ) is
44: begin
45: put(Standard_Output,al);
46: end put;
47:
48: procedure put ( file : in file_type; al : in Array_of_Lists ) is
49: begin
50: for i in al'range loop
51: put(file,al(i)); new_line(file);
52: end loop;
53: end put;
54:
55: end Generic_Arrays_of_Vector_Lists_io;
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>