Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
further replace using statements with typedef ones to please sphinx
[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 #include <xbt/base.h>
10
11 #ifdef __cplusplus
12
13 #include <boost/intrusive_ptr.hpp>
14
15 namespace simgrid {
16
17 namespace s4u {
18 class Activity;
19
20 class Actor;
21 /** Smart pointer to a simgrid::s4u::Actor */
22 typedef boost::intrusive_ptr<Actor> ActorPtr;
23 XBT_PUBLIC void intrusive_ptr_release(Actor* actor);
24 XBT_PUBLIC void intrusive_ptr_add_ref(Actor* actor);
25
26 class Barrier;
27
28 class Comm;
29 /** Smart pointer to a simgrid::s4u::Comm */
30 typedef boost::intrusive_ptr<Comm> CommPtr;
31 XBT_PUBLIC void intrusive_ptr_release(Comm* c);
32 XBT_PUBLIC void intrusive_ptr_add_ref(Comm* c);
33
34 class ConditionVariable;
35 /** Smart pointer to a simgrid::s4u::ConditionVariable */
36 typedef boost::intrusive_ptr<ConditionVariable> ConditionVariablePtr;
37 XBT_PUBLIC void intrusive_ptr_release(ConditionVariable* c);
38 XBT_PUBLIC void intrusive_ptr_add_ref(ConditionVariable* c);
39
40 class Engine;
41
42 class Exec;
43 /** Smart pointer to a simgrid::s4u::Exec */
44 typedef boost::intrusive_ptr<Exec> ExecPtr;
45 XBT_PUBLIC void intrusive_ptr_release(Exec* e);
46 XBT_PUBLIC void intrusive_ptr_add_ref(Exec* e);
47
48 class Host;
49
50 class Io;
51 /** Smart pointer to a simgrid::s4u::Io */
52 typedef boost::intrusive_ptr<Io> IoPtr;
53 XBT_PUBLIC void intrusive_ptr_release(Io* i);
54 XBT_PUBLIC void intrusive_ptr_add_ref(Io* i);
55
56 class Link;
57
58 class Mailbox;
59 /** Smart pointer to a simgrid::s4u::Mailbox */
60 typedef boost::intrusive_ptr<Mailbox> MailboxPtr;
61 XBT_PUBLIC void intrusive_ptr_release(Mailbox* m);
62 XBT_PUBLIC void intrusive_ptr_add_ref(Mailbox* m);
63
64 class Mutex;
65 XBT_PUBLIC void intrusive_ptr_release(Mutex* m);
66 XBT_PUBLIC void intrusive_ptr_add_ref(Mutex* m);
67 /** Smart pointer to a simgrid::s4u::Mutex */
68 typedef boost::intrusive_ptr<Mutex> MutexPtr;
69
70 class NetZone;
71 class VirtualMachine;
72 class File;
73 class Storage;
74 } // namespace s4u
75
76 namespace config {
77 template <class T> class Flag;
78 }
79
80 namespace kernel {
81 class EngineImpl;
82 namespace actor {
83 class ActorImpl;
84 typedef boost::intrusive_ptr<ActorImpl> ActorImplPtr;
85 } // namespace actor
86
87 namespace activity {
88   class ActivityImpl;
89   typedef boost::intrusive_ptr<ActivityImpl> ActivityImplPtr;
90   XBT_PUBLIC void intrusive_ptr_add_ref(ActivityImpl* activity);
91   XBT_PUBLIC void intrusive_ptr_release(ActivityImpl* activity);
92
93   class ConditionVariableImpl;
94
95   class CommImpl;
96   typedef boost::intrusive_ptr<CommImpl> CommImplPtr;
97   class ExecImpl;
98   typedef boost::intrusive_ptr<ExecImpl> ExecImplPtr;
99   class IoImpl;
100   typedef boost::intrusive_ptr<IoImpl> IoImplPtr;
101   class MutexImpl;
102   typedef boost::intrusive_ptr<MutexImpl> MutexImplPtr;
103   class RawImpl;
104   typedef boost::intrusive_ptr<RawImpl> RawImplPtr;
105   class SleepImpl;
106   typedef boost::intrusive_ptr<SleepImpl> SleepImplPtr;
107
108   class MailboxImpl;
109 }
110 namespace context {
111 class Context;
112 class ContextFactory;
113 } // namespace context
114 namespace lmm {
115 class Element;
116 class Variable;
117 class Constraint;
118 class ConstraintLight;
119 class System;
120 }
121 namespace resource {
122 class Action;
123 class Model;
124 class Resource;
125 class NetworkModel;
126 class TraceEvent;
127 class LinkImpl;
128 class NetworkAction;
129 }
130 namespace routing {
131 class ClusterCreationArgs;
132 class LinkCreationArgs;
133 class NetPoint;
134 class NetZoneImpl;
135 class RouteCreationArgs;
136 }
137 } // namespace kernel
138 namespace simix {
139   class Host;
140 }
141 namespace surf {
142   class Cpu;
143   class CpuModel;
144   class HostImpl;
145   class HostModel;
146   class StorageImpl;
147   class StorageType;
148   class StorageModel;
149 }
150 namespace mc {
151 class CommunicationDeterminismChecker;
152 }
153 namespace trace_mgr {
154   class trace;
155   class future_evt_set;
156 }
157 namespace vm {
158 class VMModel;
159 class VirtualMachineImpl;
160 } // namespace vm
161 } // namespace simgrid
162
163 typedef simgrid::s4u::Actor s4u_Actor;
164 typedef simgrid::s4u::Barrier s4u_Barrier;
165 typedef simgrid::s4u::Host s4u_Host;
166 typedef simgrid::s4u::Link s4u_Link;
167 typedef simgrid::s4u::File s4u_File;
168 typedef simgrid::s4u::Storage s4u_Storage;
169 typedef simgrid::s4u::NetZone s4u_NetZone;
170 typedef simgrid::s4u::VirtualMachine s4u_VM;
171 typedef boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> smx_activity_t;
172 typedef simgrid::trace_mgr::trace* tmgr_trace_t;
173
174 typedef simgrid::kernel::context::Context* smx_context_t;
175 typedef simgrid::kernel::actor::ActorImpl* smx_actor_t;
176 typedef simgrid::kernel::activity::ConditionVariableImpl* smx_cond_t;
177 typedef simgrid::kernel::activity::MutexImpl* smx_mutex_t;
178 typedef simgrid::kernel::activity::MailboxImpl* smx_mailbox_t;
179 typedef simgrid::surf::StorageImpl* surf_storage_t;
180
181 #else
182
183 typedef struct s4u_Actor s4u_Actor;
184 typedef struct s4u_Barrier s4u_Barrier;
185 typedef struct s4u_Host s4u_Host;
186 typedef struct s4u_Link s4u_Link;
187 typedef struct s4u_File s4u_File;
188 typedef struct s4u_Storage s4u_Storage;
189 typedef struct s4u_NetZone s4u_NetZone;
190 typedef struct s4u_VM s4u_VM;
191 typedef struct kernel_Activity* smx_activity_t;
192
193 typedef struct s_smx_context* smx_context_t;
194 typedef struct s_smx_actor* smx_actor_t;
195 typedef struct s_smx_cond_t* smx_cond_t;
196 typedef struct s_smx_mutex* smx_mutex_t;
197 typedef struct s_smx_mailbox* smx_mailbox_t;
198 typedef struct s_surf_storage* surf_storage_t;
199
200 #endif
201
202 typedef s4u_Barrier* sg_bar_t;
203 typedef s4u_NetZone* sg_netzone_t;
204 typedef s4u_Host* sg_host_t;
205 typedef s4u_Link* sg_link_t;
206 typedef s4u_Storage* sg_storage_t;
207 typedef s4u_File* sg_file_t;
208 typedef s4u_VM* sg_vm_t;
209 typedef s4u_Actor* sg_actor_t;
210
211 typedef struct s_smx_simcall* smx_simcall_t;
212
213 /** @ingroup m_datatypes_management_details
214  * @brief Type for any simgrid size
215  */
216 typedef unsigned long long sg_size_t;
217
218 /** @ingroup m_datatypes_management_details
219  * @brief Type for any simgrid offset
220  */
221 typedef long long sg_offset_t;
222
223 typedef long aid_t;
224
225 #endif /* SIMGRID_TYPES_H */