Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Give a p_netcard to simgrid::Host instead of relying on extensions for that
[simgrid.git] / include / simgrid / Host.hpp
index e1d2999..2810c16 100644 (file)
 #include <vector>
 
 #include <xbt/base.h>
-#include <xbt/Facetable.hpp>
 #include <xbt/string.hpp>
+#include <xbt/Extendable.hpp>
 
 namespace simgrid {
 
-XBT_PUBLIC_CLASS Host : public simgrid::xbt::Facetable<Host> {
+XBT_PUBLIC_CLASS Host :
+public simgrid::xbt::Extendable<Host> {
+
+public:
+         surf::Cpu     *p_cpu = nullptr;
+         surf::NetCard *p_netcard = nullptr;
+
 private:
-  simgrid::xbt::string id_;
+  simgrid::xbt::string name_ = "noname";
 public:
-  Host(std::string const& id);
+  Host(std::string const& name);
   ~Host();
-  simgrid::xbt::string const& id() const { return id_; }
+  simgrid::xbt::string const& getName() const { return name_; }
   static Host* by_name_or_null(const char* name);
   static Host* by_name_or_create(const char* name);
 };