Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
remove the last include of private header from installed headers
authorMartin Quinson <martin.quinson@loria.fr>
Tue, 20 Mar 2018 13:47:49 +0000 (14:47 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Tue, 20 Mar 2018 13:47:54 +0000 (14:47 +0100)
include/simgrid/forward.h
include/simgrid/kernel/resource/Resource.hpp
include/simgrid/kernel/routing/RoutedZone.hpp
src/surf/trace_mgr.cpp
src/surf/trace_mgr.hpp

index 6e8fdd0..392a3f8 100644 (file)
@@ -52,6 +52,7 @@ namespace resource {
 class Action;
 class Model;
 class Resource;
+class TraceEvent;
 }
 namespace routing {
 class ClusterCreationArgs;
index f70ea2d..1c281bc 100644 (file)
@@ -6,7 +6,10 @@
 #ifndef SIMGRID_KERNEL_RESOURCE_RESOURCE_HPP
 #define SIMGRID_KERNEL_RESOURCE_RESOURCE_HPP
 
-#include "src/surf/surf_interface.hpp"
+#include <simgrid/forward.h>
+#include <xbt/signal.hpp>
+#include <xbt/str.h>
+#include <xbt/utility.hpp>
 
 namespace simgrid {
 namespace kernel {
@@ -45,7 +48,7 @@ public:
    * @param event What happened
    * @param value [TODO]
    */
-  virtual void apply_event(tmgr_trace_event_t event, double value) = 0;
+  virtual void apply_event(TraceEvent* event, double value) = 0;
 
   /** @brief Check if the current Resource is used (if it currently serves an action) */
   virtual bool isUsed() = 0;
@@ -76,9 +79,9 @@ private:
 
 protected:
   struct Metric {
-    double peak;              /**< The peak of the metric, ie its max value */
-    double scale;             /**< Current availability of the metric according to the traces, in [0,1] */
-    tmgr_trace_event_t event; /**< The associated trace event associated to the metric */
+    double peak;       /**< The peak of the metric, ie its max value */
+    double scale;      /**< Current availability of the metric according to the traces, in [0,1] */
+    TraceEvent* event; /**< The associated trace event associated to the metric */
   };
 };
 } // namespace resource
index f8ab5d1..efe3729 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2013-2018. 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. */
@@ -6,7 +6,7 @@
 #ifndef SIMGRID_ROUTING_GENERIC_HPP_
 #define SIMGRID_ROUTING_GENERIC_HPP_
 
-#include "simgrid/kernel/routing/NetZoneImpl.hpp"
+#include <simgrid/kernel/routing/NetZoneImpl.hpp>
 
 namespace simgrid {
 namespace kernel {
index 07c5ba6..2e2743f 100644 (file)
@@ -126,7 +126,7 @@ tmgr_trace_event_t simgrid::trace_mgr::future_evt_set::add_trace(tmgr_trace_t tr
 {
   tmgr_trace_event_t trace_iterator = nullptr;
 
-  trace_iterator           = new s_tmgr_trace_event_t;
+  trace_iterator           = new simgrid::kernel::resource::TraceEvent();
   trace_iterator->trace    = trace;
   trace_iterator->idx      = 0;
   trace_iterator->resource = resource;
index 28cf319..bcd2151 100644 (file)
 #include <queue>
 #include <vector>
 
-extern "C" {
 
 /* Iterator within a trace */
-struct s_tmgr_trace_event_t {
+namespace simgrid {
+namespace kernel {
+namespace resource {
+class TraceEvent {
+public:
   tmgr_trace_t trace;
   unsigned int idx;
   sg_resource_t resource;
   bool free_me;
 };
-typedef s_tmgr_trace_event_t* tmgr_trace_event_t;
+
+} // namespace resource
+} // namespace kernel
+} // namespace simgrid
+typedef simgrid::kernel::resource::TraceEvent* tmgr_trace_event_t;
+extern "C" {
 
 /**
  * \brief Free a trace event structure