]> AND Public Git Repository - simgrid.git/blobdiff - src/kernel/resource/Resource.hpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Cosmetics
[simgrid.git] / src / kernel / resource / Resource.hpp
index 1d0e92ebf2041da13b212c96bb319c4de75cc290..bf67c6a42f8d90bde1b6202717721e42a00f1d32 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2004-2021. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2004-2023. 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. */
@@ -7,6 +7,7 @@
 #define SIMGRID_KERNEL_RESOURCE_RESOURCE_HPP
 
 #include "simgrid/forward.h"
+#include "src/kernel/actor/Simcall.hpp"
 #include "src/kernel/lmm/maxmin.hpp" // Constraint
 #include "src/kernel/resource/profile/Event.hpp"
 #include "src/kernel/resource/profile/FutureEvtSet.hpp"
 
 #include <string>
 
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
 
-/** @ingroup SURF_interface
- * @brief SURF resource interface class
+/** @ingroup Model_interface
+ * @brief Resource interface class
  * @details This is the ancestor class of every resources in SimGrid, such as links, CPU or disk
  */
-class XBT_PUBLIC Resource {
+class XBT_PUBLIC Resource : public actor::ObjectAccessSimcallItem {
   std::string name_            = "unnamed";
   bool is_on_                  = true;
   bool sealed_                 = false;
@@ -110,9 +109,7 @@ public:
   bool is_used() const override { return model_->get_maxmin_system()->constraint_used(constraint_); }
 };
 
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
 
 namespace std {
 template <> class hash<simgrid::kernel::resource::Resource> {