Add Set methods to class Ipv4Address (like the non-default ctors)
This commit is contained in:
1 parent
2241f0544f
commit
e6a2b79fc2
2 files changed
+27
No files matched your search
@@ -135,6 +135,17 @@ Ipv4Address::Ipv4Address (char const *address)
|
||||
m_address = AsciiToIpv4Host (address);
|
||||
}
|
||||
|
||||
void
|
||||
Ipv4Address::Set (uint32_t address)
|
||||
{
|
||||
m_address = address;
|
||||
}
|
||||
void
|
||||
Ipv4Address::Set (char const *address)
|
||||
{
|
||||
m_address = AsciiToIpv4Host (address);
|
||||
}
|
||||
|
||||
bool
|
||||
Ipv4Address::IsEqual (Ipv4Address other) const
|
||||
{
|
||||
|
||||
@@ -49,6 +49,22 @@ public:
|
||||
*/
|
||||
Ipv4Address (char const *address);
|
||||
|
||||
/**
|
||||
* input address is in host order.
|
||||
* \param address The host order 32-bit address
|
||||
*/
|
||||
void Set (uint32_t address);
|
||||
/**
|
||||
* \brief Sets an Ipv4Address by parsing a the input C-string
|
||||
*
|
||||
* Input address is in format:
|
||||
* hhh.xxx.xxx.lll
|
||||
* where h is the high byte and l the
|
||||
* low byte
|
||||
* \param address C-string containing the address as described above
|
||||
*/
|
||||
void Set (char const *address);
|
||||
|
||||
/**
|
||||
* \brief Comparison operation between two Ipv4Addresses
|
||||
* \param other address to which to compare this address
|
||||
|
||||
Reference in new issue
Block a user