-/* 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. */
#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;
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> {