#include <INetAddress.hpp>
Network address abstraction.
◆ INetAddress() [1/3]
anna::comm::INetAddress::INetAddress |
( |
| ) |
|
|
inline |
Constructor.
39 : a_device(NULL), a_port(-1) {}
◆ INetAddress() [2/3]
anna::comm::INetAddress::INetAddress |
( |
const Device * |
device, |
|
|
const int |
port = -1 |
|
) |
| |
|
inline |
Constructor.
- Parameters
-
device | Instance for device (address). |
port | Port number. |
46 : a_device(device), a_port(port) {;}
◆ INetAddress() [3/3]
anna::comm::INetAddress::INetAddress |
( |
const INetAddress & |
other | ) |
|
|
inline |
Copy constructor.
- Parameters
-
other | Source network address. |
52 : a_device(other.a_device) , a_port(other.a_port) {;}
◆ asString()
std::string anna::comm::INetAddress::asString |
( |
| ) |
const |
Returns string with relevant information for this instance.
- Returns
- string with relevant information for this instance.
◆ asXML()
Returns XML document with relevant information for this instance.
- Parameters
-
parent | XML node from which created data will depend on. |
- Returns
- XML document with relevant information for this instance.
◆ clear()
void anna::comm::INetAddress::clear |
( |
| ) |
|
|
inline |
Clear the content for this instance.
101 { a_device = NULL; a_port = -1; }
◆ getDevice()
const Device* anna::comm::INetAddress::getDevice |
( |
const bool |
exceptionWhenNull = true | ) |
const |
|
noexcept |
Returns the device (address) associated to this instance.
- Parameters
-
exceptionWhenNull | Exception is launched in case the device returned is NULL. |
- Returns
- Device (address) associated to this instance.
◆ getPort()
int anna::comm::INetAddress::getPort |
( |
| ) |
const |
|
inline |
Returns the port associated to this instance.
- Returns
- Port associated to this instance.
◆ isNull()
bool anna::comm::INetAddress::isNull |
( |
| ) |
const |
|
inline |
Returns the initialized state for this network address.
- Returns
- true when initialized, false when not.
96 {
return (a_device == NULL || a_port == -1); }
◆ operator=()
Copy operator.
- Parameters
-
right | Source address to be copied. |
83 { a_device = right.a_device; a_port = right.a_port;
return *
this; }
◆ operator==()
bool anna::comm::INetAddress::operator== |
( |
const INetAddress & |
right | ) |
const |
|
inline |
Comparison operator.
- Parameters
-
right | Source address to be compared. |
- Returns
- true when address provided is equal to this false in other case.
90 {
return a_device == right.a_device && a_port == right.a_port; }
◆ serialize()
std::string anna::comm::INetAddress::serialize |
( |
| ) |
const |
Returns string with low-level format relevant information for this instance.
- Returns
- string with low-level format relevant information for this instance.
◆ setAddress()
void anna::comm::INetAddress::setAddress |
( |
const Device * |
device | ) |
|
|
inline |
Sets the address for this instance.
- Parameters
-
71 { a_device = device; }
◆ setPort()
void anna::comm::INetAddress::setPort |
( |
const int |
port | ) |
|
|
inline |
Sets the port for this instance.
- Parameters
-
The documentation for this class was generated from the following file: