Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branches 'master' and 'master' of github.com:simgrid/simgrid
[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 "xbt/base.h"
13 #include <boost/intrusive_ptr.hpp>
14
15 namespace simgrid {
16 namespace s4u {
17 class Actor;
18 class Comm;
19 class Host;
20 class Link;
21 class Mailbox;
22 class NetZone;
23
24 XBT_PUBLIC(void) intrusive_ptr_release(Comm* c);
25 XBT_PUBLIC(void) intrusive_ptr_add_ref(Comm* c);
26 }
27 namespace kernel {
28 namespace activity {
29 class ActivityImpl;
30      }
31      namespace routing {
32      class NetPoint;
33      }
34   }
35   namespace simix {
36     class Host;
37   }
38   namespace surf {
39     class Resource;
40     class Cpu;
41     class LinkImpl;
42     class HostImpl;
43     class StorageImpl;
44   }
45   namespace trace_mgr {
46     class trace;
47     class future_evt_set;
48   }
49 }
50
51 typedef simgrid::s4u::Actor s4u_Actor;
52 typedef simgrid::s4u::Host s4u_Host;
53 typedef simgrid::s4u::Link s4u_Link;
54 typedef simgrid::s4u::NetZone s4u_NetZone;
55 typedef simgrid::kernel::activity::ActivityImpl kernel_Activity;
56 typedef simgrid::kernel::routing::NetPoint routing_NetPoint;
57 typedef simgrid::surf::Resource surf_Resource;
58 typedef simgrid::trace_mgr::trace tmgr_Trace;
59
60 #else
61
62 typedef struct s4u_Actor s4u_Actor;
63 typedef struct s4u_Host s4u_Host;
64 typedef struct s4u_Link s4u_Link;
65 typedef struct s4u_NetZone s4u_NetZone;
66 typedef struct kernel_Activity kernel_Activity;
67 typedef struct routing_NetPoint routing_NetPoint;
68 typedef struct surf_Resource surf_Resource;
69 typedef struct Trace tmgr_Trace;
70
71 #endif
72
73 typedef s4u_NetZone* sg_netzone_t;
74 typedef s4u_Host* sg_host_t;
75 typedef s4u_Link* sg_link_t;
76
77 typedef kernel_Activity *smx_activity_t;
78
79 typedef routing_NetPoint* sg_netpoint_t;
80 typedef surf_Resource *sg_resource_t;
81
82 // Types which are in fact dictelmt:
83 typedef struct s_xbt_dictelm *sg_storage_t;
84
85 typedef tmgr_Trace *tmgr_trace_t; /**< Opaque structure defining an availability trace */
86
87 typedef struct s_smx_simcall s_smx_simcall_t;
88 typedef struct s_smx_simcall* smx_simcall_t;
89
90 typedef enum {
91   SURF_LINK_FULLDUPLEX = 2,
92   SURF_LINK_SHARED = 1,
93   SURF_LINK_FATPIPE = 0
94 } e_surf_link_sharing_policy_t;
95
96 typedef enum {
97   SURF_TRACE_CONNECT_KIND_HOST_AVAIL = 4,
98   SURF_TRACE_CONNECT_KIND_SPEED = 3,
99   SURF_TRACE_CONNECT_KIND_LINK_AVAIL = 2,
100   SURF_TRACE_CONNECT_KIND_BANDWIDTH = 1,
101   SURF_TRACE_CONNECT_KIND_LATENCY = 0
102 } e_surf_trace_connect_kind_t;
103
104 typedef enum {
105   SURF_ACTOR_ON_FAILURE_DIE = 1,
106   SURF_ACTOR_ON_FAILURE_RESTART = 0
107 } e_surf_process_on_failure_t;
108
109
110 /** @ingroup m_datatypes_management_details
111  * @brief Type for any simgrid size
112  */
113 typedef unsigned long long sg_size_t;
114
115 /** @ingroup m_datatypes_management_details
116  * @brief Type for any simgrid offset
117  */
118 typedef long long sg_offset_t;
119
120 typedef unsigned long aid_t;
121
122 #endif