From: Guilherme Maciel Ferreira Date: Sat, 5 Nov 2011 14:24:46 +0000 (-0200) Subject: High Integrity CPP Guideline 3.2.4: An abstract class shall have no public constructors. X-Git-Tag: v1.2~38 X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=ebf9851488f36eff49e82d516d6fe3a836bb663d;p=pingcheck High Integrity CPP Guideline 3.2.4: An abstract class shall have no public constructors. --- diff --git a/src/host/pinger.h b/src/host/pinger.h index 27c9d1d..3ecbce4 100644 --- a/src/host/pinger.h +++ b/src/host/pinger.h @@ -32,15 +32,16 @@ class Pinger { public: - Pinger(); - virtual ~Pinger(); - virtual void ping( const std::string &destination_ip, const int destination_port, boost::function ping_done_callback ) = 0; +protected: + Pinger(); + virtual ~Pinger(); + }; #endif /* PINGER_H */ diff --git a/src/icmp/icmpmessage.h b/src/icmp/icmpmessage.h index 9301edd..501a0e1 100644 --- a/src/icmp/icmpmessage.h +++ b/src/icmp/icmpmessage.h @@ -24,9 +24,6 @@ class IcmpMessage { public: - IcmpMessage(); - virtual ~IcmpMessage(); - void init( const Icmpv4Type type ); void init( const Icmpv6Type type ); @@ -51,6 +48,10 @@ public: virtual std::istream& read( std::istream &is ) = 0; virtual std::ostream& write( std::ostream &os ) const = 0; +protected: + IcmpMessage(); + virtual ~IcmpMessage(); + }; #endif // ICMP_MESSAGE_H diff --git a/src/icmp/icmppacket.h b/src/icmp/icmppacket.h index a2c1084..72895ec 100644 --- a/src/icmp/icmppacket.h +++ b/src/icmp/icmppacket.h @@ -40,9 +40,6 @@ class IcmpPacket { public: - IcmpPacket(); - virtual ~IcmpPacket(); - virtual bool match_echo_reply( const uint16_t identifier, const uint16_t sequence_number, @@ -63,6 +60,10 @@ public: virtual bool read( std::istream &is ) = 0; virtual void write( std::ostream &os ) const = 0; +protected: + IcmpPacket(); + virtual ~IcmpPacket(); + }; //-----------------------------------------------------------------------------