Logo AND Algorithmique Numérique Distribuée

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