1 /* This file is part of NIT ( http://www.nitlanguage.org ).
3 * Copyright 2011 Alexis Laferrière <alexis.laf@xymus.net>
5 * This file is free software, which comes along with NIT. This software is
6 * distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
7 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
8 * PARTICULAR PURPOSE. You can modify it is you want, provided this header
9 * is kept unaltered, and a notification of the changes is added.
10 * You are allowed to redistribute it and sell it, alone or is a part of
14 #include "test_ni_cast_simple.nit.h"
17 C implementation of test_ni_cast_simple::Object::s_to_o
19 Imported methods signatures:
20 int String_is_a_Object( String value ) to check if a String is a Object
21 Object String_as_Object( String value ) to cast from String to Object
23 Object
Object_s_to_o___impl( Object recv
, String s
)
25 return String_as_Object( s
);
29 C implementation of test_ni_cast_simple::Object::n_to_nn
31 Imported methods signatures:
32 nullable_String String_as_nullable( String value ) to cast from String to nullable String
34 nullable_String
Object_n_to_nn___impl( Object recv
, String s
)
36 return String_as_nullable( s
);
40 C implementation of test_ni_cast_simple::Object::nn_to_n
42 Imported methods signatures:
43 int String_is_null( nullable_String value ) to check if a nullable String is a String
44 String nullable_String_as_not_null( nullable_String value ) to cast from nullable String to String
46 String
Object_nn_to_n___impl( Object recv
, nullable_String s
)
48 return String_as_not_null( s
);