Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[s4u] Add missing include
[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 NetCard;
25     class Link;
26   }
27   namespace trace_mgr {
28     class trace;
29     class future_evt_set;
30   }
31 }
32
33 typedef simgrid::s4u::As simgrid_As;
34 typedef simgrid::s4u::Host simgrid_Host;
35 typedef simgrid::s4u::Mailbox simgrid_Mailbox;
36 typedef simgrid::simix::Synchro simix_Synchro;
37 typedef simgrid::surf::Cpu surf_Cpu;
38 typedef simgrid::surf::NetCard surf_NetCard;
39 typedef simgrid::surf::Link Link;
40 typedef simgrid::surf::Resource surf_Resource;
41 typedef simgrid::trace_mgr::trace tmgr_Trace;
42
43 #else
44
45 typedef struct simgrid_As   simgrid_As;
46 typedef struct simgrid_Host simgrid_Host;
47 typedef struct simgrid_Mailbox simgrid_Mailbox;
48 typedef struct simix_Synchro simix_Synchro;
49 typedef struct surf_Cpu surf_Cpu;
50 typedef struct surf_NetCard surf_NetCard;
51 typedef struct surf_Resource surf_Resource;
52 typedef struct Link Link;
53 typedef struct Trace tmgr_Trace;
54 #endif
55
56 typedef simgrid_As *AS_t;
57 typedef simgrid_Host* sg_host_t;
58 typedef simgrid_Mailbox* sg_mbox_t;
59
60 typedef simix_Synchro *smx_synchro_t;
61
62 typedef surf_Cpu *surf_cpu_t;
63 typedef surf_NetCard *sg_netcard_t;
64 typedef surf_Resource *sg_resource_t;
65
66 // Types which are in fact dictelmt:
67 typedef struct s_xbt_dictelm *sg_storage_t;
68
69 typedef tmgr_Trace *tmgr_trace_t; /**< Opaque structure defining an availability trace */
70
71 typedef struct s_smx_simcall s_smx_simcall_t;
72 typedef struct s_smx_simcall* smx_simcall_t;
73
74 typedef enum {
75   SURF_LINK_FULLDUPLEX = 2,
76   SURF_LINK_SHARED = 1,
77   SURF_LINK_FATPIPE = 0
78 } e_surf_link_sharing_policy_t;
79
80 typedef enum {
81   SURF_TRACE_CONNECT_KIND_HOST_AVAIL = 4,
82   SURF_TRACE_CONNECT_KIND_SPEED = 3,
83   SURF_TRACE_CONNECT_KIND_LINK_AVAIL = 2,
84   SURF_TRACE_CONNECT_KIND_BANDWIDTH = 1,
85   SURF_TRACE_CONNECT_KIND_LATENCY = 0
86 } e_surf_trace_connect_kind_t;
87
88 typedef enum {
89   SURF_PROCESS_ON_FAILURE_DIE = 1,
90   SURF_PROCESS_ON_FAILURE_RESTART = 0
91 } e_surf_process_on_failure_t;
92
93
94 /** @ingroup m_datatypes_management_details
95  * @brief Type for any simgrid size
96  */
97 typedef unsigned long long sg_size_t;
98
99 /** @ingroup m_datatypes_management_details
100  * @brief Type for any simgrid offset
101  */
102 typedef long long sg_offset_t;
103
104 #endif