From: Martin Quinson Date: Tue, 20 Mar 2018 13:47:49 +0000 (+0100) Subject: remove the last include of private header from installed headers X-Git-Tag: v3.19~11^2 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/0bb08c80b2bff9de24524dc98f04cd145dfc93c0 remove the last include of private header from installed headers --- diff --git a/include/simgrid/forward.h b/include/simgrid/forward.h index 6e8fdd02ea..392a3f8d2a 100644 --- a/include/simgrid/forward.h +++ b/include/simgrid/forward.h @@ -52,6 +52,7 @@ namespace resource { class Action; class Model; class Resource; +class TraceEvent; } namespace routing { class ClusterCreationArgs; diff --git a/include/simgrid/kernel/resource/Resource.hpp b/include/simgrid/kernel/resource/Resource.hpp index f70ea2da46..1c281bc64a 100644 --- a/include/simgrid/kernel/resource/Resource.hpp +++ b/include/simgrid/kernel/resource/Resource.hpp @@ -6,7 +6,10 @@ #ifndef SIMGRID_KERNEL_RESOURCE_RESOURCE_HPP #define SIMGRID_KERNEL_RESOURCE_RESOURCE_HPP -#include "src/surf/surf_interface.hpp" +#include +#include +#include +#include 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 diff --git a/include/simgrid/kernel/routing/RoutedZone.hpp b/include/simgrid/kernel/routing/RoutedZone.hpp index f8ab5d16f6..efe37297ae 100644 --- a/include/simgrid/kernel/routing/RoutedZone.hpp +++ b/include/simgrid/kernel/routing/RoutedZone.hpp @@ -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 namespace simgrid { namespace kernel { diff --git a/src/surf/trace_mgr.cpp b/src/surf/trace_mgr.cpp index 07c5ba6f3e..2e2743ff2c 100644 --- a/src/surf/trace_mgr.cpp +++ b/src/surf/trace_mgr.cpp @@ -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; diff --git a/src/surf/trace_mgr.hpp b/src/surf/trace_mgr.hpp index 28cf31937d..bcd2151a92 100644 --- a/src/surf/trace_mgr.hpp +++ b/src/surf/trace_mgr.hpp @@ -11,16 +11,24 @@ #include #include -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