Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/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   using ActivityImplPtr = boost::intrusive_ptr<ActivityImpl>;
21   XBT_PUBLIC(void) intrusive_ptr_add_ref(ActivityImpl* activity);
22   XBT_PUBLIC(void) intrusive_ptr_release(ActivityImpl* activity);
23
24   class CommImpl;
25   using CommImplPtr = boost::intrusive_ptr<CommImpl>;
26   class ExecImpl;
27   using ExecImplPtr = boost::intrusive_ptr<ExecImpl>;
28   class IoImpl;
29   using IoImplPtr = boost::intrusive_ptr<IoImpl>;
30   class RawImpl;
31   using RawImplPtr = boost::intrusive_ptr<RawImpl>;
32   class SleepImpl;
33   using SleepImplPtr = boost::intrusive_ptr<SleepImpl>;
34 }
35 namespace routing {
36   class NetPoint;
37 }
38 }
39 namespace simix {
40   class ActorImpl;
41   using ActorImplPtr = boost::intrusive_ptr<ActorImpl>;
42   class Host;
43 }
44 namespace surf {
45   class Resource;
46   class Cpu;
47   class LinkImpl;
48   class HostImpl;
49   class StorageImpl;
50   class FileImpl;
51 }
52 namespace trace_mgr {
53   class trace;
54   class future_evt_set;
55 }
56 }
57
58 typedef simgrid::s4u::Actor s4u_Actor;
59 typedef simgrid::s4u::Host s4u_Host;
60 typedef simgrid::s4u::Link s4u_Link;
61 typedef simgrid::s4u::File s4u_File;
62 typedef simgrid::s4u::Storage s4u_Storage;
63 typedef simgrid::s4u::NetZone s4u_NetZone;
64 typedef boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> smx_activity_t;
65 typedef simgrid::kernel::routing::NetPoint routing_NetPoint;
66 typedef simgrid::surf::Resource surf_Resource;
67 typedef simgrid::trace_mgr::trace tmgr_Trace;
68
69 #else
70
71 typedef struct s4u_Actor s4u_Actor;
72 typedef struct s4u_Host s4u_Host;
73 typedef struct s4u_Link s4u_Link;
74 typedef struct s4u_File s4u_File;
75 typedef struct s4u_Storage s4u_Storage;
76 typedef struct s4u_NetZone s4u_NetZone;
77 typedef struct kernel_Activity* smx_activity_t;
78 typedef struct routing_NetPoint routing_NetPoint;
79 typedef struct surf_Resource surf_Resource;
80 typedef struct Trace tmgr_Trace;
81
82 #endif
83
84 typedef s4u_NetZone* sg_netzone_t;
85 typedef s4u_Host* sg_host_t;
86 typedef s4u_Link* sg_link_t;
87 typedef s4u_Storage* sg_storage_t;
88 typedef s4u_File* sg_file_t;
89
90 typedef routing_NetPoint* sg_netpoint_t;
91 typedef surf_Resource *sg_resource_t;
92
93 typedef tmgr_Trace *tmgr_trace_t; /**< Opaque structure defining an availability trace */
94
95 typedef struct s_smx_simcall s_smx_simcall_t;
96 typedef struct s_smx_simcall* smx_simcall_t;
97
98 typedef enum {
99   SURF_LINK_FULLDUPLEX = 2,
100   SURF_LINK_SHARED = 1,
101   SURF_LINK_FATPIPE = 0
102 } e_surf_link_sharing_policy_t;
103
104 typedef enum {
105   SURF_TRACE_CONNECT_KIND_HOST_AVAIL = 4,
106   SURF_TRACE_CONNECT_KIND_SPEED = 3,
107   SURF_TRACE_CONNECT_KIND_LINK_AVAIL = 2,
108   SURF_TRACE_CONNECT_KIND_BANDWIDTH = 1,
109   SURF_TRACE_CONNECT_KIND_LATENCY = 0
110 } e_surf_trace_connect_kind_t;
111
112 typedef enum {
113   SURF_ACTOR_ON_FAILURE_DIE = 1,
114   SURF_ACTOR_ON_FAILURE_RESTART = 0
115 } e_surf_process_on_failure_t;
116
117
118 /** @ingroup m_datatypes_management_details
119  * @brief Type for any simgrid size
120  */
121 typedef unsigned long long sg_size_t;
122
123 /** @ingroup m_datatypes_management_details
124  * @brief Type for any simgrid offset
125  */
126 typedef long long sg_offset_t;
127
128 typedef unsigned long aid_t;
129
130 #endif