c_src: update
[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 STRING_TYPE
7 #define STRING_TYPE
8 struct s_String{
9 struct nitni_ref ref; /* real ref struct, must be first */
10 };
11 typedef struct s_String *String;
12 #define String_incr_ref( x ) nitni_global_ref_incr( (struct nitni_ref*)(x) )
13 #define String_decr_ref( x ) nitni_global_ref_decr( (struct nitni_ref*)(x) )
14 #endif
15 #ifndef SET_TYPE
16 #define SET_TYPE
17 struct s_Set{
18 struct nitni_ref ref; /* real ref struct, must be first */
19 };
20 typedef struct s_Set *Set;
21 #define Set_incr_ref( x ) nitni_global_ref_incr( (struct nitni_ref*)(x) )
22 #define Set_decr_ref( x ) nitni_global_ref_decr( (struct nitni_ref*)(x) )
23 #endif
24 #ifndef HASHSET_TYPE
25 #define HASHSET_TYPE
26 struct s_HashSet{
27 struct nitni_ref ref; /* real ref struct, must be first */
28 };
29 typedef struct s_HashSet *HashSet;
30 #define HashSet_incr_ref( x ) nitni_global_ref_incr( (struct nitni_ref*)(x) )
31 #define HashSet_decr_ref( x ) nitni_global_ref_decr( (struct nitni_ref*)(x) )
32 #endif
33 #ifndef OBJECT_TYPE
34 #define OBJECT_TYPE
35 struct s_Object{
36 struct nitni_ref ref; /* real ref struct, must be first */
37 };
38 typedef struct s_Object *Object;
39 #define Object_incr_ref( x ) nitni_global_ref_incr( (struct nitni_ref*)(x) )
40 #define Object_decr_ref( x ) nitni_global_ref_decr( (struct nitni_ref*)(x) )
41 #endif
42 #ifndef HASHSET_TYPE
43 #define HASHSET_TYPE
44 struct s_HashSet{
45 struct nitni_ref ref; /* real ref struct, must be first */
46 };
47 typedef struct s_HashSet *HashSet;
48 #define HashSet_incr_ref( x ) nitni_global_ref_incr( (struct nitni_ref*)(x) )
49 #define HashSet_decr_ref( x ) nitni_global_ref_decr( (struct nitni_ref*)(x) )
50 #endif
51 #include "file_nit.h"
52
53 /* out/indirect function for file::String::files */
54 val_t String_files___out( val_t recv );
55
56 /* out/indirect function for file::NativeString::file_exists */
57 val_t NativeString_file_exists___out( val_t recv );
58
59 /* out/indirect function for file::NativeString::file_stat */
60 val_t NativeString_file_stat___out( val_t recv );
61
62 /* out/indirect function for file::NativeString::file_mkdir */
63 val_t NativeString_file_mkdir___out( val_t recv );
64
65 /* out/indirect function for file::NativeString::file_delete */
66 val_t NativeString_file_delete___out( val_t recv );
67
68 /* out/indirect function for file::FileStat::mode */
69 val_t FileStat_mode___out( val_t recv );
70
71 /* out/indirect function for file::FileStat::atime */
72 val_t FileStat_atime___out( val_t recv );
73
74 /* out/indirect function for file::FileStat::ctime */
75 val_t FileStat_ctime___out( val_t recv );
76
77 /* out/indirect function for file::FileStat::mtime */
78 val_t FileStat_mtime___out( val_t recv );
79
80 /* out/indirect function for file::FileStat::size */
81 val_t FileStat_size___out( val_t recv );
82 #ifndef FileStat
83 typedef void* FileStat;
84 #endif
85
86
87 /* out/indirect function for file::NativeFile::io_read */
88 val_t NativeFile_io_read___out( val_t recv, val_t buf, val_t len );
89
90 /* out/indirect function for file::NativeFile::io_write */
91 val_t NativeFile_io_write___out( val_t recv, val_t buf, val_t len );
92
93 /* out/indirect function for file::NativeFile::io_close */
94 val_t NativeFile_io_close___out( val_t recv );
95
96 /* out/indirect function for file::NativeFile::file_stat */
97 val_t NativeFile_file_stat___out( val_t recv );
98
99 /* out/indirect function for file::NativeFile::io_open_read */
100 val_t NEW_NativeFile_standard___file___NativeFile___io_open_read( val_t path );
101
102 /* out/indirect function for file::NativeFile::io_open_write */
103 val_t NEW_NativeFile_standard___file___NativeFile___io_open_write( val_t path );
104
105 /* out/indirect function for file::NativeFile::native_stdin */
106 val_t NEW_NativeFile_standard___file___NativeFile___native_stdin( );
107
108 /* out/indirect function for file::NativeFile::native_stdout */
109 val_t NEW_NativeFile_standard___file___NativeFile___native_stdout( );
110
111 /* out/indirect function for file::NativeFile::native_stderr */
112 val_t NEW_NativeFile_standard___file___NativeFile___native_stderr( );
113 #ifndef NativeFile
114 typedef void* NativeFile;
115 #endif
116
117 #endif
118 /* friendly for hash_collection::HashSet::init */
119 HashSet file_new_HashSet( );
120 #ifndef new_HashSet
121 #define new_HashSet file_new_HashSet
122 #endif
123 /* friendly for hash_collection::HashSet::(abstract_collection::SimpleCollection::add) */
124 void file_HashSet_add( HashSet recv, Object item );
125 #ifndef HashSet_add
126 #define HashSet_add file_HashSet_add
127 #endif
128 /* friendly for string::String::from_cstring */
129 String file_new_String_from_cstring( char * str );
130 #ifndef new_String_from_cstring
131 #define new_String_from_cstring file_new_String_from_cstring
132 #endif
133 /* friendly for string::String::to_cstring */
134 char * file_String_to_cstring( String recv );
135 #ifndef String_to_cstring
136 #define String_to_cstring file_String_to_cstring
137 #endif
138
139 /* Type check for HashSet[String] with Set[String] */
140 int file_HashSet_is_a_Set( HashSet value );
141 #ifndef HashSet_is_a_Set
142 #define HashSet_is_a_Set file_HashSet_is_a_Set
143 #endif
144
145 /* Cast for HashSet[String] to Set[String] */
146 Set file_HashSet_as_Set( HashSet value );
147 #ifndef HashSet_as_Set
148 #define HashSet_as_Set file_HashSet_as_Set
149 #endif
150
151 /* Type check for String with Object */
152 int file_String_is_a_Object( String value );
153 #ifndef String_is_a_Object
154 #define String_is_a_Object file_String_is_a_Object
155 #endif
156
157 /* Cast for String to Object */
158 Object file_String_as_Object( String value );
159 #ifndef String_as_Object
160 #define String_as_Object file_String_as_Object
161 #endif