Logo AND Algorithmique Numérique Distribuée

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