From: Jean-Baptiste Hervé Date: Wed, 1 Aug 2012 09:28:39 +0000 (+0200) Subject: Platform generation : make public structures for node and edge data X-Git-Tag: v3_8~232 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/feff5f361a52d180ab8d47b4000784a3c3df9237 Platform generation : make public structures for node and edge data --- 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);