Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix mingw builds (?)
[simgrid.git] / include / simgrid / forward.h
1 /* Copyright (c) 2004-2018. The SimGrid Team. All rights reserved.          */
2
3 /* This program is free software; you can redistribute it and/or modify it
4  * under the terms of the license (GNU LGPL) which comes with this package. */
5
6 #ifndef SIMGRID_TYPES_H
7 #define SIMGRID_TYPES_H
8
9 #ifdef __cplusplus
10
11 #include <simgrid/s4u/forward.hpp>
12
13 namespace simgrid {
14 namespace config {
15 template <class T> class Flag;
16 }
17
18 namespace kernel {
19 class EngineImpl;
20 namespace actor {
21 class ActorImpl;
22 using ActorImplPtr = boost::intrusive_ptr<ActorImpl>;
23 } // namespace actor
24 namespace activity {
25   class ActivityImpl;
26   using ActivityImplPtr = boost::intrusive_ptr<ActivityImpl>;
27   XBT_PUBLIC void intrusive_ptr_add_ref(ActivityImpl* activity);
28   XBT_PUBLIC void intrusive_ptr_release(ActivityImpl* activity);
29
30   class CommImpl;
31   using CommImplPtr = boost::intrusive_ptr<CommImpl>;
32   class ExecImpl;
33   using ExecImplPtr = boost::intrusive_ptr<ExecImpl>;
34   class IoImpl;
35   using IoImplPtr = boost::intrusive_ptr<IoImpl>;
36   class MutexImpl;
37   using MutexImplPtr = boost::intrusive_ptr<MutexImpl>;
38   class RawImpl;
39   using RawImplPtr = boost::intrusive_ptr<RawImpl>;
40   class SleepImpl;
41   using SleepImplPtr = boost::intrusive_ptr<SleepImpl>;
42
43   class MailboxImpl;
44 }
45 namespace context {
46 class Context;
47 class ContextFactory;
48 } // namespace context
49 namespace lmm {
50 class Element;
51 class Variable;
52 class Constraint;
53 class ConstraintLight;
54 class System;
55 }
56 namespace resource {
57 class Action;
58 class Model;
59 class Resource;
60 class TraceEvent;
61 class LinkImpl;
62 class NetworkAction;
63 }
64 namespace routing {
65 class ClusterCreationArgs;
66 class LinkCreationArgs;
67 class NetPoint;
68 class NetZoneImpl;
69 class RouteCreationArgs;
70 }
71 } // namespace kernel
72 namespace simix {
73   class Host;
74 }
75 namespace surf {
76   class Cpu;
77   class CpuModel;
78   class HostImpl;
79   class HostModel;
80   class StorageImpl;
81   class StorageType;
82   class StorageModel;
83 }
84 namespace trace_mgr {
85   class trace;
86   class future_evt_set;
87 }
88 } // namespace simgrid
89
90 typedef simgrid::s4u::Actor s4u_Actor;
91 typedef simgrid::s4u::Host s4u_Host;
92 typedef simgrid::s4u::Link s4u_Link;
93 typedef simgrid::s4u::File s4u_File;
94 typedef simgrid::s4u::Storage s4u_Storage;
95 typedef simgrid::s4u::NetZone s4u_NetZone;
96 typedef simgrid::s4u::VirtualMachine s4u_VM;
97 typedef boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> smx_activity_t;
98 typedef simgrid::trace_mgr::trace* tmgr_trace_t;
99
100 typedef simgrid::kernel::context::Context* smx_context_t;
101 typedef simgrid::kernel::actor::ActorImpl* smx_actor_t;
102 typedef simgrid::kernel::activity::MutexImpl* smx_mutex_t;
103 typedef simgrid::kernel::activity::MailboxImpl* smx_mailbox_t;
104 typedef simgrid::surf::StorageImpl* surf_storage_t;
105
106 #else
107
108 typedef struct s4u_Actor s4u_Actor;
109 typedef struct s4u_Host s4u_Host;
110 typedef struct s4u_Link s4u_Link;
111 typedef struct s4u_File s4u_File;
112 typedef struct s4u_Storage s4u_Storage;
113 typedef struct s4u_NetZone s4u_NetZone;
114 typedef struct s4u_VM s4u_VM;
115 typedef struct kernel_Activity* smx_activity_t;
116
117 typedef struct s_smx_context* smx_context_t;
118 typedef struct s_smx_actor* smx_actor_t;
119 typedef struct s_smx_mutex* smx_mutex_t;
120 typedef struct s_smx_mailbox* smx_mailbox_t;
121 typedef struct s_surf_storage* surf_storage_t;
122
123 #endif
124
125 typedef s4u_NetZone* sg_netzone_t;
126 typedef s4u_Host* sg_host_t;
127 typedef s4u_Link* sg_link_t;
128 typedef s4u_Storage* sg_storage_t;
129 typedef s4u_File* sg_file_t;
130 typedef s4u_VM* sg_vm_t;
131 typedef s4u_Actor* sg_actor_t;
132
133 typedef struct s_smx_simcall* smx_simcall_t;
134
135 /** @ingroup m_datatypes_management_details
136  * @brief Type for any simgrid size
137  */
138 typedef unsigned long long sg_size_t;
139
140 /** @ingroup m_datatypes_management_details
141  * @brief Type for any simgrid offset
142  */
143 typedef long long sg_offset_t;
144
145 typedef long aid_t;
146
147 #endif /* SIMGRID_TYPES_H */