Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
gosh, so much cruft in this code
[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 #include <boost/intrusive_ptr.hpp>
13
14 namespace simgrid {
15   namespace s4u {
16     class As;
17     class Host;
18     class Mailbox;
19   }
20   namespace kernel {
21      namespace activity {
22        class ActivityImpl;
23      }
24      namespace routing {
25        class NetCard;
26      }
27   }
28   namespace simix {
29     class Host;
30   }
31   namespace surf {
32     class Resource;
33     class Cpu;
34     class Link;
35     class HostImpl;
36   }
37   namespace trace_mgr {
38     class trace;
39     class future_evt_set;
40   }
41 }
42
43 typedef simgrid::s4u::As simgrid_As;
44 typedef simgrid::s4u::Host simgrid_Host;
45 typedef simgrid::kernel::activity::ActivityImpl kernel_Activity;
46 typedef simgrid::kernel::routing::NetCard routing_NetCard;
47 typedef simgrid::surf::Cpu surf_Cpu;
48 typedef simgrid::surf::Link Link;
49 typedef simgrid::surf::Resource surf_Resource;
50 typedef simgrid::trace_mgr::trace tmgr_Trace;
51
52 typedef simgrid::simix::Host *smx_host_priv_t;
53
54
55 #else
56
57 typedef struct simgrid_As   simgrid_As;
58 typedef struct simgrid_Host simgrid_Host;
59 typedef struct kernel_Activity kernel_Activity;
60 typedef struct surf_Cpu surf_Cpu;
61 typedef struct routing_NetCard routing_NetCard;
62 typedef struct surf_Resource surf_Resource;
63 typedef struct Link Link;
64 typedef struct Trace tmgr_Trace;
65
66 typedef struct simix_Host *smx_host_priv_t;
67 #endif
68
69 typedef simgrid_As *AS_t;
70 typedef simgrid_Host* sg_host_t;
71
72 typedef kernel_Activity *smx_activity_t;
73
74 typedef surf_Cpu *surf_cpu_t;
75 typedef routing_NetCard *sg_netcard_t;
76 typedef surf_Resource *sg_resource_t;
77
78 // Types which are in fact dictelmt:
79 typedef struct s_xbt_dictelm *sg_storage_t;
80
81 typedef tmgr_Trace *tmgr_trace_t; /**< Opaque structure defining an availability trace */
82
83 typedef struct s_smx_simcall s_smx_simcall_t;
84 typedef struct s_smx_simcall* smx_simcall_t;
85
86 typedef enum {
87   SURF_LINK_FULLDUPLEX = 2,
88   SURF_LINK_SHARED = 1,
89   SURF_LINK_FATPIPE = 0
90 } e_surf_link_sharing_policy_t;
91
92 typedef enum {
93   SURF_TRACE_CONNECT_KIND_HOST_AVAIL = 4,
94   SURF_TRACE_CONNECT_KIND_SPEED = 3,
95   SURF_TRACE_CONNECT_KIND_LINK_AVAIL = 2,
96   SURF_TRACE_CONNECT_KIND_BANDWIDTH = 1,
97   SURF_TRACE_CONNECT_KIND_LATENCY = 0
98 } e_surf_trace_connect_kind_t;
99
100 typedef enum {
101   SURF_PROCESS_ON_FAILURE_DIE = 1,
102   SURF_PROCESS_ON_FAILURE_RESTART = 0
103 } e_surf_process_on_failure_t;
104
105
106 /** @ingroup m_datatypes_management_details
107  * @brief Type for any simgrid size
108  */
109 typedef unsigned long long sg_size_t;
110
111 /** @ingroup m_datatypes_management_details
112  * @brief Type for any simgrid offset
113  */
114 typedef long long sg_offset_t;
115
116 #endif