Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
simix: change two more getter simcalls into methods
[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 namespace simgrid {
13   namespace s4u {
14     class As;
15     class Host;
16     class Mailbox;
17   }
18   namespace simix {
19     class Synchro;
20   }
21   namespace surf {
22     class Resource;
23     class Cpu;
24     class NetCard;
25     class Link;
26   }
27   namespace trace_mgr {
28     class trace;
29     class future_evt_set;
30   }
31 }
32
33 typedef simgrid::s4u::As simgrid_As;
34 typedef simgrid::s4u::Host simgrid_Host;
35 typedef simgrid::s4u::Mailbox simgrid_Mailbox;
36 typedef simgrid::simix::Synchro simix_Synchro;
37 typedef simgrid::surf::Cpu surf_Cpu;
38 typedef simgrid::surf::NetCard surf_NetCard;
39 typedef simgrid::surf::Link Link;
40 typedef simgrid::surf::Resource surf_Resource;
41 typedef simgrid::trace_mgr::trace tmgr_Trace;
42
43 #else
44
45 typedef struct simgrid_As   simgrid_As;
46 typedef struct simgrid_Host simgrid_Host;
47 typedef struct simgrid_Mailbox simgrid_Mailbox;
48 typedef struct simix_Synchro simix_Synchro;
49 typedef struct surf_Cpu surf_Cpu;
50 typedef struct surf_NetCard surf_NetCard;
51 typedef struct surf_Resource surf_Resource;
52 typedef struct Link Link;
53 typedef struct Trace tmgr_Trace;
54 #endif
55
56 typedef simgrid_As *AS_t;
57 typedef simgrid_Host* sg_host_t;
58 typedef simgrid_Mailbox* sg_mbox_t;
59
60 typedef simix_Synchro *smx_synchro_t;
61
62 typedef surf_Cpu *surf_cpu_t;
63 typedef surf_NetCard *sg_netcard_t;
64 typedef surf_Resource *sg_resource_t;
65
66 // Types which are in fact dictelmt:
67 typedef struct s_xbt_dictelm *sg_storage_t;
68
69 typedef tmgr_Trace *tmgr_trace_t; /**< Opaque structure defining an availability trace */
70
71 typedef enum {
72   SURF_LINK_FULLDUPLEX = 2,
73   SURF_LINK_SHARED = 1,
74   SURF_LINK_FATPIPE = 0
75 } e_surf_link_sharing_policy_t;
76
77 typedef enum {
78   SURF_TRACE_CONNECT_KIND_HOST_AVAIL = 4,
79   SURF_TRACE_CONNECT_KIND_SPEED = 3,
80   SURF_TRACE_CONNECT_KIND_LINK_AVAIL = 2,
81   SURF_TRACE_CONNECT_KIND_BANDWIDTH = 1,
82   SURF_TRACE_CONNECT_KIND_LATENCY = 0
83 } e_surf_trace_connect_kind_t;
84
85 typedef enum {
86   SURF_PROCESS_ON_FAILURE_DIE = 1,
87   SURF_PROCESS_ON_FAILURE_RESTART = 0
88 } e_surf_process_on_failure_t;
89
90
91 /** @ingroup m_datatypes_management_details
92  * @brief Type for any simgrid size
93  */
94 typedef unsigned long long sg_size_t;
95
96 /** @ingroup m_datatypes_management_details
97  * @brief Type for any simgrid offset
98  */
99 typedef long long sg_offset_t;
100
101 #endif