X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/fd59c94828d56624b725b65c21dee0a7c5281e7f..273b2533b20dcd3ec93b159e4507d76e4a4731b8:/include/simgrid/forward.h?ds=sidebyside diff --git a/include/simgrid/forward.h b/include/simgrid/forward.h index 2f6279c8e1..434abff5dd 100644 --- a/include/simgrid/forward.h +++ b/include/simgrid/forward.h @@ -8,32 +8,49 @@ #define SG_PLATF_TYPES_H #include -#include #ifdef __cplusplus +namespace simgrid { +class Host; +} + +namespace simgrid { +namespace surf { + class Cpu; class RoutingEdge; +class As; +class Link; -#else +} +} -typedef struct Cpu Cpu; -typedef struct RoutingEdge RoutingEdge; +typedef simgrid::Host simgrid_Host; +typedef simgrid::surf::Cpu surf_Cpu; +typedef simgrid::surf::RoutingEdge surf_RoutingEdge; +typedef simgrid::surf::As surf_As; +typedef simgrid::surf::Link Link; -#endif +#else -typedef Cpu *surf_cpu_t; -typedef RoutingEdge *routing_edge_t; -typedef RoutingEdge *sg_routing_edge_t; +typedef struct simgrid_Host simgrid_Host; +typedef struct surf_Cpu surf_Cpu; +typedef struct surf_RoutingEdge surf_RoutingEdge; +typedef struct surf_As surf_As; +typedef struct Link Link; +#endif +typedef simgrid_Host* sg_host_t; +typedef surf_Cpu *surf_cpu_t; +typedef surf_RoutingEdge *routing_edge_t; +typedef surf_RoutingEdge *sg_routing_edge_t; +typedef surf_As *AS_t; // Types which are in fact dictelmt: - -typedef xbt_dictelm_t sg_host_t; typedef xbt_dictelm_t sg_storage_t; - typedef struct tmgr_trace *tmgr_trace_t; /**< Opaque structure defining an availability trace */ typedef void *sg_routing_link_t; /* FIXME:The actual type is model-dependent so use void* instead*/