gegl r3034 - trunk/gegl/graph



Author: martinn
Date: Sat Apr 11 14:50:13 2009
New Revision: 3034
URL: http://svn.gnome.org/viewvc/gegl?rev=3034&view=rev

Log:
Make GeglNode `sources' and `sinks' private

Modified:
   trunk/gegl/graph/gegl-node.c
   trunk/gegl/graph/gegl-node.h

Modified: trunk/gegl/graph/gegl-node.c
==============================================================================
--- trunk/gegl/graph/gegl-node.c	(original)
+++ trunk/gegl/graph/gegl-node.c	Sat Apr 11 14:50:13 2009
@@ -62,6 +62,8 @@
 
 struct _GeglNodePrivate
 {
+  GSList         *sources;
+  GSList         *sinks;
   GSList         *children;  /*  used for children */
   GeglNode       *parent;
   gchar          *name;
@@ -198,12 +200,12 @@
   self->pads        = NULL;
   self->input_pads  = NULL;
   self->output_pads = NULL;
-  self->sinks       = NULL;
-  self->sources     = NULL;
   self->operation   = NULL;
   self->is_graph    = FALSE;
   self->cache       = NULL;
 
+  priv->sinks       = NULL;
+  priv->sources     = NULL;
   priv->parent      = NULL;
   priv->children    = NULL;
   priv->name        = NULL;
@@ -506,7 +508,7 @@
 
   g_return_val_if_fail (GEGL_IS_NODE (sink), NULL);
 
-  for (list = sink->sources; list; list = g_slist_next (list))
+  for (list = sink->priv->sources; list; list = g_slist_next (list))
     {
       GeglConnection *connection = list->data;
 
@@ -621,8 +623,8 @@
       gegl_connection_set_sink_node (connection, sink);
       gegl_connection_set_source_node (connection, source);
 
-      sink->sources = g_slist_prepend (sink->sources, connection);
-      source->sinks = g_slist_prepend (source->sinks, connection);
+      sink->priv->sources = g_slist_prepend (sink->priv->sources, connection);
+      source->priv->sinks = g_slist_prepend (source->priv->sinks, connection);
 
       g_signal_connect (G_OBJECT (source), "invalidated",
                         G_CALLBACK (gegl_node_source_invalidated), sink_pad);
@@ -670,8 +672,8 @@
 
       gegl_pad_disconnect (sink_pad, source_pad, connection);
 
-      sink->sources = g_slist_remove (sink->sources, connection);
-      source->sinks = g_slist_remove (source->sinks, connection);
+      sink->priv->sources = g_slist_remove (sink->priv->sources, connection);
+      source->priv->sinks = g_slist_remove (source->priv->sinks, connection);
 
       gegl_connection_destroy (connection);
 
@@ -686,7 +688,7 @@
 {
   while (TRUE)
     {
-      GeglConnection *connection = g_slist_nth_data (self->sources, 0);
+      GeglConnection *connection = g_slist_nth_data (self->priv->sources, 0);
 
       if (connection)
         {
@@ -708,7 +710,7 @@
 {
   while (TRUE)
     {
-      GeglConnection *connection = g_slist_nth_data (self->sinks, 0);
+      GeglConnection *connection = g_slist_nth_data (self->priv->sinks, 0);
 
       if (connection)
         {
@@ -739,7 +741,7 @@
 {
   g_return_val_if_fail (GEGL_IS_NODE (self), -1);
 
-  return g_slist_length (self->sinks);
+  return g_slist_length (self->priv->sinks);
 }
 
 /**
@@ -755,7 +757,7 @@
 {
   g_return_val_if_fail (GEGL_IS_NODE (self), FALSE);
 
-  return self->sinks;
+  return self->priv->sinks;
 }
 
 void
@@ -903,7 +905,7 @@
 
   g_return_val_if_fail (GEGL_IS_NODE (self), NULL);
 
-  for (llink = self->sources; llink; llink = g_slist_next (llink))
+  for (llink = self->priv->sources; llink; llink = g_slist_next (llink))
     {
       GeglConnection *connection = llink->data;
       GeglNode       *source_node;

Modified: trunk/gegl/graph/gegl-node.h
==============================================================================
--- trunk/gegl/graph/gegl-node.h	(original)
+++ trunk/gegl/graph/gegl-node.h	Sat Apr 11 14:50:13 2009
@@ -59,12 +59,6 @@
   /* The output pads */
   GSList         *output_pads;
 
-  /* The nodes this node depends on */
-  GSList         *sources;
-
-  /* The nodes that depends on this node */
-  GSList         *sinks;
-
   /* If a node is a graph it means it has children. Typically the
    * children connect to the input/output proxies of their graph
    * node. This results in that the graph node can more or less be



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]