Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove unused type definitions.
[simgrid.git] / include / simgrid / forward.h
1 /* Copyright (c) 2004-2019. 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 /** Smart pointer to a simgrid::s4u::Barrier */
28 typedef boost::intrusive_ptr<Barrier> BarrierPtr;
29 XBT_PUBLIC void intrusive_ptr_release(Barrier* m);
30 XBT_PUBLIC void intrusive_ptr_add_ref(Barrier* m);
31
32 class Comm;
33 /** Smart pointer to a simgrid::s4u::Comm */
34 typedef boost::intrusive_ptr<Comm> CommPtr;
35 XBT_PUBLIC void intrusive_ptr_release(Comm* c);
36 XBT_PUBLIC void intrusive_ptr_add_ref(Comm* c);
37
38 class ConditionVariable;
39 /** Smart pointer to a simgrid::s4u::ConditionVariable */
40 typedef boost::intrusive_ptr<ConditionVariable> ConditionVariablePtr;
41 XBT_PUBLIC void intrusive_ptr_release(ConditionVariable* c);
42 XBT_PUBLIC void intrusive_ptr_add_ref(ConditionVariable* c);
43
44 class Engine;
45
46 class Exec;
47 /** Smart pointer to a simgrid::s4u::Exec */
48 typedef boost::intrusive_ptr<Exec> ExecPtr;
49 XBT_PUBLIC void intrusive_ptr_release(Exec* e);
50 XBT_PUBLIC void intrusive_ptr_add_ref(Exec* e);
51 class ExecSeq;
52 class ExecPar;
53
54 class Host;
55
56 class Io;
57 /** Smart pointer to a simgrid::s4u::Io */
58 typedef boost::intrusive_ptr<Io> IoPtr;
59 XBT_PUBLIC void intrusive_ptr_release(Io* i);
60 XBT_PUBLIC void intrusive_ptr_add_ref(Io* i);
61
62 class Link;
63
64 class Mailbox;
65
66 class Mutex;
67 XBT_PUBLIC void intrusive_ptr_release(Mutex* m);
68 XBT_PUBLIC void intrusive_ptr_add_ref(Mutex* m);
69 /** Smart pointer to a simgrid::s4u::Mutex */
70 typedef boost::intrusive_ptr<Mutex> MutexPtr;
71
72 class NetZone;
73 class VirtualMachine;
74 class File;
75
76 class Semaphore;
77 /** Smart pointer to a simgrid::s4u::Semaphore */
78 typedef boost::intrusive_ptr<Semaphore> SemaphorePtr;
79 XBT_PUBLIC void intrusive_ptr_release(Semaphore* m);
80 XBT_PUBLIC void intrusive_ptr_add_ref(Semaphore* m);
81
82 class Storage;
83 } // namespace s4u
84
85 namespace config {
86 template <class T> class Flag;
87 }
88
89 namespace kernel {
90 class EngineImpl;
91 namespace actor {
92 class ActorImpl;
93 typedef boost::intrusive_ptr<ActorImpl> ActorImplPtr;
94 } // namespace actor
95
96 namespace activity {
97   class ActivityImpl;
98   typedef boost::intrusive_ptr<ActivityImpl> ActivityImplPtr;
99   XBT_PUBLIC void intrusive_ptr_add_ref(ActivityImpl* activity);
100   XBT_PUBLIC void intrusive_ptr_release(ActivityImpl* activity);
101
102   class ConditionVariableImpl;
103
104   class CommImpl;
105   typedef boost::intrusive_ptr<CommImpl> CommImplPtr;
106   class ExecImpl;
107   typedef boost::intrusive_ptr<ExecImpl> ExecImplPtr;
108   class IoImpl;
109   typedef boost::intrusive_ptr<IoImpl> IoImplPtr;
110   class MutexImpl;
111   typedef boost::intrusive_ptr<MutexImpl> MutexImplPtr;
112   class RawImpl;
113   typedef boost::intrusive_ptr<RawImpl> RawImplPtr;
114   class SemaphoreImpl;
115   typedef boost::intrusive_ptr<SemaphoreImpl> SemaphoreImplPtr;
116   class SleepImpl;
117   typedef boost::intrusive_ptr<SleepImpl> SleepImplPtr;
118
119   class MailboxImpl;
120 }
121 namespace context {
122 class Context;
123 class ContextFactory;
124 } // namespace context
125 namespace lmm {
126 class Element;
127 class Variable;
128 class Constraint;
129 class ConstraintLight;
130 class System;
131 }
132 namespace resource {
133 class Action;
134 class Model;
135 class Resource;
136 class NetworkModel;
137 class LinkImpl;
138 class NetworkAction;
139 class StorageImpl;
140 class StorageType;
141 class StorageModel;
142 }
143 namespace routing {
144 class ClusterCreationArgs;
145 class LinkCreationArgs;
146 class NetPoint;
147 class NetZoneImpl;
148 class RouteCreationArgs;
149 }
150 namespace profile {
151 class Event;
152 class FutureEvtSet;
153 class Profile;
154 } // namespace profile
155 } // namespace kernel
156 namespace simix {
157   class Host;
158   class Timer;
159 }
160 namespace surf {
161   class Cpu;
162   class CpuModel;
163   class HostImpl;
164   class HostModel;
165 }
166 namespace mc {
167 class CommunicationDeterminismChecker;
168 }
169 namespace vm {
170 class VMModel;
171 class VirtualMachineImpl;
172 } // namespace vm
173 } // namespace simgrid
174
175 typedef simgrid::s4u::Actor s4u_Actor;
176 typedef simgrid::s4u::Barrier s4u_Barrier;
177 typedef simgrid::s4u::Host s4u_Host;
178 typedef simgrid::s4u::Link s4u_Link;
179 typedef simgrid::s4u::File s4u_File;
180 typedef simgrid::s4u::Semaphore s4u_Semaphore;
181 typedef simgrid::s4u::Storage s4u_Storage;
182 typedef simgrid::s4u::NetZone s4u_NetZone;
183 typedef simgrid::s4u::VirtualMachine s4u_VM;
184 typedef boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> smx_activity_t;
185
186 typedef simgrid::simix::Timer* smx_timer_t;
187 typedef simgrid::kernel::context::Context* smx_context_t;
188 typedef simgrid::kernel::actor::ActorImpl* smx_actor_t;
189 typedef simgrid::kernel::activity::ConditionVariableImpl* smx_cond_t;
190 typedef simgrid::kernel::activity::MailboxImpl* smx_mailbox_t;
191 typedef simgrid::kernel::activity::MutexImpl* smx_mutex_t;
192 typedef simgrid::kernel::activity::SemaphoreImpl* smx_sem_t;
193
194 #else
195
196 typedef struct s4u_Actor s4u_Actor;
197 typedef struct s4u_Barrier s4u_Barrier;
198 typedef struct s4u_Host s4u_Host;
199 typedef struct s4u_Link s4u_Link;
200 typedef struct s4u_File s4u_File;
201 typedef struct s4u_Semaphore s4u_Semaphore;
202 typedef struct s4u_Storage s4u_Storage;
203 typedef struct s4u_NetZone s4u_NetZone;
204 typedef struct s4u_VM s4u_VM;
205 typedef struct kernel_Activity* smx_activity_t;
206
207 typedef struct s_smx_timer* smx_timer_t;
208 typedef struct s_smx_actor* smx_actor_t;
209 typedef struct s_smx_cond_t* smx_cond_t;
210 typedef struct s_smx_context* smx_context_t;
211 typedef struct s_smx_mailbox* smx_mailbox_t;
212 typedef struct s_smx_mutex* smx_mutex_t;
213 typedef struct s_smx_sem* smx_sem_t;
214
215 #endif
216
217 typedef s4u_Barrier* sg_bar_t;
218 typedef s4u_Semaphore* sg_sem_t;
219 typedef s4u_NetZone* sg_netzone_t;
220 typedef s4u_Host* sg_host_t;
221 typedef s4u_Link* sg_link_t;
222 typedef s4u_Storage* sg_storage_t;
223 typedef s4u_File* sg_file_t;
224 typedef s4u_VM* sg_vm_t;
225 typedef s4u_Actor* sg_actor_t;
226
227 typedef struct s_smx_simcall* smx_simcall_t;
228
229 /** @ingroup m_datatypes_management_details
230  * @brief Type for any simgrid size
231  */
232 typedef unsigned long long sg_size_t;
233
234 /** @ingroup m_datatypes_management_details
235  * @brief Type for any simgrid offset
236  */
237 typedef long long sg_offset_t;
238
239 /** Actor's ID, just like the classical processes' have PID in UNIX */
240 typedef long aid_t;
241
242 #endif /* SIMGRID_TYPES_H */