Logo AND Algorithmique Numérique Distribuée

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