Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[s4u] Remove s4u::Task, use xbt::Task instead
[simgrid.git] / include / simgrid / forward.h
1 /* Copyright (c) 2004-2015. The SimGrid Team.
2  * All rights reserved.                                                     */
3
4 /* This program is free software; you can redistribute it and/or modify it
5  * under the terms of the license (GNU LGPL) which comes with this package. */
6
7 #ifndef SG_PLATF_TYPES_H
8 #define SG_PLATF_TYPES_H
9
10 #ifdef __cplusplus
11
12 namespace simgrid {
13   namespace s4u {
14     class As;
15     class Host;
16     class Mailbox;
17   }
18   namespace simix {
19     class Synchro;
20   }
21   namespace surf {
22     class Resource;
23     class Cpu;
24     class Link;
25   }
26   namespace routing {
27     class NetCard;
28   }     
29   namespace trace_mgr {
30     class trace;
31     class future_evt_set;
32   }
33 }
34
35 typedef simgrid::s4u::As simgrid_As;
36 typedef simgrid::s4u::Host simgrid_Host;
37 typedef simgrid::s4u::Mailbox simgrid_Mailbox;
38 typedef simgrid::simix::Synchro simix_Synchro;
39 typedef simgrid::surf::Cpu surf_Cpu;
40 typedef simgrid::routing::NetCard routing_NetCard;
41 typedef simgrid::surf::Link Link;
42 typedef simgrid::surf::Resource surf_Resource;
43 typedef simgrid::trace_mgr::trace tmgr_Trace;
44
45 #else
46
47 typedef struct simgrid_As   simgrid_As;
48 typedef struct simgrid_Host simgrid_Host;
49 typedef struct simgrid_Mailbox simgrid_Mailbox;
50 typedef struct simix_Synchro simix_Synchro;
51 typedef struct surf_Cpu surf_Cpu;
52 typedef struct routing_NetCard routing_NetCard;
53 typedef struct surf_Resource surf_Resource;
54 typedef struct Link Link;
55 typedef struct Trace tmgr_Trace;
56 #endif
57
58 typedef simgrid_As *AS_t;
59 typedef simgrid_Host* sg_host_t;
60 typedef simgrid_Mailbox* sg_mbox_t;
61
62 typedef simix_Synchro *smx_synchro_t;
63
64 typedef surf_Cpu *surf_cpu_t;
65 typedef routing_NetCard *sg_netcard_t;
66 typedef surf_Resource *sg_resource_t;
67
68 // Types which are in fact dictelmt:
69 typedef struct s_xbt_dictelm *sg_storage_t;
70
71 typedef tmgr_Trace *tmgr_trace_t; /**< Opaque structure defining an availability trace */
72
73 typedef struct s_smx_simcall s_smx_simcall_t;
74 typedef struct s_smx_simcall* smx_simcall_t;
75
76 typedef enum {
77   SURF_LINK_FULLDUPLEX = 2,
78   SURF_LINK_SHARED = 1,
79   SURF_LINK_FATPIPE = 0
80 } e_surf_link_sharing_policy_t;
81
82 typedef enum {
83   SURF_TRACE_CONNECT_KIND_HOST_AVAIL = 4,
84   SURF_TRACE_CONNECT_KIND_SPEED = 3,
85   SURF_TRACE_CONNECT_KIND_LINK_AVAIL = 2,
86   SURF_TRACE_CONNECT_KIND_BANDWIDTH = 1,
87   SURF_TRACE_CONNECT_KIND_LATENCY = 0
88 } e_surf_trace_connect_kind_t;
89
90 typedef enum {
91   SURF_PROCESS_ON_FAILURE_DIE = 1,
92   SURF_PROCESS_ON_FAILURE_RESTART = 0
93 } e_surf_process_on_failure_t;
94
95
96 /** @ingroup m_datatypes_management_details
97  * @brief Type for any simgrid size
98  */
99 typedef unsigned long long sg_size_t;
100
101 /** @ingroup m_datatypes_management_details
102  * @brief Type for any simgrid offset
103  */
104 typedef long long sg_offset_t;
105
106 #endif