5f2e0b61fdf82f3d626622d3aef7bcb9022615f0
[nit.git] / c_src / stream._nitni.h
1 #include <nit_common.h>
2 #include "standard___stream._sep.h"
3 #ifndef STREAM_NITNI_H
4 #define STREAM_NITNI_H
5
6 #ifndef FDSTREAM_TYPE
7 #define FDSTREAM_TYPE
8 struct s_FDStream{
9 struct nitni_ref ref; /* real ref struct, must be first */
10 };
11 typedef struct s_FDStream *FDStream;
12 #define FDStream_incr_ref( x ) nitni_global_ref_incr( (struct nitni_ref*)(x) )
13 #define FDStream_decr_ref( x ) nitni_global_ref_decr( (struct nitni_ref*)(x) )
14 #endif
15 #ifndef OBJECT_TYPE
16 #define OBJECT_TYPE
17 struct s_Object{
18 struct nitni_ref ref; /* real ref struct, must be first */
19 };
20 typedef struct s_Object *Object;
21 #define Object_incr_ref( x ) nitni_global_ref_incr( (struct nitni_ref*)(x) )
22 #define Object_decr_ref( x ) nitni_global_ref_decr( (struct nitni_ref*)(x) )
23 #endif
24 #ifndef ARRAY_TYPE
25 #define ARRAY_TYPE
26 struct s_Array{
27 struct nitni_ref ref; /* real ref struct, must be first */
28 };
29 typedef struct s_Array *Array;
30 #define Array_incr_ref( x ) nitni_global_ref_incr( (struct nitni_ref*)(x) )
31 #define Array_decr_ref( x ) nitni_global_ref_decr( (struct nitni_ref*)(x) )
32 #endif
33 #ifndef NULLABLE_INT_TYPE
34 #define NULLABLE_INT_TYPE
35 struct s_nullable_Int{
36 struct nitni_ref ref; /* real ref struct, must be first */
37 };
38 typedef struct s_nullable_Int *nullable_Int;
39 #ifndef null_Int
40 #define null_Int stream_null_Int
41 #endif
42 nullable_Int stream_null_Int();
43 #define Int_incr_ref( x ) nitni_global_ref_incr( (struct nitni_ref*)(x) )
44 #define Int_decr_ref( x ) nitni_global_ref_decr( (struct nitni_ref*)(x) )
45 #endif
46 #ifndef ARRAY_TYPE
47 #define ARRAY_TYPE
48 struct s_Array{
49 struct nitni_ref ref; /* real ref struct, must be first */
50 };
51 typedef struct s_Array *Array;
52 #define Array_incr_ref( x ) nitni_global_ref_incr( (struct nitni_ref*)(x) )
53 #define Array_decr_ref( x ) nitni_global_ref_decr( (struct nitni_ref*)(x) )
54 #endif
55 #ifndef NULLABLE_OBJECT_TYPE
56 #define NULLABLE_OBJECT_TYPE
57 struct s_nullable_Object{
58 struct nitni_ref ref; /* real ref struct, must be first */
59 };
60 typedef struct s_nullable_Object *nullable_Object;
61 #ifndef null_Object
62 #define null_Object stream_null_Object
63 #endif
64 nullable_Object stream_null_Object();
65 #define Object_incr_ref( x ) nitni_global_ref_incr( (struct nitni_ref*)(x) )
66 #define Object_decr_ref( x ) nitni_global_ref_decr( (struct nitni_ref*)(x) )
67 #endif
68 #include "stream_nit.h"
69
70 /* out/indirect function for stream::FDStream::native_close */
71 val_t FDStream_native_close___out( val_t recv, val_t i );
72
73 /* out/indirect function for stream::FDStream::native_read_char */
74 val_t FDStream_native_read_char___out( val_t recv, val_t i );
75
76 /* out/indirect function for stream::FDStream::native_read */
77 val_t FDStream_native_read___out( val_t recv, val_t i, val_t buf, val_t len );
78
79 /* out/indirect function for stream::FDStream::native_write */
80 val_t FDStream_native_write___out( val_t recv, val_t i, val_t buf, val_t len );
81
82 /* out/indirect function for stream::Object::intern_poll */
83 val_t Object_intern_poll___out( val_t recv, val_t in_fds, val_t out_fds );
84 #endif
85 /* friendly for array::AbstractArrayRead::(abstract_collection::Collection::length) */
86 bigint stream_Array_length( Array recv );
87 #ifndef Array_length
88 #define Array_length stream_Array_length
89 #endif
90 /* friendly for array::Array::(abstract_collection::SequenceRead::[]) */
91 nullable_Object stream_Array__index( Array recv, bigint index );
92 #ifndef Array__index
93 #define Array__index stream_Array__index
94 #endif
95
96 /* Type check for nullable Object with Int */
97 int stream_nullable_Object_is_a_Int( nullable_Object value );
98 #ifndef nullable_Object_is_a_Int
99 #define nullable_Object_is_a_Int stream_nullable_Object_is_a_Int
100 #endif
101
102 /* Cast for nullable Object to Int */
103 bigint stream_nullable_Object_as_Int( nullable_Object value );
104 #ifndef nullable_Object_as_Int
105 #define nullable_Object_as_Int stream_nullable_Object_as_Int
106 #endif
107
108 /* Cast for Int to nullable Int */
109 nullable_Int stream_Int_as_nullable( bigint value );
110 #ifndef Int_as_nullable
111 #define Int_as_nullable stream_Int_as_nullable
112 #endif