Simple IPv4 Network Address structure. More...
#include <ip4address.h>
Public Types | |
typedef std::set< IP4Address > | Set |
typedef std::vector< IP4Address > | List |
typedef std::list< IP4Address > | Queue |
Public Member Functions | |
IP4Address () | |
Constructor. | |
IP4Address (const char *ipAddress) | |
Creates from IPv4 Address string. | |
IP4Address (const std::string &ipAddress) | |
Creates from IPv4 Address string. | |
IP4Address (const IP4Address &ipAddress) | |
Copy Constructor. | |
~IP4Address () | |
Destructor. | |
bool | SetAddress (const std::string &ipAddress) |
Sets the IP address string and octect data from an IP address string. | |
bool | SetAddress (const unsigned char a, const unsigned char b, const unsigned char c, const unsigned char d) |
Sets the IP address values "a.b.c.d". | |
IP4Address & | operator= (const IP4Address &ipAddress) |
Sets equal to. | |
IP4Address & | operator= (const std::string &ipAddress) |
Sets equal to. | |
bool | operator== (const IP4Address &ipAddress) const |
True if equal. | |
bool | operator!= (const IP4Address &ipAddress) const |
True if not equal. | |
bool | operator< (const IP4Address &ipAddress) const |
Compares the IP address for sorting. | |
bool | operator<= (const IP4Address &ipAddress) const |
Compares the IP address for sorting. | |
virtual void | Clear () |
Clears data. | |
Public Attributes | |
std::string | mString |
unsigned char | mData [4] |
Simple IPv4 Network Address structure.
Definition at line 54 of file ip4address.h.
typedef std::vector<IP4Address> CxUtils::IP4Address::List |
Definition at line 58 of file ip4address.h.
typedef std::list<IP4Address> CxUtils::IP4Address::Queue |
Definition at line 59 of file ip4address.h.
typedef std::set<IP4Address> CxUtils::IP4Address::Set |
Definition at line 57 of file ip4address.h.
IP4Address::IP4Address | ( | ) |
Constructor.
Definition at line 51 of file ip4address.cpp.
IP4Address::IP4Address | ( | const char * | ipAddress ) |
Creates from IPv4 Address string.
Definition at line 63 of file ip4address.cpp.
IP4Address::IP4Address | ( | const std::string & | ipAddress ) |
Creates from IPv4 Address string.
Definition at line 74 of file ip4address.cpp.
IP4Address::IP4Address | ( | const IP4Address & | ipAddress ) |
Copy Constructor.
Definition at line 85 of file ip4address.cpp.
IP4Address::~IP4Address | ( | ) |
Destructor.
Definition at line 97 of file ip4address.cpp.
void IP4Address::Clear | ( | ) | [virtual] |
bool IP4Address::operator!= | ( | const IP4Address & | ipAddress ) | const |
True if not equal.
Definition at line 247 of file ip4address.cpp.
bool IP4Address::operator< | ( | const IP4Address & | ipAddress ) | const |
Compares the IP address for sorting.
Definition at line 211 of file ip4address.cpp.
bool IP4Address::operator<= | ( | const IP4Address & | ipAddress ) | const |
Compares the IP address for sorting.
Definition at line 222 of file ip4address.cpp.
IP4Address & IP4Address::operator= | ( | const std::string & | ipAddress ) |
Sets equal to.
Definition at line 200 of file ip4address.cpp.
IP4Address & IP4Address::operator= | ( | const IP4Address & | ipAddress ) |
Sets equal to.
Definition at line 188 of file ip4address.cpp.
bool IP4Address::operator== | ( | const IP4Address & | ipAddress ) | const |
True if equal.
Definition at line 233 of file ip4address.cpp.
bool IP4Address::SetAddress | ( | const std::string & | ipAddress ) |
Sets the IP address string and octect data from an IP address string.
[in] | ipAddress | IP Address data "127.0.0.1", "132.170.190.84", etc. |
Definition at line 112 of file ip4address.cpp.
bool IP4Address::SetAddress | ( | const unsigned char | a, |
const unsigned char | b, | ||
const unsigned char | c, | ||
const unsigned char | d | ||
) |
Sets the IP address values "a.b.c.d".
[in] | a | Part of IP address. |
[in] | b | Part of IP address. |
[in] | c | Part of IP address. |
[in] | d | Part of IP address. |
Definition at line 167 of file ip4address.cpp.
unsigned char CxUtils::IP4Address::mData[4] |
Definition at line 79 of file ip4address.h.
std::string CxUtils::IP4Address::mString |
Definition at line 78 of file ip4address.h.