Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[surf] new (abstract) class: PropertyHolder, with only one purpose
[simgrid.git] / include / simgrid / Host.hpp
1 /* Copyright (c) 2015. The SimGrid Team.
2  * All rights reserved.                                                     */
3
4 /* This program is free software; you can redistribute it and/or modify it
5  * under the terms of the license (GNU LGPL) which comes with this package. */
6
7 #ifndef SIMGRID_HOST_HPP
8 #define SIMGRID_HOST_HPP
9
10 #include <cstddef>
11 #include <memory>
12 #include <string>
13 #include <vector>
14
15 #include <xbt/base.h>
16 #include <xbt/Facetable.hpp>
17 #include <xbt/string.hpp>
18
19 namespace simgrid {
20
21 XBT_PUBLIC_CLASS Host : public simgrid::xbt::Facetable<Host> {
22 private:
23   simgrid::xbt::string id_;
24 public:
25   Host(std::string const& id);
26   ~Host();
27   simgrid::xbt::string const& id() const { return id_; }
28   static Host* by_name_or_null(const char* name);
29   static Host* by_name_or_create(const char* name);
30 };
31
32 }
33
34 #endif