Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Hide a bit an internal datatype to please sonar
[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 Actor;
17   class Host;
18   class Link;
19   class Mailbox;
20   class NetZone;
21   }
22   namespace kernel {
23      namespace activity {
24        class ActivityImpl;
25      }
26      namespace routing {
27      class NetPoint;
28      }
29   }
30   namespace simix {
31     class Host;
32   }
33   namespace surf {
34     class Resource;
35     class Cpu;
36     class LinkImpl;
37     class HostImpl;
38   }
39   namespace trace_mgr {
40     class trace;
41     class future_evt_set;
42   }
43 }
44
45 typedef simgrid::s4u::Actor s4u_Actor;
46 typedef simgrid::s4u::Host s4u_Host;
47 typedef simgrid::s4u::Link s4u_Link;
48 typedef simgrid::s4u::NetZone s4u_NetZone;
49 typedef simgrid::kernel::activity::ActivityImpl kernel_Activity;
50 typedef simgrid::kernel::routing::NetPoint routing_NetPoint;
51 typedef simgrid::surf::Resource surf_Resource;
52 typedef simgrid::trace_mgr::trace tmgr_Trace;
53
54 #else
55
56 typedef struct s4u_Actor s4u_Actor;
57 typedef struct s4u_Host s4u_Host;
58 typedef struct s4u_Link s4u_Link;
59 typedef struct s4u_NetZone s4u_NetZone;
60 typedef struct kernel_Activity kernel_Activity;
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
71 typedef kernel_Activity *smx_activity_t;
72
73 typedef routing_NetPoint* sg_netpoint_t;
74 typedef surf_Resource *sg_resource_t;
75
76 // Types which are in fact dictelmt:
77 typedef struct s_xbt_dictelm *sg_storage_t;
78
79 typedef tmgr_Trace *tmgr_trace_t; /**< Opaque structure defining an availability trace */
80
81 typedef struct s_smx_simcall s_smx_simcall_t;
82 typedef struct s_smx_simcall* smx_simcall_t;
83
84 typedef enum {
85   SURF_LINK_FULLDUPLEX = 2,
86   SURF_LINK_SHARED = 1,
87   SURF_LINK_FATPIPE = 0
88 } e_surf_link_sharing_policy_t;
89
90 typedef enum {
91   SURF_TRACE_CONNECT_KIND_HOST_AVAIL = 4,
92   SURF_TRACE_CONNECT_KIND_SPEED = 3,
93   SURF_TRACE_CONNECT_KIND_LINK_AVAIL = 2,
94   SURF_TRACE_CONNECT_KIND_BANDWIDTH = 1,
95   SURF_TRACE_CONNECT_KIND_LATENCY = 0
96 } e_surf_trace_connect_kind_t;
97
98 typedef enum {
99   SURF_PROCESS_ON_FAILURE_DIE = 1,
100   SURF_PROCESS_ON_FAILURE_RESTART = 0
101 } e_surf_process_on_failure_t;
102
103
104 /** @ingroup m_datatypes_management_details
105  * @brief Type for any simgrid size
106  */
107 typedef unsigned long long sg_size_t;
108
109 /** @ingroup m_datatypes_management_details
110  * @brief Type for any simgrid offset
111  */
112 typedef long long sg_offset_t;
113
114 #endif