var type_fun = new ClassRegisterFunction (cl, context);
type_fun.init_from_type (in_plugin);
+ source_declarations.add_type_member_declaration (type_fun.get_source_declaration ());
source_type_member_definition.append (type_fun.get_definition ());
if (in_plugin) {
/* valatyperegisterfunction.vala
*
- * Copyright (C) 2006-2008 Jürg Billeter
+ * Copyright (C) 2006-2009 Jürg Billeter
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* C function to register a type at runtime.
*/
public abstract class Vala.TypeRegisterFunction {
- private CCodeFragment declaration_fragment = new CCodeFragment ();
-
- private CCodeFragment definition_fragment = new CCodeFragment ();
+ CCodeFragment source_declaration_fragment = new CCodeFragment ();
+ CCodeFragment declaration_fragment = new CCodeFragment ();
+ CCodeFragment definition_fragment = new CCodeFragment ();
public CodeContext context { get; set; }
if (!plugin) {
type_block.add_statement (cdecl);
} else {
- definition_fragment.append (cdecl);
+ source_declaration_fragment.append (cdecl);
}
CCodeFunction fun;
*/
public abstract CCodeFragment get_type_interface_init_statements ();
+ public CCodeFragment get_source_declaration () {
+ return source_declaration_fragment;
+ }
+
/**
* Returns the declaration for this type register function in C code.
*