]> git.tdb.fi Git - libs/net.git/blobdiff - source/net/inet.h
Decorate things which constitute the public API
[libs/net.git] / source / net / inet.h
index 639e64cbb1eca5ec8c9fc2e0d5247c91600adf38..fb76d7e4d5edd29676d3158baa759c2922d733cf 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef MSP_NET_INET_H_
 #define MSP_NET_INET_H_
 
+#include "mspnet_api.h"
 #include "sockaddr.h"
 
 namespace Msp {
@@ -9,23 +10,23 @@ namespace Net {
 /**
 Address class for IPv4 sockets.
 */
-class InetAddr: public SockAddr
+class MSPNET_API InetAddr: public SockAddr
 {
 private:
-       unsigned char addr[4];
-       unsigned port;
+       unsigned char addr[4] = { };
+       unsigned port = 0;
 
 public:
-       InetAddr();
+       InetAddr() = default;
        InetAddr(const SysAddr &);
 
-       virtual InetAddr *copy() const { return new InetAddr(*this); }
+       InetAddr *copy() const override { return new InetAddr(*this); }
 
-       virtual SysAddr to_sys() const;
+       SysAddr to_sys() const override;
 
-       virtual Family get_family() const { return INET; }
+       Family get_family() const override { return INET; }
        unsigned get_port() const { return port; }
-       virtual std::string str() const;
+       std::string str() const override;
 };
 
 } // namespace Net