indent with tabs
This commit is contained in:
@@ -11,38 +11,38 @@ namespace network {
|
||||
/* IPv4 address */
|
||||
class IPAddress {
|
||||
private:
|
||||
std::uint32_t m_Address;
|
||||
bool m_Valid;
|
||||
std::uint32_t m_Address;
|
||||
bool m_Valid;
|
||||
|
||||
public:
|
||||
/* Create an invalid address */
|
||||
IPAddress() noexcept;
|
||||
/* Create an invalid address */
|
||||
IPAddress() noexcept;
|
||||
|
||||
/* Initialize by string IP */
|
||||
IPAddress(const std::string& str);
|
||||
/* Initialize by string IP */
|
||||
IPAddress(const std::string& str);
|
||||
|
||||
/* Initialize by string IP */
|
||||
IPAddress(const std::wstring& str);
|
||||
/* Initialize by string IP */
|
||||
IPAddress(const std::wstring& str);
|
||||
|
||||
/* Initialize by octets */
|
||||
IPAddress(std::uint8_t octet1, std::uint8_t octet2, std::uint8_t octet3, std::uint8_t octet4) noexcept;
|
||||
/* Initialize by octets */
|
||||
IPAddress(std::uint8_t octet1, std::uint8_t octet2, std::uint8_t octet3, std::uint8_t octet4) noexcept;
|
||||
|
||||
/* Get the specific octet. 1-4 */
|
||||
std::uint8_t GetOctet(std::uint8_t num) const;
|
||||
/* Get the specific octet. 1-4 */
|
||||
std::uint8_t GetOctet(std::uint8_t num) const;
|
||||
|
||||
/* Set the specific octet. 1-4 */
|
||||
void SetOctet(std::uint8_t num, std::uint8_t value);
|
||||
/* Set the specific octet. 1-4 */
|
||||
void SetOctet(std::uint8_t num, std::uint8_t value);
|
||||
|
||||
/* Make sure the IP is valid. It will be invalid if the host wasn't found. */
|
||||
bool IsValid() const noexcept { return m_Valid; }
|
||||
/* Make sure the IP is valid. It will be invalid if the host wasn't found. */
|
||||
bool IsValid() const noexcept { return m_Valid; }
|
||||
|
||||
std::string ToString() const;
|
||||
std::string ToString() const;
|
||||
|
||||
static IPAddress LocalAddress();
|
||||
static IPAddress LocalAddress();
|
||||
|
||||
bool operator==(const IPAddress& right);
|
||||
bool operator!=(const IPAddress& right);
|
||||
bool operator==(bool b);
|
||||
bool operator==(const IPAddress& right);
|
||||
bool operator!=(const IPAddress& right);
|
||||
bool operator==(bool b);
|
||||
};
|
||||
|
||||
typedef std::vector<IPAddress> IPAddresses;
|
||||
|
||||
Reference in New Issue
Block a user