Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[s4u] Add a header file with forward declarations
authorGabriel Corona <gabriel.corona@loria.fr>
Thu, 14 Jan 2016 15:50:24 +0000 (16:50 +0100)
committerGabriel Corona <gabriel.corona@loria.fr>
Fri, 15 Jan 2016 08:45:19 +0000 (09:45 +0100)
include/simgrid/s4u/actor.hpp
include/simgrid/s4u/async.hpp
include/simgrid/s4u/comm.hpp
include/simgrid/s4u/engine.hpp
include/simgrid/s4u/forward.hpp [new file with mode: 0644]
include/simgrid/s4u/mailbox.hpp
include/simgrid/s4u/storage.hpp
tools/cmake/DefinePackages.cmake

index d59ad63..f807407 100644 (file)
@@ -8,14 +8,11 @@
 
 #include <xbt/base.h>
 #include <simgrid/simix.h>
+#include <simgrid/s4u/forward.hpp>
 
 namespace simgrid {
 namespace s4u {
 
-class Comm;
-class Host;
-class Mailbox;
-
 /** @brief Simulation Agent
  *
  * An actor may be defined as a code executing in a location (host).
index 3454a03..37bd4e1 100644 (file)
@@ -11,6 +11,8 @@
 #include <xbt/base.h>
 #include <xbt/misc.h>
 
+#include <simgrid/s4u/forward.hpp>
+
 SG_BEGIN_DECL();
 typedef enum {
        inited, started, finished
@@ -20,10 +22,6 @@ SG_END_DECL();
 namespace simgrid {
 namespace s4u {
 
-/* Forward declaration */
-class Comm;
-
-
 /** @brief Asynchronous Actions
  *
  * This class is the ancestor of every asynchronous actions, that is, of actions that do take time in the simulated world.
index f006baf..fa6b064 100644 (file)
@@ -8,14 +8,13 @@
 #define SIMGRID_S4U_COMM_HPP
 
 #include <xbt/base.h>
+#include <simgrid/s4u/forward.hpp>
 #include <simgrid/s4u/async.hpp>
 #include <simgrid/s4u/mailbox.hpp>
 
 namespace simgrid {
 namespace s4u {
 
-class Mailbox;
-
 /** @brief Communication async
  *
  * Represents all asynchronous communications, that you can test or wait onto.
index 0f7dca1..da1d33a 100644 (file)
@@ -8,6 +8,8 @@
 
 #include <xbt/base.h>
 
+#include <simgrid/s4u/forward.hpp>
+
 namespace simgrid {
 namespace s4u {
 /** @brief Simulation engine
diff --git a/include/simgrid/s4u/forward.hpp b/include/simgrid/s4u/forward.hpp
new file mode 100644 (file)
index 0000000..12a7894
--- /dev/null
@@ -0,0 +1,22 @@
+/* Copyright (c) 2016. The SimGrid Team. All rights reserved.          */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
+
+#ifndef SIMGRID_S4U_FORWARD_HPP
+#define SIMGRID_S4U_FORWARD_HPP
+
+namespace simgrid {
+namespace s4u {
+
+class Async;
+class Comm;
+class Engine;
+class Host;
+class Mailbox;
+class Storage;
+
+}
+}
+
+#endif
index 93dad67..1962201 100644 (file)
@@ -9,13 +9,12 @@
 #include <boost/unordered_map.hpp>
 
 #include <xbt/base.h>
+#include <simgrid/s4u/forward.hpp>
 #include <simgrid/s4u/actor.hpp>
 
 namespace simgrid {
 namespace s4u {
 
-class Comm;
-
 /** @brief Mailboxes
  *
  * Rendez-vous point for network communications, similar to URLs on which you could post and retrieve data.
index b0b3335..66547b8 100644 (file)
@@ -10,6 +10,7 @@
 #include <boost/unordered_map.hpp>
 #include "xbt/base.h"
 #include "simgrid/simix.h"
+#include <simgrid/s4u/forward.hpp>
 
 namespace simgrid {
 namespace s4u {
index a09ab39..bfcf1b0 100644 (file)
@@ -675,6 +675,7 @@ set(headers_to_install
   include/simgrid/simix.hpp
   include/simgrid/host.h
   include/simgrid/link.h
+  include/simgrid/s4u/forward.hpp
   include/simgrid/s4u/actor.hpp
   include/simgrid/s4u/async.hpp
   include/simgrid/s4u/comm.hpp