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

/*
* Copyright (c) 2018-2026 (https://github.com/phase1geo/Minder)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program 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
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*
* Authored by: Trevor Williams <phase1geo@gmail.com>
*/

#include <glib-object.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <glib/gi18n-lib.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define TYPE_UNDO_ITEM (undo_item_get_type ())
#define UNDO_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_UNDO_ITEM, UndoItem))
#define UNDO_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_UNDO_ITEM, UndoItemClass))
#define IS_UNDO_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_UNDO_ITEM))
#define IS_UNDO_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_UNDO_ITEM))
#define UNDO_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_UNDO_ITEM, UndoItemClass))

typedef struct _UndoItem UndoItem;
typedef struct _UndoItemClass UndoItemClass;
typedef struct _UndoItemPrivate UndoItemPrivate;

#define TYPE_MIND_MAP (mind_map_get_type ())
#define MIND_MAP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MIND_MAP, MindMap))
#define MIND_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MIND_MAP, MindMapClass))
#define IS_MIND_MAP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MIND_MAP))
#define IS_MIND_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MIND_MAP))
#define MIND_MAP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MIND_MAP, MindMapClass))

typedef struct _MindMap MindMap;
typedef struct _MindMapClass MindMapClass;

#define TYPE_UNDO_NODE_SUMMARY_DELETE (undo_node_summary_delete_get_type ())
#define UNDO_NODE_SUMMARY_DELETE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_UNDO_NODE_SUMMARY_DELETE, UndoNodeSummaryDelete))
#define UNDO_NODE_SUMMARY_DELETE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_UNDO_NODE_SUMMARY_DELETE, UndoNodeSummaryDeleteClass))
#define IS_UNDO_NODE_SUMMARY_DELETE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_UNDO_NODE_SUMMARY_DELETE))
#define IS_UNDO_NODE_SUMMARY_DELETE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_UNDO_NODE_SUMMARY_DELETE))
#define UNDO_NODE_SUMMARY_DELETE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_UNDO_NODE_SUMMARY_DELETE, UndoNodeSummaryDeleteClass))

typedef struct _UndoNodeSummaryDelete UndoNodeSummaryDelete;
typedef struct _UndoNodeSummaryDeleteClass UndoNodeSummaryDeleteClass;
typedef struct _UndoNodeSummaryDeletePrivate UndoNodeSummaryDeletePrivate;

#define TYPE_NODE (node_get_type ())
#define NODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_NODE, Node))
#define NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_NODE, NodeClass))
#define IS_NODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_NODE))
#define IS_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_NODE))
#define NODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_NODE, NodeClass))

typedef struct _Node Node;
typedef struct _NodeClass NodeClass;

#define TYPE_SUMMARY_NODE (summary_node_get_type ())
#define SUMMARY_NODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SUMMARY_NODE, SummaryNode))
#define SUMMARY_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SUMMARY_NODE, SummaryNodeClass))
#define IS_SUMMARY_NODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SUMMARY_NODE))
#define IS_SUMMARY_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SUMMARY_NODE))
#define SUMMARY_NODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SUMMARY_NODE, SummaryNodeClass))

typedef struct _SummaryNode SummaryNode;
typedef struct _SummaryNodeClass SummaryNodeClass;

#define TYPE_CONNECTION (connection_get_type ())
#define CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CONNECTION, Connection))
#define CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CONNECTION, ConnectionClass))
#define IS_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CONNECTION))
#define IS_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CONNECTION))
#define CONNECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CONNECTION, ConnectionClass))

typedef struct _Connection Connection;
typedef struct _ConnectionClass ConnectionClass;

#define TYPE_UNDO_NODE_GROUPS (undo_node_groups_get_type ())
typedef struct _UndoNodeGroups UndoNodeGroups;

#define TYPE_NODE_GROUP (node_group_get_type ())
#define NODE_GROUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_NODE_GROUP, NodeGroup))
#define NODE_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_NODE_GROUP, NodeGroupClass))
#define IS_NODE_GROUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_NODE_GROUP))
#define IS_NODE_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_NODE_GROUP))
#define NODE_GROUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_NODE_GROUP, NodeGroupClass))

typedef struct _NodeGroup NodeGroup;
typedef struct _NodeGroupClass NodeGroupClass;
enum  {
	UNDO_NODE_SUMMARY_DELETE_0_PROPERTY,
	UNDO_NODE_SUMMARY_DELETE_NUM_PROPERTIES
};
static GParamSpec* undo_node_summary_delete_properties[UNDO_NODE_SUMMARY_DELETE_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_array_unref0(var) ((var == NULL) ? NULL : (var = (g_array_unref (var), NULL)))
#define _undo_node_groups_free0(var) ((var == NULL) ? NULL : (var = (undo_node_groups_free (var), NULL)))

#define TYPE_CONNECTIONS (connections_get_type ())
#define CONNECTIONS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CONNECTIONS, Connections))
#define CONNECTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CONNECTIONS, ConnectionsClass))
#define IS_CONNECTIONS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CONNECTIONS))
#define IS_CONNECTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CONNECTIONS))
#define CONNECTIONS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CONNECTIONS, ConnectionsClass))

typedef struct _Connections Connections;
typedef struct _ConnectionsClass ConnectionsClass;

#define TYPE_NODE_GROUPS (node_groups_get_type ())
#define NODE_GROUPS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_NODE_GROUPS, NodeGroups))
#define NODE_GROUPS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_NODE_GROUPS, NodeGroupsClass))
#define IS_NODE_GROUPS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_NODE_GROUPS))
#define IS_NODE_GROUPS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_NODE_GROUPS))
#define NODE_GROUPS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_NODE_GROUPS, NodeGroupsClass))

typedef struct _NodeGroups NodeGroups;
typedef struct _NodeGroupsClass NodeGroupsClass;

struct _UndoItem {
	GObject parent_instance;
	UndoItemPrivate * priv;
};

struct _UndoItemClass {
	GObjectClass parent_class;
	void (*undo) (UndoItem* self, MindMap* map);
	void (*redo) (UndoItem* self, MindMap* map);
	gboolean (*matches) (UndoItem* self, UndoItem* item);
	void (*replace_with_item) (UndoItem* self, UndoItem* item);
	gchar* (*to_string) (UndoItem* self);
};

struct _UndoNodeSummaryDelete {
	UndoItem parent_instance;
	UndoNodeSummaryDeletePrivate * priv;
};

struct _UndoNodeSummaryDeleteClass {
	UndoItemClass parent_class;
};

struct _UndoNodeGroups {
	Node* node;
	GArray* groups;
};

struct _UndoNodeSummaryDeletePrivate {
	SummaryNode* _node;
	GArray* _conns;
	UndoNodeGroups* _groups;
};

static gint UndoNodeSummaryDelete_private_offset;
static gpointer undo_node_summary_delete_parent_class = NULL;

VALA_EXTERN GType undo_item_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (UndoItem, g_object_unref)
VALA_EXTERN gpointer mind_map_ref (gpointer instance);
VALA_EXTERN void mind_map_unref (gpointer instance);
VALA_EXTERN GParamSpec* param_spec_mind_map (const gchar* name,
                                 const gchar* nick,
                                 const gchar* blurb,
                                 GType object_type,
                                 GParamFlags flags);
VALA_EXTERN void value_set_mind_map (GValue* value,
                         gpointer v_object);
VALA_EXTERN void value_take_mind_map (GValue* value,
                          gpointer v_object);
VALA_EXTERN gpointer value_get_mind_map (const GValue* value);
VALA_EXTERN GType mind_map_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (MindMap, mind_map_unref)
VALA_EXTERN GType undo_node_summary_delete_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (UndoNodeSummaryDelete, g_object_unref)
VALA_EXTERN GType node_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Node, g_object_unref)
VALA_EXTERN GType summary_node_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SummaryNode, g_object_unref)
VALA_EXTERN GType connection_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Connection, g_object_unref)
VALA_EXTERN GType undo_node_groups_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType node_group_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (NodeGroup, g_object_unref)
VALA_EXTERN UndoNodeGroups* undo_node_groups_dup (const UndoNodeGroups* self);
VALA_EXTERN void undo_node_groups_free (UndoNodeGroups* self);
VALA_EXTERN void undo_node_groups_copy (const UndoNodeGroups* self,
                            UndoNodeGroups* dest);
VALA_EXTERN void undo_node_groups_destroy (UndoNodeGroups* self);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (UndoNodeGroups, undo_node_groups_destroy)
VALA_EXTERN void undo_item_undo (UndoItem* self,
                     MindMap* map);
VALA_EXTERN void undo_item_redo (UndoItem* self,
                     MindMap* map);
VALA_EXTERN UndoNodeSummaryDelete* undo_node_summary_delete_new (SummaryNode* n,
                                                     GArray* conns,
                                                     UndoNodeGroups* groups);
VALA_EXTERN UndoNodeSummaryDelete* undo_node_summary_delete_construct (GType object_type,
                                                           SummaryNode* n,
                                                           GArray* conns,
                                                           UndoNodeGroups* groups);
VALA_EXTERN UndoItem* undo_item_new (const gchar* name);
VALA_EXTERN UndoItem* undo_item_construct (GType object_type,
                               const gchar* name);
static void undo_node_summary_delete_real_undo (UndoItem* base,
                                         MindMap* map);
VALA_EXTERN void summary_node_attach_all (SummaryNode* self);
VALA_EXTERN void mind_map_set_current_node (MindMap* self,
                                Node* n);
VALA_EXTERN gpointer connections_ref (gpointer instance);
VALA_EXTERN void connections_unref (gpointer instance);
VALA_EXTERN GParamSpec* param_spec_connections (const gchar* name,
                                    const gchar* nick,
                                    const gchar* blurb,
                                    GType object_type,
                                    GParamFlags flags);
VALA_EXTERN void value_set_connections (GValue* value,
                            gpointer v_object);
VALA_EXTERN void value_take_connections (GValue* value,
                             gpointer v_object);
VALA_EXTERN gpointer value_get_connections (const GValue* value);
VALA_EXTERN GType connections_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Connections, connections_unref)
VALA_EXTERN Connections* mind_map_get_connections (MindMap* self);
VALA_EXTERN void connections_add_connection (Connections* self,
                                 Connection* conn);
VALA_EXTERN gpointer node_groups_ref (gpointer instance);
VALA_EXTERN void node_groups_unref (gpointer instance);
VALA_EXTERN GParamSpec* param_spec_node_groups (const gchar* name,
                                    const gchar* nick,
                                    const gchar* blurb,
                                    GType object_type,
                                    GParamFlags flags);
VALA_EXTERN void value_set_node_groups (GValue* value,
                            gpointer v_object);
VALA_EXTERN void value_take_node_groups (GValue* value,
                             gpointer v_object);
VALA_EXTERN gpointer value_get_node_groups (const GValue* value);
VALA_EXTERN GType node_groups_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (NodeGroups, node_groups_unref)
VALA_EXTERN NodeGroups* mind_map_get_groups (MindMap* self);
VALA_EXTERN void node_groups_apply_undo (NodeGroups* self,
                             UndoNodeGroups* g);
VALA_EXTERN void mind_map_queue_draw (MindMap* self);
VALA_EXTERN void mind_map_auto_save (MindMap* self);
static void undo_node_summary_delete_real_redo (UndoItem* base,
                                         MindMap* map);
VALA_EXTERN void summary_node_detach_all (SummaryNode* self);
VALA_EXTERN gboolean connections_remove_connection (Connections* self,
                                        Connection* conn,
                                        gboolean disconnect);
VALA_EXTERN void node_groups_remove_node (NodeGroups* self,
                              Node* node,
                              UndoNodeGroups** affected);
static void undo_node_summary_delete_finalize (GObject * obj);
static GType undo_node_summary_delete_get_type_once (void);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
undo_node_summary_delete_get_instance_private (UndoNodeSummaryDelete* self)
{
	return G_STRUCT_MEMBER_P (self, UndoNodeSummaryDelete_private_offset);
}

static gpointer
_g_object_ref0 (gpointer self)
{
	return self ? g_object_ref (self) : NULL;
}

static gpointer
_g_array_ref0 (gpointer self)
{
	return self ? g_array_ref (self) : NULL;
}

static gpointer
_undo_node_groups_dup0 (gpointer self)
{
	return self ? undo_node_groups_dup (self) : NULL;
}

UndoNodeSummaryDelete*
undo_node_summary_delete_construct (GType object_type,
                                    SummaryNode* n,
                                    GArray* conns,
                                    UndoNodeGroups* groups)
{
	UndoNodeSummaryDelete * self = NULL;
	SummaryNode* _tmp0_;
	GArray* _tmp1_;
	UndoNodeGroups* _tmp2_;
	g_return_val_if_fail (n != NULL, NULL);
	g_return_val_if_fail (conns != NULL, NULL);
	self = (UndoNodeSummaryDelete*) undo_item_construct (object_type, _ ("delete summary node"));
	_tmp0_ = _g_object_ref0 (n);
	_g_object_unref0 (self->priv->_node);
	self->priv->_node = _tmp0_;
	_tmp1_ = _g_array_ref0 (conns);
	_g_array_unref0 (self->priv->_conns);
	self->priv->_conns = _tmp1_;
	_tmp2_ = _undo_node_groups_dup0 (groups);
	_undo_node_groups_free0 (self->priv->_groups);
	self->priv->_groups = _tmp2_;
	return self;
}

UndoNodeSummaryDelete*
undo_node_summary_delete_new (SummaryNode* n,
                              GArray* conns,
                              UndoNodeGroups* groups)
{
	return undo_node_summary_delete_construct (TYPE_UNDO_NODE_SUMMARY_DELETE, n, conns, groups);
}

static void
undo_node_summary_delete_real_undo (UndoItem* base,
                                    MindMap* map)
{
	UndoNodeSummaryDelete * self;
	SummaryNode* _tmp0_;
	SummaryNode* _tmp1_;
	NodeGroups* _tmp9_;
	NodeGroups* _tmp10_;
	UndoNodeGroups* _tmp11_;
	self = (UndoNodeSummaryDelete*) base;
	g_return_if_fail (map != NULL);
	_tmp0_ = self->priv->_node;
	summary_node_attach_all (_tmp0_);
	_tmp1_ = self->priv->_node;
	mind_map_set_current_node (map, (Node*) _tmp1_);
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp2_ = FALSE;
			_tmp2_ = TRUE;
			while (TRUE) {
				GArray* _tmp4_;
				Connections* _tmp5_;
				Connections* _tmp6_;
				GArray* _tmp7_;
				Connection* _tmp8_;
				if (!_tmp2_) {
					gint _tmp3_;
					_tmp3_ = i;
					i = _tmp3_ + 1;
				}
				_tmp2_ = FALSE;
				_tmp4_ = self->priv->_conns;
				if (!(((guint) i) < _tmp4_->len)) {
					break;
				}
				_tmp5_ = mind_map_get_connections (map);
				_tmp6_ = _tmp5_;
				_tmp7_ = self->priv->_conns;
				_tmp8_ = g_array_index (_tmp7_, Connection*, (guint) i);
				connections_add_connection (_tmp6_, _tmp8_);
			}
		}
	}
	_tmp9_ = mind_map_get_groups (map);
	_tmp10_ = _tmp9_;
	_tmp11_ = self->priv->_groups;
	node_groups_apply_undo (_tmp10_, _tmp11_);
	mind_map_queue_draw (map);
	mind_map_auto_save (map);
}

static void
undo_node_summary_delete_real_redo (UndoItem* base,
                                    MindMap* map)
{
	UndoNodeSummaryDelete * self;
	UndoNodeGroups* tmp_groups = NULL;
	SummaryNode* _tmp0_;
	NodeGroups* _tmp8_;
	NodeGroups* _tmp9_;
	SummaryNode* _tmp10_;
	self = (UndoNodeSummaryDelete*) base;
	g_return_if_fail (map != NULL);
	tmp_groups = NULL;
	_tmp0_ = self->priv->_node;
	summary_node_detach_all (_tmp0_);
	mind_map_set_current_node (map, NULL);
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp1_ = FALSE;
			_tmp1_ = TRUE;
			while (TRUE) {
				GArray* _tmp3_;
				Connections* _tmp4_;
				Connections* _tmp5_;
				GArray* _tmp6_;
				Connection* _tmp7_;
				if (!_tmp1_) {
					gint _tmp2_;
					_tmp2_ = i;
					i = _tmp2_ + 1;
				}
				_tmp1_ = FALSE;
				_tmp3_ = self->priv->_conns;
				if (!(((guint) i) < _tmp3_->len)) {
					break;
				}
				_tmp4_ = mind_map_get_connections (map);
				_tmp5_ = _tmp4_;
				_tmp6_ = self->priv->_conns;
				_tmp7_ = g_array_index (_tmp6_, Connection*, (guint) i);
				connections_remove_connection (_tmp5_, _tmp7_, FALSE);
			}
		}
	}
	_tmp8_ = mind_map_get_groups (map);
	_tmp9_ = _tmp8_;
	_tmp10_ = self->priv->_node;
	node_groups_remove_node (_tmp9_, (Node*) _tmp10_, &tmp_groups);
	mind_map_queue_draw (map);
	mind_map_auto_save (map);
	_undo_node_groups_free0 (tmp_groups);
}

static void
undo_node_summary_delete_class_init (UndoNodeSummaryDeleteClass * klass,
                                     gpointer klass_data)
{
	undo_node_summary_delete_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &UndoNodeSummaryDelete_private_offset);
	((UndoItemClass *) klass)->undo = (void (*) (UndoItem*, MindMap*)) undo_node_summary_delete_real_undo;
	((UndoItemClass *) klass)->redo = (void (*) (UndoItem*, MindMap*)) undo_node_summary_delete_real_redo;
	G_OBJECT_CLASS (klass)->finalize = undo_node_summary_delete_finalize;
}

static void
undo_node_summary_delete_instance_init (UndoNodeSummaryDelete * self,
                                        gpointer klass)
{
	self->priv = undo_node_summary_delete_get_instance_private (self);
}

static void
undo_node_summary_delete_finalize (GObject * obj)
{
	UndoNodeSummaryDelete * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_UNDO_NODE_SUMMARY_DELETE, UndoNodeSummaryDelete);
	_g_object_unref0 (self->priv->_node);
	_g_array_unref0 (self->priv->_conns);
	_undo_node_groups_free0 (self->priv->_groups);
	G_OBJECT_CLASS (undo_node_summary_delete_parent_class)->finalize (obj);
}

static GType
undo_node_summary_delete_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (UndoNodeSummaryDeleteClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) undo_node_summary_delete_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UndoNodeSummaryDelete), 0, (GInstanceInitFunc) undo_node_summary_delete_instance_init, NULL };
	GType undo_node_summary_delete_type_id;
	undo_node_summary_delete_type_id = g_type_register_static (TYPE_UNDO_ITEM, "UndoNodeSummaryDelete", &g_define_type_info, 0);
	UndoNodeSummaryDelete_private_offset = g_type_add_instance_private (undo_node_summary_delete_type_id, sizeof (UndoNodeSummaryDeletePrivate));
	return undo_node_summary_delete_type_id;
}

GType
undo_node_summary_delete_get_type (void)
{
	static volatile gsize undo_node_summary_delete_type_id__once = 0;
	if (g_once_init_enter (&undo_node_summary_delete_type_id__once)) {
		GType undo_node_summary_delete_type_id;
		undo_node_summary_delete_type_id = undo_node_summary_delete_get_type_once ();
		g_once_init_leave (&undo_node_summary_delete_type_id__once, undo_node_summary_delete_type_id);
	}
	return undo_node_summary_delete_type_id__once;
}

static inline gpointer
_vala_memdup2 (gconstpointer mem,
               gsize byte_size)
{
	gpointer new_mem;
	if (mem && byte_size != 0) {
		new_mem = g_malloc (byte_size);
		memcpy (new_mem, mem, byte_size);
	} else {
		new_mem = NULL;
	}
	return new_mem;
}

