K
K' Dash
dear members
I have a question. If a base class have a virtual destructor, then is it necessary to write in child class (like as we write pure virtual function in child class). If yes then how can we write in child class?
e.g
class Ipv4RoutingHelper
{
public:
virtual ~Ipv4RoutingHelper ();
virtual Ipv4RoutingHelper* Copy (void) const = 0;
virtual Ptr<Ipv4RoutingProtocol> Create (Ptr<Node> node) const = 0;
**********************************************************************
class MeDeHaDtnRoutingHelper : public Ipv4RoutingHelper
{
public:
MeDeHaDtnRoutingHelper ();
~MeDeHaDtnRoutingHelper ();
virtual Ptr<Ipv4RoutingProtocol> Create (Ptr<Node> node) const;
virtual Ipv4RoutingHelper* Copy (void) const;
I have a question. If a base class have a virtual destructor, then is it necessary to write in child class (like as we write pure virtual function in child class). If yes then how can we write in child class?
e.g
class Ipv4RoutingHelper
{
public:
virtual ~Ipv4RoutingHelper ();
virtual Ipv4RoutingHelper* Copy (void) const = 0;
virtual Ptr<Ipv4RoutingProtocol> Create (Ptr<Node> node) const = 0;
**********************************************************************
class MeDeHaDtnRoutingHelper : public Ipv4RoutingHelper
{
public:
MeDeHaDtnRoutingHelper ();
~MeDeHaDtnRoutingHelper ();
virtual Ptr<Ipv4RoutingProtocol> Create (Ptr<Node> node) const;
virtual Ipv4RoutingHelper* Copy (void) const;