~ubuntu-branches/ubuntu/vivid/vala/vivid

« back to all changes in this revision

Viewing changes to codegen/valatyperegisterfunction.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Dröge
  • Date: 2010-07-28 07:58:01 UTC
  • mfrom: (1.5.5 upstream) (7.3.14 experimental)
  • Revision ID: james.westby@ubuntu.com-20100728075801-18u9cg5hv5oety6m
Tags: 0.9.4-1
New upstream development release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
159
159
}
160
160
 
161
161
 
 
162
/**
 
163
 * Constructs the C function from the specified type.
 
164
 */
162
165
void vala_typeregister_function_init_from_type (ValaTypeRegisterFunction* self, gboolean plugin) {
163
166
        gboolean _tmp0_ = FALSE;
164
167
        gboolean use_thread_safe;
555
558
                                        }
556
559
                                        ev = (ValaEnumValue*) vala_iterator_get (_ev_it);
557
560
                                        clist_ev = (_tmp117_ = vala_ccode_initializer_list_new (), _vala_ccode_node_unref0 (clist_ev), _tmp117_);
558
 
                                        vala_ccode_initializer_list_append (clist_ev, (ValaCCodeExpression*) (_tmp119_ = vala_ccode_constant_new (_tmp118_ = vala_enum_value_get_cname (ev))));
 
561
                                        vala_ccode_initializer_list_append (clist_ev, (ValaCCodeExpression*) (_tmp119_ = vala_ccode_constant_new (_tmp118_ = vala_constant_get_cname ((ValaConstant*) ev))));
559
562
                                        _vala_ccode_node_unref0 (_tmp119_);
560
563
                                        _g_free0 (_tmp118_);
561
 
                                        vala_ccode_initializer_list_append (clist_ev, (ValaCCodeExpression*) (_tmp122_ = vala_ccode_identifier_new (_tmp121_ = g_strdup_printf ("\"%s\"", _tmp120_ = vala_enum_value_get_cname (ev)))));
 
564
                                        vala_ccode_initializer_list_append (clist_ev, (ValaCCodeExpression*) (_tmp122_ = vala_ccode_identifier_new (_tmp121_ = g_strdup_printf ("\"%s\"", _tmp120_ = vala_constant_get_cname ((ValaConstant*) ev)))));
562
565
                                        _vala_ccode_node_unref0 (_tmp122_);
563
566
                                        _g_free0 (_tmp121_);
564
567
                                        _g_free0 (_tmp120_);
767
770
}
768
771
 
769
772
 
 
773
/**
 
774
 * Returns the data type to be registered.
 
775
 *
 
776
 * @return type to be registered
 
777
 */
770
778
static ValaTypeSymbol* vala_typeregister_function_real_get_type_declaration (ValaTypeRegisterFunction* self) {
771
779
        g_return_val_if_fail (self != NULL, NULL);
772
780
        g_critical ("Type `%s' does not implement abstract method `vala_typeregister_function_get_type_declaration'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
779
787
}
780
788
 
781
789
 
 
790
/**
 
791
 * Returns the name of the type struct in C code.
 
792
 *
 
793
 * @return C struct name
 
794
 */
782
795
static char* vala_typeregister_function_real_get_type_struct_name (ValaTypeRegisterFunction* self) {
783
796
        char* result = NULL;
784
797
        g_return_val_if_fail (self != NULL, NULL);
792
805
}
793
806
 
794
807
 
 
808
/**
 
809
 * Returns the name of the base_init function in C code.
 
810
 *
 
811
 * @return C function name
 
812
 */
795
813
static char* vala_typeregister_function_real_get_base_init_func_name (ValaTypeRegisterFunction* self) {
796
814
        char* result = NULL;
797
815
        g_return_val_if_fail (self != NULL, NULL);
805
823
}
806
824
 
807
825
 
 
826
/**
 
827
 * Returns the name of the class_finalize function in C code.
 
828
 *
 
829
 * @return C function name
 
830
 */
808
831
static char* vala_typeregister_function_real_get_class_finalize_func_name (ValaTypeRegisterFunction* self) {
809
832
        char* result = NULL;
810
833
        g_return_val_if_fail (self != NULL, NULL);
818
841
}
819
842
 
820
843
 
 
844
/**
 
845
 * Returns the name of the base_finalize function in C code.
 
846
 *
 
847
 * @return C function name
 
848
 */
821
849
static char* vala_typeregister_function_real_get_base_finalize_func_name (ValaTypeRegisterFunction* self) {
822
850
        char* result = NULL;
823
851
        g_return_val_if_fail (self != NULL, NULL);
831
859
}
832
860
 
833
861
 
 
862
/**
 
863
 * Returns the name of the class_init function in C code.
 
864
 *
 
865
 * @return C function name
 
866
 */
834
867
static char* vala_typeregister_function_real_get_class_init_func_name (ValaTypeRegisterFunction* self) {
835
868
        char* result = NULL;
836
869
        g_return_val_if_fail (self != NULL, NULL);
844
877
}
845
878
 
846
879
 
 
880
/**
 
881
 * Returns the size of the instance struct in C code.
 
882
 *
 
883
 * @return C instance struct size
 
884
 */
847
885
static char* vala_typeregister_function_real_get_instance_struct_size (ValaTypeRegisterFunction* self) {
848
886
        char* result = NULL;
849
887
        g_return_val_if_fail (self != NULL, NULL);
857
895
}
858
896
 
859
897
 
 
898
/**
 
899
 * Returns the name of the instance_init function in C code.
 
900
 *
 
901
 * @return C function name
 
902
 */
860
903
static char* vala_typeregister_function_real_get_instance_init_func_name (ValaTypeRegisterFunction* self) {
861
904
        char* result = NULL;
862
905
        g_return_val_if_fail (self != NULL, NULL);
870
913
}
871
914
 
872
915
 
 
916
/**
 
917
 * Returns the name of the parent type in C code.
 
918
 *
 
919
 * @return C function name
 
920
 */
873
921
static char* vala_typeregister_function_real_get_parent_type_name (ValaTypeRegisterFunction* self) {
874
922
        char* result = NULL;
875
923
        g_return_val_if_fail (self != NULL, NULL);
883
931
}
884
932
 
885
933
 
 
934
/**
 
935
 * Returns the C-name of the new generated GTypeValueTable init function or null when not available.
 
936
 *
 
937
 * @return C function name
 
938
 */
886
939
static char* vala_typeregister_function_real_get_gtype_value_table_init_function_name (ValaTypeRegisterFunction* self) {
887
940
        char* result = NULL;
888
941
        g_return_val_if_fail (self != NULL, NULL);
896
949
}
897
950
 
898
951
 
 
952
/**
 
953
 * Returns the C-name of the new generated GTypeValueTable peek pointer function or null when not available.
 
954
 *
 
955
 * @return C function name
 
956
 */
899
957
static char* vala_typeregister_function_real_get_gtype_value_table_peek_pointer_function_name (ValaTypeRegisterFunction* self) {
900
958
        char* result = NULL;
901
959
        g_return_val_if_fail (self != NULL, NULL);
909
967
}
910
968
 
911
969
 
 
970
/**
 
971
 * Returns the C-name of the new generated GTypeValueTable free function or null when not available.
 
972
 *
 
973
 * @return C function name
 
974
 */
912
975
static char* vala_typeregister_function_real_get_gtype_value_table_free_function_name (ValaTypeRegisterFunction* self) {
913
976
        char* result = NULL;
914
977
        g_return_val_if_fail (self != NULL, NULL);
922
985
}
923
986
 
924
987
 
 
988
/**
 
989
 * Returns the C-name of the new generated GTypeValueTable copy function or null when not available.
 
990
 *
 
991
 * @return C function name
 
992
 */
925
993
static char* vala_typeregister_function_real_get_gtype_value_table_copy_function_name (ValaTypeRegisterFunction* self) {
926
994
        char* result = NULL;
927
995
        g_return_val_if_fail (self != NULL, NULL);
935
1003
}
936
1004
 
937
1005
 
 
1006
/**
 
1007
 * Returns the C-name of the new generated GTypeValueTable lcopy function or null when not available.
 
1008
 *
 
1009
 * @return C function name
 
1010
 */
938
1011
static char* vala_typeregister_function_real_get_gtype_value_table_lcopy_value_function_name (ValaTypeRegisterFunction* self) {
939
1012
        char* result = NULL;
940
1013
        g_return_val_if_fail (self != NULL, NULL);
948
1021
}
949
1022
 
950
1023
 
 
1024
/**
 
1025
 * Returns the C-name of the new generated GTypeValueTable collect value function or null when not available.
 
1026
 *
 
1027
 * @return C function name
 
1028
 */
951
1029
static char* vala_typeregister_function_real_get_gtype_value_table_collect_value_function_name (ValaTypeRegisterFunction* self) {
952
1030
        char* result = NULL;
953
1031
        g_return_val_if_fail (self != NULL, NULL);
961
1039
}
962
1040
 
963
1041
 
 
1042
/**
 
1043
 * Returns the set of type flags to be applied when registering.
 
1044
 *
 
1045
 * @return type flags
 
1046
 */
964
1047
static char* vala_typeregister_function_real_get_type_flags (ValaTypeRegisterFunction* self) {
965
1048
        char* result = NULL;
966
1049
        g_return_val_if_fail (self != NULL, NULL);
974
1057
}
975
1058
 
976
1059
 
 
1060
/**
 
1061
 * Returns additional C declarations to setup interfaces.
 
1062
 *
 
1063
 * @return C declarations
 
1064
 */
977
1065
static ValaCCodeFragment* vala_typeregister_function_real_get_type_interface_init_declaration (ValaTypeRegisterFunction* self) {
978
1066
        ValaCCodeFragment* result = NULL;
979
1067
        g_return_val_if_fail (self != NULL, NULL);
987
1075
}
988
1076
 
989
1077
 
 
1078
/**
 
1079
 * Returns additional C initialization statements to setup interfaces.
 
1080
 *
 
1081
 * @return C statements
 
1082
 */
990
1083
static ValaCCodeFragment* vala_typeregister_function_real_get_type_interface_init_statements (ValaTypeRegisterFunction* self, gboolean plugin) {
991
1084
        g_return_val_if_fail (self != NULL, NULL);
992
1085
        g_critical ("Type `%s' does not implement abstract method `vala_typeregister_function_get_type_interface_init_statements'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
1007
1100
}
1008
1101
 
1009
1102
 
 
1103
/**
 
1104
 * Returns the declaration for this type register function in C code.
 
1105
 *
 
1106
 * @return C function declaration fragment
 
1107
 */
1010
1108
ValaCCodeFragment* vala_typeregister_function_get_declaration (ValaTypeRegisterFunction* self) {
1011
1109
        ValaCCodeFragment* result = NULL;
1012
1110
        g_return_val_if_fail (self != NULL, NULL);
1015
1113
}
1016
1114
 
1017
1115
 
 
1116
/**
 
1117
 * Returns the definition for this type register function in C code.
 
1118
 *
 
1119
 * @return C function definition fragment
 
1120
 */
1018
1121
ValaCCodeFragment* vala_typeregister_function_get_definition (ValaTypeRegisterFunction* self) {
1019
1122
        ValaCCodeFragment* result = NULL;
1020
1123
        g_return_val_if_fail (self != NULL, NULL);
1023
1126
}
1024
1127
 
1025
1128
 
 
1129
/**
 
1130
 * Returns the accessibility for this type.
 
1131
 */
1026
1132
static ValaSymbolAccessibility vala_typeregister_function_real_get_accessibility (ValaTypeRegisterFunction* self) {
1027
1133
        g_return_val_if_fail (self != NULL, 0);
1028
1134
        g_critical ("Type `%s' does not implement abstract method `vala_typeregister_function_get_accessibility'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
1217
1323
}
1218
1324
 
1219
1325
 
 
1326
/**
 
1327
 * C function to register a type at runtime.
 
1328
 */
1220
1329
GType vala_typeregister_function_get_type (void) {
1221
1330
        static volatile gsize vala_typeregister_function_type_id__volatile = 0;
1222
1331
        if (g_once_init_enter (&vala_typeregister_function_type_id__volatile)) {