9 #ifndef anna_comm_INetAddress_hpp 10 #define anna_comm_INetAddress_hpp 12 #include <sys/types.h> 13 #include <sys/socket.h> 14 #include <netinet/in.h> 15 #include <arpa/inet.h> 59 const Device* getDevice(
const bool exceptionWhenNull =
true)
const noexcept(
false);
77 void setPort(
const int port) { a_port = port; }
83 INetAddress& operator = (
const INetAddress& right) { a_device = right.a_device; a_port = right.a_port;
return *
this; }
90 bool operator == (
const INetAddress& right)
const {
return a_device == right.a_device && a_port == right.a_port; }
96 bool isNull()
const {
return (a_device == NULL || a_port == -1); }
101 void clear() { a_device = NULL; a_port = -1; }
107 std::string asString()
const ;
113 std::string serialize()
const ;
Definition: INetAddress.hpp:34
INetAddress()
Definition: INetAddress.hpp:39
Definition: Device.hpp:37
INetAddress(const INetAddress &other)
Definition: INetAddress.hpp:52
void setAddress(const Device *device)
Definition: INetAddress.hpp:71
void clear()
Definition: INetAddress.hpp:101
bool isNull() const
Definition: INetAddress.hpp:96
xml::Node Node
Definition: Node.hpp:21
INetAddress(const Device *device, const int port=-1)
Definition: INetAddress.hpp:46
int getPort() const
Definition: INetAddress.hpp:65
void setPort(const int port)
Definition: INetAddress.hpp:77