-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathIPv6.h
More file actions
40 lines (30 loc) · 971 Bytes
/
Copy pathIPv6.h
File metadata and controls
40 lines (30 loc) · 971 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#pragma once
NS_BEGIN
//#################################################################################################
class CIPv6 final
{
public:
CIPv6(void) = default;
CIPv6(const CIPv6 &src) = default;
CIPv6(CIPv6 &&src) noexcept;
explicit CIPv6(PCBYTE pIP);
explicit CIPv6(PCNSTR szIP);
bool IsEmpty(void) const noexcept;
void Empty(void);
void Set(PCBYTE pIP);
void Set(PCNSTR szIP);
PCBYTE Get(void) const noexcept;
CStr GetAsString(void) const;
CIPv6 &operator=(const CIPv6 &src) = default;
CIPv6 &operator=(CIPv6 &&src) noexcept;
void Assign(const CIPv6 &src);
void Assign(PCNSTR szIP);
friend std::ostream &operator<<(std::ostream &stream, const CIPv6 &ip);
friend std::wostream &operator<<(std::wostream &stream, const CIPv6 &ip);
bool operator==(const CIPv6 &ip) const;
bool operator!=(const CIPv6 &ip) const;
int Compare(const CIPv6 &ip) const;
private:
BYTE m_ip[16] = {0};
};
NS_END