xtd - Reference Guide  0.2.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
ip_host_entry.h
Go to the documentation of this file.
1 #pragma once
5 
6 #include <vector>
7 #include "../core_export.h"
8 #include "../object.h"
9 #include "../types.h"
10 #include "../ustring.h"
11 #include "ip_address.h"
12 
14 namespace xtd {
16  namespace net {
23  class core_export_ ip_host_entry : public xtd::object {
24  public:
26  ip_host_entry() = default;
27 
30  ip_host_entry(const ip_host_entry& ip_host_entry) = default;
31  ip_host_entry& operator=(const ip_host_entry&) = default;
32  friend std::ostream& operator <<(std::ostream& os, const ip_host_entry& host_entry) noexcept {return os << host_entry.to_string();}
34 
37  const std::vector<xtd::net::ip_address>& address_list() const noexcept;
40  std::vector<xtd::net::ip_address>& address_list() noexcept;
44  ip_host_entry& address_list(const std::vector<xtd::net::ip_address>& address_list) noexcept;
45 
48  const std::vector<xtd::ustring>& aliases() const noexcept;
51  std::vector<xtd::ustring>& aliases() noexcept;
55  ip_host_entry& aliases(const std::vector<xtd::ustring>& aliases) noexcept;
56 
59  const xtd::ustring& host_name() const noexcept;
63  ip_host_entry& host_name(const xtd::ustring& host_name) noexcept;
64 
65  private:
66  std::vector<xtd::net::ip_address> address_list_;
67  std::vector<xtd::ustring> aliases_;
68  xtd::ustring host_name_;
69  };
70  }
71 }
virtual xtd::ustring to_string() const noexcept
Returns a std::string that represents the current object.
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:48
Contains xtd::net::ip_address class.
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes...
Definition: object.h:26
Provides a container class for Internet host address information.
Definition: ip_host_entry.h:23