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/transport.hpp b/daemon/face/transport.hpp
index 55efe3b..d069a0e 100644
--- a/daemon/face/transport.hpp
+++ b/daemon/face/transport.hpp
@@ -237,13 +237,9 @@
/** \brief invoked before persistency is changed
* \throw std::invalid_argument new persistency is not supported
* \throw std::runtime_error transition is disallowed
- *
- * Base class implementation does nothing.
*/
virtual void
- beforeChangePersistency(ndn::nfd::FacePersistency newPersistency)
- {
- }
+ beforeChangePersistency(ndn::nfd::FacePersistency newPersistency) = 0;
/** \brief performs Transport specific operations to close the transport
*
@@ -337,13 +333,6 @@
return m_persistency;
}
-inline void
-Transport::setPersistency(ndn::nfd::FacePersistency persistency)
-{
- this->beforeChangePersistency(persistency);
- m_persistency = persistency;
-}
-
inline ndn::nfd::LinkType
Transport::getLinkType() const
{