face: override Transport::beforeChangePersistency in all subclasses
This commit also adds the final specifier to some Transport
subclasses in order to improve code generation.
Change-Id: If2979fa1614476a98019ba79cee3961663fc447b
Refs: #3318
diff --git a/daemon/face/multicast-udp-transport.hpp b/daemon/face/multicast-udp-transport.hpp
index 14371f7..2998f42 100644
--- a/daemon/face/multicast-udp-transport.hpp
+++ b/daemon/face/multicast-udp-transport.hpp
@@ -34,7 +34,7 @@
/**
* \brief A Transport that communicates on a UDP multicast group
*/
-class MulticastUdpTransport : public DatagramTransport<boost::asio::ip::udp, Multicast>
+class MulticastUdpTransport DECL_FINAL : public DatagramTransport<boost::asio::ip::udp, Multicast>
{
public:
/**
@@ -46,14 +46,19 @@
*/
MulticastUdpTransport(const protocol::endpoint& localEndpoint,
const protocol::endpoint& multicastGroup,
- protocol::socket&& recvSocket, protocol::socket&& sendSocket);
+ protocol::socket&& recvSocket,
+ protocol::socket&& sendSocket);
+
+protected:
+ virtual void
+ beforeChangePersistency(ndn::nfd::FacePersistency newPersistency) DECL_FINAL;
private:
virtual void
- doSend(Transport::Packet&& packet) DECL_OVERRIDE;
+ doSend(Transport::Packet&& packet) DECL_FINAL;
virtual void
- doClose() DECL_OVERRIDE;
+ doClose() DECL_FINAL;
private:
protocol::endpoint m_multicastGroup;