c_src: update
[nit.git] / c_src / file._nitni.h
index 5caab9e..cf0a2e9 100644 (file)
@@ -3,17 +3,56 @@
 #ifndef FILE_NITNI_H
 #define FILE_NITNI_H
 
-#ifndef NATIVEFILECAPABLE_TYPE
-#define NATIVEFILECAPABLE_TYPE
-struct s_NativeFileCapable{
+#ifndef STRING_TYPE
+#define STRING_TYPE
+struct s_String{
                struct nitni_ref ref; /* real ref struct, must be first */
 };
-typedef struct s_NativeFileCapable *NativeFileCapable;
-#define NativeFileCapable_incr_ref( x ) nitni_global_ref_incr( (struct nitni_ref*)(x) )
-#define NativeFileCapable_decr_ref( x ) nitni_global_ref_decr( (struct nitni_ref*)(x) )
+typedef struct s_String *String;
+#define String_incr_ref( x ) nitni_global_ref_incr( (struct nitni_ref*)(x) )
+#define String_decr_ref( x ) nitni_global_ref_decr( (struct nitni_ref*)(x) )
+#endif
+#ifndef SET_TYPE
+#define SET_TYPE
+struct s_Set{
+               struct nitni_ref ref; /* real ref struct, must be first */
+};
+typedef struct s_Set *Set;
+#define Set_incr_ref( x ) nitni_global_ref_incr( (struct nitni_ref*)(x) )
+#define Set_decr_ref( x ) nitni_global_ref_decr( (struct nitni_ref*)(x) )
+#endif
+#ifndef HASHSET_TYPE
+#define HASHSET_TYPE
+struct s_HashSet{
+               struct nitni_ref ref; /* real ref struct, must be first */
+};
+typedef struct s_HashSet *HashSet;
+#define HashSet_incr_ref( x ) nitni_global_ref_incr( (struct nitni_ref*)(x) )
+#define HashSet_decr_ref( x ) nitni_global_ref_decr( (struct nitni_ref*)(x) )
+#endif
+#ifndef OBJECT_TYPE
+#define OBJECT_TYPE
+struct s_Object{
+               struct nitni_ref ref; /* real ref struct, must be first */
+};
+typedef struct s_Object *Object;
+#define Object_incr_ref( x ) nitni_global_ref_incr( (struct nitni_ref*)(x) )
+#define Object_decr_ref( x ) nitni_global_ref_decr( (struct nitni_ref*)(x) )
+#endif
+#ifndef HASHSET_TYPE
+#define HASHSET_TYPE
+struct s_HashSet{
+               struct nitni_ref ref; /* real ref struct, must be first */
+};
+typedef struct s_HashSet *HashSet;
+#define HashSet_incr_ref( x ) nitni_global_ref_incr( (struct nitni_ref*)(x) )
+#define HashSet_decr_ref( x ) nitni_global_ref_decr( (struct nitni_ref*)(x) )
 #endif
 #include "file_nit.h"
 
+/* out/indirect function for file::String::files */
+val_t String_files___out( val_t recv );
+
 /* out/indirect function for file::NativeString::file_exists */
 val_t NativeString_file_exists___out( val_t recv );
 
@@ -56,23 +95,67 @@ val_t NativeFile_io_close___out( val_t recv );
 
 /* out/indirect function for file::NativeFile::file_stat */
 val_t NativeFile_file_stat___out( val_t recv );
+
+/* out/indirect function for file::NativeFile::io_open_read */
+val_t NEW_NativeFile_standard___file___NativeFile___io_open_read( val_t path );
+
+/* out/indirect function for file::NativeFile::io_open_write */
+val_t NEW_NativeFile_standard___file___NativeFile___io_open_write( val_t path );
+
+/* out/indirect function for file::NativeFile::native_stdin */
+val_t NEW_NativeFile_standard___file___NativeFile___native_stdin(  );
+
+/* out/indirect function for file::NativeFile::native_stdout */
+val_t NEW_NativeFile_standard___file___NativeFile___native_stdout(  );
+
+/* out/indirect function for file::NativeFile::native_stderr */
+val_t NEW_NativeFile_standard___file___NativeFile___native_stderr(  );
 #ifndef NativeFile
        typedef void* NativeFile;
 #endif
 
+#endif
+/* friendly for hash_collection::HashSet::init */
+HashSet file_new_HashSet(  );
+#ifndef new_HashSet
+#define new_HashSet file_new_HashSet
+#endif
+/* friendly for hash_collection::HashSet::(abstract_collection::SimpleCollection::add) */
+void file_HashSet_add( HashSet recv, Object item );
+#ifndef HashSet_add
+#define HashSet_add file_HashSet_add
+#endif
+/* friendly for string::String::from_cstring */
+String file_new_String_from_cstring( char * str );
+#ifndef new_String_from_cstring
+#define new_String_from_cstring file_new_String_from_cstring
+#endif
+/* friendly for string::String::to_cstring */
+char * file_String_to_cstring( String recv );
+#ifndef String_to_cstring
+#define String_to_cstring file_String_to_cstring
+#endif
 
-/* out/indirect function for file::NativeFileCapable::io_open_read */
-val_t NativeFileCapable_io_open_read___out( val_t recv, val_t path );
-
-/* out/indirect function for file::NativeFileCapable::io_open_write */
-val_t NativeFileCapable_io_open_write___out( val_t recv, val_t path );
+/* Type check for HashSet[String] with Set[String] */
+int file_HashSet_is_a_Set( HashSet value );
+#ifndef HashSet_is_a_Set
+#define HashSet_is_a_Set file_HashSet_is_a_Set
+#endif
 
-/* out/indirect function for file::NativeFileCapable::native_stdin */
-val_t NativeFileCapable_native_stdin___out( val_t recv );
+/* Cast for HashSet[String] to Set[String] */
+Set file_HashSet_as_Set( HashSet value );
+#ifndef HashSet_as_Set
+#define HashSet_as_Set file_HashSet_as_Set
+#endif
 
-/* out/indirect function for file::NativeFileCapable::native_stdout */
-val_t NativeFileCapable_native_stdout___out( val_t recv );
+/* Type check for String with Object */
+int file_String_is_a_Object( String value );
+#ifndef String_is_a_Object
+#define String_is_a_Object file_String_is_a_Object
+#endif
 
-/* out/indirect function for file::NativeFileCapable::native_stderr */
-val_t NativeFileCapable_native_stderr___out( val_t recv );
+/* Cast for String to Object */
+Object file_String_as_Object( String value );
+#ifndef String_as_Object
+#define String_as_Object file_String_as_Object
 #endif