Logo Search packages:      
Sourcecode: valatoys version File versions  Download package

vbftarget.c

/* vbftarget.c generated by valac 0.10.0, the Vala compiler
 * generated from vbftarget.vala, do not modify */

/*
 *  vbftarget.vala - Vala Build Framework library
 *  
 *  Copyright (C) 2008 - Andrea Del Signore <sejerpz@tin.it>
 *  
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public
 *  License as published by the Free Software Foundation; either
 *  version 2.1 of the License, or (at your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *  Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public
 *  License along with this library; if not, write to the Free Software
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
 */

#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <valagee.h>


#define VBF_TYPE_TARGET_TYPES (vbf_target_types_get_type ())

#define VBF_TYPE_TARGET (vbf_target_get_type ())
#define VBF_TARGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VBF_TYPE_TARGET, VbfTarget))
#define VBF_TARGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VBF_TYPE_TARGET, VbfTargetClass))
#define VBF_IS_TARGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VBF_TYPE_TARGET))
#define VBF_IS_TARGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VBF_TYPE_TARGET))
#define VBF_TARGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VBF_TYPE_TARGET, VbfTargetClass))

typedef struct _VbfTarget VbfTarget;
typedef struct _VbfTargetClass VbfTargetClass;
typedef struct _VbfTargetPrivate VbfTargetPrivate;

#define VBF_TYPE_GROUP (vbf_group_get_type ())
#define VBF_GROUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VBF_TYPE_GROUP, VbfGroup))
#define VBF_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VBF_TYPE_GROUP, VbfGroupClass))
#define VBF_IS_GROUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VBF_TYPE_GROUP))
#define VBF_IS_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VBF_TYPE_GROUP))
#define VBF_GROUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VBF_TYPE_GROUP, VbfGroupClass))

typedef struct _VbfGroup VbfGroup;
typedef struct _VbfGroupClass VbfGroupClass;

#define VBF_TYPE_FILE (vbf_file_get_type ())
#define VBF_FILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VBF_TYPE_FILE, VbfFile))
#define VBF_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VBF_TYPE_FILE, VbfFileClass))
#define VBF_IS_FILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VBF_TYPE_FILE))
#define VBF_IS_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VBF_TYPE_FILE))
#define VBF_FILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VBF_TYPE_FILE, VbfFileClass))

typedef struct _VbfFile VbfFile;
typedef struct _VbfFileClass VbfFileClass;

#define VBF_TYPE_SOURCE (vbf_source_get_type ())
#define VBF_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VBF_TYPE_SOURCE, VbfSource))
#define VBF_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VBF_TYPE_SOURCE, VbfSourceClass))
#define VBF_IS_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VBF_TYPE_SOURCE))
#define VBF_IS_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VBF_TYPE_SOURCE))
#define VBF_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VBF_TYPE_SOURCE, VbfSourceClass))

typedef struct _VbfSource VbfSource;
typedef struct _VbfSourceClass VbfSourceClass;

#define VBF_TYPE_PACKAGE (vbf_package_get_type ())
#define VBF_PACKAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VBF_TYPE_PACKAGE, VbfPackage))
#define VBF_PACKAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VBF_TYPE_PACKAGE, VbfPackageClass))
#define VBF_IS_PACKAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VBF_TYPE_PACKAGE))
#define VBF_IS_PACKAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VBF_TYPE_PACKAGE))
#define VBF_PACKAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VBF_TYPE_PACKAGE, VbfPackageClass))

typedef struct _VbfPackage VbfPackage;
typedef struct _VbfPackageClass VbfPackageClass;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _vala_collection_object_unref0(var) ((var == NULL) ? NULL : (var = (vala_collection_object_unref (var), NULL)))
typedef struct _VbfFilePrivate VbfFilePrivate;

#define VBF_TYPE_FILE_TYPES (vbf_file_types_get_type ())
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _VbfPackagePrivate VbfPackagePrivate;

#define VBF_TYPE_CONFIG_NODE (vbf_config_node_get_type ())
#define VBF_CONFIG_NODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VBF_TYPE_CONFIG_NODE, VbfConfigNode))
#define VBF_CONFIG_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VBF_TYPE_CONFIG_NODE, VbfConfigNodeClass))
#define VBF_IS_CONFIG_NODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VBF_TYPE_CONFIG_NODE))
#define VBF_IS_CONFIG_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VBF_TYPE_CONFIG_NODE))
#define VBF_CONFIG_NODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VBF_TYPE_CONFIG_NODE, VbfConfigNodeClass))

typedef struct _VbfConfigNode VbfConfigNode;
typedef struct _VbfConfigNodeClass VbfConfigNodeClass;

#define VBF_TYPE_MODULE (vbf_module_get_type ())
#define VBF_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VBF_TYPE_MODULE, VbfModule))
#define VBF_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VBF_TYPE_MODULE, VbfModuleClass))
#define VBF_IS_MODULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VBF_TYPE_MODULE))
#define VBF_IS_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VBF_TYPE_MODULE))
#define VBF_MODULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VBF_TYPE_MODULE, VbfModuleClass))

typedef struct _VbfModule VbfModule;
typedef struct _VbfModuleClass VbfModuleClass;

typedef enum  {
      VBF_TARGET_TYPES_PROGRAM,
      VBF_TARGET_TYPES_LIBRARY,
      VBF_TARGET_TYPES_DATA,
      VBF_TARGET_TYPES_BUILT_SOURCES
} VbfTargetTypes;

struct _VbfTarget {
      GObject parent_instance;
      VbfTargetPrivate * priv;
      char* id;
      char* name;
      VbfTargetTypes type;
      gboolean no_install;
      VbfGroup* group;
};

struct _VbfTargetClass {
      GObjectClass parent_class;
};

00132 struct _VbfTargetPrivate {
      ValaList* sources;
      ValaList* files;
      ValaList* packages;
      ValaList* include_dirs;
      ValaList* built_libraries;
};

typedef enum  {
      VBF_FILE_TYPES_UNKNOWN,
      VBF_FILE_TYPES_DATA,
      VBF_FILE_TYPES_VALA_SOURCE,
      VBF_FILE_TYPES_OTHER_SOURCE
} VbfFileTypes;

struct _VbfFile {
      GObject parent_instance;
      VbfFilePrivate * priv;
      char* name;
      char* filename;
      char* uri;
      VbfFileTypes type;
      VbfTarget* target;
};

struct _VbfFileClass {
      GObjectClass parent_class;
};

struct _VbfPackage {
      GObject parent_instance;
      VbfPackagePrivate * priv;
      char* id;
      char* name;
      char* constraint;
      VbfConfigNode* version;
      VbfTarget* parent_target;
      VbfGroup* parent_group;
      VbfModule* parent_module;
};

struct _VbfPackageClass {
      GObjectClass parent_class;
};


static gpointer vbf_target_parent_class = NULL;

GType vbf_target_types_get_type (void) G_GNUC_CONST;
GType vbf_target_get_type (void) G_GNUC_CONST;
GType vbf_group_get_type (void) G_GNUC_CONST;
GType vbf_file_get_type (void) G_GNUC_CONST;
GType vbf_source_get_type (void) G_GNUC_CONST;
GType vbf_package_get_type (void) G_GNUC_CONST;
#define VBF_TARGET_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), VBF_TYPE_TARGET, VbfTargetPrivate))
enum  {
      VBF_TARGET_DUMMY_PROPERTY
};
VbfTarget* vbf_target_new (VbfGroup* group, VbfTargetTypes type, const char* id);
VbfTarget* vbf_target_construct (GType object_type, VbfGroup* group, VbfTargetTypes type, const char* id);
ValaList* vbf_target_get_sources (VbfTarget* self);
VbfSource* vbf_target_get_source (VbfTarget* self, const char* filename);
GType vbf_file_types_get_type (void) G_GNUC_CONST;
gboolean vbf_target_has_sources_of_type (VbfTarget* self, VbfFileTypes type);
void vbf_target_add_source (VbfTarget* self, VbfSource* source);
void vbf_target_remove_source (VbfTarget* self, VbfSource* source);
gboolean vbf_target_has_file_of_type (VbfTarget* self, VbfFileTypes type);
gboolean vbf_target_has_file_with_extension (VbfTarget* self, const char* extension);
ValaList* vbf_target_get_files (VbfTarget* self);
void vbf_target_add_file (VbfTarget* self, VbfFile* file);
ValaList* vbf_target_get_packages (VbfTarget* self);
void vbf_target_add_package (VbfTarget* self, VbfPackage* package);
GType vbf_config_node_get_type (void) G_GNUC_CONST;
GType vbf_module_get_type (void) G_GNUC_CONST;
gboolean vbf_target_contains_package (VbfTarget* self, const char* package_id);
ValaList* vbf_target_get_include_dirs (VbfTarget* self);
gboolean vbf_target_contains_include_dir (VbfTarget* self, const char* dir);
void vbf_target_add_include_dir (VbfTarget* self, const char* dir);
ValaList* vbf_target_get_built_libraries (VbfTarget* self);
void vbf_target_add_built_library (VbfTarget* self, const char* dir);
static void vbf_target_finalize (GObject* obj);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
static gint _vala_array_length (gpointer array);
static int _vala_strcmp0 (const char * str1, const char * str2);



GType vbf_target_types_get_type (void) {
      static volatile gsize vbf_target_types_type_id__volatile = 0;
      if (g_once_init_enter (&vbf_target_types_type_id__volatile)) {
            static const GEnumValue values[] = {{VBF_TARGET_TYPES_PROGRAM, "VBF_TARGET_TYPES_PROGRAM", "program"}, {VBF_TARGET_TYPES_LIBRARY, "VBF_TARGET_TYPES_LIBRARY", "library"}, {VBF_TARGET_TYPES_DATA, "VBF_TARGET_TYPES_DATA", "data"}, {VBF_TARGET_TYPES_BUILT_SOURCES, "VBF_TARGET_TYPES_BUILT_SOURCES", "built-sources"}, {0, NULL, NULL}};
            GType vbf_target_types_type_id;
            vbf_target_types_type_id = g_enum_register_static ("VbfTargetTypes", values);
            g_once_init_leave (&vbf_target_types_type_id__volatile, vbf_target_types_type_id);
      }
      return vbf_target_types_type_id__volatile;
}


VbfTarget* vbf_target_construct (GType object_type, VbfGroup* group, VbfTargetTypes type, const char* id) {
      VbfTarget * self;
      char* _tmp0_;
      gint tmp_length1;
      gint _tmp_size_;
      char** _tmp2_;
      char** _tmp1_;
      char** tmp;
      char* _tmp3_;
      g_return_val_if_fail (group != NULL, NULL);
      g_return_val_if_fail (id != NULL, NULL);
      self = (VbfTarget*) g_object_new (object_type, NULL);
      self->group = group;
      self->id = (_tmp0_ = g_strdup (id), _g_free0 (self->id), _tmp0_);
      tmp = (_tmp2_ = _tmp1_ = g_strsplit (id, ".", 2), tmp_length1 = _vala_array_length (_tmp1_), _tmp_size_ = tmp_length1, _tmp2_);
      self->name = (_tmp3_ = g_strdup (tmp[0]), _g_free0 (self->name), _tmp3_);
      self->type = type;
      tmp = (_vala_array_free (tmp, tmp_length1, (GDestroyNotify) g_free), NULL);
      return self;
}


VbfTarget* vbf_target_new (VbfGroup* group, VbfTargetTypes type, const char* id) {
      return vbf_target_construct (VBF_TYPE_TARGET, group, type, id);
}


static gpointer _vala_collection_object_ref0 (gpointer self) {
      return self ? vala_collection_object_ref (self) : NULL;
}


ValaList* vbf_target_get_sources (VbfTarget* self) {
      ValaList* result = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      result = _vala_collection_object_ref0 (self->priv->sources);
      return result;
}


VbfSource* vbf_target_get_source (VbfTarget* self, const char* filename) {
      VbfSource* result = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (filename != NULL, NULL);
      {
            ValaIterator* _source_it;
            _source_it = vala_iterable_iterator ((ValaIterable*) self->priv->sources);
            while (TRUE) {
                  VbfSource* source;
                  if (!vala_iterator_next (_source_it)) {
                        break;
                  }
                  source = (VbfSource*) vala_iterator_get (_source_it);
                  if (_vala_strcmp0 (((VbfFile*) source)->filename, filename) == 0) {
                        result = source;
                        _vala_collection_object_unref0 (_source_it);
                        return result;
                  }
                  _g_object_unref0 (source);
            }
            _vala_collection_object_unref0 (_source_it);
      }
      result = NULL;
      return result;
}


gboolean vbf_target_has_sources_of_type (VbfTarget* self, VbfFileTypes type) {
      gboolean result = FALSE;
      g_return_val_if_fail (self != NULL, FALSE);
      {
            ValaIterator* _source_it;
            _source_it = vala_iterable_iterator ((ValaIterable*) self->priv->sources);
            while (TRUE) {
                  VbfSource* source;
                  if (!vala_iterator_next (_source_it)) {
                        break;
                  }
                  source = (VbfSource*) vala_iterator_get (_source_it);
                  if (((VbfFile*) source)->type == type) {
                        result = TRUE;
                        _g_object_unref0 (source);
                        _vala_collection_object_unref0 (_source_it);
                        return result;
                  }
                  _g_object_unref0 (source);
            }
            _vala_collection_object_unref0 (_source_it);
      }
      result = FALSE;
      return result;
}


void vbf_target_add_source (VbfTarget* self, VbfSource* source) {
      g_return_if_fail (self != NULL);
      g_return_if_fail (source != NULL);
      vala_collection_add ((ValaCollection*) self->priv->sources, source);
}


void vbf_target_remove_source (VbfTarget* self, VbfSource* source) {
      g_return_if_fail (self != NULL);
      g_return_if_fail (source != NULL);
      vala_collection_remove ((ValaCollection*) self->priv->sources, source);
}


gboolean vbf_target_has_file_of_type (VbfTarget* self, VbfFileTypes type) {
      gboolean result = FALSE;
      g_return_val_if_fail (self != NULL, FALSE);
      {
            ValaIterator* _file_it;
            _file_it = vala_iterable_iterator ((ValaIterable*) self->priv->files);
            while (TRUE) {
                  VbfFile* file;
                  if (!vala_iterator_next (_file_it)) {
                        break;
                  }
                  file = (VbfFile*) vala_iterator_get (_file_it);
                  if (file->type == type) {
                        result = TRUE;
                        _g_object_unref0 (file);
                        _vala_collection_object_unref0 (_file_it);
                        return result;
                  }
                  _g_object_unref0 (file);
            }
            _vala_collection_object_unref0 (_file_it);
      }
      result = FALSE;
      return result;
}


gboolean vbf_target_has_file_with_extension (VbfTarget* self, const char* extension) {
      gboolean result = FALSE;
      char* ext;
      g_return_val_if_fail (self != NULL, FALSE);
      g_return_val_if_fail (extension != NULL, FALSE);
      ext = g_strdup_printf (".%s", extension);
      {
            ValaIterator* _file_it;
            _file_it = vala_iterable_iterator ((ValaIterable*) self->priv->files);
            while (TRUE) {
                  VbfFile* file;
                  if (!vala_iterator_next (_file_it)) {
                        break;
                  }
                  file = (VbfFile*) vala_iterator_get (_file_it);
                  if (g_str_has_suffix (file->filename, ext)) {
                        result = TRUE;
                        _g_object_unref0 (file);
                        _vala_collection_object_unref0 (_file_it);
                        _g_free0 (ext);
                        return result;
                  }
                  _g_object_unref0 (file);
            }
            _vala_collection_object_unref0 (_file_it);
      }
      result = FALSE;
      _g_free0 (ext);
      return result;
}


ValaList* vbf_target_get_files (VbfTarget* self) {
      ValaList* result = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      result = _vala_collection_object_ref0 (self->priv->files);
      return result;
}


void vbf_target_add_file (VbfTarget* self, VbfFile* file) {
      g_return_if_fail (self != NULL);
      g_return_if_fail (file != NULL);
      vala_collection_add ((ValaCollection*) self->priv->files, file);
}


ValaList* vbf_target_get_packages (VbfTarget* self) {
      ValaList* result = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      result = _vala_collection_object_ref0 (self->priv->packages);
      return result;
}


void vbf_target_add_package (VbfTarget* self, VbfPackage* package) {
      g_return_if_fail (self != NULL);
      g_return_if_fail (package != NULL);
      vala_collection_add ((ValaCollection*) self->priv->packages, package);
      package->parent_target = self;
}


gboolean vbf_target_contains_package (VbfTarget* self, const char* package_id) {
      gboolean result = FALSE;
      g_return_val_if_fail (self != NULL, FALSE);
      g_return_val_if_fail (package_id != NULL, FALSE);
      {
            ValaIterator* _package_it;
            _package_it = vala_iterable_iterator ((ValaIterable*) self->priv->packages);
            while (TRUE) {
                  VbfPackage* package;
                  if (!vala_iterator_next (_package_it)) {
                        break;
                  }
                  package = (VbfPackage*) vala_iterator_get (_package_it);
                  if (_vala_strcmp0 (package->id, package_id) == 0) {
                        result = TRUE;
                        _g_object_unref0 (package);
                        _vala_collection_object_unref0 (_package_it);
                        return result;
                  }
                  _g_object_unref0 (package);
            }
            _vala_collection_object_unref0 (_package_it);
      }
      result = FALSE;
      return result;
}


ValaList* vbf_target_get_include_dirs (VbfTarget* self) {
      ValaList* result = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      result = _vala_collection_object_ref0 (self->priv->include_dirs);
      return result;
}


gboolean vbf_target_contains_include_dir (VbfTarget* self, const char* dir) {
      gboolean result = FALSE;
      g_return_val_if_fail (self != NULL, FALSE);
      g_return_val_if_fail (dir != NULL, FALSE);
      {
            ValaIterator* _item_it;
            _item_it = vala_iterable_iterator ((ValaIterable*) self->priv->include_dirs);
            while (TRUE) {
                  char* item;
                  if (!vala_iterator_next (_item_it)) {
                        break;
                  }
                  item = (char*) vala_iterator_get (_item_it);
                  if (_vala_strcmp0 (item, dir) == 0) {
                        result = TRUE;
                        _g_free0 (item);
                        _vala_collection_object_unref0 (_item_it);
                        return result;
                  }
                  _g_free0 (item);
            }
            _vala_collection_object_unref0 (_item_it);
      }
      result = FALSE;
      return result;
}


void vbf_target_add_include_dir (VbfTarget* self, const char* dir) {
      g_return_if_fail (self != NULL);
      g_return_if_fail (dir != NULL);
      vala_collection_add ((ValaCollection*) self->priv->include_dirs, dir);
}


ValaList* vbf_target_get_built_libraries (VbfTarget* self) {
      ValaList* result = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      result = _vala_collection_object_ref0 (self->priv->built_libraries);
      return result;
}


void vbf_target_add_built_library (VbfTarget* self, const char* dir) {
      g_return_if_fail (self != NULL);
      g_return_if_fail (dir != NULL);
      vala_collection_add ((ValaCollection*) self->priv->built_libraries, dir);
}


static void vbf_target_class_init (VbfTargetClass * klass) {
      vbf_target_parent_class = g_type_class_peek_parent (klass);
      g_type_class_add_private (klass, sizeof (VbfTargetPrivate));
      G_OBJECT_CLASS (klass)->finalize = vbf_target_finalize;
}


static void vbf_target_instance_init (VbfTarget * self) {
      self->priv = VBF_TARGET_GET_PRIVATE (self);
      self->no_install = FALSE;
      self->priv->sources = (ValaList*) vala_array_list_new (VBF_TYPE_SOURCE, (GBoxedCopyFunc) g_object_ref, g_object_unref, g_direct_equal);
      self->priv->files = (ValaList*) vala_array_list_new (VBF_TYPE_FILE, (GBoxedCopyFunc) g_object_ref, g_object_unref, g_direct_equal);
      self->priv->packages = (ValaList*) vala_array_list_new (VBF_TYPE_PACKAGE, (GBoxedCopyFunc) g_object_ref, g_object_unref, g_direct_equal);
      self->priv->include_dirs = (ValaList*) vala_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, g_direct_equal);
      self->priv->built_libraries = (ValaList*) vala_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, g_direct_equal);
}


static void vbf_target_finalize (GObject* obj) {
      VbfTarget * self;
      self = VBF_TARGET (obj);
      _g_free0 (self->id);
      _g_free0 (self->name);
      _vala_collection_object_unref0 (self->priv->sources);
      _vala_collection_object_unref0 (self->priv->files);
      _vala_collection_object_unref0 (self->priv->packages);
      _vala_collection_object_unref0 (self->priv->include_dirs);
      _vala_collection_object_unref0 (self->priv->built_libraries);
      G_OBJECT_CLASS (vbf_target_parent_class)->finalize (obj);
}


GType vbf_target_get_type (void) {
      static volatile gsize vbf_target_type_id__volatile = 0;
      if (g_once_init_enter (&vbf_target_type_id__volatile)) {
            static const GTypeInfo g_define_type_info = { sizeof (VbfTargetClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vbf_target_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (VbfTarget), 0, (GInstanceInitFunc) vbf_target_instance_init, NULL };
            GType vbf_target_type_id;
            vbf_target_type_id = g_type_register_static (G_TYPE_OBJECT, "VbfTarget", &g_define_type_info, 0);
            g_once_init_leave (&vbf_target_type_id__volatile, vbf_target_type_id);
      }
      return vbf_target_type_id__volatile;
}


static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
      if ((array != NULL) && (destroy_func != NULL)) {
            int i;
            for (i = 0; i < array_length; i = i + 1) {
                  if (((gpointer*) array)[i] != NULL) {
                        destroy_func (((gpointer*) array)[i]);
                  }
            }
      }
}


static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
      _vala_array_destroy (array, array_length, destroy_func);
      g_free (array);
}


static gint _vala_array_length (gpointer array) {
      int length;
      length = 0;
      if (array) {
            while (((gpointer*) array)[length]) {
                  length++;
            }
      }
      return length;
}


static int _vala_strcmp0 (const char * str1, const char * str2) {
      if (str1 == NULL) {
            return -(str1 != str2);
      }
      if (str2 == NULL) {
            return str1 != str2;
      }
      return strcmp (str1, str2);
}





Generated by  Doxygen 1.6.0   Back to index