From feff5f361a52d180ab8d47b4000784a3c3df9237 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jean-Baptiste=20Herv=C3=A9?= Date: Wed, 1 Aug 2012 11:28:39 +0200 Subject: [PATCH] Platform generation : make public structures for node and edge data --- include/simgrid/platf_generator.h | 18 ++++++++++++++++-- src/surf/platf_generator_private.h | 17 ----------------- 2 files changed, 16 insertions(+), 19 deletions(-) diff --git a/include/simgrid/platf_generator.h b/include/simgrid/platf_generator.h index 4ee6cce2f0..b98a1e0e04 100644 --- a/include/simgrid/platf_generator.h +++ b/include/simgrid/platf_generator.h @@ -19,8 +19,22 @@ typedef enum { CLUSTER } e_platf_node_kind; -typedef struct s_context_node_t *context_node_t; -typedef struct s_context_edge_t *context_edge_t; +typedef struct s_context_node_t { + unsigned long id; + double x, y; + int degree; + e_platf_node_kind kind; + union { + s_sg_platf_host_cbarg_t host_parameters; + s_sg_platf_cluster_cbarg_t cluster_parameters; + }; +} s_context_node_t, *context_node_t; + +typedef struct s_context_edge_t { + unsigned long id; + int labeled; + s_sg_platf_link_cbarg_t link_parameters; +} s_context_edge_t, *context_edge_t; typedef void (*platf_promoter_cb_t) (context_node_t); typedef void (*platf_labeler_cb_t) (context_edge_t); diff --git a/src/surf/platf_generator_private.h b/src/surf/platf_generator_private.h index 3b95d508ac..12cfdd0e83 100644 --- a/src/surf/platf_generator_private.h +++ b/src/surf/platf_generator_private.h @@ -4,23 +4,6 @@ #include "xbt/graph.h" #include "simgrid/platf.h" -typedef struct s_context_node_t { - unsigned long id; - double x, y; - int degree; - e_platf_node_kind kind; - union { - s_sg_platf_host_cbarg_t host_parameters; - s_sg_platf_cluster_cbarg_t cluster_parameters; - }; -} s_context_node_t; - -typedef struct s_context_edge_t { - unsigned long id; - int labeled; - s_sg_platf_link_cbarg_t link_parameters; -} s_context_edge_t; - void platf_graph_init(unsigned long node_count); void platf_node_connect(xbt_node_t node1, xbt_node_t node2); -- 2.20.1