X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/1386d9951c6653d682ba02d5ed9155485acf4f64..dc6258583c78a558d0bfc6d317272810e1b278ac:/src/s4u/s4u_Disk.cpp diff --git a/src/s4u/s4u_Disk.cpp b/src/s4u/s4u_Disk.cpp index b543f9499e..684cbab8be 100644 --- a/src/s4u/s4u_Disk.cpp +++ b/src/s4u/s4u_Disk.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2019. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2019-2020. 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. */ @@ -10,9 +10,8 @@ #include "src/kernel/resource/DiskImpl.hpp" namespace simgrid { -namespace xbt { -template class Extendable; -} // namespace xbt + +template class xbt::Extendable; namespace s4u { @@ -20,19 +19,19 @@ xbt::signal Disk::on_creation; xbt::signal Disk::on_destruction; xbt::signal Disk::on_state_change; -Disk::Disk(const std::string& name, kernel::resource::DiskImpl* pimpl) : pimpl_(pimpl), name_(name) +double Disk::get_read_bandwidth() const { - Engine::get_instance()->disk_register(name_, this); + return this->pimpl_->get_read_bandwidth(); } -Disk* Disk::by_name(const std::string& name) +double Disk::get_write_bandwidth() const { - return Engine::get_instance()->disk_by_name(name); + return pimpl_->get_write_bandwidth(); } -Disk* Disk::by_name_or_null(const std::string& name) +Host* Disk::get_host() const { - return Engine::get_instance()->disk_by_name_or_null(name); + return pimpl_->get_host(); } const std::unordered_map* Disk::get_properties() const @@ -67,7 +66,6 @@ sg_size_t Disk::read(sg_size_t size) IoPtr Disk::write_async(sg_size_t size) { - return IoPtr(io_init(size, Io::OpType::WRITE)->start()); }