xtd - Reference Guide 0.2.0
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 
29  ip_host_entry() = default;
31 
34  ip_host_entry(const ip_host_entry& ip_host_entry) = default;
35  ip_host_entry& operator=(const ip_host_entry&) = default;
36  friend std::ostream& operator <<(std::ostream& os, const ip_host_entry& host_entry) noexcept {return os << host_entry.to_string();}
38 
40 
44  const std::vector<xtd::net::ip_address>& address_list() const noexcept;
47  std::vector<xtd::net::ip_address>& address_list() noexcept;
51  ip_host_entry& address_list(const std::vector<xtd::net::ip_address>& address_list) noexcept;
52 
55  const std::vector<xtd::ustring>& aliases() const noexcept;
58  std::vector<xtd::ustring>& aliases() noexcept;
62  ip_host_entry& aliases(const std::vector<xtd::ustring>& aliases) noexcept;
63 
66  const xtd::ustring& host_name() const noexcept;
70  ip_host_entry& host_name(const xtd::ustring& host_name) noexcept;
72 
73  private:
74  std::vector<xtd::net::ip_address> address_list_;
75  std::vector<xtd::ustring> aliases_;
76  xtd::ustring host_name_;
77  };
78  }
79 }
virtual xtd::ustring to_string() const noexcept
Returns a sxd::ustring 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:50
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:30
Provides a container class for Internet host address information.
Definition: ip_host_entry.h:23