Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
kill an unused method in HostImpl (that should be renamed StorageImpl or something)
[simgrid.git] / src / surf / HostImpl.hpp
1 /* Copyright (c) 2004-2018. The SimGrid Team. All rights reserved.          */
2
3 /* This program is free software; you can redistribute it and/or modify it
4  * under the terms of the license (GNU LGPL) which comes with this package. */
5
6 #include "cpu_interface.hpp"
7 #include "network_interface.hpp"
8 #include "src/surf/PropertyHolder.hpp"
9
10 #include "StorageImpl.hpp"
11
12 #ifndef SURF_HOST_INTERFACE_HPP_
13 #define SURF_HOST_INTERFACE_HPP_
14
15 /*********
16  * Model *
17  *********/
18
19 namespace simgrid {
20 namespace surf {
21
22 /** @ingroup SURF_host_interface
23  * @brief SURF Host model interface class
24  * @details A model is an object which handle the interactions between its Resources and its Actions
25  */
26 class XBT_PRIVATE HostModel : public kernel::resource::Model {
27 public:
28   HostModel() : Model(Model::UpdateAlgo::Full) {}
29
30   virtual void ignore_empty_vm_in_pm_LMM();
31   virtual kernel::resource::Action* execute_parallel(int host_nb, sg_host_t* host_list, double* flops_amount,
32                                                      double* bytes_amount, double rate);
33 };
34
35 /************
36  * Resource *
37  ************/
38 /** @ingroup SURF_host_interface
39  * @brief SURF Host interface class
40  * @details An host represents a machine with a aggregation of a Cpu, a RoutingEdge and a Storage
41  */
42 class XBT_PRIVATE HostImpl : public simgrid::surf::PropertyHolder {
43
44 public:
45   explicit HostImpl(s4u::Host* host);
46   virtual ~HostImpl() = default;
47
48   /** @brief Get the vector of storages (by names) attached to the Host */
49   virtual std::vector<const char*> get_attached_storages();
50
51   std::map<std::string, simgrid::surf::StorageImpl*> storage_;
52   simgrid::s4u::Host* piface_ = nullptr;
53 };
54 }
55 }
56
57 XBT_PUBLIC_DATA simgrid::surf::HostModel* surf_host_model;
58
59 #endif /* SURF_Host_INTERFACE_HPP_ */