added swap files, tests results and Eclipse project file to git ignore
[nit.git] / c_src / file._nitni.h
1 #include <nit_common.h>
2 #include "standard___file._sep.h"
3 #ifndef FILE_NITNI_H
4 #define FILE_NITNI_H
5
6 #ifndef STDIN_TYPE
7 #define STDIN_TYPE
8 struct s_Stdin{
9 struct nitni_ref ref; /* real ref struct, must be first */
10 };
11 typedef struct s_Stdin *Stdin;
12 #define Stdin_incr_ref( x ) nitni_global_ref_incr( (struct nitni_ref*)(x) )
13 #define Stdin_decr_ref( x ) nitni_global_ref_decr( (struct nitni_ref*)(x) )
14 #endif
15 #ifndef STRING_TYPE
16 #define STRING_TYPE
17 struct s_String{
18 struct nitni_ref ref; /* real ref struct, must be first */
19 };
20 typedef struct s_String *String;
21 #define String_incr_ref( x ) nitni_global_ref_incr( (struct nitni_ref*)(x) )
22 #define String_decr_ref( x ) nitni_global_ref_decr( (struct nitni_ref*)(x) )
23 #endif
24 #ifndef SET_TYPE
25 #define SET_TYPE
26 struct s_Set{
27 struct nitni_ref ref; /* real ref struct, must be first */
28 };
29 typedef struct s_Set *Set;
30 #define Set_incr_ref( x ) nitni_global_ref_incr( (struct nitni_ref*)(x) )
31 #define Set_decr_ref( x ) nitni_global_ref_decr( (struct nitni_ref*)(x) )
32 #endif
33 #ifndef HASHSET_TYPE
34 #define HASHSET_TYPE
35 struct s_HashSet{
36 struct nitni_ref ref; /* real ref struct, must be first */
37 };
38 typedef struct s_HashSet *HashSet;
39 #define HashSet_incr_ref( x ) nitni_global_ref_incr( (struct nitni_ref*)(x) )
40 #define HashSet_decr_ref( x ) nitni_global_ref_decr( (struct nitni_ref*)(x) )
41 #endif
42 #ifndef OBJECT_TYPE
43 #define OBJECT_TYPE
44 struct s_Object{
45 struct nitni_ref ref; /* real ref struct, must be first */
46 };
47 typedef struct s_Object *Object;
48 #define Object_incr_ref( x ) nitni_global_ref_incr( (struct nitni_ref*)(x) )
49 #define Object_decr_ref( x ) nitni_global_ref_decr( (struct nitni_ref*)(x) )
50 #endif
51 #ifndef HASHSET_TYPE
52 #define HASHSET_TYPE
53 struct s_HashSet{
54 struct nitni_ref ref; /* real ref struct, must be first */
55 };
56 typedef struct s_HashSet *HashSet;
57 #define HashSet_incr_ref( x ) nitni_global_ref_incr( (struct nitni_ref*)(x) )
58 #define HashSet_decr_ref( x ) nitni_global_ref_decr( (struct nitni_ref*)(x) )
59 #endif
60 #include "file_nit.h"
61 #include <standard___file._ffi.h>
62
63 /* out/indirect function for file::Stdin::poll_in */
64 val_t Stdin_poll_in___out( val_t recv );
65
66 /* out/indirect function for file::String::files */
67 val_t String_files___out( val_t recv );
68
69 /* out/indirect function for file::NativeString::file_exists */
70 val_t NativeString_file_exists___out( val_t recv );
71
72 /* out/indirect function for file::NativeString::file_stat */
73 val_t NativeString_file_stat___out( val_t recv );
74
75 /* out/indirect function for file::NativeString::file_lstat */
76 val_t NativeString_file_lstat___out( val_t recv );
77
78 /* out/indirect function for file::NativeString::file_mkdir */
79 val_t NativeString_file_mkdir___out( val_t recv );
80
81 /* out/indirect function for file::NativeString::file_delete */
82 val_t NativeString_file_delete___out( val_t recv );
83
84 /* out/indirect function for file::FileStat::mode */
85 val_t FileStat_mode___out( val_t recv );
86
87 /* out/indirect function for file::FileStat::atime */
88 val_t FileStat_atime___out( val_t recv );
89
90 /* out/indirect function for file::FileStat::ctime */
91 val_t FileStat_ctime___out( val_t recv );
92
93 /* out/indirect function for file::FileStat::mtime */
94 val_t FileStat_mtime___out( val_t recv );
95
96 /* out/indirect function for file::FileStat::size */
97 val_t FileStat_size___out( val_t recv );
98
99 /* out/indirect function for file::FileStat::is_reg */
100 val_t FileStat_is_reg___out( val_t recv );
101
102 /* out/indirect function for file::FileStat::is_dir */
103 val_t FileStat_is_dir___out( val_t recv );
104
105 /* out/indirect function for file::FileStat::is_chr */
106 val_t FileStat_is_chr___out( val_t recv );
107
108 /* out/indirect function for file::FileStat::is_blk */
109 val_t FileStat_is_blk___out( val_t recv );
110
111 /* out/indirect function for file::FileStat::is_fifo */
112 val_t FileStat_is_fifo___out( val_t recv );
113
114 /* out/indirect function for file::FileStat::is_lnk */
115 val_t FileStat_is_lnk___out( val_t recv );
116
117 /* out/indirect function for file::FileStat::is_sock */
118 val_t FileStat_is_sock___out( val_t recv );
119
120 /* out/indirect function for file::NativeFile::io_read */
121 val_t NativeFile_io_read___out( val_t recv, val_t buf, val_t len );
122
123 /* out/indirect function for file::NativeFile::io_write */
124 val_t NativeFile_io_write___out( val_t recv, val_t buf, val_t len );
125
126 /* out/indirect function for file::NativeFile::io_close */
127 val_t NativeFile_io_close___out( val_t recv );
128
129 /* out/indirect function for file::NativeFile::file_stat */
130 val_t NativeFile_file_stat___out( val_t recv );
131
132 /* out/indirect function for file::NativeFile::io_open_read */
133 val_t NEW_NativeFile_standard___file___NativeFile___io_open_read( val_t path );
134
135 /* out/indirect function for file::NativeFile::io_open_write */
136 val_t NEW_NativeFile_standard___file___NativeFile___io_open_write( val_t path );
137
138 /* out/indirect function for file::NativeFile::native_stdin */
139 val_t NEW_NativeFile_standard___file___NativeFile___native_stdin( );
140
141 /* out/indirect function for file::NativeFile::native_stdout */
142 val_t NEW_NativeFile_standard___file___NativeFile___native_stdout( );
143
144 /* out/indirect function for file::NativeFile::native_stderr */
145 val_t NEW_NativeFile_standard___file___NativeFile___native_stderr( );
146 /* friendly for hash_collection::HashSet::init */
147 HashSet file_new_HashSet( );
148 #ifndef new_HashSet
149 #define new_HashSet file_new_HashSet
150 #endif
151 /* friendly for hash_collection::HashSet::(abstract_collection::SimpleCollection::add) */
152 void file_HashSet_add( HashSet recv, Object item );
153 #ifndef HashSet_add
154 #define HashSet_add file_HashSet_add
155 #endif
156 /* friendly for string::NativeString::(string::Object::to_s) */
157 String file_NativeString_to_s( char * recv );
158 #ifndef NativeString_to_s
159 #define NativeString_to_s file_NativeString_to_s
160 #endif
161 /* friendly for string::String::to_cstring */
162 char * file_String_to_cstring( String recv );
163 #ifndef String_to_cstring
164 #define String_to_cstring file_String_to_cstring
165 #endif
166
167 /* Type check for HashSet[String] with Set[String] */
168 int file_HashSet_is_a_Set( HashSet value );
169 #ifndef HashSet_is_a_Set
170 #define HashSet_is_a_Set file_HashSet_is_a_Set
171 #endif
172
173 /* Cast for HashSet[String] to Set[String] */
174 Set file_HashSet_as_Set( HashSet value );
175 #ifndef HashSet_as_Set
176 #define HashSet_as_Set file_HashSet_as_Set
177 #endif
178
179 /* Type check for String with Object */
180 int file_String_is_a_Object( String value );
181 #ifndef String_is_a_Object
182 #define String_is_a_Object file_String_is_a_Object
183 #endif
184
185 /* Cast for String to Object */
186 Object file_String_as_Object( String value );
187 #ifndef String_as_Object
188 #define String_as_Object file_String_as_Object
189 #endif
190 #endif