Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
give informative names to Host methods
[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 <memory>
11 #include <string>
12 #include <vector>
13
14 #include <xbt/base.h>
15 #include <xbt/Lib.hpp>
16
17 namespace simgrid {
18
19 XBT_PUBLIC_CLASS Host : public simgrid::xbt::Lib<Host> {
20 private:
21   std::string id_;
22 public:
23   Host(std::string id);
24   ~Host();
25   std::string const& id() const { return id_; }
26   static Host* by_name_or_null(const char* name);
27   static Host* by_name_or_create(const char* name);
28 };
29
30 }
31
32 #endif