diff --git a/examples/stats/wifi-example-apps.h b/examples/stats/wifi-example-apps.h index b855a9ed3..176b9a1f7 100644 --- a/examples/stats/wifi-example-apps.h +++ b/examples/stats/wifi-example-apps.h @@ -44,14 +44,14 @@ public: */ static TypeId GetTypeId (); Sender(); - virtual ~Sender(); + ~Sender() override; protected: - virtual void DoDispose (); + void DoDispose () override; private: - virtual void StartApplication (); - virtual void StopApplication (); + void StartApplication () override; + void StopApplication () override; /** * Send a packet. @@ -87,7 +87,7 @@ public: */ static TypeId GetTypeId (); Receiver(); - virtual ~Receiver(); + ~Receiver() override; /** * Set the counter calculator for received packets. @@ -102,11 +102,11 @@ public: void SetDelayTracker (Ptr delay); protected: - virtual void DoDispose (); + void DoDispose () override; private: - virtual void StartApplication (); - virtual void StopApplication (); + void StartApplication () override; + void StopApplication () override; /** * Receive a packet. @@ -138,11 +138,11 @@ public: * \return The object TypeId. */ static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; - virtual uint32_t GetSerializedSize () const; - virtual void Serialize (TagBuffer i) const; - virtual void Deserialize (TagBuffer i); + uint32_t GetSerializedSize () const override; + void Serialize (TagBuffer i) const override; + void Deserialize (TagBuffer i) override; /** * Set the timestamp. @@ -155,7 +155,7 @@ public: */ Time GetTimestamp () const; - void Print (std::ostream &os) const; + void Print (std::ostream &os) const override; private: Time m_timestamp; //!< Timestamp. diff --git a/examples/tutorial/tutorial-app.h b/examples/tutorial/tutorial-app.h index c676c634c..e085343aa 100644 --- a/examples/tutorial/tutorial-app.h +++ b/examples/tutorial/tutorial-app.h @@ -32,7 +32,7 @@ class TutorialApp : public Application { public: TutorialApp (); - virtual ~TutorialApp (); + ~TutorialApp () override; /** * Register this type. @@ -51,8 +51,8 @@ public: void Setup (Ptr socket, Address address, uint32_t packetSize, uint32_t nPackets, DataRate dataRate); private: - virtual void StartApplication (); - virtual void StopApplication (); + void StartApplication () override; + void StopApplication () override; /// Schedule a new transmission. void ScheduleTx (); diff --git a/src/antenna/model/antenna-model.h b/src/antenna/model/antenna-model.h index 486e86c32..5660cbdaf 100644 --- a/src/antenna/model/antenna-model.h +++ b/src/antenna/model/antenna-model.h @@ -58,7 +58,7 @@ public: AntennaModel (); - virtual ~AntennaModel (); + ~AntennaModel () override; /** * \brief Get the type ID. diff --git a/src/antenna/model/cosine-antenna-model.h b/src/antenna/model/cosine-antenna-model.h index 914456ae3..9046b9bd0 100644 --- a/src/antenna/model/cosine-antenna-model.h +++ b/src/antenna/model/cosine-antenna-model.h @@ -57,7 +57,7 @@ public: static TypeId GetTypeId (); // inherited from AntennaModel - virtual double GetGainDb (Angles a); + double GetGainDb (Angles a) override; /** * Get the vertical 3 dB beamwidth of the cosine antenna model. diff --git a/src/antenna/model/isotropic-antenna-model.h b/src/antenna/model/isotropic-antenna-model.h index e90f3423a..d9eaebd1c 100644 --- a/src/antenna/model/isotropic-antenna-model.h +++ b/src/antenna/model/isotropic-antenna-model.h @@ -47,7 +47,7 @@ public: static TypeId GetTypeId (); // inherited from AntennaModel - virtual double GetGainDb (Angles a); + double GetGainDb (Angles a) override; protected: diff --git a/src/antenna/model/parabolic-antenna-model.h b/src/antenna/model/parabolic-antenna-model.h index 6e7e8b2f0..0da4a56c9 100644 --- a/src/antenna/model/parabolic-antenna-model.h +++ b/src/antenna/model/parabolic-antenna-model.h @@ -54,7 +54,7 @@ public: static TypeId GetTypeId (); // inherited from AntennaModel - virtual double GetGainDb (Angles a); + double GetGainDb (Angles a) override; // attribute getters/setters diff --git a/src/antenna/model/phased-array-model.h b/src/antenna/model/phased-array-model.h index 095de807c..38cb4f5ca 100644 --- a/src/antenna/model/phased-array-model.h +++ b/src/antenna/model/phased-array-model.h @@ -44,7 +44,7 @@ public: /** * Destructor */ - virtual ~PhasedArrayModel (); + ~PhasedArrayModel () override; /** diff --git a/src/antenna/model/three-gpp-antenna-model.h b/src/antenna/model/three-gpp-antenna-model.h index f4e498d40..773311abe 100644 --- a/src/antenna/model/three-gpp-antenna-model.h +++ b/src/antenna/model/three-gpp-antenna-model.h @@ -36,7 +36,7 @@ class ThreeGppAntennaModel : public AntennaModel { public: ThreeGppAntennaModel (); - virtual ~ThreeGppAntennaModel () override; + ~ThreeGppAntennaModel () override; /** * \brief Get the type ID. @@ -45,7 +45,7 @@ public: static TypeId GetTypeId (); // inherited from AntennaModel - virtual double GetGainDb (Angles a) override; + double GetGainDb (Angles a) override; /** * Get the vertical beamwidth of the antenna element. diff --git a/src/antenna/model/uniform-planar-array.h b/src/antenna/model/uniform-planar-array.h index d7981179a..3b1986195 100644 --- a/src/antenna/model/uniform-planar-array.h +++ b/src/antenna/model/uniform-planar-array.h @@ -47,7 +47,7 @@ public: /** * Destructor */ - virtual ~UniformPlanarArray (); + ~UniformPlanarArray () override; /** * \brief Get the type ID. diff --git a/src/antenna/test/test-angles.cc b/src/antenna/test/test-angles.cc index 1c0938031..48e1c5bcf 100644 --- a/src/antenna/test/test-angles.cc +++ b/src/antenna/test/test-angles.cc @@ -50,7 +50,7 @@ public: OneVectorConstructorTestCase (Vector v, Angles a); private: - virtual void DoRun (); + void DoRun () override; Vector m_v; //!< vector Angles m_a; //!< expected angle @@ -104,7 +104,7 @@ public: TwoVectorsConstructorTestCase (Vector v, Vector o, Angles a); private: - virtual void DoRun (); + void DoRun () override; Vector m_v; //!< point Vector m_o; //!< origin diff --git a/src/antenna/test/test-cosine-antenna.cc b/src/antenna/test/test-cosine-antenna.cc index fbc30dc45..37568be00 100644 --- a/src/antenna/test/test-cosine-antenna.cc +++ b/src/antenna/test/test-cosine-antenna.cc @@ -73,7 +73,7 @@ public: private: - virtual void DoRun (); + void DoRun () override; Angles m_a; //!< Antenna angle double m_b; //!< Horizontal and Vertical Beamwidth double m_o; //!< Orientation diff --git a/src/antenna/test/test-degrees-radians.cc b/src/antenna/test/test-degrees-radians.cc index fa6b3dc9a..f33ab1fb6 100644 --- a/src/antenna/test/test-degrees-radians.cc +++ b/src/antenna/test/test-degrees-radians.cc @@ -51,7 +51,7 @@ public: private: - virtual void DoRun (); + void DoRun () override; double m_a; //!< angle in degrees double m_b; //!< expected angle in radians @@ -104,7 +104,7 @@ public: private: - virtual void DoRun (); + void DoRun () override; double m_a; //!< angle in radians double m_b; //!< expected angle in degrees diff --git a/src/antenna/test/test-isotropic-antenna.cc b/src/antenna/test/test-isotropic-antenna.cc index 6ad638e52..6ff8c4b04 100644 --- a/src/antenna/test/test-isotropic-antenna.cc +++ b/src/antenna/test/test-isotropic-antenna.cc @@ -51,7 +51,7 @@ public: private: - virtual void DoRun (); + void DoRun () override; Angles m_a; //!< Antenna angle double m_expectedGain; //!< Expected gain diff --git a/src/antenna/test/test-parabolic-antenna.cc b/src/antenna/test/test-parabolic-antenna.cc index e00e782b3..45f1e8d60 100644 --- a/src/antenna/test/test-parabolic-antenna.cc +++ b/src/antenna/test/test-parabolic-antenna.cc @@ -73,7 +73,7 @@ public: private: - virtual void DoRun (); + void DoRun () override; Angles m_a; //!< Antenna angle double m_b; //!< Beamwidth diff --git a/src/antenna/test/test-uniform-planar-array.cc b/src/antenna/test/test-uniform-planar-array.cc index ba7a79abd..ca0f56e13 100644 --- a/src/antenna/test/test-uniform-planar-array.cc +++ b/src/antenna/test/test-uniform-planar-array.cc @@ -76,7 +76,7 @@ private: /** * Run the test */ - virtual void DoRun (); + void DoRun () override; /** * Compute the gain of the antenna array * \param a the antenna array diff --git a/src/aodv/helper/aodv-helper.h b/src/aodv/helper/aodv-helper.h index a253dfd67..ede647e1d 100644 --- a/src/aodv/helper/aodv-helper.h +++ b/src/aodv/helper/aodv-helper.h @@ -43,7 +43,7 @@ public: * This method is mainly for internal use by the other helpers; * clients are expected to free the dynamic memory allocated by this method */ - AodvHelper* Copy () const; + AodvHelper* Copy () const override; /** * \param node the node on which the routing protocol will run @@ -53,7 +53,7 @@ public: * * \todo support installing AODV on the subset of all available IP interfaces */ - virtual Ptr Create (Ptr node) const; + Ptr Create (Ptr node) const override; /** * \param name the name of the attribute to set * \param value the value of the attribute to set. diff --git a/src/aodv/model/aodv-packet.h b/src/aodv/model/aodv-packet.h index 6621b4337..90b6f214d 100644 --- a/src/aodv/model/aodv-packet.h +++ b/src/aodv/model/aodv-packet.h @@ -68,11 +68,11 @@ public: * \return the object TypeId */ static TypeId GetTypeId (); - TypeId GetInstanceTypeId () const; - uint32_t GetSerializedSize () const; - void Serialize (Buffer::Iterator start) const; - uint32_t Deserialize (Buffer::Iterator start); - void Print (std::ostream &os) const; + TypeId GetInstanceTypeId () const override; + uint32_t GetSerializedSize () const override; + void Serialize (Buffer::Iterator start) const override; + uint32_t Deserialize (Buffer::Iterator start) override; + void Print (std::ostream &os) const override; /** * \returns the type @@ -153,11 +153,11 @@ public: * \return the object TypeId */ static TypeId GetTypeId (); - TypeId GetInstanceTypeId () const; - uint32_t GetSerializedSize () const; - void Serialize (Buffer::Iterator start) const; - uint32_t Deserialize (Buffer::Iterator start); - void Print (std::ostream &os) const; + TypeId GetInstanceTypeId () const override; + uint32_t GetSerializedSize () const override; + void Serialize (Buffer::Iterator start) const override; + uint32_t Deserialize (Buffer::Iterator start) override; + void Print (std::ostream &os) const override; // Fields /** @@ -353,11 +353,11 @@ public: * \return the object TypeId */ static TypeId GetTypeId (); - TypeId GetInstanceTypeId () const; - uint32_t GetSerializedSize () const; - void Serialize (Buffer::Iterator start) const; - uint32_t Deserialize (Buffer::Iterator start); - void Print (std::ostream &os) const; + TypeId GetInstanceTypeId () const override; + uint32_t GetSerializedSize () const override; + void Serialize (Buffer::Iterator start) const override; + uint32_t Deserialize (Buffer::Iterator start) override; + void Print (std::ostream &os) const override; // Fields /** @@ -511,11 +511,11 @@ public: * \return the object TypeId */ static TypeId GetTypeId (); - TypeId GetInstanceTypeId () const; - uint32_t GetSerializedSize () const; - void Serialize (Buffer::Iterator start) const; - uint32_t Deserialize (Buffer::Iterator start); - void Print (std::ostream &os) const; + TypeId GetInstanceTypeId () const override; + uint32_t GetSerializedSize () const override; + void Serialize (Buffer::Iterator start) const override; + uint32_t Deserialize (Buffer::Iterator start) override; + void Print (std::ostream &os) const override; /** * \brief Comparison operator @@ -565,11 +565,11 @@ public: * \return the object TypeId */ static TypeId GetTypeId (); - TypeId GetInstanceTypeId () const; - uint32_t GetSerializedSize () const; - void Serialize (Buffer::Iterator i) const; - uint32_t Deserialize (Buffer::Iterator start); - void Print (std::ostream &os) const; + TypeId GetInstanceTypeId () const override; + uint32_t GetSerializedSize () const override; + void Serialize (Buffer::Iterator i) const override; + uint32_t Deserialize (Buffer::Iterator start) override; + void Print (std::ostream &os) const override; // No delete flag /** diff --git a/src/aodv/model/aodv-routing-protocol.cc b/src/aodv/model/aodv-routing-protocol.cc index c10167f13..0583da209 100644 --- a/src/aodv/model/aodv-routing-protocol.cc +++ b/src/aodv/model/aodv-routing-protocol.cc @@ -86,7 +86,7 @@ public: return tid; } - TypeId GetInstanceTypeId () const + TypeId GetInstanceTypeId () const override { return GetTypeId (); } @@ -109,22 +109,22 @@ public: m_oif = oif; } - uint32_t GetSerializedSize () const + uint32_t GetSerializedSize () const override { return sizeof(int32_t); } - void Serialize (TagBuffer i) const + void Serialize (TagBuffer i) const override { i.WriteU32 (m_oif); } - void Deserialize (TagBuffer i) + void Deserialize (TagBuffer i) override { m_oif = i.ReadU32 (); } - void Print (std::ostream &os) const + void Print (std::ostream &os) const override { os << "DeferredRouteOutputTag: output interface = " << m_oif; } diff --git a/src/aodv/model/aodv-routing-protocol.h b/src/aodv/model/aodv-routing-protocol.h index aebc9d45b..981a56cda 100644 --- a/src/aodv/model/aodv-routing-protocol.h +++ b/src/aodv/model/aodv-routing-protocol.h @@ -64,20 +64,20 @@ public: /// constructor RoutingProtocol (); - virtual ~RoutingProtocol (); - virtual void DoDispose (); + ~RoutingProtocol () override; + void DoDispose () override; // Inherited from Ipv4RoutingProtocol - Ptr RouteOutput (Ptr p, const Ipv4Header &header, Ptr oif, Socket::SocketErrno &sockerr); + Ptr RouteOutput (Ptr p, const Ipv4Header &header, Ptr oif, Socket::SocketErrno &sockerr) override; bool RouteInput (Ptr p, const Ipv4Header &header, Ptr idev, UnicastForwardCallback ucb, MulticastForwardCallback mcb, - LocalDeliverCallback lcb, ErrorCallback ecb); - virtual void NotifyInterfaceUp (uint32_t interface); - virtual void NotifyInterfaceDown (uint32_t interface); - virtual void NotifyAddAddress (uint32_t interface, Ipv4InterfaceAddress address); - virtual void NotifyRemoveAddress (uint32_t interface, Ipv4InterfaceAddress address); - virtual void SetIpv4 (Ptr ipv4); - virtual void PrintRoutingTable (Ptr stream, Time::Unit unit = Time::S) const; + LocalDeliverCallback lcb, ErrorCallback ecb) override; + void NotifyInterfaceUp (uint32_t interface) override; + void NotifyInterfaceDown (uint32_t interface) override; + void NotifyAddAddress (uint32_t interface, Ipv4InterfaceAddress address) override; + void NotifyRemoveAddress (uint32_t interface, Ipv4InterfaceAddress address) override; + void SetIpv4 (Ptr ipv4) override; + void PrintRoutingTable (Ptr stream, Time::Unit unit = Time::S) const override; // Handle protocol parameters /** @@ -182,7 +182,7 @@ public: int64_t AssignStreams (int64_t stream); protected: - virtual void DoInitialize (); + void DoInitialize () override; private: /** * Notify that an MPDU was dropped. diff --git a/src/aodv/test/aodv-id-cache-test-suite.cc b/src/aodv/test/aodv-id-cache-test-suite.cc index f3528ce45..caa6ce9ec 100644 --- a/src/aodv/test/aodv-id-cache-test-suite.cc +++ b/src/aodv/test/aodv-id-cache-test-suite.cc @@ -50,7 +50,7 @@ public: cache (Seconds (10)) { } - virtual void DoRun (); + void DoRun () override; private: /// Timeout test function #1 diff --git a/src/aodv/test/aodv-regression.h b/src/aodv/test/aodv-regression.h index ec2abd8fb..54c70a1a8 100644 --- a/src/aodv/test/aodv-regression.h +++ b/src/aodv/test/aodv-regression.h @@ -162,7 +162,7 @@ public: * \param arpAliveTimeout ARP alive timeout, this is used to check that ARP and routing do not interfere */ ChainRegressionTest (const char * const prefix, Time time = Seconds (10), uint32_t size = 5, Time arpAliveTimeout = Seconds (120)); - ~ChainRegressionTest (); + ~ChainRegressionTest () override; private: /// \internal It is important to have pointers here @@ -190,7 +190,7 @@ private: /// Compare traces with reference ones void CheckResults (); /// Go - void DoRun (); + void DoRun () override; /// Send one ping void SendPing (); }; diff --git a/src/aodv/test/aodv-test-suite.cc b/src/aodv/test/aodv-test-suite.cc index cf0db0a47..aaca3b070 100644 --- a/src/aodv/test/aodv-test-suite.cc +++ b/src/aodv/test/aodv-test-suite.cc @@ -39,7 +39,7 @@ struct NeighborTest : public TestCase neighbor (0) { } - virtual void DoRun (); + void DoRun () override; /** * Handler test function * \param addr the IPv4 address of the neighbor @@ -120,7 +120,7 @@ struct TypeHeaderTest : public TestCase TypeHeaderTest () : TestCase ("AODV TypeHeader") { } - virtual void DoRun () + void DoRun () override { TypeHeader h (AODVTYPE_RREQ); NS_TEST_EXPECT_MSG_EQ (h.IsValid (), true, "Default header is valid"); @@ -146,7 +146,7 @@ struct RreqHeaderTest : public TestCase RreqHeaderTest () : TestCase ("AODV RREQ") { } - virtual void DoRun () + void DoRun () override { RreqHeader h (/*flags*/ 0, /*reserved*/ 0, /*hopCount*/ 6, /*requestID*/ 1, /*dst*/ Ipv4Address ("1.2.3.4"), /*dstSeqNo*/ 40, /*origin*/ Ipv4Address ("4.3.2.1"), /*originSeqNo*/ 10); @@ -199,7 +199,7 @@ struct RrepHeaderTest : public TestCase RrepHeaderTest () : TestCase ("AODV RREP") { } - virtual void DoRun () + void DoRun () override { RrepHeader h (/*prefixSize*/ 0, /*hopCount*/ 12, /*dst*/ Ipv4Address ("1.2.3.4"), /*dstSeqNo*/ 2, /*origin*/ Ipv4Address ("4.3.2.1"), /*lifetime*/ Seconds (3)); @@ -251,7 +251,7 @@ struct RrepAckHeaderTest : public TestCase RrepAckHeaderTest () : TestCase ("AODV RREP-ACK") { } - virtual void DoRun () + void DoRun () override { RrepAckHeader h; Ptr p = Create (); @@ -274,7 +274,7 @@ struct RerrHeaderTest : public TestCase RerrHeaderTest () : TestCase ("AODV RERR") { } - virtual void DoRun () + void DoRun () override { RerrHeader h; h.SetNoDelete (true); @@ -343,7 +343,7 @@ struct QueueEntryTest : public TestCase void Error2 (Ptr p, const Ipv4Header & h, Socket::SocketErrno e) { } - virtual void DoRun () + void DoRun () override { Ptr packet = Create (); Ipv4Header h; @@ -380,7 +380,7 @@ struct AodvRqueueTest : public TestCase q (64, Seconds (30)) { } - virtual void DoRun (); + void DoRun () override; /** * Unicast test function * \param route the IPv4 route @@ -506,7 +506,7 @@ struct AodvRtableEntryTest : public TestCase AodvRtableEntryTest () : TestCase ("RtableEntry") { } - virtual void DoRun () + void DoRun () override { Ptr dev; Ipv4InterfaceAddress iface; @@ -592,7 +592,7 @@ struct AodvRtableTest : public TestCase AodvRtableTest () : TestCase ("Rtable") { } - virtual void DoRun () + void DoRun () override { RoutingTable rtable (Seconds (2)); NS_TEST_EXPECT_MSG_EQ (rtable.GetBadLinkLifetime (), Seconds (2), "trivial"); diff --git a/src/aodv/test/bug-772.h b/src/aodv/test/bug-772.h index 6a191bed1..f4a8e0cf5 100644 --- a/src/aodv/test/bug-772.h +++ b/src/aodv/test/bug-772.h @@ -49,7 +49,7 @@ public: * \param time Simulation time */ Bug772ChainTest (const char * const prefix, const char * const proto, Time time, uint32_t size); - ~Bug772ChainTest (); + ~Bug772ChainTest () override; private: /// \internal It is important to have pointers here @@ -75,7 +75,7 @@ private: /// Compare traces with reference ones void CheckResults (); /// Go - void DoRun (); + void DoRun () override; /** * Receive data function * \param socket the socket to receive from diff --git a/src/aodv/test/loopback.cc b/src/aodv/test/loopback.cc index 096ba4f8c..5ba7761a0 100644 --- a/src/aodv/test/loopback.cc +++ b/src/aodv/test/loopback.cc @@ -76,7 +76,7 @@ class LoopbackTestCase : public TestCase public: LoopbackTestCase (); - void DoRun (); + void DoRun () override; }; LoopbackTestCase::LoopbackTestCase () diff --git a/src/applications/model/application-packet-probe.h b/src/applications/model/application-packet-probe.h index afd322682..1dc7173da 100644 --- a/src/applications/model/application-packet-probe.h +++ b/src/applications/model/application-packet-probe.h @@ -57,7 +57,7 @@ public: */ static TypeId GetTypeId (); ApplicationPacketProbe (); - virtual ~ApplicationPacketProbe (); + ~ApplicationPacketProbe () override; /** * \brief Set a probe value @@ -83,7 +83,7 @@ public: * \param obj ns3::Object to connect to * \return true if the trace source was successfully connected */ - virtual bool ConnectByObject (std::string traceSource, Ptr obj); + bool ConnectByObject (std::string traceSource, Ptr obj) override; /** * \brief connect to a trace source provided by a config path @@ -93,7 +93,7 @@ public: * Note, if an invalid path is provided, the probe will not be connected * to anything. */ - virtual void ConnectByPath (std::string path); + void ConnectByPath (std::string path) override; private: /** diff --git a/src/applications/model/bulk-send-application.h b/src/applications/model/bulk-send-application.h index 66d210429..5b9e2149d 100644 --- a/src/applications/model/bulk-send-application.h +++ b/src/applications/model/bulk-send-application.h @@ -83,7 +83,7 @@ public: BulkSendApplication (); - virtual ~BulkSendApplication (); + ~BulkSendApplication () override; /** * \brief Set the upper bound for the total number of bytes to send. @@ -107,11 +107,11 @@ public: Ptr GetSocket () const; protected: - virtual void DoDispose (); + void DoDispose () override; private: // inherited from Application base class. - virtual void StartApplication (); // Called at time specified by Start - virtual void StopApplication (); // Called at time specified by Stop + void StartApplication () override; // Called at time specified by Start + void StopApplication () override; // Called at time specified by Stop /** * \brief Send data until the L4 transmission buffer is full. diff --git a/src/applications/model/onoff-application.h b/src/applications/model/onoff-application.h index e9b1fe5b7..b3415fbe9 100644 --- a/src/applications/model/onoff-application.h +++ b/src/applications/model/onoff-application.h @@ -103,7 +103,7 @@ public: OnOffApplication (); - virtual ~OnOffApplication(); + ~OnOffApplication() override; /** * \brief Set the total number of bytes to send. @@ -131,11 +131,11 @@ public: int64_t AssignStreams (int64_t stream); protected: - virtual void DoDispose (); + void DoDispose () override; private: // inherited from Application base class. - virtual void StartApplication (); // Called at time specified by Start - virtual void StopApplication (); // Called at time specified by Stop + void StartApplication () override; // Called at time specified by Start + void StopApplication () override; // Called at time specified by Stop //helpers /** diff --git a/src/applications/model/packet-sink.h b/src/applications/model/packet-sink.h index 45a2e187c..d48513df6 100644 --- a/src/applications/model/packet-sink.h +++ b/src/applications/model/packet-sink.h @@ -79,7 +79,7 @@ public: static TypeId GetTypeId (); PacketSink (); - virtual ~PacketSink (); + ~PacketSink () override; /** * \return the total bytes received in this sink app @@ -108,11 +108,11 @@ public: const SeqTsSizeHeader &header); protected: - virtual void DoDispose (); + void DoDispose () override; private: // inherited from Application base class. - virtual void StartApplication (); // Called at time specified by Start - virtual void StopApplication (); // Called at time specified by Stop + void StartApplication () override; // Called at time specified by Start + void StopApplication () override; // Called at time specified by Stop /** * \brief Handle a packet received by the application diff --git a/src/applications/model/seq-ts-echo-header.h b/src/applications/model/seq-ts-echo-header.h index 468279472..59bbbb54a 100644 --- a/src/applications/model/seq-ts-echo-header.h +++ b/src/applications/model/seq-ts-echo-header.h @@ -82,11 +82,11 @@ public: void SetTsEchoReply (Time ts); // Inherited - virtual TypeId GetInstanceTypeId () const override; - virtual void Print (std::ostream &os) const override; - virtual uint32_t GetSerializedSize () const override; - virtual void Serialize (Buffer::Iterator start) const override; - virtual uint32_t Deserialize (Buffer::Iterator start) override; + TypeId GetInstanceTypeId () const override; + void Print (std::ostream &os) const override; + uint32_t GetSerializedSize () const override; + void Serialize (Buffer::Iterator start) const override; + uint32_t Deserialize (Buffer::Iterator start) override; private: uint32_t m_seq; //!< Sequence number diff --git a/src/applications/model/seq-ts-header.h b/src/applications/model/seq-ts-header.h index e48c1facc..c5fadfcd8 100644 --- a/src/applications/model/seq-ts-header.h +++ b/src/applications/model/seq-ts-header.h @@ -65,11 +65,11 @@ public: */ static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId () const; - virtual void Print (std::ostream &os) const; - virtual uint32_t GetSerializedSize () const; - virtual void Serialize (Buffer::Iterator start) const; - virtual uint32_t Deserialize (Buffer::Iterator start); + TypeId GetInstanceTypeId () const override; + void Print (std::ostream &os) const override; + uint32_t GetSerializedSize () const override; + void Serialize (Buffer::Iterator start) const override; + uint32_t Deserialize (Buffer::Iterator start) override; private: uint32_t m_seq; //!< Sequence number diff --git a/src/applications/model/seq-ts-size-header.h b/src/applications/model/seq-ts-size-header.h index 159a4222b..f0d49fb8d 100644 --- a/src/applications/model/seq-ts-size-header.h +++ b/src/applications/model/seq-ts-size-header.h @@ -61,11 +61,11 @@ public: uint64_t GetSize () const; // Inherited - virtual TypeId GetInstanceTypeId () const override; - virtual void Print (std::ostream &os) const override; - virtual uint32_t GetSerializedSize () const override; - virtual void Serialize (Buffer::Iterator start) const override; - virtual uint32_t Deserialize (Buffer::Iterator start) override; + TypeId GetInstanceTypeId () const override; + void Print (std::ostream &os) const override; + uint32_t GetSerializedSize () const override; + void Serialize (Buffer::Iterator start) const override; + uint32_t Deserialize (Buffer::Iterator start) override; private: uint64_t m_size {0}; //!< The 'size' information that the header is carrying diff --git a/src/applications/model/three-gpp-http-client.h b/src/applications/model/three-gpp-http-client.h index 7885bf56a..d4d626aab 100644 --- a/src/applications/model/three-gpp-http-client.h +++ b/src/applications/model/three-gpp-http-client.h @@ -177,11 +177,11 @@ public: protected: // Inherited from Object base class. - virtual void DoDispose (); + void DoDispose () override; // Inherited from Application base class. - virtual void StartApplication (); - virtual void StopApplication (); + void StartApplication () override; + void StopApplication () override; private: // SOCKET CALLBACK METHODS diff --git a/src/applications/model/three-gpp-http-header.h b/src/applications/model/three-gpp-http-header.h index a0a82c0b8..54dd8da61 100644 --- a/src/applications/model/three-gpp-http-header.h +++ b/src/applications/model/three-gpp-http-header.h @@ -65,13 +65,13 @@ public: static TypeId GetTypeId (); // Inherited from ObjectBase base class. - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; // Inherited from Header base class. - virtual uint32_t GetSerializedSize () const; - virtual void Serialize (Buffer::Iterator start) const; - virtual uint32_t Deserialize (Buffer::Iterator start); - virtual void Print (std::ostream &os) const; + uint32_t GetSerializedSize () const override; + void Serialize (Buffer::Iterator start) const override; + uint32_t Deserialize (Buffer::Iterator start) override; + void Print (std::ostream &os) const override; /** * \return The string representation of the header. diff --git a/src/applications/model/three-gpp-http-server.h b/src/applications/model/three-gpp-http-server.h index a471df0d5..5857eee4d 100644 --- a/src/applications/model/three-gpp-http-server.h +++ b/src/applications/model/three-gpp-http-server.h @@ -150,11 +150,11 @@ public: protected: // Inherited from Object base class - virtual void DoDispose (); + void DoDispose () override; // Inherited from Application base class - virtual void StartApplication (); - virtual void StopApplication (); + void StartApplication () override; + void StopApplication () override; private: // SOCKET CALLBACK METHODS diff --git a/src/applications/model/three-gpp-http-variables.h b/src/applications/model/three-gpp-http-variables.h index f46f1c87d..9bb63c58e 100644 --- a/src/applications/model/three-gpp-http-variables.h +++ b/src/applications/model/three-gpp-http-variables.h @@ -278,7 +278,7 @@ private: */ void UpdateEmbeddedObjectMuAndSigma (); - void DoInitialize (); // overridden from base class + void DoInitialize () override; // overridden from base class /** * Random variable for determining MTU size (in bytes). diff --git a/src/applications/model/udp-client.h b/src/applications/model/udp-client.h index b84eed754..3205f0f2c 100644 --- a/src/applications/model/udp-client.h +++ b/src/applications/model/udp-client.h @@ -51,7 +51,7 @@ public: UdpClient (); - virtual ~UdpClient (); + ~UdpClient () override; /** * \brief set the remote address and port @@ -71,12 +71,12 @@ public: uint64_t GetTotalTx () const; protected: - virtual void DoDispose (); + void DoDispose () override; private: - virtual void StartApplication (); - virtual void StopApplication (); + void StartApplication () override; + void StopApplication () override; /** * \brief Send a packet diff --git a/src/applications/model/udp-echo-client.h b/src/applications/model/udp-echo-client.h index 6c7f4a5fb..4471c2d67 100644 --- a/src/applications/model/udp-echo-client.h +++ b/src/applications/model/udp-echo-client.h @@ -47,7 +47,7 @@ public: UdpEchoClient (); - virtual ~UdpEchoClient (); + ~UdpEchoClient () override; /** * \brief set the remote address and port @@ -131,12 +131,12 @@ public: void SetFill (uint8_t *fill, uint32_t fillSize, uint32_t dataSize); protected: - virtual void DoDispose (); + void DoDispose () override; private: - virtual void StartApplication (); - virtual void StopApplication (); + void StartApplication () override; + void StopApplication () override; /** * \brief Schedule the next packet transmission diff --git a/src/applications/model/udp-echo-server.h b/src/applications/model/udp-echo-server.h index c622932dd..e442c463e 100644 --- a/src/applications/model/udp-echo-server.h +++ b/src/applications/model/udp-echo-server.h @@ -50,15 +50,15 @@ public: */ static TypeId GetTypeId (); UdpEchoServer (); - virtual ~UdpEchoServer (); + ~UdpEchoServer () override; protected: - virtual void DoDispose (); + void DoDispose () override; private: - virtual void StartApplication (); - virtual void StopApplication (); + void StartApplication () override; + void StopApplication () override; /** * \brief Handle a packet reception. diff --git a/src/applications/model/udp-server.h b/src/applications/model/udp-server.h index cff9997c4..938ffcd99 100644 --- a/src/applications/model/udp-server.h +++ b/src/applications/model/udp-server.h @@ -54,7 +54,7 @@ public: */ static TypeId GetTypeId (); UdpServer (); - virtual ~UdpServer (); + ~UdpServer () override; /** * \brief Returns the number of lost packets * \return the number of lost packets @@ -81,12 +81,12 @@ public: */ void SetPacketWindowSize (uint16_t size); protected: - virtual void DoDispose (); + void DoDispose () override; private: - virtual void StartApplication (); - virtual void StopApplication (); + void StartApplication () override; + void StopApplication () override; /** * \brief Handle a packet reception. diff --git a/src/applications/model/udp-trace-client.h b/src/applications/model/udp-trace-client.h index e23b6047f..f64929eed 100644 --- a/src/applications/model/udp-trace-client.h +++ b/src/applications/model/udp-trace-client.h @@ -80,7 +80,7 @@ public: * */ UdpTraceClient (Ipv4Address ip, uint16_t port, char *traceFile); - ~UdpTraceClient (); + ~UdpTraceClient () override; /** * \brief set the remote address and port @@ -122,7 +122,7 @@ public: void SetTraceLoop (bool traceLoop); protected: - virtual void DoDispose (); + void DoDispose () override; private: /** @@ -134,8 +134,8 @@ private: * \brief Load the default trace */ void LoadDefaultTrace (); - virtual void StartApplication (); - virtual void StopApplication (); + void StartApplication () override; + void StopApplication () override; /** * \brief Send a packet diff --git a/src/applications/test/bulk-send-application-test-suite.cc b/src/applications/test/bulk-send-application-test-suite.cc index ef5e4c081..68a74efa8 100644 --- a/src/applications/test/bulk-send-application-test-suite.cc +++ b/src/applications/test/bulk-send-application-test-suite.cc @@ -49,10 +49,10 @@ class BulkSendBasicTestCase : public TestCase { public: BulkSendBasicTestCase (); - virtual ~BulkSendBasicTestCase (); + ~BulkSendBasicTestCase () override; private: - virtual void DoRun (); + void DoRun () override; /** * Record a packet successfully sent * \param p the packet @@ -145,10 +145,10 @@ class BulkSendSeqTsSizeTestCase : public TestCase { public: BulkSendSeqTsSizeTestCase (); - virtual ~BulkSendSeqTsSizeTestCase (); + ~BulkSendSeqTsSizeTestCase () override; private: - virtual void DoRun (); + void DoRun () override; /** * Record a packet successfully sent * \param p the packet diff --git a/src/applications/test/three-gpp-http-client-server-test.cc b/src/applications/test/three-gpp-http-client-server-test.cc index 4d4558dbf..38b7eeb07 100644 --- a/src/applications/test/three-gpp-http-client-server-test.cc +++ b/src/applications/test/three-gpp-http-client-server-test.cc @@ -112,8 +112,8 @@ private: Address &assignedAddress); // Inherited from TestCase base class. - virtual void DoRun (); - virtual void DoTeardown (); + void DoRun () override; + void DoTeardown () override; /** * \internal diff --git a/src/applications/test/udp-client-server-test.cc b/src/applications/test/udp-client-server-test.cc index 887230eab..9a2fd2235 100644 --- a/src/applications/test/udp-client-server-test.cc +++ b/src/applications/test/udp-client-server-test.cc @@ -53,10 +53,10 @@ class UdpClientServerTestCase : public TestCase { public: UdpClientServerTestCase (); - virtual ~UdpClientServerTestCase (); + ~UdpClientServerTestCase () override; private: - virtual void DoRun (); + void DoRun () override; }; @@ -127,10 +127,10 @@ class UdpTraceClientServerTestCase : public TestCase { public: UdpTraceClientServerTestCase (); - virtual ~UdpTraceClientServerTestCase (); + ~UdpTraceClientServerTestCase () override; private: - virtual void DoRun (); + void DoRun () override; }; @@ -196,10 +196,10 @@ class PacketLossCounterTestCase : public TestCase { public: PacketLossCounterTestCase (); - virtual ~PacketLossCounterTestCase (); + ~PacketLossCounterTestCase () override; private: - virtual void DoRun (); + void DoRun () override; }; @@ -271,10 +271,10 @@ class UdpEchoClientSetFillTestCase : public TestCase { public: UdpEchoClientSetFillTestCase (); - virtual ~UdpEchoClientSetFillTestCase (); + ~UdpEchoClientSetFillTestCase () override; private: - virtual void DoRun (); + void DoRun () override; }; diff --git a/src/bridge/model/bridge-channel.h b/src/bridge/model/bridge-channel.h index efb3cf9c3..a03f20f73 100644 --- a/src/bridge/model/bridge-channel.h +++ b/src/bridge/model/bridge-channel.h @@ -48,7 +48,7 @@ public: */ static TypeId GetTypeId (); BridgeChannel (); - virtual ~BridgeChannel (); + ~BridgeChannel () override; // Delete copy constructor and assignment operator to avoid misuse BridgeChannel (const BridgeChannel &) = delete; @@ -61,8 +61,8 @@ public: void AddChannel (Ptr bridgedChannel); // virtual methods implementation, from Channel - virtual std::size_t GetNDevices () const; - virtual Ptr GetDevice (std::size_t i) const; + std::size_t GetNDevices () const override; + Ptr GetDevice (std::size_t i) const override; private: std::vector< Ptr > m_bridgedChannels; //!< pool of bridged channels diff --git a/src/bridge/model/bridge-net-device.h b/src/bridge/model/bridge-net-device.h index aa0d64fed..baccb3264 100644 --- a/src/bridge/model/bridge-net-device.h +++ b/src/bridge/model/bridge-net-device.h @@ -77,7 +77,7 @@ public: */ static TypeId GetTypeId (); BridgeNetDevice (); - virtual ~BridgeNetDevice (); + ~BridgeNetDevice () override; // Delete copy constructor and assignment operator to avoid misuse BridgeNetDevice (const BridgeNetDevice &) = delete; @@ -113,33 +113,33 @@ public: Ptr GetBridgePort (uint32_t n) const; // inherited from NetDevice base class. - virtual void SetIfIndex (const uint32_t index); - virtual uint32_t GetIfIndex () const; - virtual Ptr GetChannel () const; - virtual void SetAddress (Address address); - virtual Address GetAddress () const; - virtual bool SetMtu (const uint16_t mtu); - virtual uint16_t GetMtu () const; - virtual bool IsLinkUp () const; - virtual void AddLinkChangeCallback (Callback callback); - virtual bool IsBroadcast () const; - virtual Address GetBroadcast () const; - virtual bool IsMulticast () const; - virtual Address GetMulticast (Ipv4Address multicastGroup) const; - virtual bool IsPointToPoint () const; - virtual bool IsBridge () const; - virtual bool Send (Ptr packet, const Address& dest, uint16_t protocolNumber); - virtual bool SendFrom (Ptr packet, const Address& source, const Address& dest, uint16_t protocolNumber); - virtual Ptr GetNode () const; - virtual void SetNode (Ptr node); - virtual bool NeedsArp () const; - virtual void SetReceiveCallback (NetDevice::ReceiveCallback cb); - virtual void SetPromiscReceiveCallback (NetDevice::PromiscReceiveCallback cb); - virtual bool SupportsSendFrom () const; - virtual Address GetMulticast (Ipv6Address addr) const; + void SetIfIndex (const uint32_t index) override; + uint32_t GetIfIndex () const override; + Ptr GetChannel () const override; + void SetAddress (Address address) override; + Address GetAddress () const override; + bool SetMtu (const uint16_t mtu) override; + uint16_t GetMtu () const override; + bool IsLinkUp () const override; + void AddLinkChangeCallback (Callback callback) override; + bool IsBroadcast () const override; + Address GetBroadcast () const override; + bool IsMulticast () const override; + Address GetMulticast (Ipv4Address multicastGroup) const override; + bool IsPointToPoint () const override; + bool IsBridge () const override; + bool Send (Ptr packet, const Address& dest, uint16_t protocolNumber) override; + bool SendFrom (Ptr packet, const Address& source, const Address& dest, uint16_t protocolNumber) override; + Ptr GetNode () const override; + void SetNode (Ptr node) override; + bool NeedsArp () const override; + void SetReceiveCallback (NetDevice::ReceiveCallback cb) override; + void SetPromiscReceiveCallback (NetDevice::PromiscReceiveCallback cb) override; + bool SupportsSendFrom () const override; + Address GetMulticast (Ipv6Address addr) const override; protected: - virtual void DoDispose (); + void DoDispose () override; /** * \brief Receives a packet from one bridged port. diff --git a/src/buildings/helper/building-allocator.h b/src/buildings/helper/building-allocator.h index 7480cc450..9d361e88c 100644 --- a/src/buildings/helper/building-allocator.h +++ b/src/buildings/helper/building-allocator.h @@ -45,7 +45,7 @@ class GridBuildingAllocator : public Object { public: GridBuildingAllocator (); - virtual ~GridBuildingAllocator (); + ~GridBuildingAllocator () override; /** * \brief Get the type ID. diff --git a/src/buildings/helper/building-position-allocator.h b/src/buildings/helper/building-position-allocator.h index e41be71d5..bc6d835b4 100644 --- a/src/buildings/helper/building-position-allocator.h +++ b/src/buildings/helper/building-position-allocator.h @@ -48,7 +48,7 @@ public: static TypeId GetTypeId (); // inherited from PositionAllocator - virtual Vector GetNext () const; + Vector GetNext () const override; /** * Assign a fixed random variable stream number to the random variables @@ -58,7 +58,7 @@ public: * \param stream first stream index to use * \return the number of stream indices assigned by this model */ - int64_t AssignStreams (int64_t stream); + int64_t AssignStreams (int64_t stream) override; private: @@ -95,7 +95,7 @@ public: static TypeId GetTypeId (); // inherited from PositionAllocator - virtual Vector GetNext () const; + Vector GetNext () const override; /** * \brief Set the random variable stream object that generates x-positions @@ -121,7 +121,7 @@ public: * \param stream first stream index to use * \return the number of stream indices assigned by this model */ - int64_t AssignStreams (int64_t stream); + int64_t AssignStreams (int64_t stream) override; private: Ptr m_x; //!< pointer to x's random variable stream @@ -149,7 +149,7 @@ public: static TypeId GetTypeId (); // inherited from PositionAllocator - virtual Vector GetNext () const; + Vector GetNext () const override; /** * Assign a fixed random variable stream number to the random variables @@ -159,7 +159,7 @@ public: * \param stream first stream index to use * \return the number of stream indices assigned by this model */ - int64_t AssignStreams (int64_t stream); + int64_t AssignStreams (int64_t stream) override; private: @@ -204,7 +204,7 @@ public: static TypeId GetTypeId (); // inherited from PositionAllocator - virtual Vector GetNext () const; + Vector GetNext () const override; /** * Assign a fixed random variable stream number to the random variables @@ -214,7 +214,7 @@ public: * \param stream first stream index to use * \return the number of stream indices assigned by this model */ - int64_t AssignStreams (int64_t); + int64_t AssignStreams (int64_t) override; private: @@ -252,7 +252,7 @@ public: */ static TypeId GetTypeId (); // inherited from PositionAllocator - virtual Vector GetNext () const; + Vector GetNext () const override; /** * Assign a fixed random variable stream number to the random variables @@ -262,7 +262,7 @@ public: * \param stream first stream index to use * \return the number of stream indices assigned by this model */ - int64_t AssignStreams (int64_t); + int64_t AssignStreams (int64_t) override; private: diff --git a/src/buildings/model/building-list.cc b/src/buildings/model/building-list.cc index 61ef17513..d7292c9a3 100644 --- a/src/buildings/model/building-list.cc +++ b/src/buildings/model/building-list.cc @@ -44,7 +44,7 @@ public: */ static TypeId GetTypeId (); BuildingListPriv (); - ~BuildingListPriv (); + ~BuildingListPriv () override; /** * Add a Building to the list. @@ -84,7 +84,7 @@ public: static Ptr Get (); private: - virtual void DoDispose (); + void DoDispose () override; /** * Get the Singleton instance of BuildingListPriv (or create one) * \return the BuildingListPriv instance diff --git a/src/buildings/model/building.h b/src/buildings/model/building.h index 5ca0bf53b..d3865edf3 100644 --- a/src/buildings/model/building.h +++ b/src/buildings/model/building.h @@ -43,7 +43,7 @@ public: * \return The object TypeId. */ static TypeId GetTypeId (); - virtual void DoDispose (); + void DoDispose () override; /** * Building type enum @@ -88,7 +88,7 @@ public: * Destructor * */ - virtual ~Building (); + ~Building () override; /** * \return the unique id of this Building. This unique id happens to diff --git a/src/buildings/model/buildings-channel-condition-model.h b/src/buildings/model/buildings-channel-condition-model.h index 9dce58411..f3e7f1e00 100644 --- a/src/buildings/model/buildings-channel-condition-model.h +++ b/src/buildings/model/buildings-channel-condition-model.h @@ -55,7 +55,7 @@ public: /** * Destructor for the BuildingsChannelConditionModel class */ - virtual ~BuildingsChannelConditionModel () override; + ~BuildingsChannelConditionModel () override; /** * Computes the condition of the channel between a and b. @@ -64,7 +64,7 @@ public: * \param b mobility model * \return the condition of the channel between a and b */ - virtual Ptr GetChannelCondition (Ptr a, Ptr b) const override; + Ptr GetChannelCondition (Ptr a, Ptr b) const override; /** * If this model uses objects of type RandomVariableStream, @@ -75,7 +75,7 @@ public: * \param stream * \return the number of stream indices assigned by this model */ - virtual int64_t AssignStreams (int64_t stream) override; + int64_t AssignStreams (int64_t stream) override; private: /** diff --git a/src/buildings/model/buildings-propagation-loss-model.h b/src/buildings/model/buildings-propagation-loss-model.h index 4e73bc9db..3ed110b20 100644 --- a/src/buildings/model/buildings-propagation-loss-model.h +++ b/src/buildings/model/buildings-propagation-loss-model.h @@ -73,7 +73,7 @@ public: virtual double GetLoss (Ptr a, Ptr b) const = 0; // inherited from PropagationLossModel - virtual double DoCalcRxPower (double txPowerDbm, Ptr a, Ptr b) const; + double DoCalcRxPower (double txPowerDbm, Ptr a, Ptr b) const override; protected: /** @@ -152,7 +152,7 @@ protected: double m_shadowingSigmaIndoor; Ptr m_randVariable; //!< Random variable - virtual int64_t DoAssignStreams (int64_t stream); + int64_t DoAssignStreams (int64_t stream) override; }; } diff --git a/src/buildings/model/hybrid-buildings-propagation-loss-model.h b/src/buildings/model/hybrid-buildings-propagation-loss-model.h index 83311a7a0..011e3dfd4 100644 --- a/src/buildings/model/hybrid-buildings-propagation-loss-model.h +++ b/src/buildings/model/hybrid-buildings-propagation-loss-model.h @@ -63,7 +63,7 @@ public: */ static TypeId GetTypeId (); HybridBuildingsPropagationLossModel (); - ~HybridBuildingsPropagationLossModel (); + ~HybridBuildingsPropagationLossModel () override; /** @@ -102,7 +102,7 @@ public: * \param b the mobility model of the destination * \returns the propagation loss (in dBm) */ - virtual double GetLoss (Ptr a, Ptr b) const; + double GetLoss (Ptr a, Ptr b) const override; private: diff --git a/src/buildings/model/itu-r-1238-propagation-loss-model.h b/src/buildings/model/itu-r-1238-propagation-loss-model.h index 3c1589126..e65ee7a63 100644 --- a/src/buildings/model/itu-r-1238-propagation-loss-model.h +++ b/src/buildings/model/itu-r-1238-propagation-loss-model.h @@ -57,10 +57,10 @@ public: private: // inherited from PropagationLossModel - virtual double DoCalcRxPower (double txPowerDbm, + double DoCalcRxPower (double txPowerDbm, Ptr a, - Ptr b) const; - virtual int64_t DoAssignStreams (int64_t stream); + Ptr b) const override; + int64_t DoAssignStreams (int64_t stream) override; double m_frequency; ///< frequency in MHz diff --git a/src/buildings/model/mobility-building-info.h b/src/buildings/model/mobility-building-info.h index c0bb156c1..6a6b9516b 100644 --- a/src/buildings/model/mobility-building-info.h +++ b/src/buildings/model/mobility-building-info.h @@ -133,7 +133,7 @@ public: protected: // inherited from Object - virtual void DoInitialize (); + void DoInitialize () override; diff --git a/src/buildings/model/oh-buildings-propagation-loss-model.h b/src/buildings/model/oh-buildings-propagation-loss-model.h index 544120c77..dec0994ea 100644 --- a/src/buildings/model/oh-buildings-propagation-loss-model.h +++ b/src/buildings/model/oh-buildings-propagation-loss-model.h @@ -46,14 +46,14 @@ public: */ static TypeId GetTypeId (); OhBuildingsPropagationLossModel (); - ~OhBuildingsPropagationLossModel (); + ~OhBuildingsPropagationLossModel () override; /** * \param a the mobility model of the source * \param b the mobility model of the destination * \returns the propagation loss (in dBm) */ - virtual double GetLoss (Ptr a, Ptr b) const; + double GetLoss (Ptr a, Ptr b) const override; private: diff --git a/src/buildings/model/random-walk-2d-outdoor-mobility-model.h b/src/buildings/model/random-walk-2d-outdoor-mobility-model.h index a9b4995b8..bbd90dde4 100644 --- a/src/buildings/model/random-walk-2d-outdoor-mobility-model.h +++ b/src/buildings/model/random-walk-2d-outdoor-mobility-model.h @@ -110,12 +110,12 @@ private: */ Vector CalculateIntersectionFromOutside (const Vector ¤t, const Vector &next, const Box boundaries) const; - virtual void DoDispose (); - virtual void DoInitialize (); - virtual Vector DoGetPosition () const; - virtual void DoSetPosition (const Vector &position); - virtual Vector DoGetVelocity () const; - virtual int64_t DoAssignStreams (int64_t); + void DoDispose () override; + void DoInitialize () override; + Vector DoGetPosition () const override; + void DoSetPosition (const Vector &position) override; + Vector DoGetVelocity () const override; + int64_t DoAssignStreams (int64_t) override; ConstantVelocityHelper m_helper; //!< helper for this object EventId m_event; //!< stored event ID diff --git a/src/buildings/model/three-gpp-v2v-channel-condition-model.h b/src/buildings/model/three-gpp-v2v-channel-condition-model.h index 4b64cad77..c9fe403f4 100644 --- a/src/buildings/model/three-gpp-v2v-channel-condition-model.h +++ b/src/buildings/model/three-gpp-v2v-channel-condition-model.h @@ -64,7 +64,7 @@ public: /** * Destructor for the ThreeGppV2vUrbanChannelConditionModel class */ - virtual ~ThreeGppV2vUrbanChannelConditionModel () override; + ~ThreeGppV2vUrbanChannelConditionModel () override; private: /** @@ -75,7 +75,7 @@ private: * \param b rx mobility model * \return the LOS probability */ - virtual double ComputePlos (Ptr a, Ptr b) const override; + double ComputePlos (Ptr a, Ptr b) const override; /** * Compute the NLOS probability. It determines the presence of obstructions @@ -86,7 +86,7 @@ private: * \param b rx mobility model * \return the NLOS probability */ - virtual double ComputePnlos (Ptr a, Ptr b) const override; + double ComputePnlos (Ptr a, Ptr b) const override; Ptr m_buildingsCcm; //!< used to determine the obstructions due to buildings }; @@ -126,7 +126,7 @@ public: /** * Destructor for the ThreeGppV2vHighwayChannelConditionModel class */ - virtual ~ThreeGppV2vHighwayChannelConditionModel () override; + ~ThreeGppV2vHighwayChannelConditionModel () override; private: /** @@ -137,7 +137,7 @@ private: * \param b rx mobility model * \return the LOS probability */ - virtual double ComputePlos (Ptr a, Ptr b) const override; + double ComputePlos (Ptr a, Ptr b) const override; /** * Compute the NLOS probability. It determines the presence of obstructions @@ -148,7 +148,7 @@ private: * \param b rx mobility model * \return the NLOS probability */ - virtual double ComputePnlos (Ptr a, Ptr b) const override; + double ComputePnlos (Ptr a, Ptr b) const override; /** * \brief The callback which is hooked to a method to compute channel condition. diff --git a/src/buildings/test/building-position-allocator-test.cc b/src/buildings/test/building-position-allocator-test.cc index c543ab3bf..cedce6bb2 100644 --- a/src/buildings/test/building-position-allocator-test.cc +++ b/src/buildings/test/building-position-allocator-test.cc @@ -89,7 +89,7 @@ public: RandomRoomPositionAllocatorTestCase (); private: - virtual void DoRun (); + void DoRun () override; }; @@ -173,7 +173,7 @@ public: SameRoomPositionAllocatorTestCase (); private: - virtual void DoRun (); + void DoRun () override; }; diff --git a/src/buildings/test/buildings-channel-condition-model-test.cc b/src/buildings/test/buildings-channel-condition-model-test.cc index 66cb3a46b..b02be7004 100644 --- a/src/buildings/test/buildings-channel-condition-model-test.cc +++ b/src/buildings/test/buildings-channel-condition-model-test.cc @@ -49,13 +49,13 @@ public: /** * Destructor */ - virtual ~BuildingsChannelConditionModelTestCase (); + ~BuildingsChannelConditionModelTestCase () override; private: /** * Builds the simulation scenario and perform the tests */ - virtual void DoRun (); + void DoRun () override; /** * Struct containing the parameters for each test diff --git a/src/buildings/test/buildings-helper-test.cc b/src/buildings/test/buildings-helper-test.cc index 127a0fd3a..34812ffc3 100644 --- a/src/buildings/test/buildings-helper-test.cc +++ b/src/buildings/test/buildings-helper-test.cc @@ -122,7 +122,7 @@ public: BuildingsHelperOneTestCase (PositionInBuilding pib, BuildingData bd); private: - virtual void DoRun (); + void DoRun () override; PositionInBuilding m_pib; //!< Position in the building BuildingData m_bd; //!< Building data diff --git a/src/buildings/test/buildings-pathloss-test.h b/src/buildings/test/buildings-pathloss-test.h index 3b73e1220..a23d6d01a 100644 --- a/src/buildings/test/buildings-pathloss-test.h +++ b/src/buildings/test/buildings-pathloss-test.h @@ -64,10 +64,10 @@ public: * \param name Test name */ BuildingsPathlossTestCase (double freq, uint16_t m1, uint16_t m2, EnvironmentType env, CitySize city, double refValue, std::string name); - virtual ~BuildingsPathlossTestCase (); + ~BuildingsPathlossTestCase () override; private: - virtual void DoRun (); + void DoRun () override; /** * Create a mobility model based on its index * \param index MobilityModel index diff --git a/src/buildings/test/buildings-shadowing-test.h b/src/buildings/test/buildings-shadowing-test.h index 3bd5ba3c5..b2a8772a6 100644 --- a/src/buildings/test/buildings-shadowing-test.h +++ b/src/buildings/test/buildings-shadowing-test.h @@ -65,10 +65,10 @@ public: * \param name Test name */ BuildingsShadowingTestCase (uint16_t m1, uint16_t m2, double refValue, double sigmaRef, std::string name); - virtual ~BuildingsShadowingTestCase (); + ~BuildingsShadowingTestCase () override; private: - virtual void DoRun (); + void DoRun () override; /** * Create a mobility model based on its index * \param index MobilityModel index diff --git a/src/buildings/test/outdoor-random-walk-test.cc b/src/buildings/test/outdoor-random-walk-test.cc index 315559ea0..2b729cd89 100644 --- a/src/buildings/test/outdoor-random-walk-test.cc +++ b/src/buildings/test/outdoor-random-walk-test.cc @@ -44,10 +44,10 @@ class OutdoorRandomWalkTestCase : public TestCase { public: OutdoorRandomWalkTestCase (); - virtual ~OutdoorRandomWalkTestCase (); + ~OutdoorRandomWalkTestCase () override; private: - virtual void DoRun (); + void DoRun () override; /** * Check that the position is the expected one diff --git a/src/buildings/test/three-gpp-v2v-channel-condition-model-test.cc b/src/buildings/test/three-gpp-v2v-channel-condition-model-test.cc index b638322be..f1a82db2e 100644 --- a/src/buildings/test/three-gpp-v2v-channel-condition-model-test.cc +++ b/src/buildings/test/three-gpp-v2v-channel-condition-model-test.cc @@ -58,13 +58,13 @@ public: /** * Destructor */ - virtual ~ThreeGppV2vBuildingsChCondModelTestCase (); + ~ThreeGppV2vBuildingsChCondModelTestCase () override; private: /** * Builds the simulation scenario and perform the tests */ - virtual void DoRun (); + void DoRun () override; /** * Struct containing the parameters for each test @@ -194,13 +194,13 @@ public: /** * Destructor */ - virtual ~ThreeGppV2vUrbanLosNlosvChCondModelTestCase (); + ~ThreeGppV2vUrbanLosNlosvChCondModelTestCase () override; private: /** * Builds the simulation scenario and perform the tests */ - virtual void DoRun (); + void DoRun () override; /** * Evaluates the channel condition between two nodes by calling the method @@ -345,13 +345,13 @@ public: /** * Destructor */ - virtual ~ThreeGppV2vHighwayLosNlosvChCondModelTestCase (); + ~ThreeGppV2vHighwayLosNlosvChCondModelTestCase () override; private: /** * Builds the simulation scenario and perform the tests */ - virtual void DoRun (); + void DoRun () override; /** * Evaluates the channel condition between two nodes by calling the method diff --git a/src/config-store/model/config-store.h b/src/config-store/model/config-store.h index 349eb1d11..9cde13dfe 100644 --- a/src/config-store/model/config-store.h +++ b/src/config-store/model/config-store.h @@ -83,10 +83,10 @@ public: * \return the object TypeId */ static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; ConfigStore (); - ~ConfigStore (); + ~ConfigStore () override; /** * Set the mode of operation diff --git a/src/config-store/model/file-config.h b/src/config-store/model/file-config.h index cd07b3c60..9635b43dd 100644 --- a/src/config-store/model/file-config.h +++ b/src/config-store/model/file-config.h @@ -69,11 +69,11 @@ class NoneFileConfig : public FileConfig { public: NoneFileConfig (); - virtual ~NoneFileConfig (); - virtual void SetFilename (std::string filename); - virtual void Default (); - virtual void Global (); - virtual void Attributes (); + ~NoneFileConfig () override; + void SetFilename (std::string filename) override; + void Default () override; + void Global () override; + void Attributes () override; }; } // namespace ns3 diff --git a/src/config-store/model/raw-text-config.cc b/src/config-store/model/raw-text-config.cc index 8d5c24194..a5d15be42 100644 --- a/src/config-store/model/raw-text-config.cc +++ b/src/config-store/model/raw-text-config.cc @@ -72,10 +72,10 @@ public: } private: - virtual void StartVisitTypeId (std::string name) { + void StartVisitTypeId (std::string name) override { m_typeId = name; } - virtual void DoVisitAttribute (std::string name, std::string defaultValue) { + void DoVisitAttribute (std::string name, std::string defaultValue) override { NS_LOG_DEBUG ("Saving " << m_typeId << "::" << name); TypeId tid = TypeId::LookupByName (m_typeId); ns3::TypeId::SupportLevel supportLevel = TypeId::SupportLevel::SUPPORTED; @@ -141,7 +141,7 @@ public: } private: - virtual void DoVisitAttribute (Ptr object, std::string name) { + void DoVisitAttribute (Ptr object, std::string name) override { StringValue str; ns3::TypeId::SupportLevel supportLevel = TypeId::SupportLevel::SUPPORTED; diff --git a/src/config-store/model/raw-text-config.h b/src/config-store/model/raw-text-config.h index 007d5ef81..c16cf57cb 100644 --- a/src/config-store/model/raw-text-config.h +++ b/src/config-store/model/raw-text-config.h @@ -36,12 +36,12 @@ class RawTextConfigSave : public FileConfig { public: RawTextConfigSave (); //!< default constructor - virtual ~RawTextConfigSave (); //!< destructor + ~RawTextConfigSave () override; //!< destructor // Inherited - virtual void SetFilename (std::string filename); - virtual void Default (); - virtual void Global (); - virtual void Attributes (); + void SetFilename (std::string filename) override; + void Default () override; + void Global () override; + void Attributes () override; private: /// Config store output stream std::ofstream *m_os; @@ -56,12 +56,12 @@ class RawTextConfigLoad : public FileConfig { public: RawTextConfigLoad (); //!< default constructor - virtual ~RawTextConfigLoad (); //!< destructor + ~RawTextConfigLoad () override; //!< destructor // Inherited - virtual void SetFilename (std::string filename); - virtual void Default (); - virtual void Global (); - virtual void Attributes (); + void SetFilename (std::string filename) override; + void Default () override; + void Global () override; + void Attributes () override; private: /** * Parse (potentially multi-) line configs into type, name, and values. diff --git a/src/config-store/model/xml-config.cc b/src/config-store/model/xml-config.cc index 16f84fdf9..c94401fd1 100644 --- a/src/config-store/model/xml-config.cc +++ b/src/config-store/model/xml-config.cc @@ -113,10 +113,10 @@ public: } private: - virtual void StartVisitTypeId (std::string name) { + void StartVisitTypeId (std::string name) override { m_typeid = name; } - virtual void DoVisitAttribute (std::string name, std::string defaultValue) { + void DoVisitAttribute (std::string name, std::string defaultValue) override { TypeId tid = TypeId::LookupByName (m_typeid); ns3::TypeId::SupportLevel supportLevel = TypeId::SupportLevel::SUPPORTED; for (std::size_t i = 0; i < tid.GetAttributeN (); i++) @@ -191,7 +191,7 @@ public: } private: - virtual void DoVisitAttribute (Ptr object, std::string name) { + void DoVisitAttribute (Ptr object, std::string name) override { TypeId tid = object->GetInstanceTypeId (); ns3::TypeId::SupportLevel supportLevel = TypeId::SupportLevel::SUPPORTED; for (std::size_t i = 0; i < tid.GetAttributeN (); i++) diff --git a/src/config-store/model/xml-config.h b/src/config-store/model/xml-config.h index bc7dd4c58..40473f0e5 100644 --- a/src/config-store/model/xml-config.h +++ b/src/config-store/model/xml-config.h @@ -37,12 +37,12 @@ class XmlConfigSave : public FileConfig { public: XmlConfigSave (); - virtual ~XmlConfigSave (); + ~XmlConfigSave () override; - virtual void SetFilename (std::string filename); - virtual void Default (); - virtual void Global (); - virtual void Attributes (); + void SetFilename (std::string filename) override; + void Default () override; + void Global () override; + void Attributes () override; private: xmlTextWriterPtr m_writer; ///< XML writer }; @@ -55,12 +55,12 @@ class XmlConfigLoad : public FileConfig { public: XmlConfigLoad (); - virtual ~XmlConfigLoad (); + ~XmlConfigLoad () override; - virtual void SetFilename (std::string filename); - virtual void Default (); - virtual void Global (); - virtual void Attributes (); + void SetFilename (std::string filename) override; + void Default () override; + void Global () override; + void Attributes () override; private: std::string m_filename; ///< the file name }; diff --git a/src/core/examples/main-ptr.cc b/src/core/examples/main-ptr.cc index a77c88150..7cd41c36e 100644 --- a/src/core/examples/main-ptr.cc +++ b/src/core/examples/main-ptr.cc @@ -40,7 +40,7 @@ public: /** Constructor. */ PtrExample (); /** Destructor. */ - ~PtrExample (); + ~PtrExample () override; /** Example class method. */ void Method (); }; diff --git a/src/core/model/attribute-accessor-helper.h b/src/core/model/attribute-accessor-helper.h index 35569c1f9..ac344fe03 100644 --- a/src/core/model/attribute-accessor-helper.h +++ b/src/core/model/attribute-accessor-helper.h @@ -175,7 +175,7 @@ public: * \param [in] val Generic AttributeValue, to upcast to \pname{U}. * \returns true if the member was set successfully. */ - virtual bool Set (ObjectBase * object, const AttributeValue & val) const + bool Set (ObjectBase * object, const AttributeValue & val) const override { const U *value = dynamic_cast (&val); if (value == 0) @@ -202,7 +202,7 @@ public: * \param [out] val Generic AttributeValue, to upcast to \pname{U}. * \returns true if the member value could be retrieved successfully */ - virtual bool Get (const ObjectBase * object, AttributeValue &val) const + bool Get (const ObjectBase * object, AttributeValue &val) const override { U *value = dynamic_cast (&val); if (value == 0) @@ -271,7 +271,7 @@ DoMakeAccessorHelperOne (U T::*memberVariable) {} private: - virtual bool DoSet (T *object, const V *v) const + bool DoSet (T *object, const V *v) const override { typename AccessorTrait::Result tmp; bool ok = v->GetAccessor (tmp); @@ -282,16 +282,16 @@ DoMakeAccessorHelperOne (U T::*memberVariable) (object->*m_memberVariable) = tmp; return true; } - virtual bool DoGet (const T *object, V *v) const + bool DoGet (const T *object, V *v) const override { v->Set (object->*m_memberVariable); return true; } - virtual bool HasGetter () const + bool HasGetter () const override { return true; } - virtual bool HasSetter () const + bool HasSetter () const override { return true; } @@ -333,20 +333,20 @@ DoMakeAccessorHelperOne (U (T::*getter)() const) {} private: - virtual bool DoSet ([[maybe_unused]] T *object, [[maybe_unused]] const V *v) const + bool DoSet ([[maybe_unused]] T *object, [[maybe_unused]] const V *v) const override { return false; } - virtual bool DoGet (const T *object, V *v) const + bool DoGet (const T *object, V *v) const override { v->Set ((object->*m_getter)()); return true; } - virtual bool HasGetter () const + bool HasGetter () const override { return true; } - virtual bool HasSetter () const + bool HasSetter () const override { return false; } @@ -388,7 +388,7 @@ DoMakeAccessorHelperOne (void (T::*setter)(U)) {} private: - virtual bool DoSet (T *object, const V *v) const + bool DoSet (T *object, const V *v) const override { typename AccessorTrait::Result tmp; bool ok = v->GetAccessor (tmp); @@ -399,15 +399,15 @@ DoMakeAccessorHelperOne (void (T::*setter)(U)) (object->*m_setter)(tmp); return true; } - virtual bool DoGet ([[maybe_unused]] const T *object, [[maybe_unused]] V *v) const + bool DoGet ([[maybe_unused]] const T *object, [[maybe_unused]] V *v) const override { return false; } - virtual bool HasGetter () const + bool HasGetter () const override { return false; } - virtual bool HasSetter () const + bool HasSetter () const override { return true; } @@ -460,7 +460,7 @@ DoMakeAccessorHelperTwo (void (T::*setter)(U), {} private: - virtual bool DoSet (T *object, const W *v) const + bool DoSet (T *object, const W *v) const override { typename AccessorTrait::Result tmp; bool ok = v->GetAccessor (tmp); @@ -471,16 +471,16 @@ DoMakeAccessorHelperTwo (void (T::*setter)(U), (object->*m_setter)(tmp); return true; } - virtual bool DoGet (const T *object, W *v) const + bool DoGet (const T *object, W *v) const override { v->Set ((object->*m_getter)()); return true; } - virtual bool HasGetter () const + bool HasGetter () const override { return true; } - virtual bool HasSetter () const + bool HasSetter () const override { return true; } @@ -548,7 +548,7 @@ DoMakeAccessorHelperTwo (bool (T::*setter)(U), {} private: - virtual bool DoSet (T *object, const W *v) const + bool DoSet (T *object, const W *v) const override { typename AccessorTrait::Result tmp; bool ok = v->GetAccessor (tmp); @@ -559,16 +559,16 @@ DoMakeAccessorHelperTwo (bool (T::*setter)(U), ok = (object->*m_setter)(tmp); return ok; } - virtual bool DoGet (const T *object, W *v) const + bool DoGet (const T *object, W *v) const override { v->Set ((object->*m_getter)()); return true; } - virtual bool HasGetter () const + bool HasGetter () const override { return true; } - virtual bool HasSetter () const + bool HasSetter () const override { return true; } diff --git a/src/core/model/attribute-container.h b/src/core/model/attribute-container.h index 02a1d8a2c..285753584 100644 --- a/src/core/model/attribute-container.h +++ b/src/core/model/attribute-container.h @@ -96,12 +96,12 @@ public: AttributeContainerValue (const ITER begin, const ITER end); /** Destructor. */ - ~AttributeContainerValue (); + ~AttributeContainerValue () override; // Inherited - Ptr Copy () const; - bool DeserializeFromString (std::string value, Ptr checker); - std::string SerializeToString (Ptr checker) const; + Ptr Copy () const override; + bool DeserializeFromString (std::string value, Ptr checker) override; + std::string SerializeToString (Ptr checker) const override; // defacto pure virtuals to integrate with built-in accessor code /** @@ -294,8 +294,8 @@ public: * \param itemchecker The AttributeChecker. */ explicit AttributeContainerChecker (Ptr itemchecker); - void SetItemChecker (Ptr itemchecker); - Ptr GetItemChecker () const; + void SetItemChecker (Ptr itemchecker) override; + Ptr GetItemChecker () const override; private: Ptr m_itemchecker; //!< The AttributeChecker diff --git a/src/core/model/attribute-helper.h b/src/core/model/attribute-helper.h index 931ef85f6..17899fadd 100644 --- a/src/core/model/attribute-helper.h +++ b/src/core/model/attribute-helper.h @@ -103,27 +103,27 @@ MakeSimpleAttributeChecker (std::string name, std::string underlying) */ struct SimpleAttributeChecker : public BASE { - virtual bool Check (const AttributeValue &value) const + bool Check (const AttributeValue &value) const override { return dynamic_cast (&value) != 0; } - virtual std::string GetValueTypeName () const + std::string GetValueTypeName () const override { return m_type; } - virtual bool HasUnderlyingTypeInformation () const + bool HasUnderlyingTypeInformation () const override { return true; } - virtual std::string GetUnderlyingTypeInformation () const + std::string GetUnderlyingTypeInformation () const override { return m_underlying; } - virtual Ptr Create () const + Ptr Create () const override { return ns3::Create (); } - virtual bool Copy (const AttributeValue &source, AttributeValue &destination) const + bool Copy (const AttributeValue &source, AttributeValue &destination) const override { const T *src = dynamic_cast (&source); T *dst = dynamic_cast (&destination); diff --git a/src/core/model/attribute.h b/src/core/model/attribute.h index 1792470df..936b29cd0 100644 --- a/src/core/model/attribute.h +++ b/src/core/model/attribute.h @@ -239,14 +239,14 @@ private: /** * \returns a deep copy of this class, wrapped into an Attribute object. */ - virtual Ptr Copy () const; + Ptr Copy () const override; /** * \param [in] checker The checker associated to the attribute * \returns a string representation of this value. * * In the EmptyAttributeValue case, the string returned will be simply "" */ - virtual std::string SerializeToString (Ptr checker) const; + std::string SerializeToString (Ptr checker) const override; /** * \param [in] value A string representation of the value * \param [in] checker A pointer to the checker associated to the attribute. @@ -255,7 +255,7 @@ private: * * In the trivial case of EmptyAttributeValue, this should always return true */ - virtual bool DeserializeFromString (std::string value, Ptr checker); + bool DeserializeFromString (std::string value, Ptr checker) override; }; /** @@ -267,11 +267,11 @@ class EmptyAttributeAccessor : public AttributeAccessor { public: EmptyAttributeAccessor (); - ~EmptyAttributeAccessor (); - virtual bool Set (ObjectBase * object, const AttributeValue &value) const; - virtual bool Get (const ObjectBase * object, AttributeValue &attribute) const; - virtual bool HasGetter () const; - virtual bool HasSetter () const; + ~EmptyAttributeAccessor () override; + bool Set (ObjectBase * object, const AttributeValue &value) const override; + bool Get (const ObjectBase * object, AttributeValue &attribute) const override; + bool HasGetter () const override; + bool HasSetter () const override; }; /** @@ -297,13 +297,13 @@ class EmptyAttributeChecker : public AttributeChecker { public: EmptyAttributeChecker (); - ~EmptyAttributeChecker (); - virtual bool Check (const AttributeValue &value) const; - virtual std::string GetValueTypeName () const; - virtual bool HasUnderlyingTypeInformation () const; - virtual std::string GetUnderlyingTypeInformation () const; - virtual Ptr Create () const; - virtual bool Copy (const AttributeValue &source, AttributeValue &destination) const; + ~EmptyAttributeChecker () override; + bool Check (const AttributeValue &value) const override; + std::string GetValueTypeName () const override; + bool HasUnderlyingTypeInformation () const override; + std::string GetUnderlyingTypeInformation () const override; + Ptr Create () const override; + bool Copy (const AttributeValue &source, AttributeValue &destination) const override; }; /** diff --git a/src/core/model/boolean.h b/src/core/model/boolean.h index e3bdc53f0..19f0afddb 100644 --- a/src/core/model/boolean.h +++ b/src/core/model/boolean.h @@ -54,9 +54,9 @@ public: */ operator bool () const; - virtual Ptr Copy () const; - virtual std::string SerializeToString (Ptr checker) const; - virtual bool DeserializeFromString (std::string value, Ptr checker); + Ptr Copy () const override; + std::string SerializeToString (Ptr checker) const override; + bool DeserializeFromString (std::string value, Ptr checker) override; private: bool m_value; diff --git a/src/core/model/calendar-scheduler.h b/src/core/model/calendar-scheduler.h index f26fb9007..a82e670d8 100644 --- a/src/core/model/calendar-scheduler.h +++ b/src/core/model/calendar-scheduler.h @@ -101,14 +101,14 @@ public: /** Constructor. */ CalendarScheduler (); /** Destructor. */ - virtual ~CalendarScheduler (); + ~CalendarScheduler () override; // Inherited - virtual void Insert (const Scheduler::Event &ev); - virtual bool IsEmpty () const; - virtual Scheduler::Event PeekNext () const; - virtual Scheduler::Event RemoveNext (); - virtual void Remove (const Scheduler::Event &ev); + void Insert (const Scheduler::Event &ev) override; + bool IsEmpty () const override; + Scheduler::Event PeekNext () const override; + Scheduler::Event RemoveNext () override; + void Remove (const Scheduler::Event &ev) override; private: /** Double the number of buckets if necessary. */ diff --git a/src/core/model/callback.h b/src/core/model/callback.h index bd108eb3c..79f587364 100644 --- a/src/core/model/callback.h +++ b/src/core/model/callback.h @@ -172,7 +172,7 @@ public: * \param [in] other CallbackComponentBase Ptr * \return \c true if we are equal */ - bool IsEqual (std::shared_ptr other) const + bool IsEqual (std::shared_ptr other) const override { auto p = std::dynamic_pointer_cast> (other); @@ -218,7 +218,7 @@ public: * \param [in] other CallbackParam Ptr * \return \c true if we are equal */ - bool IsEqual (std::shared_ptr other) const + bool IsEqual (std::shared_ptr other) const override { return false; } @@ -273,7 +273,7 @@ public: return m_func (uargs...); } - virtual bool IsEqual (Ptr other) const + bool IsEqual (Ptr other) const override { CallbackImpl const *otherDerived = dynamic_cast const *> (PeekPointer (other)); @@ -310,7 +310,7 @@ public: return true; } - virtual std::string GetTypeid () const + std::string GetTypeid () const override { return DoGetTypeid (); } @@ -758,20 +758,20 @@ public: */ CallbackValue (const CallbackBase &base); /** Destructor */ - virtual ~CallbackValue (); + ~CallbackValue () override; /** \param [in] base The CallbackBase to use */ void Set (CallbackBase base); /* Documented by print-introspected-doxygen.cc */ template bool GetAccessor (T &value) const; /** \return A copy of this CallBack */ - virtual Ptr Copy () const; + Ptr Copy () const override; /** * Serialize to string * \param [in] checker The checker to validate with * \return Serialized form of this Callback. */ - virtual std::string SerializeToString (Ptr checker) const; + std::string SerializeToString (Ptr checker) const override; /** * Deserialize from string (not implemented) * @@ -779,7 +779,7 @@ public: * \param [in] checker Checker to validate with * \return \c true if successful */ - virtual bool DeserializeFromString (std::string value, Ptr checker); + bool DeserializeFromString (std::string value, Ptr checker) override; private: /* Documented by print-introspected-doxygen.cc */ diff --git a/src/core/model/command-line.h b/src/core/model/command-line.h index c2b6e5681..ac6e4aa70 100644 --- a/src/core/model/command-line.h +++ b/src/core/model/command-line.h @@ -454,9 +454,9 @@ private: { public: // Inherited - virtual bool Parse (const std::string value); - bool HasDefault () const; - std::string GetDefault () const; + bool Parse (const std::string value) override; + bool HasDefault () const override; + std::string GetDefault () const override; T *m_valuePtr; /**< Pointer to the POD location */ std::string m_default; /**< String representation of default value */ @@ -470,9 +470,9 @@ private: { public: // Inherited - bool Parse (const std::string value); - bool HasDefault () const; - std::string GetDefault () const; + bool Parse (const std::string value) override; + bool HasDefault () const override; + std::string GetDefault () const override; std::string m_value; /**< The argument value. */ }; // class StringItem @@ -485,8 +485,8 @@ private: { public: // Inherited - bool HasDefault () const; - std::string GetDefault () const; + bool HasDefault () const override; + std::string GetDefault () const override; /** * Parse from a string. @@ -494,7 +494,7 @@ private: * \param [in] value The string representation * \return \c true if parsing the value succeeded */ - virtual bool Parse (const std::string value); + bool Parse (const std::string value) override; ns3::Callback m_callback; /**< The Callback */ std::string m_default; /**< The default value, as a string, if it exists. */ }; // class CallbackItem diff --git a/src/core/model/config.cc b/src/core/model/config.cc index 2bf62620e..21394d5a8 100644 --- a/src/core/model/config.cc +++ b/src/core/model/config.cc @@ -758,7 +758,7 @@ public: : Resolver (path) { } - virtual void DoOne (Ptr object, std::string path) + void DoOne (Ptr object, std::string path) override { m_objects.push_back (object); m_contexts.push_back (path); diff --git a/src/core/model/default-simulator-impl.h b/src/core/model/default-simulator-impl.h index b1116163d..158b6bbae 100644 --- a/src/core/model/default-simulator-impl.h +++ b/src/core/model/default-simulator-impl.h @@ -54,31 +54,31 @@ public: /** Constructor. */ DefaultSimulatorImpl (); /** Destructor. */ - ~DefaultSimulatorImpl (); + ~DefaultSimulatorImpl () override; // Inherited - virtual void Destroy (); - virtual bool IsFinished () const; - virtual void Stop (); - virtual void Stop (const Time &delay); - virtual EventId Schedule (const Time &delay, EventImpl *event); - virtual void ScheduleWithContext (uint32_t context, const Time &delay, EventImpl *event); - virtual EventId ScheduleNow (EventImpl *event); - virtual EventId ScheduleDestroy (EventImpl *event); - virtual void Remove (const EventId &id); - virtual void Cancel (const EventId &id); - virtual bool IsExpired (const EventId &id) const; - virtual void Run (); - virtual Time Now () const; - virtual Time GetDelayLeft (const EventId &id) const; - virtual Time GetMaximumSimulationTime () const; - virtual void SetScheduler (ObjectFactory schedulerFactory); - virtual uint32_t GetSystemId () const; - virtual uint32_t GetContext () const; - virtual uint64_t GetEventCount () const; + void Destroy () override; + bool IsFinished () const override; + void Stop () override; + void Stop (const Time &delay) override; + EventId Schedule (const Time &delay, EventImpl *event) override; + void ScheduleWithContext (uint32_t context, const Time &delay, EventImpl *event) override; + EventId ScheduleNow (EventImpl *event) override; + EventId ScheduleDestroy (EventImpl *event) override; + void Remove (const EventId &id) override; + void Cancel (const EventId &id) override; + bool IsExpired (const EventId &id) const override; + void Run () override; + Time Now () const override; + Time GetDelayLeft (const EventId &id) const override; + Time GetMaximumSimulationTime () const override; + void SetScheduler (ObjectFactory schedulerFactory) override; + uint32_t GetSystemId () const override; + uint32_t GetContext () const override; + uint64_t GetEventCount () const override; private: - virtual void DoDispose (); + void DoDispose () override; /** Process the next event. */ void ProcessOneEvent (); diff --git a/src/core/model/des-metrics.h b/src/core/model/des-metrics.h index 24b6f0aba..4d4f6f8a3 100644 --- a/src/core/model/des-metrics.h +++ b/src/core/model/des-metrics.h @@ -140,7 +140,7 @@ public: /** * Destructor, closes the trace file. */ - ~DesMetrics (); + ~DesMetrics () override; private: diff --git a/src/core/model/double.cc b/src/core/model/double.cc index 690e9af75..f7264d94d 100644 --- a/src/core/model/double.cc +++ b/src/core/model/double.cc @@ -57,7 +57,7 @@ Ptr MakeDoubleChecker (double min, double max, std::stri m_maxValue (maxValue), m_name (name) {} - virtual bool Check (const AttributeValue &value) const + bool Check (const AttributeValue &value) const override { NS_LOG_FUNCTION (&value); const DoubleValue *v = dynamic_cast (&value); @@ -67,29 +67,29 @@ Ptr MakeDoubleChecker (double min, double max, std::stri } return v->Get () >= m_minValue && v->Get () <= m_maxValue; } - virtual std::string GetValueTypeName () const + std::string GetValueTypeName () const override { NS_LOG_FUNCTION_NOARGS (); return "ns3::DoubleValue"; } - virtual bool HasUnderlyingTypeInformation () const + bool HasUnderlyingTypeInformation () const override { NS_LOG_FUNCTION_NOARGS (); return true; } - virtual std::string GetUnderlyingTypeInformation () const + std::string GetUnderlyingTypeInformation () const override { NS_LOG_FUNCTION_NOARGS (); std::ostringstream oss; oss << m_name << " " << m_minValue << ":" << m_maxValue; return oss.str (); } - virtual Ptr Create () const + Ptr Create () const override { NS_LOG_FUNCTION_NOARGS (); return ns3::Create (); } - virtual bool Copy (const AttributeValue &source, AttributeValue &destination) const + bool Copy (const AttributeValue &source, AttributeValue &destination) const override { NS_LOG_FUNCTION (&source << &destination); const DoubleValue *src = dynamic_cast (&source); diff --git a/src/core/model/enum.h b/src/core/model/enum.h index e51a1ddb6..555994d72 100644 --- a/src/core/model/enum.h +++ b/src/core/model/enum.h @@ -66,9 +66,9 @@ public: template bool GetAccessor (T & value) const; - virtual Ptr Copy () const; - virtual std::string SerializeToString (Ptr checker) const; - virtual bool DeserializeFromString (std::string value, Ptr checker); + Ptr Copy () const override; + std::string SerializeToString (Ptr checker) const override; + bool DeserializeFromString (std::string value, Ptr checker) override; private: int m_value; //!< The stored integer value. @@ -115,12 +115,12 @@ public: int GetValue (const std::string name) const; // Inherited - virtual bool Check (const AttributeValue &value) const; - virtual std::string GetValueTypeName () const; - virtual bool HasUnderlyingTypeInformation () const; - virtual std::string GetUnderlyingTypeInformation () const; - virtual Ptr Create () const; - virtual bool Copy (const AttributeValue &src, AttributeValue &dst) const; + bool Check (const AttributeValue &value) const override; + std::string GetValueTypeName () const override; + bool HasUnderlyingTypeInformation () const override; + std::string GetUnderlyingTypeInformation () const override; + Ptr Create () const override; + bool Copy (const AttributeValue &src, AttributeValue &dst) const override; private: /** Type for the pair value, name */ diff --git a/src/core/model/example-as-test.h b/src/core/model/example-as-test.h index d74341abc..b5f25b4e6 100644 --- a/src/core/model/example-as-test.h +++ b/src/core/model/example-as-test.h @@ -72,7 +72,7 @@ public: const std::string args = ""); /** Destructor. */ - virtual ~ExampleAsTestCase (); + ~ExampleAsTestCase () override; /** * Customization point for more complicated patterns @@ -94,7 +94,7 @@ public: virtual std::string GetPostProcessingCommand () const; // Inherited - virtual void DoRun (); + void DoRun () override; protected: std::string m_program; /**< The program to run. */ diff --git a/src/core/model/hash-fnv.h b/src/core/model/hash-fnv.h index ecfc358d7..398267b8e 100644 --- a/src/core/model/hash-fnv.h +++ b/src/core/model/hash-fnv.h @@ -71,7 +71,7 @@ public: * \param [in] size length of the buffer, in bytes * \return 32-bit hash of the buffer */ - uint32_t GetHash32 (const char * buffer, const size_t size); + uint32_t GetHash32 (const char * buffer, const size_t size) override; /** * Compute 64-bit hash of a byte buffer. * @@ -86,11 +86,11 @@ public: * \param [in] size length of the buffer, in bytes * \return 64-bit hash of the buffer */ - uint64_t GetHash64 (const char * buffer, const size_t size); + uint64_t GetHash64 (const char * buffer, const size_t size) override; /** * Restore initial state */ - virtual void clear (); + void clear () override; private: /** diff --git a/src/core/model/hash-function.h b/src/core/model/hash-function.h index 70aef5624..99bf9926d 100644 --- a/src/core/model/hash-function.h +++ b/src/core/model/hash-function.h @@ -136,11 +136,11 @@ public: */ Hash32 (Hash32Function_ptr hp) : m_fp (hp) { } - uint32_t GetHash32 (const char * buffer, const std::size_t size) + uint32_t GetHash32 (const char * buffer, const std::size_t size) override { return (*m_fp)(buffer, size); } - void clear () + void clear () override { } private: @@ -163,11 +163,11 @@ public: */ Hash64 (Hash64Function_ptr hp) : m_fp (hp) { } - uint64_t GetHash64 (const char * buffer, const std::size_t size) + uint64_t GetHash64 (const char * buffer, const std::size_t size) override { return (*m_fp)(buffer, size); } - uint32_t GetHash32 (const char * buffer, const std::size_t size) + uint32_t GetHash32 (const char * buffer, const std::size_t size) override { uint32_t hash32; uint64_t hash64 = GetHash64 (buffer, size); @@ -175,7 +175,7 @@ public: memcpy (&hash32, &hash64, sizeof (hash32)); return hash32; } - void clear () + void clear () override { } private: diff --git a/src/core/model/hash-murmur3.h b/src/core/model/hash-murmur3.h index a5e0d18cc..472bb53a0 100644 --- a/src/core/model/hash-murmur3.h +++ b/src/core/model/hash-murmur3.h @@ -71,7 +71,7 @@ public: * \param [in] size length of the buffer, in bytes * \return 32-bit hash of the buffer */ - uint32_t GetHash32 (const char * buffer, const std::size_t size); + uint32_t GetHash32 (const char * buffer, const std::size_t size) override; /** * Compute 64-bit hash of a byte buffer. * @@ -86,11 +86,11 @@ public: * \param [in] size length of the buffer, in bytes * \return 64-bit hash of the buffer */ - uint64_t GetHash64 (const char * buffer, const std::size_t size); + uint64_t GetHash64 (const char * buffer, const std::size_t size) override; /** * Restore initial state */ - virtual void clear (); + void clear () override; private: /** diff --git a/src/core/model/heap-scheduler.h b/src/core/model/heap-scheduler.h index 1ebf9ef27..6a0a8a33e 100644 --- a/src/core/model/heap-scheduler.h +++ b/src/core/model/heap-scheduler.h @@ -81,14 +81,14 @@ public: /** Constructor. */ HeapScheduler (); /** Destructor. */ - virtual ~HeapScheduler (); + ~HeapScheduler () override; // Inherited - virtual void Insert (const Scheduler::Event &ev); - virtual bool IsEmpty () const; - virtual Scheduler::Event PeekNext () const; - virtual Scheduler::Event RemoveNext (); - virtual void Remove (const Scheduler::Event &ev); + void Insert (const Scheduler::Event &ev) override; + bool IsEmpty () const override; + Scheduler::Event PeekNext () const override; + Scheduler::Event RemoveNext () override; + void Remove (const Scheduler::Event &ev) override; private: /** Event list type: vector of Events, managed as a heap. */ diff --git a/src/core/model/integer.cc b/src/core/model/integer.cc index cfb755701..bdbb4dcf8 100644 --- a/src/core/model/integer.cc +++ b/src/core/model/integer.cc @@ -56,7 +56,7 @@ MakeIntegerChecker (int64_t min, int64_t max, std::string name) m_maxValue (maxValue), m_name (name) {} - virtual bool Check (const AttributeValue &value) const + bool Check (const AttributeValue &value) const override { NS_LOG_FUNCTION (&value); const IntegerValue *v = dynamic_cast (&value); @@ -66,29 +66,29 @@ MakeIntegerChecker (int64_t min, int64_t max, std::string name) } return v->Get () >= m_minValue && v->Get () <= m_maxValue; } - virtual std::string GetValueTypeName () const + std::string GetValueTypeName () const override { NS_LOG_FUNCTION_NOARGS (); return "ns3::IntegerValue"; } - virtual bool HasUnderlyingTypeInformation () const + bool HasUnderlyingTypeInformation () const override { NS_LOG_FUNCTION_NOARGS (); return true; } - virtual std::string GetUnderlyingTypeInformation () const + std::string GetUnderlyingTypeInformation () const override { NS_LOG_FUNCTION_NOARGS (); std::ostringstream oss; oss << m_name << " " << m_minValue << ":" << m_maxValue; return oss.str (); } - virtual Ptr Create () const + Ptr Create () const override { NS_LOG_FUNCTION_NOARGS (); return ns3::Create (); } - virtual bool Copy (const AttributeValue &src, AttributeValue &dst) const + bool Copy (const AttributeValue &src, AttributeValue &dst) const override { NS_LOG_FUNCTION (&src << &dst); const IntegerValue *source = dynamic_cast (&src); diff --git a/src/core/model/list-scheduler.h b/src/core/model/list-scheduler.h index d624bb2fb..377d8ccec 100644 --- a/src/core/model/list-scheduler.h +++ b/src/core/model/list-scheduler.h @@ -73,14 +73,14 @@ public: /** Constructor. */ ListScheduler (); /** Destructor. */ - virtual ~ListScheduler (); + ~ListScheduler () override; // Inherited - virtual void Insert (const Scheduler::Event &ev); - virtual bool IsEmpty () const; - virtual Scheduler::Event PeekNext () const; - virtual Scheduler::Event RemoveNext (); - virtual void Remove (const Scheduler::Event &ev); + void Insert (const Scheduler::Event &ev) override; + bool IsEmpty () const override; + Scheduler::Event PeekNext () const override; + Scheduler::Event RemoveNext () override; + void Remove (const Scheduler::Event &ev) override; private: /** Event list type: a simple list of Events. */ diff --git a/src/core/model/make-event.cc b/src/core/model/make-event.cc index a386b2ab3..c82b0434d 100644 --- a/src/core/model/make-event.cc +++ b/src/core/model/make-event.cc @@ -43,11 +43,11 @@ EventImpl * MakeEvent (void (*f)()) EventFunctionImpl0 (F function) : m_function (function) {} - virtual ~EventFunctionImpl0 () + ~EventFunctionImpl0 () override {} protected: - virtual void Notify () + void Notify () override { (*m_function)(); } diff --git a/src/core/model/make-event.h b/src/core/model/make-event.h index 5b53b63cb..d1d7330c3 100644 --- a/src/core/model/make-event.h +++ b/src/core/model/make-event.h @@ -377,11 +377,11 @@ EventImpl * MakeEvent (MEM mem_ptr, OBJ obj) : m_obj (obj), m_function (function) {} - virtual ~EventMemberImpl0 () + ~EventMemberImpl0 () override {} private: - virtual void Notify () + void Notify () override { (EventMemberImplObjTraits::GetReference (m_obj).*m_function)(); } @@ -407,11 +407,11 @@ EventImpl * MakeEvent (MEM mem_ptr, OBJ obj, T1 a1) {} protected: - virtual ~EventMemberImpl1 () + ~EventMemberImpl1 () override {} private: - virtual void Notify () + void Notify () override { (EventMemberImplObjTraits::GetReference (m_obj).*m_function)(m_a1); } @@ -438,11 +438,11 @@ EventImpl * MakeEvent (MEM mem_ptr, OBJ obj, T1 a1, T2 a2) {} protected: - virtual ~EventMemberImpl2 () + ~EventMemberImpl2 () override {} private: - virtual void Notify () + void Notify () override { (EventMemberImplObjTraits::GetReference (m_obj).*m_function)(m_a1, m_a2); } @@ -471,11 +471,11 @@ EventImpl * MakeEvent (MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3) {} protected: - virtual ~EventMemberImpl3 () + ~EventMemberImpl3 () override {} private: - virtual void Notify () + void Notify () override { (EventMemberImplObjTraits::GetReference (m_obj).*m_function)(m_a1, m_a2, m_a3); } @@ -506,11 +506,11 @@ EventImpl * MakeEvent (MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3, T4 a4) {} protected: - virtual ~EventMemberImpl4 () + ~EventMemberImpl4 () override {} private: - virtual void Notify () + void Notify () override { (EventMemberImplObjTraits::GetReference (m_obj).*m_function)(m_a1, m_a2, m_a3, m_a4); } @@ -544,11 +544,11 @@ EventImpl * MakeEvent (MEM mem_ptr, OBJ obj, {} protected: - virtual ~EventMemberImpl5 () + ~EventMemberImpl5 () override {} private: - virtual void Notify () + void Notify () override { (EventMemberImplObjTraits::GetReference (m_obj).*m_function)(m_a1, m_a2, m_a3, m_a4, m_a5); } @@ -584,11 +584,11 @@ EventImpl * MakeEvent (MEM mem_ptr, OBJ obj, {} protected: - virtual ~EventMemberImpl6 () + ~EventMemberImpl6 () override {} private: - virtual void Notify () + void Notify () override { (EventMemberImplObjTraits::GetReference (m_obj).*m_function)(m_a1, m_a2, m_a3, m_a4, m_a5, m_a6); } @@ -620,11 +620,11 @@ EventImpl * MakeEvent (void (*f)(U1), T1 a1) {} protected: - virtual ~EventFunctionImpl1 () + ~EventFunctionImpl1 () override {} private: - virtual void Notify () + void Notify () override { (*m_function)(m_a1); } @@ -651,11 +651,11 @@ EventImpl * MakeEvent (void (*f)(U1,U2), T1 a1, T2 a2) {} protected: - virtual ~EventFunctionImpl2 () + ~EventFunctionImpl2 () override {} private: - virtual void Notify () + void Notify () override { (*m_function)(m_a1, m_a2); } @@ -685,11 +685,11 @@ EventImpl * MakeEvent (void (*f)(U1,U2,U3), T1 a1, T2 a2, T3 a3) {} protected: - virtual ~EventFunctionImpl3 () + ~EventFunctionImpl3 () override {} private: - virtual void Notify () + void Notify () override { (*m_function)(m_a1, m_a2, m_a3); } @@ -721,11 +721,11 @@ EventImpl * MakeEvent (void (*f)(U1,U2,U3,U4), T1 a1, T2 a2, T3 a3, T4 a4) {} protected: - virtual ~EventFunctionImpl4 () + ~EventFunctionImpl4 () override {} private: - virtual void Notify () + void Notify () override { (*m_function)(m_a1, m_a2, m_a3, m_a4); } @@ -759,11 +759,11 @@ EventImpl * MakeEvent (void (*f)(U1,U2,U3,U4,U5), T1 a1, T2 a2, T3 a3, T4 a4, T5 {} protected: - virtual ~EventFunctionImpl5 () + ~EventFunctionImpl5 () override {} private: - virtual void Notify () + void Notify () override { (*m_function)(m_a1, m_a2, m_a3, m_a4, m_a5); } @@ -799,11 +799,11 @@ EventImpl * MakeEvent (void (*f)(U1,U2,U3,U4,U5,U6), T1 a1, T2 a2, T3 a3, T4 a4, {} protected: - virtual ~EventFunctionImpl6 () + ~EventFunctionImpl6 () override {} private: - virtual void Notify () + void Notify () override { (*m_function)(m_a1, m_a2, m_a3, m_a4, m_a5, m_a6); } @@ -828,11 +828,11 @@ public: : m_function (function) { } - virtual ~EventImplFunctional () + ~EventImplFunctional () override { } private: - virtual void Notify () + void Notify () override { m_function(); } diff --git a/src/core/model/map-scheduler.h b/src/core/model/map-scheduler.h index 3dab9e070..b9adc2ae0 100644 --- a/src/core/model/map-scheduler.h +++ b/src/core/model/map-scheduler.h @@ -71,14 +71,14 @@ public: /** Constructor. */ MapScheduler (); /** Destructor. */ - virtual ~MapScheduler (); + ~MapScheduler () override; // Inherited - virtual void Insert (const Scheduler::Event &ev); - virtual bool IsEmpty () const; - virtual Scheduler::Event PeekNext () const; - virtual Scheduler::Event RemoveNext (); - virtual void Remove (const Scheduler::Event &ev); + void Insert (const Scheduler::Event &ev) override; + bool IsEmpty () const override; + Scheduler::Event PeekNext () const override; + Scheduler::Event RemoveNext () override; + void Remove (const Scheduler::Event &ev) override; private: /** Event list type: a Map from EventKey to EventImpl. */ diff --git a/src/core/model/names.cc b/src/core/model/names.cc index 510c704fb..76e64eaff 100644 --- a/src/core/model/names.cc +++ b/src/core/model/names.cc @@ -122,7 +122,7 @@ public: /** Constructor. */ NamesPriv (); /** Destructor. */ - ~NamesPriv (); + ~NamesPriv () override; // Doxygen \copydoc bug: won't copy these docs, so we repeat them. diff --git a/src/core/model/object-map.h b/src/core/model/object-map.h index 66a536101..d5e372f5f 100644 --- a/src/core/model/object-map.h +++ b/src/core/model/object-map.h @@ -81,7 +81,7 @@ MakeObjectMapAccessor (U T::*memberVector) { struct MemberStdContainer : public ObjectPtrContainerAccessor { - virtual bool DoGetN (const ObjectBase *object, std::size_t *n) const + bool DoGetN (const ObjectBase *object, std::size_t *n) const override { const T *obj = dynamic_cast (object); if (obj == 0) @@ -91,7 +91,7 @@ MakeObjectMapAccessor (U T::*memberVector) *n = (obj->*m_memberVector).size (); return true; } - virtual Ptr DoGet (const ObjectBase *object, std::size_t i, std::size_t *index) const + Ptr DoGet (const ObjectBase *object, std::size_t i, std::size_t *index) const override { const T *obj = static_cast (object); typename U::const_iterator begin = (obj->*m_memberVector).begin (); diff --git a/src/core/model/object-ptr-container.h b/src/core/model/object-ptr-container.h index 8ee4a849d..9643a5dab 100644 --- a/src/core/model/object-ptr-container.h +++ b/src/core/model/object-ptr-container.h @@ -82,7 +82,7 @@ public: * * \returns A copy of this container. */ - virtual Ptr Copy () const; + Ptr Copy () const override; /** * Serialize each of the Object pointers to a string. * @@ -91,7 +91,7 @@ public: * \param [in] checker The checker to use (currently not used.) * \returns The string form of the Objects. */ - virtual std::string SerializeToString (Ptr checker) const; + std::string SerializeToString (Ptr checker) const override; /** * Deserialize from a string. (Not implemented; raises a fatal error.) * @@ -99,7 +99,7 @@ public: * \param [in] checker The checker to use. * \returns \c true. */ - virtual bool DeserializeFromString (std::string value, Ptr checker); + bool DeserializeFromString (std::string value, Ptr checker) override; private: /** ObjectPtrContainerAccessor::Get() needs access. */ @@ -177,31 +177,31 @@ template class ObjectPtrContainerChecker : public ns3::ObjectPtrContainerChecker { public: - virtual TypeId GetItemTypeId () const + TypeId GetItemTypeId () const override { return T::GetTypeId (); } - virtual bool Check (const AttributeValue &value) const + bool Check (const AttributeValue &value) const override { return dynamic_cast (&value) != 0; } - virtual std::string GetValueTypeName () const + std::string GetValueTypeName () const override { return "ns3::ObjectPtrContainerValue"; } - virtual bool HasUnderlyingTypeInformation () const + bool HasUnderlyingTypeInformation () const override { return true; } - virtual std::string GetUnderlyingTypeInformation () const + std::string GetUnderlyingTypeInformation () const override { return "ns3::Ptr< " + T::GetTypeId ().GetName () + " >"; } - virtual Ptr Create () const + Ptr Create () const override { return ns3::Create (); } - virtual bool Copy (const AttributeValue &source, AttributeValue &destination) const + bool Copy (const AttributeValue &source, AttributeValue &destination) const override { const ObjectPtrContainerValue *src = dynamic_cast (&source); ObjectPtrContainerValue *dst = dynamic_cast (&destination); @@ -224,10 +224,10 @@ public: class ObjectPtrContainerAccessor : public AttributeAccessor { public: - virtual bool Set (ObjectBase * object, const AttributeValue &value) const; - virtual bool Get (const ObjectBase * object, AttributeValue &value) const; - virtual bool HasGetter () const; - virtual bool HasSetter () const; + bool Set (ObjectBase * object, const AttributeValue &value) const override; + bool Get (const ObjectBase * object, AttributeValue &value) const override; + bool HasGetter () const override; + bool HasSetter () const override; private: /** @@ -256,7 +256,7 @@ MakeObjectPtrContainerAccessor (Ptr (T::*get)(INDEX) const, { struct MemberGetters : public ObjectPtrContainerAccessor { - virtual bool DoGetN (const ObjectBase *object, std::size_t *n) const + bool DoGetN (const ObjectBase *object, std::size_t *n) const override { const T *obj = dynamic_cast (object); if (obj == 0) @@ -266,7 +266,7 @@ MakeObjectPtrContainerAccessor (Ptr (T::*get)(INDEX) const, *n = (obj->*m_getN)(); return true; } - virtual Ptr DoGet (const ObjectBase *object, std::size_t i, std::size_t *index) const + Ptr DoGet (const ObjectBase *object, std::size_t i, std::size_t *index) const override { const T *obj = static_cast (object); *index = i; diff --git a/src/core/model/object-vector.h b/src/core/model/object-vector.h index 0b2320f7e..b9938596a 100644 --- a/src/core/model/object-vector.h +++ b/src/core/model/object-vector.h @@ -82,7 +82,7 @@ MakeObjectVectorAccessor (U T::*memberVector) { struct MemberStdContainer : public ObjectPtrContainerAccessor { - virtual bool DoGetN (const ObjectBase *object, std::size_t *n) const + bool DoGetN (const ObjectBase *object, std::size_t *n) const override { const T *obj = dynamic_cast (object); if (obj == 0) @@ -92,7 +92,7 @@ MakeObjectVectorAccessor (U T::*memberVector) *n = (obj->*m_memberVector).size (); return true; } - virtual Ptr DoGet (const ObjectBase *object, std::size_t i, std::size_t *index) const + Ptr DoGet (const ObjectBase *object, std::size_t i, std::size_t *index) const override { const T *obj = static_cast (object); typename U::const_iterator begin = (obj->*m_memberVector).begin (); diff --git a/src/core/model/object.h b/src/core/model/object.h index 08779a3d6..b19a1187b 100644 --- a/src/core/model/object.h +++ b/src/core/model/object.h @@ -141,9 +141,9 @@ public: /** Constructor. */ Object (); /** Destructor. */ - virtual ~Object (); + ~Object () override; - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * Get a pointer to the requested aggregated Object. If the type of object diff --git a/src/core/model/pair.h b/src/core/model/pair.h index 546c3a808..1c30db179 100644 --- a/src/core/model/pair.h +++ b/src/core/model/pair.h @@ -74,9 +74,9 @@ public: PairValue (const result_type &value); // "import" constructor // Inherited - Ptr Copy () const; - bool DeserializeFromString (std::string value, Ptr checker); - std::string SerializeToString (Ptr checker) const; + Ptr Copy () const override; + bool DeserializeFromString (std::string value, Ptr checker) override; + std::string SerializeToString (Ptr checker) const override; /** * Get the stored value as a std::pair. @@ -184,8 +184,8 @@ public: * \param secondchecker The AttributeChecker for second. */ PairChecker (Ptr firstchecker, Ptr secondchecker); - void SetCheckers (Ptr firstchecker, Ptr secondchecker); - typename ns3::PairChecker::checker_pair_type GetCheckers () const; + void SetCheckers (Ptr firstchecker, Ptr secondchecker) override; + typename ns3::PairChecker::checker_pair_type GetCheckers () const override; private: /** The first checker. */ diff --git a/src/core/model/pointer.h b/src/core/model/pointer.h index 8ee455491..53ca7b5c1 100644 --- a/src/core/model/pointer.h +++ b/src/core/model/pointer.h @@ -85,9 +85,9 @@ public: template bool GetAccessor (Ptr &value) const; - virtual Ptr Copy () const; - virtual std::string SerializeToString (Ptr checker) const; - virtual bool DeserializeFromString (std::string value, Ptr checker); + Ptr Copy () const override; + std::string SerializeToString (Ptr checker) const override; + bool DeserializeFromString (std::string value, Ptr checker) override; private: Ptr m_value; @@ -129,7 +129,7 @@ namespace internal { template class PointerChecker : public ns3::PointerChecker { - virtual bool Check (const AttributeValue &val) const + bool Check (const AttributeValue &val) const override { const PointerValue *value = dynamic_cast (&val); if (value == 0) @@ -147,24 +147,24 @@ class PointerChecker : public ns3::PointerChecker } return true; } - virtual std::string GetValueTypeName () const + std::string GetValueTypeName () const override { return "ns3::PointerValue"; } - virtual bool HasUnderlyingTypeInformation () const + bool HasUnderlyingTypeInformation () const override { return true; } - virtual std::string GetUnderlyingTypeInformation () const + std::string GetUnderlyingTypeInformation () const override { TypeId tid = T::GetTypeId (); return "ns3::Ptr< " + tid.GetName () + " >"; } - virtual Ptr Create () const + Ptr Create () const override { return ns3::Create (); } - virtual bool Copy (const AttributeValue &source, AttributeValue &destination) const + bool Copy (const AttributeValue &source, AttributeValue &destination) const override { const PointerValue *src = dynamic_cast (&source); PointerValue *dst = dynamic_cast (&destination); @@ -175,7 +175,7 @@ class PointerChecker : public ns3::PointerChecker *dst = *src; return true; } - virtual TypeId GetPointeeTypeId () const + TypeId GetPointeeTypeId () const override { return T::GetTypeId (); } diff --git a/src/core/model/priority-queue-scheduler.h b/src/core/model/priority-queue-scheduler.h index 36452e7cf..24afaa0cd 100644 --- a/src/core/model/priority-queue-scheduler.h +++ b/src/core/model/priority-queue-scheduler.h @@ -73,14 +73,14 @@ public: /** Constructor. */ PriorityQueueScheduler (); /** Destructor. */ - virtual ~PriorityQueueScheduler (); + ~PriorityQueueScheduler () override; // Inherited - virtual void Insert (const Scheduler::Event &ev); - virtual bool IsEmpty () const; - virtual Scheduler::Event PeekNext () const; - virtual Scheduler::Event RemoveNext (); - virtual void Remove (const Scheduler::Event &ev); + void Insert (const Scheduler::Event &ev) override; + bool IsEmpty () const override; + Scheduler::Event PeekNext () const override; + Scheduler::Event RemoveNext () override; + void Remove (const Scheduler::Event &ev) override; private: diff --git a/src/core/model/random-variable-stream.h b/src/core/model/random-variable-stream.h index cf46722a2..f80bb1f64 100644 --- a/src/core/model/random-variable-stream.h +++ b/src/core/model/random-variable-stream.h @@ -109,7 +109,7 @@ public: /** * \brief Destructor. */ - virtual ~RandomVariableStream (); + ~RandomVariableStream () override; // Delete copy constructor and assignment operator to avoid misuse RandomVariableStream (const RandomVariableStream &) = delete; @@ -270,13 +270,13 @@ public: * \return A floating point random value. * \note The upper limit is excluded from the output range. */ - virtual double GetValue (); + double GetValue () override; /** * \brief Get the next random value as an integer drawn from the distribution. * \return An integer random value. * \note The upper limit is included in the output range. */ - virtual uint32_t GetInteger (); + uint32_t GetInteger () override; private: /** The lower bound on values that can be returned by this RNG stream. */ @@ -333,9 +333,9 @@ public: // Inherited from RandomVariableStream /* \note This RNG always returns the same value. */ - virtual double GetValue (); + double GetValue () override; /* \note This RNG always returns the same value. */ - virtual uint32_t GetInteger (); + uint32_t GetInteger () override; private: /** The constant value returned by this RNG stream. */ @@ -421,8 +421,8 @@ public: uint32_t GetConsecutive () const; // Inherited from RandomVariableStream - virtual double GetValue (); - virtual uint32_t GetInteger (); + double GetValue () override; + uint32_t GetInteger () override; private: /** The first value of the sequence. */ @@ -567,8 +567,8 @@ public: uint32_t GetInteger (uint32_t mean, uint32_t bound); // Inherited from RandomVariableStream - virtual double GetValue (); - virtual uint32_t GetInteger (); + double GetValue () override; + uint32_t GetInteger () override; private: /** The mean value of the unbounded exponential distribution. */ @@ -741,7 +741,7 @@ public: * rules don't work well with overloads split between parent and child * classes. */ - virtual double GetValue (); + double GetValue () override; /** * \brief Returns a random unsigned integer from a Pareto distribution with the current mean, shape, and upper bound. @@ -766,7 +766,7 @@ public: * * which now involves the distance \f$u\f$ is from 1 in the denominator. */ - virtual uint32_t GetInteger (); + uint32_t GetInteger () override; private: /** The scale parameter for the Pareto distribution returned by this RNG stream. */ @@ -948,7 +948,7 @@ public: * rules don't work well with overloads split between parent and child * classes. */ - virtual double GetValue (); + double GetValue () override; /** * \brief Returns a random unsigned integer from a Weibull distribution with the current scale, shape, and upper bound. @@ -972,7 +972,7 @@ public: * * which now involves the log of the distance \f$u\f$ is from 1. */ - virtual uint32_t GetInteger (); + uint32_t GetInteger () override; private: /** The scale parameter for the Weibull distribution returned by this RNG stream. */ @@ -1170,7 +1170,7 @@ public: * rules don't work well with overloads split between parent and child * classes. */ - virtual double GetValue (); + double GetValue () override; /** * \brief Returns a random unsigned integer from a normal distribution with the current mean, variance, and bound. @@ -1205,7 +1205,7 @@ public: * * which now involves the distances \f$u1\f$ and \f$u2\f$ are from 1. */ - virtual uint32_t GetInteger (); + uint32_t GetInteger () override; private: /** The mean value for the normal distribution returned by this RNG stream. */ @@ -1404,7 +1404,7 @@ public: * rules don't work well with overloads split between parent and child * classes. */ - virtual double GetValue (); + double GetValue () override; /** * \brief Returns a random unsigned integer from a log-normal distribution with the current mu and sigma. @@ -1437,7 +1437,7 @@ public: * * which now involves the distances \f$u1\f$ and \f$u2\f$ are from 1. */ - virtual uint32_t GetInteger (); + uint32_t GetInteger () override; private: /** The mu value for the log-normal distribution returned by this RNG stream. */ @@ -1553,7 +1553,7 @@ public: * rules don't work well with overloads split between parent and child * classes. */ - virtual double GetValue (); + double GetValue () override; /** * \brief Returns a random unsigned integer from a gamma distribution with the current alpha and beta. @@ -1566,7 +1566,7 @@ public: * The value returned in the antithetic case, \f$x'\f$, uses (1-u), * which is the distance \f$u\f$ is from the 1. */ - virtual uint32_t GetInteger (); + uint32_t GetInteger () override; private: /** @@ -1732,7 +1732,7 @@ public: * rules don't work well with overloads split between parent and child * classes. */ - virtual double GetValue (); + double GetValue () override; /** * \brief Returns a random unsigned integer from an Erlang distribution with the current k and lambda. @@ -1745,7 +1745,7 @@ public: * The value returned in the antithetic case, \f$x'\f$, uses (1-u), * which is the distance \f$u\f$ is from the 1. */ - virtual uint32_t GetInteger (); + uint32_t GetInteger () override; private: /** @@ -1964,7 +1964,7 @@ public: * rules don't work well with overloads split between parent and child * classes. */ - virtual double GetValue (); + double GetValue () override; /** * \brief Returns a random unsigned integer from a triangular distribution with the current mean, min, and max. @@ -2001,7 +2001,7 @@ public: * * which now involves the distance \f$u\f$ is from the 1. */ - virtual uint32_t GetInteger (); + uint32_t GetInteger () override; private: /** The mean value for the triangular distribution returned by this RNG stream. */ @@ -2147,7 +2147,7 @@ public: * rules don't work well with overloads split between parent and child * classes. */ - virtual double GetValue (); + double GetValue () override; /** * \brief Returns a random unsigned integer from a Zipf distribution with the current n and alpha. @@ -2160,7 +2160,7 @@ public: * The value returned in the antithetic case, \f$x'\f$, uses (1-u), * which is the distance \f$u\f$ is from the 1. */ - virtual uint32_t GetInteger (); + uint32_t GetInteger () override; private: /** The n value for the Zipf distribution returned by this RNG stream. */ @@ -2279,7 +2279,7 @@ public: * rules don't work well with overloads split between parent and child * classes. */ - virtual double GetValue (); + double GetValue () override; /** * \brief Returns a random unsigned integer from a zeta distribution with the current alpha. @@ -2292,7 +2292,7 @@ public: * The value returned in the antithetic case, \f$x'\f$, uses (1-u), * which is the distance \f$u\f$ is from the 1. */ - virtual uint32_t GetInteger (); + uint32_t GetInteger () override; private: /** The alpha value for the zeta distribution returned by this RNG stream. */ @@ -2348,7 +2348,7 @@ public: * sequence of values. */ DeterministicRandomVariable (); - virtual ~DeterministicRandomVariable (); + ~DeterministicRandomVariable () override; /** * \brief Sets the array of values that holds the predetermined sequence. @@ -2364,13 +2364,13 @@ public: * \brief Returns the next value in the sequence. * \return The floating point next value in the sequence. */ - virtual double GetValue (); + double GetValue () override; /** * \brief Returns the next value in the sequence. * \return The integer next value in the sequence. */ - virtual uint32_t GetInteger (); + uint32_t GetInteger () override; private: /** Size of the array of values. */ @@ -2499,7 +2499,7 @@ public: * The value returned in the antithetic case, \f$x'\f$, uses (1-u), * which is the distance \f$u\f$ is from the 1. */ - virtual double GetValue (); + double GetValue () override; /** * \brief Returns the next value in the empirical distribution. @@ -2514,7 +2514,7 @@ public: * The value returned in the antithetic case, \f$x'\f$, uses (1-u), * which is the distance \f$u\f$ is from the 1. */ - virtual uint32_t GetInteger (); + uint32_t GetInteger () override; /** * \brief Returns the next value in the empirical distribution using diff --git a/src/core/model/realtime-simulator-impl.h b/src/core/model/realtime-simulator-impl.h index 0864bd205..b2f5f16f1 100644 --- a/src/core/model/realtime-simulator-impl.h +++ b/src/core/model/realtime-simulator-impl.h @@ -87,28 +87,28 @@ public: /** Constructor. */ RealtimeSimulatorImpl (); /** Destructor. */ - ~RealtimeSimulatorImpl (); + ~RealtimeSimulatorImpl () override; // Inherited from SimulatorImpl - virtual void Destroy (); - virtual bool IsFinished () const; - virtual void Stop (); - virtual void Stop (const Time &delay); - virtual EventId Schedule (const Time &delay, EventImpl *event); - virtual void ScheduleWithContext (uint32_t context, const Time &delay, EventImpl *event); - virtual EventId ScheduleNow (EventImpl *event); - virtual EventId ScheduleDestroy (EventImpl *event); - virtual void Remove (const EventId &ev); - virtual void Cancel (const EventId &ev); - virtual bool IsExpired (const EventId &ev) const; - virtual void Run (); - virtual Time Now () const; - virtual Time GetDelayLeft (const EventId &id) const; - virtual Time GetMaximumSimulationTime () const; - virtual void SetScheduler (ObjectFactory schedulerFactory); - virtual uint32_t GetSystemId () const; - virtual uint32_t GetContext () const; - virtual uint64_t GetEventCount () const; + void Destroy () override; + bool IsFinished () const override; + void Stop () override; + void Stop (const Time &delay) override; + EventId Schedule (const Time &delay, EventImpl *event) override; + void ScheduleWithContext (uint32_t context, const Time &delay, EventImpl *event) override; + EventId ScheduleNow (EventImpl *event) override; + EventId ScheduleDestroy (EventImpl *event) override; + void Remove (const EventId &ev) override; + void Cancel (const EventId &ev) override; + bool IsExpired (const EventId &ev) const override; + void Run () override; + Time Now () const override; + Time GetDelayLeft (const EventId &id) const override; + Time GetMaximumSimulationTime () const override; + void SetScheduler (ObjectFactory schedulerFactory) override; + uint32_t GetSystemId () const override; + uint32_t GetContext () const override; + uint64_t GetEventCount () const override; /** \copydoc ScheduleWithContext(uint32_t,const Time&,EventImpl*) */ void ScheduleRealtimeWithContext (uint32_t context, const Time &delay, EventImpl *event); @@ -184,7 +184,7 @@ private: /** Process the next event. */ void ProcessOneEvent (); /** Destructor implementation. */ - virtual void DoDispose (); + void DoDispose () override; /** Container type for events to be run at destroy time. */ typedef std::list DestroyEvents; diff --git a/src/core/model/scheduler.h b/src/core/model/scheduler.h index d6ce02758..5fefbe854 100644 --- a/src/core/model/scheduler.h +++ b/src/core/model/scheduler.h @@ -185,7 +185,7 @@ public: }; /** Destructor. */ - virtual ~Scheduler () = 0; + ~Scheduler () override = 0; /** * Insert a new Event in the schedule. diff --git a/src/core/model/synchronizer.h b/src/core/model/synchronizer.h index 6c04ae86e..ecd45e7c0 100644 --- a/src/core/model/synchronizer.h +++ b/src/core/model/synchronizer.h @@ -60,7 +60,7 @@ public: /** Constructor. */ Synchronizer (); /** Destructor. */ - virtual ~Synchronizer (); + ~Synchronizer () override; /** * @brief Return true if this synchronizer is actually synchronizing to a diff --git a/src/core/model/test.h b/src/core/model/test.h index 872eb07d9..8ac6f9158 100644 --- a/src/core/model/test.h +++ b/src/core/model/test.h @@ -1217,7 +1217,7 @@ public: private: // Inherited - virtual void DoRun (); + void DoRun () override; TestSuite::Type m_type; //!< Type of this TestSuite }; diff --git a/src/core/model/time.cc b/src/core/model/time.cc index 4a1325ec6..bd5c83c56 100644 --- a/src/core/model/time.cc +++ b/src/core/model/time.cc @@ -527,7 +527,7 @@ MakeTimeChecker (const Time min, const Time max) : m_minValue (minValue), m_maxValue (maxValue) {} - virtual bool Check (const AttributeValue &value) const + bool Check (const AttributeValue &value) const override { NS_LOG_FUNCTION (&value); const TimeValue *v = dynamic_cast (&value); @@ -537,29 +537,29 @@ MakeTimeChecker (const Time min, const Time max) } return v->Get () >= m_minValue && v->Get () <= m_maxValue; } - virtual std::string GetValueTypeName () const + std::string GetValueTypeName () const override { NS_LOG_FUNCTION_NOARGS (); return "ns3::TimeValue"; } - virtual bool HasUnderlyingTypeInformation () const + bool HasUnderlyingTypeInformation () const override { NS_LOG_FUNCTION_NOARGS (); return true; } - virtual std::string GetUnderlyingTypeInformation () const + std::string GetUnderlyingTypeInformation () const override { NS_LOG_FUNCTION_NOARGS (); std::ostringstream oss; oss << "Time" << " " << m_minValue << ":" << m_maxValue; return oss.str (); } - virtual Ptr Create () const + Ptr Create () const override { NS_LOG_FUNCTION_NOARGS (); return ns3::Create (); } - virtual bool Copy (const AttributeValue &source, AttributeValue &destination) const + bool Copy (const AttributeValue &source, AttributeValue &destination) const override { NS_LOG_FUNCTION (&source << &destination); const TimeValue *src = dynamic_cast (&source); diff --git a/src/core/model/timer-impl.h b/src/core/model/timer-impl.h index a5716382c..c9afff958 100644 --- a/src/core/model/timer-impl.h +++ b/src/core/model/timer-impl.h @@ -268,11 +268,11 @@ MakeTimerImpl (IntToType<0>, FN fn) FnTimerImplZero (FN fn) : m_fn (fn) {} - virtual EventId Schedule (const Time &delay) + EventId Schedule (const Time &delay) override { return Simulator::Schedule (delay, m_fn); } - virtual void Invoke () + void Invoke () override { m_fn (); } @@ -298,15 +298,15 @@ MakeTimerImpl (IntToType<1>, FN fn) FnTimerImplOne (FN fn) : m_fn (fn) {} - virtual void SetArguments (T1Parameter a1) + void SetArguments (T1Parameter a1) override { m_a1 = a1; } - virtual EventId Schedule (const Time &delay) + EventId Schedule (const Time &delay) override { return Simulator::Schedule (delay, m_fn, m_a1); } - virtual void Invoke () + void Invoke () override { m_fn (m_a1); } @@ -336,16 +336,16 @@ MakeTimerImpl (IntToType<2>, FN fn) FnTimerImplTwo (FN fn) : m_fn (fn) {} - virtual void SetArguments (T1Parameter a1, T2Parameter a2) + void SetArguments (T1Parameter a1, T2Parameter a2) override { m_a1 = a1; m_a2 = a2; } - virtual EventId Schedule (const Time &delay) + EventId Schedule (const Time &delay) override { return Simulator::Schedule (delay, m_fn, m_a1, m_a2); } - virtual void Invoke () + void Invoke () override { m_fn (m_a1, m_a2); } @@ -379,17 +379,17 @@ MakeTimerImpl (IntToType<3>, FN fn) FnTimerImplThree (FN fn) : m_fn (fn) {} - virtual void SetArguments (T1Parameter a1, T2Parameter a2, T3Parameter a3) + void SetArguments (T1Parameter a1, T2Parameter a2, T3Parameter a3) override { m_a1 = a1; m_a2 = a2; m_a3 = a3; } - virtual EventId Schedule (const Time &delay) + EventId Schedule (const Time &delay) override { return Simulator::Schedule (delay, m_fn, m_a1, m_a2, m_a3); } - virtual void Invoke () + void Invoke () override { m_fn (m_a1, m_a2, m_a3); } @@ -427,18 +427,18 @@ MakeTimerImpl (IntToType<4>, FN fn) FnTimerImplFour (FN fn) : m_fn (fn) {} - virtual void SetArguments (T1Parameter a1, T2Parameter a2, T3Parameter a3, T4Parameter a4) + void SetArguments (T1Parameter a1, T2Parameter a2, T3Parameter a3, T4Parameter a4) override { m_a1 = a1; m_a2 = a2; m_a3 = a3; m_a4 = a4; } - virtual EventId Schedule (const Time &delay) + EventId Schedule (const Time &delay) override { return Simulator::Schedule (delay, m_fn, m_a1, m_a2, m_a3, m_a4); } - virtual void Invoke () + void Invoke () override { m_fn (m_a1, m_a2, m_a3, m_a4); } @@ -480,7 +480,7 @@ MakeTimerImpl (IntToType<5>, FN fn) FnTimerImplFive (FN fn) : m_fn (fn) {} - virtual void SetArguments (T1Parameter a1, T2Parameter a2, T3Parameter a3, T4Parameter a4, T5Parameter a5) + void SetArguments (T1Parameter a1, T2Parameter a2, T3Parameter a3, T4Parameter a4, T5Parameter a5) override { m_a1 = a1; m_a2 = a2; @@ -488,11 +488,11 @@ MakeTimerImpl (IntToType<5>, FN fn) m_a4 = a4; m_a5 = a5; } - virtual EventId Schedule (const Time &delay) + EventId Schedule (const Time &delay) override { return Simulator::Schedule (delay, m_fn, m_a1, m_a2, m_a3, m_a4, m_a5); } - virtual void Invoke () + void Invoke () override { m_fn (m_a1, m_a2, m_a3, m_a4, m_a5); } @@ -636,11 +636,11 @@ MakeTimerImpl (IntToType<0>, MEM_PTR memPtr, OBJ_PTR objPtr) : m_memPtr (memPtr), m_objPtr (objPtr) {} - virtual EventId Schedule (const Time &delay) + EventId Schedule (const Time &delay) override { return Simulator::Schedule (delay, m_memPtr, m_objPtr); } - virtual void Invoke () + void Invoke () override { (TimerImplMemberTraits::GetReference (m_objPtr).*m_memPtr)(); } @@ -668,15 +668,15 @@ MakeTimerImpl (IntToType<1>, MEM_PTR memPtr, OBJ_PTR objPtr) : m_memPtr (memPtr), m_objPtr (objPtr) {} - virtual void SetArguments (T1Parameter a1) + void SetArguments (T1Parameter a1) override { m_a1 = a1; } - virtual EventId Schedule (const Time &delay) + EventId Schedule (const Time &delay) override { return Simulator::Schedule (delay, m_memPtr, m_objPtr, m_a1); } - virtual void Invoke () + void Invoke () override { (TimerImplMemberTraits::GetReference (m_objPtr).*m_memPtr)(m_a1); } @@ -708,16 +708,16 @@ MakeTimerImpl (IntToType<2>, MEM_PTR memPtr, OBJ_PTR objPtr) : m_memPtr (memPtr), m_objPtr (objPtr) {} - virtual void SetArguments (T1Parameter a1, T2Parameter a2) + void SetArguments (T1Parameter a1, T2Parameter a2) override { m_a1 = a1; m_a2 = a2; } - virtual EventId Schedule (const Time &delay) + EventId Schedule (const Time &delay) override { return Simulator::Schedule (delay, m_memPtr, m_objPtr, m_a1, m_a2); } - virtual void Invoke () + void Invoke () override { (TimerImplMemberTraits::GetReference (m_objPtr).*m_memPtr)(m_a1, m_a2); } @@ -753,17 +753,17 @@ MakeTimerImpl (IntToType<3>, MEM_PTR memPtr, OBJ_PTR objPtr) : m_memPtr (memPtr), m_objPtr (objPtr) {} - virtual void SetArguments (T1Parameter a1, T2Parameter a2, T3Parameter a3) + void SetArguments (T1Parameter a1, T2Parameter a2, T3Parameter a3) override { m_a1 = a1; m_a2 = a2; m_a3 = a3; } - virtual EventId Schedule (const Time &delay) + EventId Schedule (const Time &delay) override { return Simulator::Schedule (delay, m_memPtr, m_objPtr, m_a1, m_a2, m_a3); } - virtual void Invoke () + void Invoke () override { (TimerImplMemberTraits::GetReference (m_objPtr).*m_memPtr)(m_a1, m_a2, m_a3); } @@ -803,18 +803,18 @@ MakeTimerImpl (IntToType<4>, MEM_PTR memPtr, OBJ_PTR objPtr) : m_memPtr (memPtr), m_objPtr (objPtr) {} - virtual void SetArguments (T1Parameter a1, T2Parameter a2, T3Parameter a3, T4Parameter a4) + void SetArguments (T1Parameter a1, T2Parameter a2, T3Parameter a3, T4Parameter a4) override { m_a1 = a1; m_a2 = a2; m_a3 = a3; m_a4 = a4; } - virtual EventId Schedule (const Time &delay) + EventId Schedule (const Time &delay) override { return Simulator::Schedule (delay, m_memPtr, m_objPtr, m_a1, m_a2, m_a3, m_a4); } - virtual void Invoke () + void Invoke () override { (TimerImplMemberTraits::GetReference (m_objPtr).*m_memPtr)(m_a1, m_a2, m_a3, m_a4); } @@ -858,7 +858,7 @@ MakeTimerImpl (IntToType<5>, MEM_PTR memPtr, OBJ_PTR objPtr) : m_memPtr (memPtr), m_objPtr (objPtr) {} - virtual void SetArguments (T1Parameter a1, T2Parameter a2, T3Parameter a3, T4Parameter a4,T5Parameter a5) + void SetArguments (T1Parameter a1, T2Parameter a2, T3Parameter a3, T4Parameter a4,T5Parameter a5) override { m_a1 = a1; m_a2 = a2; @@ -866,11 +866,11 @@ MakeTimerImpl (IntToType<5>, MEM_PTR memPtr, OBJ_PTR objPtr) m_a4 = a4; m_a5 = a5; } - virtual EventId Schedule (const Time &delay) + EventId Schedule (const Time &delay) override { return Simulator::Schedule (delay, m_memPtr, m_objPtr, m_a1, m_a2, m_a3, m_a4, m_a5); } - virtual void Invoke () + void Invoke () override { (TimerImplMemberTraits::GetReference (m_objPtr).*m_memPtr)(m_a1, m_a2, m_a3, m_a4, m_a5); } diff --git a/src/core/model/trace-source-accessor.h b/src/core/model/trace-source-accessor.h index 42f103399..d0f5729c9 100644 --- a/src/core/model/trace-source-accessor.h +++ b/src/core/model/trace-source-accessor.h @@ -152,7 +152,7 @@ DoMakeTraceSourceAccessor (SOURCE T::*a) { struct Accessor : public TraceSourceAccessor { - virtual bool ConnectWithoutContext (ObjectBase *obj, const CallbackBase &cb) const + bool ConnectWithoutContext (ObjectBase *obj, const CallbackBase &cb) const override { T *p = dynamic_cast (obj); if (p == 0) @@ -162,7 +162,7 @@ DoMakeTraceSourceAccessor (SOURCE T::*a) (p->*m_source).ConnectWithoutContext (cb); return true; } - virtual bool Connect (ObjectBase *obj, std::string context, const CallbackBase &cb) const + bool Connect (ObjectBase *obj, std::string context, const CallbackBase &cb) const override { T *p = dynamic_cast (obj); if (p == 0) @@ -172,7 +172,7 @@ DoMakeTraceSourceAccessor (SOURCE T::*a) (p->*m_source).Connect (cb, context); return true; } - virtual bool DisconnectWithoutContext (ObjectBase *obj, const CallbackBase &cb) const + bool DisconnectWithoutContext (ObjectBase *obj, const CallbackBase &cb) const override { T *p = dynamic_cast (obj); if (p == 0) @@ -182,7 +182,7 @@ DoMakeTraceSourceAccessor (SOURCE T::*a) (p->*m_source).DisconnectWithoutContext (cb); return true; } - virtual bool Disconnect (ObjectBase *obj, std::string context, const CallbackBase &cb) const + bool Disconnect (ObjectBase *obj, std::string context, const CallbackBase &cb) const override { T *p = dynamic_cast (obj); if (p == 0) diff --git a/src/core/model/uinteger.cc b/src/core/model/uinteger.cc index 2fd174df5..531fa6a87 100644 --- a/src/core/model/uinteger.cc +++ b/src/core/model/uinteger.cc @@ -55,7 +55,7 @@ Ptr MakeUintegerChecker (uint64_t min, uint64_t max, std m_maxValue (maxValue), m_name (name) {} - virtual bool Check (const AttributeValue &value) const + bool Check (const AttributeValue &value) const override { NS_LOG_FUNCTION (&value); const UintegerValue *v = dynamic_cast (&value); @@ -65,29 +65,29 @@ Ptr MakeUintegerChecker (uint64_t min, uint64_t max, std } return v->Get () >= m_minValue && v->Get () <= m_maxValue; } - virtual std::string GetValueTypeName () const + std::string GetValueTypeName () const override { NS_LOG_FUNCTION_NOARGS (); return "ns3::UintegerValue"; } - virtual bool HasUnderlyingTypeInformation () const + bool HasUnderlyingTypeInformation () const override { NS_LOG_FUNCTION_NOARGS (); return true; } - virtual std::string GetUnderlyingTypeInformation () const + std::string GetUnderlyingTypeInformation () const override { NS_LOG_FUNCTION_NOARGS (); std::ostringstream oss; oss << m_name << " " << m_minValue << ":" << m_maxValue; return oss.str (); } - virtual Ptr Create () const + Ptr Create () const override { NS_LOG_FUNCTION_NOARGS (); return ns3::Create (); } - virtual bool Copy (const AttributeValue &source, AttributeValue &destination) const + bool Copy (const AttributeValue &source, AttributeValue &destination) const override { NS_LOG_FUNCTION (&source << &destination); const UintegerValue *src = dynamic_cast (&source); diff --git a/src/core/model/wall-clock-synchronizer.h b/src/core/model/wall-clock-synchronizer.h index e367a0161..3e4afb864 100644 --- a/src/core/model/wall-clock-synchronizer.h +++ b/src/core/model/wall-clock-synchronizer.h @@ -77,7 +77,7 @@ public: /** Constructor. */ WallClockSynchronizer (); /** Destructor. */ - virtual ~WallClockSynchronizer (); + ~WallClockSynchronizer () override; /** Conversion constant between μs and ns. */ static const uint64_t US_PER_NS = (uint64_t)1000; @@ -127,15 +127,15 @@ protected: bool SleepWait (uint64_t ns); // Inherited from Synchronizer - virtual void DoSetOrigin (uint64_t ns); - virtual bool DoRealtime (); - virtual uint64_t DoGetCurrentRealtime (); - virtual bool DoSynchronize (uint64_t nsCurrent, uint64_t nsDelay); - virtual void DoSignal (); - virtual void DoSetCondition (bool cond); - virtual int64_t DoGetDrift (uint64_t ns); - virtual void DoEventStart (); - virtual uint64_t DoEventEnd (); + void DoSetOrigin (uint64_t ns) override; + bool DoRealtime () override; + uint64_t DoGetCurrentRealtime () override; + bool DoSynchronize (uint64_t nsCurrent, uint64_t nsDelay) override; + void DoSignal () override; + void DoSetCondition (bool cond) override; + int64_t DoGetDrift (uint64_t ns) override; + void DoEventStart () override; + uint64_t DoEventEnd () override; /** * @brief Compute a correction to the nominal delay to account for diff --git a/src/core/test/attribute-container-test-suite.cc b/src/core/test/attribute-container-test-suite.cc index 6f3fcf6fe..9827834d7 100644 --- a/src/core/test/attribute-container-test-suite.cc +++ b/src/core/test/attribute-container-test-suite.cc @@ -55,7 +55,7 @@ class AttributeContainerObject : public Object { public: AttributeContainerObject (); - virtual ~AttributeContainerObject (); + ~AttributeContainerObject () override; /** * Reverses the list of doubles. @@ -196,10 +196,10 @@ class AttributeContainerTestCase : public TestCase { public: AttributeContainerTestCase (); - virtual ~AttributeContainerTestCase () {} + ~AttributeContainerTestCase () override {} private: - virtual void DoRun (); + void DoRun () override; }; AttributeContainerTestCase::AttributeContainerTestCase () @@ -302,10 +302,10 @@ class AttributeContainerSerializationTestCase : public TestCase { public: AttributeContainerSerializationTestCase (); - virtual ~AttributeContainerSerializationTestCase () {} + ~AttributeContainerSerializationTestCase () override {} private: - virtual void DoRun (); + void DoRun () override; }; AttributeContainerSerializationTestCase::AttributeContainerSerializationTestCase () @@ -392,10 +392,10 @@ class AttributeContainerSetGetTestCase : public TestCase { public: AttributeContainerSetGetTestCase (); - virtual ~AttributeContainerSetGetTestCase () {} + ~AttributeContainerSetGetTestCase () override {} private: - virtual void DoRun (); + void DoRun () override; }; AttributeContainerSetGetTestCase::AttributeContainerSetGetTestCase () diff --git a/src/core/test/attribute-test-suite.cc b/src/core/test/attribute-test-suite.cc index 10f59003b..c6e3e3450 100644 --- a/src/core/test/attribute-test-suite.cc +++ b/src/core/test/attribute-test-suite.cc @@ -294,7 +294,7 @@ public: { } - virtual ~AttributeObjectTest () + ~AttributeObjectTest () override {} /// Add an object to the first vector. @@ -476,10 +476,10 @@ public: * \param description The TestCase description. */ AttributeTestCase (std::string description); - virtual ~AttributeTestCase (); + ~AttributeTestCase () override; private: - virtual void DoRun (); + void DoRun () override; /** * Check the attribute path and value. * \param p The object to test. @@ -981,7 +981,7 @@ public: * \param description The TestCase description. */ RandomVariableStreamAttributeTestCase (std::string description); - virtual ~RandomVariableStreamAttributeTestCase () + ~RandomVariableStreamAttributeTestCase () override {} /** @@ -997,7 +997,7 @@ public: } private: - virtual void DoRun (); + void DoRun () override; /// Callback used in the test. Callback m_cbValue; @@ -1055,11 +1055,11 @@ public: * \param description The TestCase description. */ ObjectVectorAttributeTestCase (std::string description); - virtual ~ObjectVectorAttributeTestCase () + ~ObjectVectorAttributeTestCase () override {} private: - virtual void DoRun (); + void DoRun () override; }; ObjectVectorAttributeTestCase::ObjectVectorAttributeTestCase (std::string description) @@ -1126,11 +1126,11 @@ public: * \param description The TestCase description. */ ObjectMapAttributeTestCase (std::string description); - virtual ~ObjectMapAttributeTestCase () + ~ObjectMapAttributeTestCase () override {} private: - virtual void DoRun (); + void DoRun () override; }; ObjectMapAttributeTestCase::ObjectMapAttributeTestCase (std::string description) @@ -1198,11 +1198,11 @@ public: * \param description The TestCase description. */ IntegerTraceSourceAttributeTestCase (std::string description); - virtual ~IntegerTraceSourceAttributeTestCase () + ~IntegerTraceSourceAttributeTestCase () override {} private: - virtual void DoRun (); + void DoRun () override; }; IntegerTraceSourceAttributeTestCase::IntegerTraceSourceAttributeTestCase (std::string description) @@ -1296,11 +1296,11 @@ public: * \param description The TestCase description. */ IntegerTraceSourceTestCase (std::string description); - virtual ~IntegerTraceSourceTestCase () + ~IntegerTraceSourceTestCase () override {} private: - virtual void DoRun (); + void DoRun () override; /** * Notify the call of source 1. @@ -1382,11 +1382,11 @@ public: * \param description The TestCase description. */ TracedCallbackTestCase (std::string description); - virtual ~TracedCallbackTestCase () + ~TracedCallbackTestCase () override {} private: - virtual void DoRun (); + void DoRun () override; /** * Notify the call of source 2. @@ -1471,11 +1471,11 @@ public: * \param description The TestCase description. */ PointerAttributeTestCase (std::string description); - virtual ~PointerAttributeTestCase () + ~PointerAttributeTestCase () override {} private: - virtual void DoRun (); + void DoRun () override; /** * Notify the call of source 2. @@ -1597,7 +1597,7 @@ public: * \param description The TestCase description. */ CallbackValueTestCase (std::string description); - virtual ~CallbackValueTestCase () + ~CallbackValueTestCase () override {} /** @@ -1613,7 +1613,7 @@ public: } private: - virtual void DoRun (); + void DoRun () override; Callback m_cbValue; //!< The callback diff --git a/src/core/test/build-profile-test-suite.cc b/src/core/test/build-profile-test-suite.cc index 150f86165..817471dd9 100644 --- a/src/core/test/build-profile-test-suite.cc +++ b/src/core/test/build-profile-test-suite.cc @@ -47,11 +47,11 @@ class BuildProfileTestCase : public TestCase { public: BuildProfileTestCase (); - virtual ~BuildProfileTestCase () + ~BuildProfileTestCase () override {} private: - virtual void DoRun (); + void DoRun () override; }; BuildProfileTestCase::BuildProfileTestCase () diff --git a/src/core/test/callback-test-suite.cc b/src/core/test/callback-test-suite.cc index 3f94d1dd9..d7002733c 100644 --- a/src/core/test/callback-test-suite.cc +++ b/src/core/test/callback-test-suite.cc @@ -42,7 +42,7 @@ class BasicCallbackTestCase : public TestCase { public: BasicCallbackTestCase (); - virtual ~BasicCallbackTestCase () + ~BasicCallbackTestCase () override {} /** @@ -82,8 +82,8 @@ public: } private: - virtual void DoRun (); - virtual void DoSetup (); + void DoRun () override; + void DoSetup () override; bool m_test1; //!< true if Target1 has been called, false otherwise. bool m_test2; //!< true if Target2 has been called, false otherwise. @@ -228,7 +228,7 @@ class MakeCallbackTestCase : public TestCase { public: MakeCallbackTestCase (); - virtual ~MakeCallbackTestCase () + ~MakeCallbackTestCase () override {} /** @@ -268,8 +268,8 @@ public: } private: - virtual void DoRun (); - virtual void DoSetup (); + void DoRun () override; + void DoSetup () override; bool m_test1; //!< true if Target1 has been called, false otherwise. bool m_test2; //!< true if Target2 has been called, false otherwise. @@ -407,7 +407,7 @@ class MakeBoundCallbackTestCase : public TestCase { public: MakeBoundCallbackTestCase (); - virtual ~MakeBoundCallbackTestCase () + ~MakeBoundCallbackTestCase () override {} /** @@ -424,8 +424,8 @@ public: } private: - virtual void DoRun (); - virtual void DoSetup (); + void DoRun () override; + void DoSetup () override; }; /** @@ -721,7 +721,7 @@ class CallbackEqualityTestCase : public TestCase { public: CallbackEqualityTestCase (); - virtual ~CallbackEqualityTestCase () {} + ~CallbackEqualityTestCase () override {} /** * Member function used to test equality of callbacks. @@ -736,8 +736,8 @@ public: } private: - virtual void DoRun (); - virtual void DoSetup (); + void DoRun () override; + void DoSetup () override; }; /** @@ -874,7 +874,7 @@ class NullifyCallbackTestCase : public TestCase { public: NullifyCallbackTestCase (); - virtual ~NullifyCallbackTestCase () + ~NullifyCallbackTestCase () override {} /** @@ -886,8 +886,8 @@ public: } private: - virtual void DoRun (); - virtual void DoSetup (); + void DoRun () override; + void DoSetup () override; bool m_test1; //!< true if Target1 has been called, false otherwise. }; @@ -930,7 +930,7 @@ class MakeCallbackTemplatesTestCase : public TestCase { public: MakeCallbackTemplatesTestCase (); - virtual ~MakeCallbackTemplatesTestCase () + ~MakeCallbackTemplatesTestCase () override {} /** @@ -942,7 +942,7 @@ public: } private: - virtual void DoRun (); + void DoRun () override; bool m_test1; //!< true if Target1 has been called, false otherwise. }; diff --git a/src/core/test/command-line-test-suite.cc b/src/core/test/command-line-test-suite.cc index 437d06a71..d53af621f 100644 --- a/src/core/test/command-line-test-suite.cc +++ b/src/core/test/command-line-test-suite.cc @@ -61,7 +61,7 @@ public: */ CommandLineTestCaseBase (std::string description); /** Destructor */ - virtual ~CommandLineTestCaseBase () + ~CommandLineTestCaseBase () override {} /** @@ -126,12 +126,12 @@ public: /** Constructor */ CommandLineBooleanTestCase (); /** Destructor */ - virtual ~CommandLineBooleanTestCase () + ~CommandLineBooleanTestCase () override {} private: /** Run the test */ - virtual void DoRun (); + void DoRun () override; }; @@ -178,12 +178,12 @@ public: /** Constructor */ CommandLineUint8tTestCase (); /** Destructor */ - virtual ~CommandLineUint8tTestCase () + ~CommandLineUint8tTestCase () override {} private: /** Run the test */ - virtual void DoRun (); + void DoRun () override; }; @@ -213,12 +213,12 @@ public: /** Constructor */ CommandLineIntTestCase (); /** Destructor */ - virtual ~CommandLineIntTestCase () + ~CommandLineIntTestCase () override {} private: /** Run the test */ - virtual void DoRun (); + void DoRun () override; }; @@ -255,12 +255,12 @@ public: /** Constructor */ CommandLineUnsignedIntTestCase (); /** Destructor */ - virtual ~CommandLineUnsignedIntTestCase () + ~CommandLineUnsignedIntTestCase () override {} private: /** Run the test */ - virtual void DoRun (); + void DoRun () override; }; @@ -294,12 +294,12 @@ public: /** Constructor */ CommandLineStringTestCase (); /** Destructor */ - virtual ~CommandLineStringTestCase () + ~CommandLineStringTestCase () override {} private: /** Run the test */ - virtual void DoRun (); + void DoRun () override; }; @@ -333,12 +333,12 @@ public: /** Constructor */ CommandLineOrderTestCase (); /** Destructor */ - virtual ~CommandLineOrderTestCase () + ~CommandLineOrderTestCase () override {} private: /** Run the test */ - virtual void DoRun (); + void DoRun () override; }; @@ -369,12 +369,12 @@ public: /** Constructor */ CommandLineInvalidTestCase (); /** Destructor */ - virtual ~CommandLineInvalidTestCase () + ~CommandLineInvalidTestCase () override {} private: /** Run the test */ - virtual void DoRun (); + void DoRun () override; }; @@ -405,12 +405,12 @@ public: /** Constructor */ CommandLineNonOptionTestCase (); /** Destructor */ - virtual ~CommandLineNonOptionTestCase () + ~CommandLineNonOptionTestCase () override {} private: /** Run the test */ - virtual void DoRun (); + void DoRun () override; }; diff --git a/src/core/test/config-test-suite.cc b/src/core/test/config-test-suite.cc index 678056ddf..3ab8b60db 100644 --- a/src/core/test/config-test-suite.cc +++ b/src/core/test/config-test-suite.cc @@ -200,7 +200,7 @@ public: DerivedConfigTestObject () {} /** Destructor */ - virtual ~DerivedConfigTestObject () + ~DerivedConfigTestObject () override {} }; @@ -229,7 +229,7 @@ public: BaseConfigObject () : m_x (15) {} /** Destructor. */ - virtual ~BaseConfigObject () + ~BaseConfigObject () override {} private: @@ -265,7 +265,7 @@ public: DerivedConfigObject () {} /** Destructor. */ - virtual ~DerivedConfigObject () + ~DerivedConfigObject () override {} }; @@ -289,11 +289,11 @@ public: /** Constructor. */ RootNamespaceConfigTestCase (); /** Destructor. */ - virtual ~RootNamespaceConfigTestCase () + ~RootNamespaceConfigTestCase () override {} private: - virtual void DoRun (); + void DoRun () override; }; RootNamespaceConfigTestCase::RootNamespaceConfigTestCase () @@ -350,11 +350,11 @@ public: /** Constructor. */ UnderRootNamespaceConfigTestCase (); /** Destructor. */ - virtual ~UnderRootNamespaceConfigTestCase () + ~UnderRootNamespaceConfigTestCase () override {} private: - virtual void DoRun (); + void DoRun () override; }; UnderRootNamespaceConfigTestCase::UnderRootNamespaceConfigTestCase () @@ -462,11 +462,11 @@ public: /** Constructor. */ ObjectVectorConfigTestCase (); /** Destructor. */ - virtual ~ObjectVectorConfigTestCase () + ~ObjectVectorConfigTestCase () override {} private: - virtual void DoRun (); + void DoRun () override; }; ObjectVectorConfigTestCase::ObjectVectorConfigTestCase () @@ -619,7 +619,7 @@ public: /** Constructor. */ ObjectVectorTraceConfigTestCase (); /** Destructor. */ - virtual ~ObjectVectorTraceConfigTestCase () + ~ObjectVectorTraceConfigTestCase () override {} /** @@ -644,7 +644,7 @@ public: } private: - virtual void DoRun (); + void DoRun () override; int16_t m_newValue; //!< Flag to detect tracing result. std::string m_path; //!< The context path. @@ -791,11 +791,11 @@ public: /** Constructor. */ SearchAttributesOfParentObjectsTestCase (); /** Destructor. */ - virtual ~SearchAttributesOfParentObjectsTestCase () + ~SearchAttributesOfParentObjectsTestCase () override {} private: - virtual void DoRun (); + void DoRun () override; }; diff --git a/src/core/test/event-garbage-collector-test-suite.cc b/src/core/test/event-garbage-collector-test-suite.cc index 9b2b89c00..a92c5d5d2 100644 --- a/src/core/test/event-garbage-collector-test-suite.cc +++ b/src/core/test/event-garbage-collector-test-suite.cc @@ -56,8 +56,8 @@ public: /** Constructor. */ EventGarbageCollectorTestCase (); /** Destructor. */ - virtual ~EventGarbageCollectorTestCase (); - virtual void DoRun (); + ~EventGarbageCollectorTestCase () override; + void DoRun () override; }; EventGarbageCollectorTestCase::EventGarbageCollectorTestCase () diff --git a/src/core/test/examples-as-tests-test-suite.cc b/src/core/test/examples-as-tests-test-suite.cc index ed32f2d16..88f50916b 100644 --- a/src/core/test/examples-as-tests-test-suite.cc +++ b/src/core/test/examples-as-tests-test-suite.cc @@ -56,7 +56,7 @@ public: /** * Destructor */ - virtual ~CommandLineExampleTestCase(); + ~CommandLineExampleTestCase() override; /** * Override this function to filter the version string from @@ -66,7 +66,7 @@ public: * * \returns The string of post-processing commands. */ - virtual std::string GetPostProcessingCommand () const; + std::string GetPostProcessingCommand () const override; }; CommandLineExampleTestCase::CommandLineExampleTestCase () diff --git a/src/core/test/global-value-test-suite.cc b/src/core/test/global-value-test-suite.cc index 66b46921b..fc5498fed 100644 --- a/src/core/test/global-value-test-suite.cc +++ b/src/core/test/global-value-test-suite.cc @@ -49,11 +49,11 @@ public: /** Constructor. */ GlobalValueTestCase (); /** Destructor. */ - virtual ~GlobalValueTestCase () + ~GlobalValueTestCase () override {} private: - virtual void DoRun (); + void DoRun () override; }; GlobalValueTestCase::GlobalValueTestCase () diff --git a/src/core/test/hash-test-suite.cc b/src/core/test/hash-test-suite.cc index f7872e258..f19337319 100644 --- a/src/core/test/hash-test-suite.cc +++ b/src/core/test/hash-test-suite.cc @@ -57,7 +57,7 @@ public: */ HashTestCase (const std::string name); /** Destructor. */ - virtual ~HashTestCase (); + ~HashTestCase () override; protected: /** @@ -85,7 +85,7 @@ private: * \param [in] hash the hash value */ void Check ( const std::string hashName, const int bits, const uint64_t hash); - virtual void DoRun (); + void DoRun () override; }; // class HashTestCase @@ -157,10 +157,10 @@ public: /** Constructor. */ DefaultHashTestCase (); /** Destructor. */ - virtual ~DefaultHashTestCase (); + ~DefaultHashTestCase () override; private: - virtual void DoRun (); + void DoRun () override; }; DefaultHashTestCase::DefaultHashTestCase () @@ -193,10 +193,10 @@ public: /** Constructor. */ Fnv1aTestCase (); /** Destructor. */ - virtual ~Fnv1aTestCase (); + ~Fnv1aTestCase () override; private: - virtual void DoRun (); + void DoRun () override; }; Fnv1aTestCase::Fnv1aTestCase () @@ -228,10 +228,10 @@ public: /** Constructor. */ Murmur3TestCase (); /** Destructor. */ - virtual ~Murmur3TestCase (); + ~Murmur3TestCase () override; private: - virtual void DoRun (); + void DoRun () override; }; Murmur3TestCase::Murmur3TestCase () @@ -316,10 +316,10 @@ public: /** Constructor. */ Hash32FunctionPtrTestCase (); /** Destructor. */ - virtual ~Hash32FunctionPtrTestCase (); + ~Hash32FunctionPtrTestCase () override; private: - virtual void DoRun (); + void DoRun () override; }; Hash32FunctionPtrTestCase::Hash32FunctionPtrTestCase () @@ -347,10 +347,10 @@ public: /** Constructor. */ Hash64FunctionPtrTestCase (); /** Destructor. */ - virtual ~Hash64FunctionPtrTestCase (); + ~Hash64FunctionPtrTestCase () override; private: - virtual void DoRun (); + void DoRun () override; }; Hash64FunctionPtrTestCase::Hash64FunctionPtrTestCase () @@ -378,10 +378,10 @@ public: /** Constructor. */ IncrementalTestCase (); /** Destructor. */ - virtual ~IncrementalTestCase (); + ~IncrementalTestCase () override; private: - virtual void DoRun (); + void DoRun () override; /** * Complute the hash test function * \param name the hash name diff --git a/src/core/test/int64x64-test-suite.cc b/src/core/test/int64x64-test-suite.cc index 69fcee546..a87af31a5 100644 --- a/src/core/test/int64x64-test-suite.cc +++ b/src/core/test/int64x64-test-suite.cc @@ -120,7 +120,7 @@ class Int64x64HiLoTestCase : public TestCase { public: Int64x64HiLoTestCase (); - virtual void DoRun (); + void DoRun () override; /** * Check the high and low parts for correctness. * \param hi The high part of the int64x64_t. @@ -199,7 +199,7 @@ class Int64x64IntRoundTestCase : public TestCase { public: Int64x64IntRoundTestCase (); - virtual void DoRun (); + void DoRun () override; /** * Check the int64x64 value for correctness. * \param value The int64x64_t value. @@ -272,7 +272,7 @@ class Int64x64InputTestCase : public TestCase { public: Int64x64InputTestCase (); - virtual void DoRun (); + void DoRun () override; /** * Check the iont64x64 for correctness. * \param str String representation of a number. @@ -360,7 +360,7 @@ class Int64x64InputOutputTestCase : public TestCase { public: Int64x64InputOutputTestCase (); - virtual void DoRun (); + void DoRun () override; /** * Check the iont64x64 for correctness. * \param str String representation of a number. @@ -451,7 +451,7 @@ class Int64x64ArithmeticTestCase : public TestCase { public: Int64x64ArithmeticTestCase (); - virtual void DoRun (); + void DoRun () override; /** * Check the int64x64 for correctness. * \param test The test number. @@ -600,7 +600,7 @@ class Int64x64Bug455TestCase : public TestCase { public: Int64x64Bug455TestCase (); - virtual void DoRun (); + void DoRun () override; /** * Check the int64x64 for correctness. * \param result The actual value. @@ -671,7 +671,7 @@ class Int64x64Bug863TestCase : public TestCase { public: Int64x64Bug863TestCase (); - virtual void DoRun (); + void DoRun () override; /** * Check the int64x64 for correctness. * \param result The actual value. @@ -743,7 +743,7 @@ class Int64x64Bug1786TestCase : public TestCase { public: Int64x64Bug1786TestCase (); - virtual void DoRun (); + void DoRun () override; /** * Check the int64x64 for correctness. * \param low The actual low value. @@ -891,7 +891,7 @@ class Int64x64CompareTestCase : public TestCase { public: Int64x64CompareTestCase (); - virtual void DoRun (); + void DoRun () override; /** * Check the int64x64 for correctness. @@ -1009,7 +1009,7 @@ class Int64x64InvertTestCase : public TestCase { public: Int64x64InvertTestCase (); - virtual void DoRun (); + void DoRun () override; /** * Check the int64x64 for correctness. * \param factor The factor used to invert the number. @@ -1134,7 +1134,7 @@ class Int64x64DoubleTestCase : public TestCase { public: Int64x64DoubleTestCase (); - virtual void DoRun (); + void DoRun () override; /** * Check the int64x64 for correctness. @@ -1550,7 +1550,7 @@ class Int64x64ImplTestCase : public TestCase { public: Int64x64ImplTestCase (); - virtual void DoRun (); + void DoRun () override; }; Int64x64ImplTestCase::Int64x64ImplTestCase () diff --git a/src/core/test/length-test-suite.cc b/src/core/test/length-test-suite.cc index 92de92037..301d58f9c 100644 --- a/src/core/test/length-test-suite.cc +++ b/src/core/test/length-test-suite.cc @@ -74,7 +74,7 @@ public: /** * Destructor */ - virtual ~LengthTestCase () = default; + ~LengthTestCase () override = default; protected: /** @@ -315,7 +315,7 @@ private: void TestModReturnsNonZero (); /** @} */ - virtual void DoRun (); + void DoRun () override; }; void @@ -1485,7 +1485,7 @@ public: /** * Destructor */ - virtual ~LengthValueTestCase () + ~LengthValueTestCase () override {} private: @@ -1503,7 +1503,7 @@ private: : m_length () {} - virtual ~TestObject () + ~TestObject () override {} private: @@ -1537,7 +1537,7 @@ private: void TestSetAttributeUsingStringValue (); // Inherited function - virtual void DoRun (); + void DoRun () override; }; TypeId diff --git a/src/core/test/many-uniform-random-variables-one-get-value-call-test-suite.cc b/src/core/test/many-uniform-random-variables-one-get-value-call-test-suite.cc index 254ad2fec..5c562e81e 100644 --- a/src/core/test/many-uniform-random-variables-one-get-value-call-test-suite.cc +++ b/src/core/test/many-uniform-random-variables-one-get-value-call-test-suite.cc @@ -48,10 +48,10 @@ public: /** Constructor. */ ManyUniformRandomVariablesOneGetValueCallTestCase (); /** Destructor. */ - virtual ~ManyUniformRandomVariablesOneGetValueCallTestCase (); + ~ManyUniformRandomVariablesOneGetValueCallTestCase () override; private: - virtual void DoRun (); + void DoRun () override; }; ManyUniformRandomVariablesOneGetValueCallTestCase::ManyUniformRandomVariablesOneGetValueCallTestCase () diff --git a/src/core/test/names-test-suite.cc b/src/core/test/names-test-suite.cc index ca910601c..fd7e213b4 100644 --- a/src/core/test/names-test-suite.cc +++ b/src/core/test/names-test-suite.cc @@ -104,11 +104,11 @@ public: /** Constructor. */ BasicAddTestCase (); /** Destructor. */ - virtual ~BasicAddTestCase (); + ~BasicAddTestCase () override; private: - virtual void DoRun (); - virtual void DoTeardown (); + void DoRun () override; + void DoTeardown () override; }; BasicAddTestCase::BasicAddTestCase () @@ -169,11 +169,11 @@ public: /** Constructor. */ StringContextAddTestCase (); /** Destructor. */ - virtual ~StringContextAddTestCase (); + ~StringContextAddTestCase () override; private: - virtual void DoRun (); - virtual void DoTeardown (); + void DoRun () override; + void DoTeardown () override; }; StringContextAddTestCase::StringContextAddTestCase () @@ -234,11 +234,11 @@ public: /** Constructor. */ FullyQualifiedAddTestCase (); /** Destructor. */ - virtual ~FullyQualifiedAddTestCase (); + ~FullyQualifiedAddTestCase () override; private: - virtual void DoRun (); - virtual void DoTeardown (); + void DoRun () override; + void DoTeardown () override; }; FullyQualifiedAddTestCase::FullyQualifiedAddTestCase () @@ -303,11 +303,11 @@ public: /** Constructor. */ RelativeAddTestCase (); /** Destructor. */ - virtual ~RelativeAddTestCase (); + ~RelativeAddTestCase () override; private: - virtual void DoRun (); - virtual void DoTeardown (); + void DoRun () override; + void DoTeardown () override; }; RelativeAddTestCase::RelativeAddTestCase () @@ -369,11 +369,11 @@ public: /** Constructor. */ BasicRenameTestCase (); /** Destructor. */ - virtual ~BasicRenameTestCase (); + ~BasicRenameTestCase () override; private: - virtual void DoRun (); - virtual void DoTeardown (); + void DoRun () override; + void DoTeardown () override; }; BasicRenameTestCase::BasicRenameTestCase () @@ -431,11 +431,11 @@ public: /** Constructor. */ StringContextRenameTestCase (); /** Destructor. */ - virtual ~StringContextRenameTestCase (); + ~StringContextRenameTestCase () override; private: - virtual void DoRun (); - virtual void DoTeardown (); + void DoRun () override; + void DoTeardown () override; }; StringContextRenameTestCase::StringContextRenameTestCase () @@ -493,11 +493,11 @@ public: /** Constructor. */ FullyQualifiedRenameTestCase (); /** Destructor. */ - virtual ~FullyQualifiedRenameTestCase (); + ~FullyQualifiedRenameTestCase () override; private: - virtual void DoRun (); - virtual void DoTeardown (); + void DoRun () override; + void DoTeardown () override; }; FullyQualifiedRenameTestCase::FullyQualifiedRenameTestCase () @@ -555,11 +555,11 @@ public: /** Constructor. */ RelativeRenameTestCase (); /** Destructor. */ - virtual ~RelativeRenameTestCase (); + ~RelativeRenameTestCase () override; private: - virtual void DoRun (); - virtual void DoTeardown (); + void DoRun () override; + void DoTeardown () override; }; RelativeRenameTestCase::RelativeRenameTestCase () @@ -617,11 +617,11 @@ public: /** Constructor. */ FindPathTestCase (); /** Destructor. */ - virtual ~FindPathTestCase (); + ~FindPathTestCase () override; private: - virtual void DoRun (); - virtual void DoTeardown (); + void DoRun () override; + void DoTeardown () override; }; FindPathTestCase::FindPathTestCase () @@ -672,11 +672,11 @@ public: /** Constructor. */ BasicFindTestCase (); /** Destructor. */ - virtual ~BasicFindTestCase (); + ~BasicFindTestCase () override; private: - virtual void DoRun (); - virtual void DoTeardown (); + void DoRun () override; + void DoTeardown () override; }; BasicFindTestCase::BasicFindTestCase () @@ -736,11 +736,11 @@ public: /** Constructor. */ StringContextFindTestCase (); /** Destructor. */ - virtual ~StringContextFindTestCase (); + ~StringContextFindTestCase () override; private: - virtual void DoRun (); - virtual void DoTeardown (); + void DoRun () override; + void DoTeardown () override; }; StringContextFindTestCase::StringContextFindTestCase () @@ -800,11 +800,11 @@ public: /** Constructor. */ FullyQualifiedFindTestCase (); /** Destructor. */ - virtual ~FullyQualifiedFindTestCase (); + ~FullyQualifiedFindTestCase () override; private: - virtual void DoRun (); - virtual void DoTeardown (); + void DoRun () override; + void DoTeardown () override; }; FullyQualifiedFindTestCase::FullyQualifiedFindTestCase () @@ -864,11 +864,11 @@ public: /** Constructor. */ RelativeFindTestCase (); /** Destructor. */ - virtual ~RelativeFindTestCase (); + ~RelativeFindTestCase () override; private: - virtual void DoRun (); - virtual void DoTeardown (); + void DoRun () override; + void DoTeardown () override; }; RelativeFindTestCase::RelativeFindTestCase () @@ -925,11 +925,11 @@ public: /** Constructor. */ AlternateFindTestCase (); /** Destructor. */ - virtual ~AlternateFindTestCase (); + ~AlternateFindTestCase () override; private: - virtual void DoRun (); - virtual void DoTeardown (); + void DoRun () override; + void DoTeardown () override; }; AlternateFindTestCase::AlternateFindTestCase () diff --git a/src/core/test/object-test-suite.cc b/src/core/test/object-test-suite.cc index 179ee460d..3185750a4 100644 --- a/src/core/test/object-test-suite.cc +++ b/src/core/test/object-test-suite.cc @@ -89,7 +89,7 @@ public: {} protected: - virtual void DoDispose () + void DoDispose () override { BaseA::DoDispose (); } @@ -145,7 +145,7 @@ public: {} protected: - virtual void DoDispose () + void DoDispose () override { BaseB::DoDispose (); } @@ -173,10 +173,10 @@ public: /** Constructor. */ CreateObjectTestCase (); /** Destructor. */ - virtual ~CreateObjectTestCase (); + ~CreateObjectTestCase () override; private: - virtual void DoRun (); + void DoRun () override; }; CreateObjectTestCase::CreateObjectTestCase () @@ -240,10 +240,10 @@ public: /** Constructor. */ AggregateObjectTestCase (); /** Destructor. */ - virtual ~AggregateObjectTestCase (); + ~AggregateObjectTestCase () override; private: - virtual void DoRun (); + void DoRun () override; }; AggregateObjectTestCase::AggregateObjectTestCase () @@ -412,10 +412,10 @@ public: /** Constructor. */ ObjectFactoryTestCase (); /** Destructor. */ - virtual ~ObjectFactoryTestCase (); + ~ObjectFactoryTestCase () override; private: - virtual void DoRun (); + void DoRun () override; }; ObjectFactoryTestCase::ObjectFactoryTestCase () diff --git a/src/core/test/one-uniform-random-variable-many-get-value-calls-test-suite.cc b/src/core/test/one-uniform-random-variable-many-get-value-calls-test-suite.cc index 8f77612a3..d4dbabc08 100644 --- a/src/core/test/one-uniform-random-variable-many-get-value-calls-test-suite.cc +++ b/src/core/test/one-uniform-random-variable-many-get-value-calls-test-suite.cc @@ -47,10 +47,10 @@ public: /** Constructor. */ OneUniformRandomVariableManyGetValueCallsTestCase (); /** Destructor. */ - virtual ~OneUniformRandomVariableManyGetValueCallsTestCase (); + ~OneUniformRandomVariableManyGetValueCallsTestCase () override; private: - virtual void DoRun (); + void DoRun () override; }; OneUniformRandomVariableManyGetValueCallsTestCase::OneUniformRandomVariableManyGetValueCallsTestCase () diff --git a/src/core/test/pair-value-test-suite.cc b/src/core/test/pair-value-test-suite.cc index 602ec45bb..416adc988 100644 --- a/src/core/test/pair-value-test-suite.cc +++ b/src/core/test/pair-value-test-suite.cc @@ -58,7 +58,7 @@ class PairObject : public Object { public: PairObject (); - virtual ~PairObject (); + ~PairObject () override; /** * \brief Get the type ID. @@ -128,10 +128,10 @@ class PairValueTestCase : public TestCase { public: PairValueTestCase (); - virtual ~PairValueTestCase () {} + ~PairValueTestCase () override {} private: - virtual void DoRun (); + void DoRun () override; }; PairValueTestCase::PairValueTestCase () @@ -173,7 +173,7 @@ class PairValueSettingsTestCase : public TestCase public: PairValueSettingsTestCase (); - void DoRun (); + void DoRun () override; }; PairValueSettingsTestCase::PairValueSettingsTestCase () diff --git a/src/core/test/ptr-test-suite.cc b/src/core/test/ptr-test-suite.cc index 8f264ac25..4b9d66959 100644 --- a/src/core/test/ptr-test-suite.cc +++ b/src/core/test/ptr-test-suite.cc @@ -79,7 +79,7 @@ public: * The object being tracked will also be destroyed, * by calling DestroyNotify() */ - ~NoCount (); + ~NoCount () override; /** Noop function. */ void Nothing () const; @@ -101,7 +101,7 @@ public: void DestroyNotify (); private: - virtual void DoRun (); + void DoRun () override; /** * Test that \pname{p} is a valid object, by calling a member function. * \param [in] p The object pointer to test. diff --git a/src/core/test/sample-test-suite.cc b/src/core/test/sample-test-suite.cc index 8c51848e3..4cb36d650 100644 --- a/src/core/test/sample-test-suite.cc +++ b/src/core/test/sample-test-suite.cc @@ -89,10 +89,10 @@ public: /** Constructor. */ SampleTestCase1 (); /** Destructor. */ - virtual ~SampleTestCase1 (); + ~SampleTestCase1 () override; private: - virtual void DoRun (); + void DoRun () override; }; /** Add some help text to this case to describe what it is intended to test. */ diff --git a/src/core/test/simulator-test-suite.cc b/src/core/test/simulator-test-suite.cc index c053b845b..a5fbc5292 100644 --- a/src/core/test/simulator-test-suite.cc +++ b/src/core/test/simulator-test-suite.cc @@ -51,7 +51,7 @@ public: * \param schedulerFactory Scheduler factory. */ SimulatorEventsTestCase (ObjectFactory schedulerFactory); - virtual void DoRun (); + void DoRun () override; /** * Test Event. * \param value Event parameter. @@ -234,7 +234,7 @@ public: /** @} */ private: - virtual void DoRun (); + void DoRun () override; /** * Function used for scheduling. diff --git a/src/core/test/threaded-test-suite.cc b/src/core/test/threaded-test-suite.cc index 648deafef..f28f2b96b 100644 --- a/src/core/test/threaded-test-suite.cc +++ b/src/core/test/threaded-test-suite.cc @@ -111,9 +111,9 @@ public: std::list m_threadlist; //!< Thread list. private: - virtual void DoSetup (); - virtual void DoRun (); - virtual void DoTeardown (); + void DoSetup () override; + void DoRun () override; + void DoTeardown () override; }; ThreadedSimulatorEventsTestCase::ThreadedSimulatorEventsTestCase (ObjectFactory schedulerFactory, const std::string &simulatorType, unsigned int threads) diff --git a/src/core/test/time-test-suite.cc b/src/core/test/time-test-suite.cc index 861eb5996..96b6a6a62 100644 --- a/src/core/test/time-test-suite.cc +++ b/src/core/test/time-test-suite.cc @@ -48,12 +48,12 @@ private: /** * \brief setup function for TimeSimpleTestCase. */ - virtual void DoSetup (); + void DoSetup () override; /** * \brief Runs the Simple Time test case. */ - virtual void DoRun (); + void DoRun () override; /** * \brief Tests the Time Operations. @@ -63,7 +63,7 @@ private: /** * \brief Does the tear down for TimeSimpleTestCase. */ - virtual void DoTeardown (); + void DoTeardown () override; /** * Helper function to handle boilerplate code for multiplication tests @@ -345,17 +345,17 @@ private: /** * \brief DoSetup for TimeWithSignTestCase. */ - virtual void DoSetup (); + void DoSetup () override; /** * \brief DoRun for TimeWithSignTestCase. */ - virtual void DoRun (); + void DoRun () override; /** * \brief DoTeardown for TimeWithSignTestCase. */ - virtual void DoTeardown (); + void DoTeardown () override; }; TimeWithSignTestCase::TimeWithSignTestCase () @@ -417,7 +417,7 @@ private: /** * \brief DoRun for TimeInputOutputTestCase. */ - virtual void DoRun (); + void DoRun () override; /** * \brief Check roundtrip from/to string. * \param str Time input check. diff --git a/src/core/test/timer-test-suite.cc b/src/core/test/timer-test-suite.cc index 91cecda88..09edae417 100644 --- a/src/core/test/timer-test-suite.cc +++ b/src/core/test/timer-test-suite.cc @@ -67,7 +67,7 @@ class TimerStateTestCase : public TestCase { public: TimerStateTestCase (); - virtual void DoRun (); + void DoRun () override; }; TimerStateTestCase::TimerStateTestCase () @@ -116,8 +116,8 @@ class TimerTemplateTestCase : public TestCase { public: TimerTemplateTestCase (); - virtual void DoRun (); - virtual void DoTeardown (); + void DoRun () override; + void DoTeardown () override; /// Member function with one int parameter. void bazi (int) {}; diff --git a/src/core/test/traced-callback-test-suite.cc b/src/core/test/traced-callback-test-suite.cc index 3451a208d..eab7afbcd 100644 --- a/src/core/test/traced-callback-test-suite.cc +++ b/src/core/test/traced-callback-test-suite.cc @@ -41,11 +41,11 @@ class BasicTracedCallbackTestCase : public TestCase { public: BasicTracedCallbackTestCase (); - virtual ~BasicTracedCallbackTestCase () + ~BasicTracedCallbackTestCase () override {} private: - virtual void DoRun (); + void DoRun () override; /** * First callback. diff --git a/src/core/test/trickle-timer-test-suite.cc b/src/core/test/trickle-timer-test-suite.cc index 3dae91a83..62de5ec13 100644 --- a/src/core/test/trickle-timer-test-suite.cc +++ b/src/core/test/trickle-timer-test-suite.cc @@ -53,7 +53,7 @@ class TrickleTimerTestCase : public TestCase public: /** Constructor. */ TrickleTimerTestCase (); - virtual void DoRun (); + void DoRun () override; /** * Function to invoke when TrickleTimer expires. */ diff --git a/src/core/test/tuple-value-test-suite.cc b/src/core/test/tuple-value-test-suite.cc index a544d473e..541272b98 100644 --- a/src/core/test/tuple-value-test-suite.cc +++ b/src/core/test/tuple-value-test-suite.cc @@ -54,7 +54,7 @@ public: }; TupleObject (); - virtual ~TupleObject (); + ~TupleObject () override; /** * \brief Get the type ID. @@ -158,10 +158,10 @@ class TupleValueTestCase : public TestCase { public: TupleValueTestCase (); - virtual ~TupleValueTestCase () {} + ~TupleValueTestCase () override {} private: - virtual void DoRun (); + void DoRun () override; }; TupleValueTestCase::TupleValueTestCase () diff --git a/src/core/test/type-id-test-suite.cc b/src/core/test/type-id-test-suite.cc index 2b7c354c2..98a7a984a 100644 --- a/src/core/test/type-id-test-suite.cc +++ b/src/core/test/type-id-test-suite.cc @@ -55,10 +55,10 @@ class UniqueTypeIdTestCase : public TestCase { public: UniqueTypeIdTestCase (); - virtual ~UniqueTypeIdTestCase (); + ~UniqueTypeIdTestCase () override; private: - virtual void DoRun (); + void DoRun () override; enum { HashChainFlag = 0x80000000 @@ -135,10 +135,10 @@ class CollisionTestCase : public TestCase { public: CollisionTestCase (); - virtual ~CollisionTestCase (); + ~CollisionTestCase () override; private: - virtual void DoRun (); + void DoRun () override; enum { HashChainFlag = 0x80000000 @@ -228,7 +228,7 @@ public: : m_attr (0) { } - virtual ~DeprecatedAttribute () + ~DeprecatedAttribute () override {} /** @@ -298,10 +298,10 @@ class DeprecatedAttributeTestCase : public TestCase { public: DeprecatedAttributeTestCase (); - virtual ~DeprecatedAttributeTestCase (); + ~DeprecatedAttributeTestCase () override; private: - virtual void DoRun (); + void DoRun () override; }; @@ -361,11 +361,11 @@ class LookupTimeTestCase : public TestCase { public: LookupTimeTestCase (); - virtual ~LookupTimeTestCase (); + ~LookupTimeTestCase () override; private: - void DoRun (); - void DoSetup (); + void DoRun () override; + void DoSetup () override; /** * Report the performance test results. * \param how How the TypeId is searched (name or hash). diff --git a/src/core/test/type-traits-test-suite.cc b/src/core/test/type-traits-test-suite.cc index b8004aaf8..a3a337fd1 100644 --- a/src/core/test/type-traits-test-suite.cc +++ b/src/core/test/type-traits-test-suite.cc @@ -42,11 +42,11 @@ public: /** Constructor. */ TypeTraitsTestCase (); /** Destructor. */ - virtual ~TypeTraitsTestCase () + ~TypeTraitsTestCase () override {} private: - virtual void DoRun (); + void DoRun () override; }; TypeTraitsTestCase::TypeTraitsTestCase () diff --git a/src/core/test/watchdog-test-suite.cc b/src/core/test/watchdog-test-suite.cc index 8e465fb42..8767fe34b 100644 --- a/src/core/test/watchdog-test-suite.cc +++ b/src/core/test/watchdog-test-suite.cc @@ -42,7 +42,7 @@ class WatchdogTestCase : public TestCase public: /** Constructor. */ WatchdogTestCase (); - virtual void DoRun (); + void DoRun () override; /** * Function to invoke when Watchdog expires. * \param arg The argument passed. diff --git a/src/csma/helper/csma-helper.h b/src/csma/helper/csma-helper.h index 4fcfdeca7..3decc475d 100644 --- a/src/csma/helper/csma-helper.h +++ b/src/csma/helper/csma-helper.h @@ -51,7 +51,7 @@ public: * Construct a CsmaHelper. */ CsmaHelper (); - virtual ~CsmaHelper () {} + ~CsmaHelper () override {} /** * \tparam Ts \deduced Argument types @@ -231,7 +231,7 @@ private: * \param promiscuous If true capture all possible packets available at the device. * \param explicitFilename Treat the prefix as an explicit filename if true */ - virtual void EnablePcapInternal (std::string prefix, Ptr nd, bool promiscuous, bool explicitFilename); + void EnablePcapInternal (std::string prefix, Ptr nd, bool promiscuous, bool explicitFilename) override; /** * \brief Enable ascii trace output on the indicated net device. @@ -244,10 +244,10 @@ private: * \param nd Net device for which you want to enable tracing. * \param explicitFilename Treat the prefix as an explicit filename if true */ - virtual void EnableAsciiInternal (Ptr stream, + void EnableAsciiInternal (Ptr stream, std::string prefix, Ptr nd, - bool explicitFilename); + bool explicitFilename) override; ObjectFactory m_queueFactory; //!< factory for the queues ObjectFactory m_deviceFactory; //!< factory for the NetDevices diff --git a/src/csma/model/csma-channel.h b/src/csma/model/csma-channel.h index c92ceaebd..d1b54f6e1 100644 --- a/src/csma/model/csma-channel.h +++ b/src/csma/model/csma-channel.h @@ -104,7 +104,7 @@ public: /** * \brief Destroy a CsmaChannel */ - virtual ~CsmaChannel (); + ~CsmaChannel () override; // Delete copy constructor and assignment operator to avoid misuse CsmaChannel (const CsmaChannel &) = delete; @@ -260,7 +260,7 @@ public: * \return Returns the total number of devices including devices * that have been detached from the channel. */ - virtual std::size_t GetNDevices () const; + std::size_t GetNDevices () const override; /** * \return Get a NetDevice pointer to a connected network device. @@ -269,7 +269,7 @@ public: * \return Returns the pointer to the net device that is associated * with deviceId i. */ - virtual Ptr GetDevice (std::size_t i) const; + Ptr GetDevice (std::size_t i) const override; /** * \return Get a CsmaNetDevice pointer to a connected network device. diff --git a/src/csma/model/csma-net-device.h b/src/csma/model/csma-net-device.h index ce0f11e8d..0cd93da54 100644 --- a/src/csma/model/csma-net-device.h +++ b/src/csma/model/csma-net-device.h @@ -86,7 +86,7 @@ public: * * This is the destructor for a CsmaNetDevice. */ - virtual ~CsmaNetDevice (); + ~CsmaNetDevice () override; /** * Set the interframe gap used to separate packets. The interframe gap @@ -214,18 +214,18 @@ public: // // The following methods are inherited from NetDevice base class. // - virtual void SetIfIndex (const uint32_t index); - virtual uint32_t GetIfIndex () const; - virtual Ptr GetChannel () const; - virtual bool SetMtu (const uint16_t mtu); - virtual uint16_t GetMtu () const; - virtual void SetAddress (Address address); - virtual Address GetAddress () const; - virtual bool IsLinkUp () const; - virtual void AddLinkChangeCallback (Callback callback); - virtual bool IsBroadcast () const; - virtual Address GetBroadcast () const; - virtual bool IsMulticast () const; + void SetIfIndex (const uint32_t index) override; + uint32_t GetIfIndex () const override; + Ptr GetChannel () const override; + bool SetMtu (const uint16_t mtu) override; + uint16_t GetMtu () const override; + void SetAddress (Address address) override; + Address GetAddress () const override; + bool IsLinkUp () const override; + void AddLinkChangeCallback (Callback callback) override; + bool IsBroadcast () const override; + Address GetBroadcast () const override; + bool IsMulticast () const override; /** * \brief Make and return a MAC multicast address using the provided @@ -249,19 +249,19 @@ public: * \see Mac48Address * \see Address */ - virtual Address GetMulticast (Ipv4Address multicastGroup) const; + Address GetMulticast (Ipv4Address multicastGroup) const override; /** * Is this a point to point link? * \returns false. */ - virtual bool IsPointToPoint () const; + bool IsPointToPoint () const override; /** * Is this a bridge? * \returns false. */ - virtual bool IsBridge () const; + bool IsBridge () const override; /** * Start sending a packet down the channel. @@ -270,8 +270,8 @@ public: * \param protocolNumber protocol number * \return true if successful, false otherwise (drop, ...) */ - virtual bool Send (Ptr packet, const Address& dest, - uint16_t protocolNumber); + bool Send (Ptr packet, const Address& dest, + uint16_t protocolNumber) override; /** * Start sending a packet down the channel, with MAC spoofing @@ -281,22 +281,22 @@ public: * \param protocolNumber protocol number * \return true if successful, false otherwise (drop, ...) */ - virtual bool SendFrom (Ptr packet, const Address& source, const Address& dest, - uint16_t protocolNumber); + bool SendFrom (Ptr packet, const Address& source, const Address& dest, + uint16_t protocolNumber) override; /** * Get the node to which this device is attached. * * \returns Ptr to the Node to which the device is attached. */ - virtual Ptr GetNode () const; + Ptr GetNode () const override; /** * Set the node to which this device is being attached. * * \param node Ptr to the Node to which the device is being attached. */ - virtual void SetNode (Ptr node); + void SetNode (Ptr node) override; /** * Does this device need to use the address resolution protocol? @@ -304,7 +304,7 @@ public: * \returns True if the encapsulation mode is set to a value that requires * ARP (IP_ARP or LLC). */ - virtual bool NeedsArp () const; + bool NeedsArp () const override; /** * Set the callback to be used to notify higher layers when a packet has been @@ -312,7 +312,7 @@ public: * * \param cb The callback. */ - virtual void SetReceiveCallback (NetDevice::ReceiveCallback cb); + void SetReceiveCallback (NetDevice::ReceiveCallback cb) override; /** * \brief Get the MAC multicast address corresponding @@ -321,11 +321,11 @@ public: * \return the MAC multicast address * \warning Calling this method is invalid if IsMulticast returns not true. */ - virtual Address GetMulticast (Ipv6Address addr) const; + Address GetMulticast (Ipv6Address addr) const override; - virtual void SetPromiscReceiveCallback (PromiscReceiveCallback cb); - virtual bool SupportsSendFrom () const; + void SetPromiscReceiveCallback (PromiscReceiveCallback cb) override; + bool SupportsSendFrom () const override; /** * Assign a fixed random variable stream number to the random variables @@ -342,7 +342,7 @@ protected: * Perform any object release functionality required to break reference * cycles in reference counted objects held by the device. */ - virtual void DoDispose (); + void DoDispose () override; /** * Adds the necessary headers and trailers to a packet of data in order to diff --git a/src/dsdv/helper/dsdv-helper.h b/src/dsdv/helper/dsdv-helper.h index c6fde42f1..a03770e14 100644 --- a/src/dsdv/helper/dsdv-helper.h +++ b/src/dsdv/helper/dsdv-helper.h @@ -46,14 +46,14 @@ class DsdvHelper : public Ipv4RoutingHelper { public: DsdvHelper (); - ~DsdvHelper (); + ~DsdvHelper () override; /** * \returns pointer to clone of this DsdvHelper * * This method is mainly for internal use by the other helpers; * clients are expected to free the dynamic memory allocated by this method */ - DsdvHelper* Copy () const; + DsdvHelper* Copy () const override; /** * \param node the node on which the routing protocol will run @@ -62,7 +62,7 @@ public: * This method will be called by ns3::InternetStackHelper::Install * */ - virtual Ptr Create (Ptr node) const; + Ptr Create (Ptr node) const override; /** * \param name the name of the attribute to set * \param value the value of the attribute to set. diff --git a/src/dsdv/model/dsdv-packet.h b/src/dsdv/model/dsdv-packet.h index aec0fc070..d313325ae 100644 --- a/src/dsdv/model/dsdv-packet.h +++ b/src/dsdv/model/dsdv-packet.h @@ -66,17 +66,17 @@ public: * \param dstSeqNo destination sequence number */ DsdvHeader (Ipv4Address dst = Ipv4Address (), uint32_t hopcount = 0, uint32_t dstSeqNo = 0); - virtual ~DsdvHeader (); + ~DsdvHeader () override; /** * \brief Get the type ID. * \return the object TypeId */ static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId () const; - virtual uint32_t GetSerializedSize () const; - virtual void Serialize (Buffer::Iterator start) const; - virtual uint32_t Deserialize (Buffer::Iterator start); - virtual void Print (std::ostream &os) const; + TypeId GetInstanceTypeId () const override; + uint32_t GetSerializedSize () const override; + void Serialize (Buffer::Iterator start) const override; + uint32_t Deserialize (Buffer::Iterator start) override; + void Print (std::ostream &os) const override; /** * Set destination address diff --git a/src/dsdv/model/dsdv-routing-protocol.cc b/src/dsdv/model/dsdv-routing-protocol.cc index f5d239c57..eb4268013 100644 --- a/src/dsdv/model/dsdv-routing-protocol.cc +++ b/src/dsdv/model/dsdv-routing-protocol.cc @@ -83,31 +83,31 @@ struct DeferredRouteOutputTag : public Tag } TypeId - GetInstanceTypeId () const + GetInstanceTypeId () const override { return GetTypeId (); } uint32_t - GetSerializedSize () const + GetSerializedSize () const override { return sizeof(int32_t); } void - Serialize (TagBuffer i) const + Serialize (TagBuffer i) const override { i.WriteU32 (oif); } void - Deserialize (TagBuffer i) + Deserialize (TagBuffer i) override { oif = i.ReadU32 (); } void - Print (std::ostream &os) const + Print (std::ostream &os) const override { os << "DeferredRouteOutputTag: output interface = " << oif; } diff --git a/src/dsdv/model/dsdv-routing-protocol.h b/src/dsdv/model/dsdv-routing-protocol.h index eb6b3a453..32bb8d119 100644 --- a/src/dsdv/model/dsdv-routing-protocol.h +++ b/src/dsdv/model/dsdv-routing-protocol.h @@ -62,13 +62,13 @@ public: /// c-tor RoutingProtocol (); - virtual - ~RoutingProtocol (); - virtual void - DoDispose (); + + ~RoutingProtocol () override; + void + DoDispose () override; // From Ipv4RoutingProtocol - Ptr RouteOutput (Ptr p, const Ipv4Header &header, Ptr oif, Socket::SocketErrno &sockerr); + Ptr RouteOutput (Ptr p, const Ipv4Header &header, Ptr oif, Socket::SocketErrno &sockerr) override; /** * Route input packet * \param p The packet @@ -81,13 +81,13 @@ public: * \returns true if successful */ bool RouteInput (Ptr p, const Ipv4Header &header, Ptr idev, UnicastForwardCallback ucb, - MulticastForwardCallback mcb, LocalDeliverCallback lcb, ErrorCallback ecb); - virtual void PrintRoutingTable (Ptr stream, Time::Unit unit = Time::S) const; - virtual void NotifyInterfaceUp (uint32_t interface); - virtual void NotifyInterfaceDown (uint32_t interface); - virtual void NotifyAddAddress (uint32_t interface, Ipv4InterfaceAddress address); - virtual void NotifyRemoveAddress (uint32_t interface, Ipv4InterfaceAddress address); - virtual void SetIpv4 (Ptr ipv4); + MulticastForwardCallback mcb, LocalDeliverCallback lcb, ErrorCallback ecb) override; + void PrintRoutingTable (Ptr stream, Time::Unit unit = Time::S) const override; + void NotifyInterfaceUp (uint32_t interface) override; + void NotifyInterfaceDown (uint32_t interface) override; + void NotifyAddAddress (uint32_t interface, Ipv4InterfaceAddress address) override; + void NotifyRemoveAddress (uint32_t interface, Ipv4InterfaceAddress address) override; + void SetIpv4 (Ptr ipv4) override; // Methods to handle protocol parameters /** diff --git a/src/dsdv/test/dsdv-testcase.cc b/src/dsdv/test/dsdv-testcase.cc index e5c606c54..b59e1ddd5 100644 --- a/src/dsdv/test/dsdv-testcase.cc +++ b/src/dsdv/test/dsdv-testcase.cc @@ -63,9 +63,9 @@ class DsdvHeaderTestCase : public TestCase { public: DsdvHeaderTestCase (); - ~DsdvHeaderTestCase (); - virtual void - DoRun (); + ~DsdvHeaderTestCase () override; + void + DoRun () override; }; DsdvHeaderTestCase::DsdvHeaderTestCase () : TestCase ("Verifying the DSDV header") @@ -119,9 +119,9 @@ class DsdvTableTestCase : public TestCase { public: DsdvTableTestCase (); - ~DsdvTableTestCase (); - virtual void - DoRun (); + ~DsdvTableTestCase () override; + void + DoRun () override; }; DsdvTableTestCase::DsdvTableTestCase () diff --git a/src/dsr/model/dsr-fs-header.h b/src/dsr/model/dsr-fs-header.h index 4b9ef31ca..8c3610a0f 100644 --- a/src/dsr/model/dsr-fs-header.h +++ b/src/dsr/model/dsr-fs-header.h @@ -88,7 +88,7 @@ public: * \brief Get the instance type ID. * \return instance type ID */ - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * \brief Constructor. */ @@ -96,7 +96,7 @@ public: /** * \brief Destructor. */ - virtual ~DsrFsHeader (); + ~DsrFsHeader () override; /** * \brief Set the "Next header" field. * \param protocol the next header number @@ -151,23 +151,23 @@ public: * \brief Print some information about the packet. * \param os output stream */ - virtual void Print (std::ostream &os) const; + void Print (std::ostream &os) const override; /** * \brief Get the serialized size of the packet. * \return size */ - virtual uint32_t GetSerializedSize () const; + uint32_t GetSerializedSize () const override; /** * \brief Serialize the packet. * \param start Buffer iterator */ - virtual void Serialize (Buffer::Iterator start) const; + void Serialize (Buffer::Iterator start) const override; /** * \brief Deserialize the packet. * \param start Buffer iterator * \return size of the packet */ - virtual uint32_t Deserialize (Buffer::Iterator start); + uint32_t Deserialize (Buffer::Iterator start) override; private: /** @@ -286,7 +286,7 @@ public: * \brief Get the instance type ID. * \return instance type ID */ - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * \brief Constructor. */ @@ -294,28 +294,28 @@ public: /** * \brief Destructor. */ - virtual ~DsrRoutingHeader (); + ~DsrRoutingHeader () override; /** * \brief Print some information about the packet. * \param os output stream */ - virtual void Print (std::ostream &os) const; + void Print (std::ostream &os) const override; /** * \brief Get the serialized size of the packet. * \return size */ - virtual uint32_t GetSerializedSize () const; + uint32_t GetSerializedSize () const override; /** * \brief Serialize the packet. * \param start Buffer iterator */ - virtual void Serialize (Buffer::Iterator start) const; + void Serialize (Buffer::Iterator start) const override; /** * \brief Deserialize the packet. * \param start Buffer iterator * \return size of the packet */ - virtual uint32_t Deserialize (Buffer::Iterator start); + uint32_t Deserialize (Buffer::Iterator start) override; }; static inline std::ostream & operator<< (std::ostream& os, const DsrRoutingHeader & dsr) diff --git a/src/dsr/model/dsr-gratuitous-reply-table.h b/src/dsr/model/dsr-gratuitous-reply-table.h index 21ad96cb6..8182b8909 100644 --- a/src/dsr/model/dsr-gratuitous-reply-table.h +++ b/src/dsr/model/dsr-gratuitous-reply-table.h @@ -79,7 +79,7 @@ public: static TypeId GetTypeId (); DsrGraReply (); - virtual ~DsrGraReply (); + ~DsrGraReply () override; /// Set the gratuitous reply table size /// \param g The gratuitous reply table size diff --git a/src/dsr/model/dsr-network-queue.h b/src/dsr/model/dsr-network-queue.h index b4da68c50..8690eb425 100644 --- a/src/dsr/model/dsr-network-queue.h +++ b/src/dsr/model/dsr-network-queue.h @@ -192,7 +192,7 @@ public: * \param maxDelay Maximum entry lifetime in the queue */ DsrNetworkQueue (uint32_t maxLen, Time maxDelay); - ~DsrNetworkQueue (); + ~DsrNetworkQueue () override; /** * Find the packet entry with a given next hop diff --git a/src/dsr/model/dsr-option-header.h b/src/dsr/model/dsr-option-header.h index 0cdbfaeed..5f3a78adc 100644 --- a/src/dsr/model/dsr-option-header.h +++ b/src/dsr/model/dsr-option-header.h @@ -68,7 +68,7 @@ public: * \brief Get the instance type ID. * \return instance type ID */ - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * \brief Constructor. */ @@ -76,7 +76,7 @@ public: /** * \brief Destructor. */ - virtual ~DsrOptionHeader (); + ~DsrOptionHeader () override; /** * \brief Set the type of the option. * \param type the type of the option @@ -101,23 +101,23 @@ public: * \brief Print some information about the packet. * \param os output stream */ - virtual void Print (std::ostream &os) const; + void Print (std::ostream &os) const override; /** * \brief Get the serialized size of the packet. * \return size */ - virtual uint32_t GetSerializedSize () const; + uint32_t GetSerializedSize () const override; /** * \brief Serialize the packet. * \param start Buffer iterator */ - virtual void Serialize (Buffer::Iterator start) const; + void Serialize (Buffer::Iterator start) const override; /** * \brief Deserialize the packet. * \param start Buffer iterator * \return size of the packet */ - virtual uint32_t Deserialize (Buffer::Iterator start); + uint32_t Deserialize (Buffer::Iterator start) override; /** * \brief Get the Alignment requirement of this option header * \return The required alignment @@ -158,7 +158,7 @@ public: * \brief Get the instance type ID. * \return instance type ID */ - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * \brief Constructor. */ @@ -166,28 +166,28 @@ public: /** * \brief Destructor. */ - virtual ~DsrOptionPad1Header (); + ~DsrOptionPad1Header () override; /** * \brief Print some information about the packet. * \param os output stream */ - virtual void Print (std::ostream &os) const; + void Print (std::ostream &os) const override; /** * \brief Get the serialized size of the packet. * \return size */ - virtual uint32_t GetSerializedSize () const; + uint32_t GetSerializedSize () const override; /** * \brief Serialize the packet. * \param start Buffer iterator */ - virtual void Serialize (Buffer::Iterator start) const; + void Serialize (Buffer::Iterator start) const override; /** * \brief Deserialize the packet. * \param start Buffer iterator * \return size of the packet */ - virtual uint32_t Deserialize (Buffer::Iterator start); + uint32_t Deserialize (Buffer::Iterator start) override; }; /** @@ -206,7 +206,7 @@ public: * \brief Get the instance type ID. * \return instance type ID */ - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * \brief Constructor. * \param pad Number of bytes to pad (>=2) @@ -215,28 +215,28 @@ public: /** * \brief Destructor. */ - virtual ~DsrOptionPadnHeader (); + ~DsrOptionPadnHeader () override; /** * \brief Print some information about the packet. * \param os output stream */ - virtual void Print (std::ostream &os) const; + void Print (std::ostream &os) const override; /** * \brief Get the serialized size of the packet. * \return size */ - virtual uint32_t GetSerializedSize () const; + uint32_t GetSerializedSize () const override; /** * \brief Serialize the packet. * \param start Buffer iterator */ - virtual void Serialize (Buffer::Iterator start) const; + void Serialize (Buffer::Iterator start) const override; /** * \brief Deserialize the packet. * \param start Buffer iterator * \return size of the packet */ - virtual uint32_t Deserialize (Buffer::Iterator start); + uint32_t Deserialize (Buffer::Iterator start) override; }; /** @@ -278,7 +278,7 @@ public: * \brief Get the instance type ID. * \return instance type ID */ - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * \brief Constructor. */ @@ -286,7 +286,7 @@ public: /** * \brief Destructor. */ - virtual ~DsrOptionRreqHeader (); + ~DsrOptionRreqHeader () override; /** * \brief Set the number of ipv4 address. * \param n the number of ipv4 address @@ -348,28 +348,28 @@ public: * \brief Print some information about the packet. * \param os output stream */ - virtual void Print (std::ostream &os) const; + void Print (std::ostream &os) const override; /** * \brief Get the serialized size of the packet. * \return size */ - virtual uint32_t GetSerializedSize () const; + uint32_t GetSerializedSize () const override; /** * \brief Serialize the packet. * \param start Buffer iterator */ - virtual void Serialize (Buffer::Iterator start) const; + void Serialize (Buffer::Iterator start) const override; /** * \brief Deserialize the packet. * \param start Buffer iterator * \return size of the packet */ - virtual uint32_t Deserialize (Buffer::Iterator start); + uint32_t Deserialize (Buffer::Iterator start) override; /** * \brief Get the Alignment requirement of this option header * \return The required alignment */ - virtual Alignment GetAlignment () const; + Alignment GetAlignment () const override; private: /** @@ -453,7 +453,7 @@ public: * \brief Get the instance type ID. * \return instance type ID */ - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * \brief Constructor. */ @@ -461,7 +461,7 @@ public: /** * \brief Destructor. */ - virtual ~DsrOptionRrepHeader (); + ~DsrOptionRrepHeader () override; /** * \brief Set the number of ipv4 address. * \param n the number of ipv4 address @@ -499,28 +499,28 @@ public: * \brief Print some information about the packet. * \param os output stream */ - virtual void Print (std::ostream &os) const; + void Print (std::ostream &os) const override; /** * \brief Get the serialized size of the packet. * \return size */ - virtual uint32_t GetSerializedSize () const; + uint32_t GetSerializedSize () const override; /** * \brief Serialize the packet. * \param start Buffer iterator */ - virtual void Serialize (Buffer::Iterator start) const; + void Serialize (Buffer::Iterator start) const override; /** * \brief Deserialize the packet. * \param start Buffer iterator * \return size of the packet */ - virtual uint32_t Deserialize (Buffer::Iterator start); + uint32_t Deserialize (Buffer::Iterator start) override; /** * \brief Get the Alignment requirement of this option header * \return The required alignment */ - virtual Alignment GetAlignment () const; + Alignment GetAlignment () const override; private: /** @@ -574,7 +574,7 @@ public: * \brief Get the instance type ID. * \return instance type ID */ - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * \brief Constructor. */ @@ -582,7 +582,7 @@ public: /** * \brief Destructor. */ - virtual ~DsrOptionSRHeader (); + ~DsrOptionSRHeader () override; /** * \brief Set the number of segments left to send * \param segmentsLeft The segments left @@ -639,28 +639,28 @@ public: * \brief Print some information about the packet. * \param os output stream */ - virtual void Print (std::ostream &os) const; + void Print (std::ostream &os) const override; /** * \brief Get the serialized size of the packet. * \return size */ - virtual uint32_t GetSerializedSize () const; + uint32_t GetSerializedSize () const override; /** * \brief Serialize the packet. * \param start Buffer iterator */ - virtual void Serialize (Buffer::Iterator start) const; + void Serialize (Buffer::Iterator start) const override; /** * \brief Deserialize the packet. * \param start Buffer iterator * \return size of the packet */ - virtual uint32_t Deserialize (Buffer::Iterator start); + uint32_t Deserialize (Buffer::Iterator start) override; /** * \brief Get the Alignment requirement of this option header * \return The required alignment */ - virtual Alignment GetAlignment () const; + Alignment GetAlignment () const override; /** * TracedCallback signature for DsrOptionSrHeader. @@ -737,7 +737,7 @@ public: * \brief Get the instance type ID. * \return instance type ID */ - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * \brief Constructor. */ @@ -745,7 +745,7 @@ public: /** * \brief Destructor. */ - virtual ~DsrOptionRerrHeader (); + ~DsrOptionRerrHeader () override; /** * \brief Set the route error type * \param errorType The error type @@ -790,28 +790,28 @@ public: * \brief Print some information about the packet. * \param os output stream */ - virtual void Print (std::ostream &os) const; + void Print (std::ostream &os) const override; /** * \brief Get the serialized size of the packet. * \return size */ - virtual uint32_t GetSerializedSize () const; + uint32_t GetSerializedSize () const override; /** * \brief Serialize the packet. * \param start Buffer iterator */ - virtual void Serialize (Buffer::Iterator start) const; + void Serialize (Buffer::Iterator start) const override; /** * \brief Deserialize the packet. * \param start Buffer iterator * \return size of the packet */ - virtual uint32_t Deserialize (Buffer::Iterator start); + uint32_t Deserialize (Buffer::Iterator start) override; /** * \brief Get the Alignment requirement of this option header * \return The required alignment */ - virtual Alignment GetAlignment () const; + Alignment GetAlignment () const override; private: /** @@ -882,7 +882,7 @@ public: * \brief Get the instance type ID. * \return instance type ID */ - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * \brief Constructor. */ @@ -890,37 +890,37 @@ public: /** * \brief Destructor. */ - virtual ~DsrOptionRerrUnreachHeader (); + ~DsrOptionRerrUnreachHeader () override; /** * \brief Set the route error source address * \param errorSrcAddress The error source address */ - virtual void SetErrorSrc (Ipv4Address errorSrcAddress); + void SetErrorSrc (Ipv4Address errorSrcAddress) override; /** * \brief Get the route error source address * \return The error source address */ - virtual Ipv4Address GetErrorSrc () const; + Ipv4Address GetErrorSrc () const override; /** * \brief Set the salvage value of the packet * \param salvage The salvage value of the packet */ - virtual void SetSalvage (uint8_t salvage); + void SetSalvage (uint8_t salvage) override; /** * \brief Get the salvage value of the packet * \return The salvage value of the packet */ - virtual uint8_t GetSalvage () const; + uint8_t GetSalvage () const override; /** * \brief Set the error destination ip address * \param errorDstAddress The error destination address */ - virtual void SetErrorDst (Ipv4Address errorDstAddress); + void SetErrorDst (Ipv4Address errorDstAddress) override; /** * \brief Get the error destination ip address * \return The error destination address */ - virtual Ipv4Address GetErrorDst () const; + Ipv4Address GetErrorDst () const override; /** * \brief Set the unreachable node ip address * \param unreachNode The unreachable ip address @@ -945,28 +945,28 @@ public: * \brief Print some information about the packet. * \param os output stream */ - virtual void Print (std::ostream &os) const; + void Print (std::ostream &os) const override; /** * \brief Get the serialized size of the packet. * \return size */ - virtual uint32_t GetSerializedSize () const; + uint32_t GetSerializedSize () const override; /** * \brief Serialize the packet. * \param start Buffer iterator */ - virtual void Serialize (Buffer::Iterator start) const; + void Serialize (Buffer::Iterator start) const override; /** * \brief Deserialize the packet. * \param start Buffer iterator * \return size of the packet */ - virtual uint32_t Deserialize (Buffer::Iterator start); + uint32_t Deserialize (Buffer::Iterator start) override; /** * \brief Get the Alignment requirement of this option header * \return The required alignment */ - virtual Alignment GetAlignment () const; + Alignment GetAlignment () const override; private: /** @@ -1038,7 +1038,7 @@ public: * \brief Get the instance type ID. * \return instance type ID */ - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * \brief Constructor. */ @@ -1046,37 +1046,37 @@ public: /** * \brief Destructor. */ - virtual ~DsrOptionRerrUnsupportHeader (); + ~DsrOptionRerrUnsupportHeader () override; /** * \brief Set the route error source address * \param errorSrcAddress The error source address */ - virtual void SetErrorSrc (Ipv4Address errorSrcAddress); + void SetErrorSrc (Ipv4Address errorSrcAddress) override; /** * \brief Get the route error source address * \return The error source address */ - virtual Ipv4Address GetErrorSrc () const; + Ipv4Address GetErrorSrc () const override; /** * \brief Set the salvage value of the packet * \param salvage the salvage value */ - virtual void SetSalvage (uint8_t salvage); + void SetSalvage (uint8_t salvage) override; /** * \brief Get the salvage value of the packet * \return The salvage value of the packet */ - virtual uint8_t GetSalvage () const; + uint8_t GetSalvage () const override; /** * \brief Set the error destination ip address * \param errorDstAddress The error destination address */ - virtual void SetErrorDst (Ipv4Address errorDstAddress); + void SetErrorDst (Ipv4Address errorDstAddress) override; /** * \brief Get the error destination ip address * \return The error destination address */ - virtual Ipv4Address GetErrorDst () const; + Ipv4Address GetErrorDst () const override; /** * \brief Set the unsupported option type value * \param optionType The unsupported option type value @@ -1091,28 +1091,28 @@ public: * \brief Print some information about the packet. * \param os output stream */ - virtual void Print (std::ostream &os) const; + void Print (std::ostream &os) const override; /** * \brief Get the serialized size of the packet. * \return size */ - virtual uint32_t GetSerializedSize () const; + uint32_t GetSerializedSize () const override; /** * \brief Serialize the packet. * \param start Buffer iterator */ - virtual void Serialize (Buffer::Iterator start) const; + void Serialize (Buffer::Iterator start) const override; /** * \brief Deserialize the packet. * \param start Buffer iterator * \return size of the packet */ - virtual uint32_t Deserialize (Buffer::Iterator start); + uint32_t Deserialize (Buffer::Iterator start) override; /** * \brief Get the Alignment requirement of this option header * \return The required alignment */ - virtual Alignment GetAlignment () const; + Alignment GetAlignment () const override; private: /** @@ -1166,7 +1166,7 @@ public: * \brief Get the instance type ID. * \return instance type ID */ - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * \brief Constructor. */ @@ -1174,7 +1174,7 @@ public: /** * \brief Destructor. */ - virtual ~DsrOptionAckReqHeader (); + ~DsrOptionAckReqHeader () override; /** * \brief Set the Ack request id number. * \param identification the identification number @@ -1189,28 +1189,28 @@ public: * \brief Print some information about the packet. * \param os output stream */ - virtual void Print (std::ostream &os) const; + void Print (std::ostream &os) const override; /** * \brief Get the serialized size of the packet. * \return size */ - virtual uint32_t GetSerializedSize () const; + uint32_t GetSerializedSize () const override; /** * \brief Serialize the packet. * \param start Buffer iterator */ - virtual void Serialize (Buffer::Iterator start) const; + void Serialize (Buffer::Iterator start) const override; /** * \brief Deserialize the packet. * \param start Buffer iterator * \return size of the packet */ - virtual uint32_t Deserialize (Buffer::Iterator start); + uint32_t Deserialize (Buffer::Iterator start) override; /** * \brief Get the Alignment requirement of this option header * \return The required alignment */ - virtual Alignment GetAlignment () const; + Alignment GetAlignment () const override; private: /** @@ -1252,7 +1252,7 @@ public: * \brief Get the instance type ID. * \return instance type ID */ - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * \brief Constructor. */ @@ -1260,7 +1260,7 @@ public: /** * \brief Destructor. */ - virtual ~DsrOptionAckHeader (); + ~DsrOptionAckHeader () override; /** * \brief Set the Ack id number. * \param identification the identification number @@ -1295,28 +1295,28 @@ public: * \brief Print some information about the packet. * \param os output stream */ - virtual void Print (std::ostream &os) const; + void Print (std::ostream &os) const override; /** * \brief Get the serialized size of the packet. * \return size */ - virtual uint32_t GetSerializedSize () const; + uint32_t GetSerializedSize () const override; /** * \brief Serialize the packet. * \param start Buffer iterator */ - virtual void Serialize (Buffer::Iterator start) const; + void Serialize (Buffer::Iterator start) const override; /** * \brief Deserialize the packet. * \param start Buffer iterator * \return size of the packet */ - virtual uint32_t Deserialize (Buffer::Iterator start); + uint32_t Deserialize (Buffer::Iterator start) override; /** * \brief Get the Alignment requirement of this option header * \return The required alignment */ - virtual Alignment GetAlignment () const; + Alignment GetAlignment () const override; private: /** diff --git a/src/dsr/model/dsr-options.h b/src/dsr/model/dsr-options.h index f6e0d854a..babb76fc1 100644 --- a/src/dsr/model/dsr-options.h +++ b/src/dsr/model/dsr-options.h @@ -86,7 +86,7 @@ public: /** * \brief Destructor. */ - virtual ~DsrOptions (); + ~DsrOptions () override; /** * \brief Get the option number. * \return option number @@ -289,10 +289,10 @@ public: static TypeId GetTypeId (); DsrOptionPad1 (); - virtual ~DsrOptionPad1 (); + ~DsrOptionPad1 () override; - virtual uint8_t GetOptionNumber () const; - virtual uint8_t Process (Ptr packet, Ptr dsrP, Ipv4Address ipv4Address, Ipv4Address source, Ipv4Header const& ipv4Header, uint8_t protocol, bool& isPromisc, Ipv4Address promiscSource); + uint8_t GetOptionNumber () const override; + uint8_t Process (Ptr packet, Ptr dsrP, Ipv4Address ipv4Address, Ipv4Address source, Ipv4Header const& ipv4Header, uint8_t protocol, bool& isPromisc, Ipv4Address promiscSource) override; }; /** @@ -314,10 +314,10 @@ public: static TypeId GetTypeId (); DsrOptionPadn (); - virtual ~DsrOptionPadn (); + ~DsrOptionPadn () override; - virtual uint8_t GetOptionNumber () const; - virtual uint8_t Process (Ptr packet, Ptr dsrP, Ipv4Address ipv4Address, Ipv4Address source, Ipv4Header const& ipv4Header, uint8_t protocol, bool& isPromisc, Ipv4Address promiscSource); + uint8_t GetOptionNumber () const override; + uint8_t Process (Ptr packet, Ptr dsrP, Ipv4Address ipv4Address, Ipv4Address source, Ipv4Header const& ipv4Header, uint8_t protocol, bool& isPromisc, Ipv4Address promiscSource) override; }; /** @@ -341,7 +341,7 @@ public: * \brief Get the instance type ID. * \return instance type ID */ - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * \brief Constructor. */ @@ -349,10 +349,10 @@ public: /** * \brief Destructor. */ - virtual ~DsrOptionRreq (); + ~DsrOptionRreq () override; - virtual uint8_t GetOptionNumber () const; - virtual uint8_t Process (Ptr packet, Ptr dsrP, Ipv4Address ipv4Address, Ipv4Address source, Ipv4Header const& ipv4Header, uint8_t protocol, bool& isPromisc, Ipv4Address promiscSource); + uint8_t GetOptionNumber () const override; + uint8_t Process (Ptr packet, Ptr dsrP, Ipv4Address ipv4Address, Ipv4Address source, Ipv4Header const& ipv4Header, uint8_t protocol, bool& isPromisc, Ipv4Address promiscSource) override; private: /** @@ -386,13 +386,13 @@ public: * \brief Get the instance type ID. * \return instance type ID */ - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; DsrOptionRrep (); - virtual ~DsrOptionRrep (); + ~DsrOptionRrep () override; - virtual uint8_t GetOptionNumber () const; - virtual uint8_t Process (Ptr packet, Ptr dsrP, Ipv4Address ipv4Address, Ipv4Address source, Ipv4Header const& ipv4Header, uint8_t protocol, bool& isPromisc, Ipv4Address promiscSource); + uint8_t GetOptionNumber () const override; + uint8_t Process (Ptr packet, Ptr dsrP, Ipv4Address ipv4Address, Ipv4Address source, Ipv4Header const& ipv4Header, uint8_t protocol, bool& isPromisc, Ipv4Address promiscSource) override; private: /** @@ -426,13 +426,13 @@ public: * \brief Get the instance type ID. * \return instance type ID */ - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; DsrOptionSR (); - virtual ~DsrOptionSR (); + ~DsrOptionSR () override; - virtual uint8_t GetOptionNumber () const; - virtual uint8_t Process (Ptr packet, Ptr dsrP, Ipv4Address ipv4Address, Ipv4Address source, Ipv4Header const& ipv4Header, uint8_t protocol, bool& isPromisc, Ipv4Address promiscSource); + uint8_t GetOptionNumber () const override; + uint8_t Process (Ptr packet, Ptr dsrP, Ipv4Address ipv4Address, Ipv4Address source, Ipv4Header const& ipv4Header, uint8_t protocol, bool& isPromisc, Ipv4Address promiscSource) override; private: /** @@ -462,13 +462,13 @@ public: * \brief Get the instance type ID. * \return instance type ID */ - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; DsrOptionRerr (); - virtual ~DsrOptionRerr (); + ~DsrOptionRerr () override; - virtual uint8_t GetOptionNumber () const; - virtual uint8_t Process (Ptr packet, Ptr dsrP, Ipv4Address ipv4Address, Ipv4Address source, Ipv4Header const& ipv4Header, uint8_t protocol, bool& isPromisc, Ipv4Address promiscSource); + uint8_t GetOptionNumber () const override; + uint8_t Process (Ptr packet, Ptr dsrP, Ipv4Address ipv4Address, Ipv4Address source, Ipv4Header const& ipv4Header, uint8_t protocol, bool& isPromisc, Ipv4Address promiscSource) override; /** * \brief Do Send error message * @@ -513,13 +513,13 @@ public: * \brief Get the instance type ID. * \return instance type ID */ - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; DsrOptionAckReq (); - virtual ~DsrOptionAckReq (); + ~DsrOptionAckReq () override; - virtual uint8_t GetOptionNumber () const; - virtual uint8_t Process (Ptr packet, Ptr dsrP, Ipv4Address ipv4Address, Ipv4Address source, Ipv4Header const& ipv4Header, uint8_t protocol, bool& isPromisc, Ipv4Address promiscSource); + uint8_t GetOptionNumber () const override; + uint8_t Process (Ptr packet, Ptr dsrP, Ipv4Address ipv4Address, Ipv4Address source, Ipv4Header const& ipv4Header, uint8_t protocol, bool& isPromisc, Ipv4Address promiscSource) override; private: /** @@ -553,13 +553,13 @@ public: * \brief Get the instance type ID. * \return instance type ID */ - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; DsrOptionAck (); - virtual ~DsrOptionAck (); + ~DsrOptionAck () override; - virtual uint8_t GetOptionNumber () const; - virtual uint8_t Process (Ptr packet, Ptr dsrP, Ipv4Address ipv4Address, Ipv4Address source, Ipv4Header const& ipv4Header, uint8_t protocol, bool& isPromisc, Ipv4Address promiscSource); + uint8_t GetOptionNumber () const override; + uint8_t Process (Ptr packet, Ptr dsrP, Ipv4Address ipv4Address, Ipv4Address source, Ipv4Header const& ipv4Header, uint8_t protocol, bool& isPromisc, Ipv4Address promiscSource) override; private: /** diff --git a/src/dsr/model/dsr-passive-buff.h b/src/dsr/model/dsr-passive-buff.h index b35047041..f0f40afb4 100644 --- a/src/dsr/model/dsr-passive-buff.h +++ b/src/dsr/model/dsr-passive-buff.h @@ -265,7 +265,7 @@ public: static TypeId GetTypeId (); DsrPassiveBuffer (); - virtual ~DsrPassiveBuffer (); + ~DsrPassiveBuffer () override; /// Push entry in queue, if there is no entry with the same packet and destination address in queue. /// \param entry Buffer Entry diff --git a/src/dsr/model/dsr-rcache.h b/src/dsr/model/dsr-rcache.h index 983dabd8f..bfa7f3377 100644 --- a/src/dsr/model/dsr-rcache.h +++ b/src/dsr/model/dsr-rcache.h @@ -387,7 +387,7 @@ public: static TypeId GetTypeId (); DsrRouteCache (); - virtual ~DsrRouteCache (); + ~DsrRouteCache () override; // Delete assignment operator to avoid misuse DsrRouteCache & operator = (DsrRouteCache const &) = delete; diff --git a/src/dsr/model/dsr-routing.h b/src/dsr/model/dsr-routing.h index 1f2f46b56..890dabaf4 100644 --- a/src/dsr/model/dsr-routing.h +++ b/src/dsr/model/dsr-routing.h @@ -111,7 +111,7 @@ public: /** * \brief Destructor. */ - virtual ~DsrRouting (); + ~DsrRouting () override; /** * \brief Get the node. * \return the node @@ -281,7 +281,7 @@ public: * \brief Get the dsr protocol number. * \return protocol number */ - int GetProtocolNumber () const; + int GetProtocolNumber () const override; /** * \brief The send buffer timer expire. */ @@ -622,9 +622,9 @@ public: * Called from lower-level layers to send the packet up * in the stack. */ - virtual enum IpL4Protocol::RxStatus Receive (Ptr p, + enum IpL4Protocol::RxStatus Receive (Ptr p, Ipv4Header const &header, - Ptr incomingInterface); + Ptr incomingInterface) override; /** * \param p packet to forward up @@ -635,14 +635,14 @@ public: * Called from lower-level layers to send the packet up * in the stack. Not implemented (IPv6). */ - virtual enum IpL4Protocol::RxStatus Receive (Ptr p, + enum IpL4Protocol::RxStatus Receive (Ptr p, Ipv6Header const &header, - Ptr incomingInterface); + Ptr incomingInterface) override; - void SetDownTarget (IpL4Protocol::DownTargetCallback callback); - void SetDownTarget6 (IpL4Protocol::DownTargetCallback6 callback); - IpL4Protocol::DownTargetCallback GetDownTarget () const; - IpL4Protocol::DownTargetCallback6 GetDownTarget6 () const; + void SetDownTarget (IpL4Protocol::DownTargetCallback callback) override; + void SetDownTarget6 (IpL4Protocol::DownTargetCallback6 callback) override; + IpL4Protocol::DownTargetCallback GetDownTarget () const override; + IpL4Protocol::DownTargetCallback6 GetDownTarget6 () const override; /** * \brief Process method * Called from Ipv4L3Protocol::Receive. @@ -707,11 +707,11 @@ protected: * * This function will notify other components connected to the node that a new stack member is now connected * * This will be used to notify Layer 3 protocol of layer 4 protocol stack to connect them together. * */ - virtual void NotifyNewAggregate (); + void NotifyNewAggregate () override; /** * \brief Drop trace callback. */ - virtual void DoDispose (); + void DoDispose () override; /** * The trace for drop, receive and send data packets */ diff --git a/src/dsr/model/dsr-rreq-table.h b/src/dsr/model/dsr-rreq-table.h index 83806a607..9111513b6 100644 --- a/src/dsr/model/dsr-rreq-table.h +++ b/src/dsr/model/dsr-rreq-table.h @@ -206,7 +206,7 @@ public: static TypeId GetTypeId (); DsrRreqTable (); - virtual ~DsrRreqTable (); + ~DsrRreqTable () override; /** * Set the initial discovert hop limit diff --git a/src/dsr/test/dsr-test-suite.cc b/src/dsr/test/dsr-test-suite.cc index 0494f82bf..ba9c9fcf5 100644 --- a/src/dsr/test/dsr-test-suite.cc +++ b/src/dsr/test/dsr-test-suite.cc @@ -70,9 +70,9 @@ class DsrFsHeaderTest : public TestCase { public: DsrFsHeaderTest (); - ~DsrFsHeaderTest (); - virtual void - DoRun (); + ~DsrFsHeaderTest () override; + void + DoRun () override; }; DsrFsHeaderTest::DsrFsHeaderTest () : TestCase ("DSR Fixed size Header") @@ -108,9 +108,9 @@ class DsrRreqHeaderTest : public TestCase { public: DsrRreqHeaderTest (); - ~DsrRreqHeaderTest (); - virtual void - DoRun (); + ~DsrRreqHeaderTest () override; + void + DoRun () override; }; DsrRreqHeaderTest::DsrRreqHeaderTest () : TestCase ("DSR RREQ") @@ -161,9 +161,9 @@ class DsrRrepHeaderTest : public TestCase { public: DsrRrepHeaderTest (); - ~DsrRrepHeaderTest (); - virtual void - DoRun (); + ~DsrRrepHeaderTest () override; + void + DoRun () override; }; DsrRrepHeaderTest::DsrRrepHeaderTest () : TestCase ("DSR RREP") @@ -210,9 +210,9 @@ class DsrSRHeaderTest : public TestCase { public: DsrSRHeaderTest (); - ~DsrSRHeaderTest (); - virtual void - DoRun (); + ~DsrSRHeaderTest () override; + void + DoRun () override; }; DsrSRHeaderTest::DsrSRHeaderTest () : TestCase ("DSR Source Route") @@ -264,9 +264,9 @@ class DsrRerrHeaderTest : public TestCase { public: DsrRerrHeaderTest (); - ~DsrRerrHeaderTest (); - virtual void - DoRun (); + ~DsrRerrHeaderTest () override; + void + DoRun () override; }; DsrRerrHeaderTest::DsrRerrHeaderTest () : TestCase ("DSR RERR") @@ -309,9 +309,9 @@ class DsrAckReqHeaderTest : public TestCase { public: DsrAckReqHeaderTest (); - ~DsrAckReqHeaderTest (); - virtual void - DoRun (); + ~DsrAckReqHeaderTest () override; + void + DoRun () override; }; DsrAckReqHeaderTest::DsrAckReqHeaderTest () : TestCase ("DSR Ack Req") @@ -351,9 +351,9 @@ class DsrAckHeaderTest : public TestCase { public: DsrAckHeaderTest (); - ~DsrAckHeaderTest (); - virtual void - DoRun (); + ~DsrAckHeaderTest () override; + void + DoRun () override; }; DsrAckHeaderTest::DsrAckHeaderTest () : TestCase ("DSR ACK") @@ -397,9 +397,9 @@ class DsrCacheEntryTest : public TestCase { public: DsrCacheEntryTest (); - ~DsrCacheEntryTest (); - virtual void - DoRun (); + ~DsrCacheEntryTest () override; + void + DoRun () override; }; DsrCacheEntryTest::DsrCacheEntryTest () : TestCase ("DSR ACK") @@ -461,9 +461,9 @@ class DsrSendBuffTest : public TestCase { public: DsrSendBuffTest (); - ~DsrSendBuffTest (); - virtual void - DoRun (); + ~DsrSendBuffTest () override; + void + DoRun () override; /// Check size limit function void CheckSizeLimit (); /// Check timeout function @@ -563,9 +563,9 @@ class DsrRreqTableTest : public TestCase { public: DsrRreqTableTest (); - ~DsrRreqTableTest (); - virtual void - DoRun (); + ~DsrRreqTableTest () override; + void + DoRun () override; }; DsrRreqTableTest::DsrRreqTableTest () : TestCase ("DSR RreqTable") diff --git a/src/energy/helper/basic-energy-harvester-helper.h b/src/energy/helper/basic-energy-harvester-helper.h index 6d732c314..7581a4e64 100644 --- a/src/energy/helper/basic-energy-harvester-helper.h +++ b/src/energy/helper/basic-energy-harvester-helper.h @@ -36,12 +36,12 @@ class BasicEnergyHarvesterHelper : public EnergyHarvesterHelper { public: BasicEnergyHarvesterHelper (); - ~BasicEnergyHarvesterHelper (); + ~BasicEnergyHarvesterHelper () override; - void Set (std::string name, const AttributeValue &v); + void Set (std::string name, const AttributeValue &v) override; private: - virtual Ptr DoInstall (Ptr source) const; + Ptr DoInstall (Ptr source) const override; private: ObjectFactory m_basicEnergyHarvester; //!< Energy source factory diff --git a/src/energy/helper/basic-energy-source-helper.h b/src/energy/helper/basic-energy-source-helper.h index a74e5c91f..5b41a6e76 100644 --- a/src/energy/helper/basic-energy-source-helper.h +++ b/src/energy/helper/basic-energy-source-helper.h @@ -35,12 +35,12 @@ class BasicEnergySourceHelper : public EnergySourceHelper { public: BasicEnergySourceHelper (); - ~BasicEnergySourceHelper (); + ~BasicEnergySourceHelper () override; - void Set (std::string name, const AttributeValue &v); + void Set (std::string name, const AttributeValue &v) override; private: - virtual Ptr DoInstall (Ptr node) const; + Ptr DoInstall (Ptr node) const override; private: ObjectFactory m_basicEnergySource; //!< Energy source factory diff --git a/src/energy/helper/energy-harvester-container.h b/src/energy/helper/energy-harvester-container.h index b16e71e67..91fa48496 100644 --- a/src/energy/helper/energy-harvester-container.h +++ b/src/energy/helper/energy-harvester-container.h @@ -58,7 +58,7 @@ public: * Creates an empty EnergyHarvesterContainer. */ EnergyHarvesterContainer (); - ~EnergyHarvesterContainer (); + ~EnergyHarvesterContainer () override; /** * \param harvester Pointer to an EnergyHarvester. @@ -177,12 +177,12 @@ public: void Clear (); private: - virtual void DoDispose (); + void DoDispose () override; /** * \brief Calls Object::Initialize () for all EnergySource objects. */ - virtual void DoInitialize (); + void DoInitialize () override; private: std::vector< Ptr > m_harvesters; //!< Harvester container diff --git a/src/energy/helper/energy-source-container.h b/src/energy/helper/energy-source-container.h index 3308417a4..92c7978dc 100644 --- a/src/energy/helper/energy-source-container.h +++ b/src/energy/helper/energy-source-container.h @@ -57,7 +57,7 @@ public: * Creates an empty EnergySourceContainer. */ EnergySourceContainer (); - ~EnergySourceContainer (); + ~EnergySourceContainer () override; /** * \param source Pointer to an EnergySource. @@ -170,12 +170,12 @@ public: void Add (std::string sourceName); private: - virtual void DoDispose (); + void DoDispose () override; /** * \brief Calls Object::Start () for all EnergySource objects. */ - virtual void DoInitialize (); + void DoInitialize () override; private: std::vector< Ptr > m_sources; //!< Energy source container diff --git a/src/energy/helper/li-ion-energy-source-helper.h b/src/energy/helper/li-ion-energy-source-helper.h index 972dbbf18..719636fd5 100644 --- a/src/energy/helper/li-ion-energy-source-helper.h +++ b/src/energy/helper/li-ion-energy-source-helper.h @@ -37,12 +37,12 @@ class LiIonEnergySourceHelper: public EnergySourceHelper { public: LiIonEnergySourceHelper (); - ~LiIonEnergySourceHelper (); + ~LiIonEnergySourceHelper () override; - void Set (std::string name, const AttributeValue &v); + void Set (std::string name, const AttributeValue &v) override; private: - virtual Ptr DoInstall (Ptr node) const; + Ptr DoInstall (Ptr node) const override; private: ObjectFactory m_liIonEnergySource; //!< LiIon Battery factory diff --git a/src/energy/helper/rv-battery-model-helper.h b/src/energy/helper/rv-battery-model-helper.h index 57b6022e2..ed1fc7331 100644 --- a/src/energy/helper/rv-battery-model-helper.h +++ b/src/energy/helper/rv-battery-model-helper.h @@ -35,12 +35,12 @@ class RvBatteryModelHelper : public EnergySourceHelper { public: RvBatteryModelHelper (); - ~RvBatteryModelHelper (); + ~RvBatteryModelHelper () override; - void Set (std::string name, const AttributeValue &v); + void Set (std::string name, const AttributeValue &v) override; private: - virtual Ptr DoInstall (Ptr node) const; + Ptr DoInstall (Ptr node) const override; private: ObjectFactory m_rvBatteryModel; //!< RV Battery factory diff --git a/src/energy/model/basic-energy-harvester.h b/src/energy/model/basic-energy-harvester.h index da6e680b2..cc3249e80 100644 --- a/src/energy/model/basic-energy-harvester.h +++ b/src/energy/model/basic-energy-harvester.h @@ -65,7 +65,7 @@ public: */ BasicEnergyHarvester (Time updateInterval); - virtual ~BasicEnergyHarvester (); + ~BasicEnergyHarvester () override; /** * \param updateInterval Energy harvesting update interval. @@ -94,10 +94,10 @@ public: private: /// Defined in ns3::Object - void DoInitialize (); + void DoInitialize () override; /// Defined in ns3::Object - void DoDispose (); + void DoDispose () override; /** * Calculates harvested Power. @@ -108,7 +108,7 @@ private: * \returns m_harvestedPower The power currently provided by the Basic Energy Harvester. * Implements DoGetPower defined in EnergyHarvester. */ - virtual double DoGetPower () const; + double DoGetPower () const override; /** * This function is called every m_energyHarvestingUpdateInterval in order to diff --git a/src/energy/model/basic-energy-source.h b/src/energy/model/basic-energy-source.h index b4d454bdd..b27870fff 100644 --- a/src/energy/model/basic-energy-source.h +++ b/src/energy/model/basic-energy-source.h @@ -43,40 +43,40 @@ public: */ static TypeId GetTypeId (); BasicEnergySource (); - virtual ~BasicEnergySource (); + ~BasicEnergySource () override; /** * \return Initial energy stored in energy source, in Joules. * * Implements GetInitialEnergy. */ - virtual double GetInitialEnergy () const; + double GetInitialEnergy () const override; /** * \returns Supply voltage at the energy source. * * Implements GetSupplyVoltage. */ - virtual double GetSupplyVoltage () const; + double GetSupplyVoltage () const override; /** * \return Remaining energy in energy source, in Joules * * Implements GetRemainingEnergy. */ - virtual double GetRemainingEnergy (); + double GetRemainingEnergy () override; /** * \returns Energy fraction. * * Implements GetEnergyFraction. */ - virtual double GetEnergyFraction (); + double GetEnergyFraction () override; /** * Implements UpdateEnergySource. */ - virtual void UpdateEnergySource (); + void UpdateEnergySource () override; /** * \param initialEnergyJ Initial energy, in Joules @@ -109,10 +109,10 @@ public: private: /// Defined in ns3::Object - void DoInitialize (); + void DoInitialize () override; /// Defined in ns3::Object - void DoDispose (); + void DoDispose () override; /** * Handles the remaining energy going to zero event. This function notifies diff --git a/src/energy/model/device-energy-model.h b/src/energy/model/device-energy-model.h index 307f34ec4..aa57456d5 100644 --- a/src/energy/model/device-energy-model.h +++ b/src/energy/model/device-energy-model.h @@ -56,7 +56,7 @@ public: */ static TypeId GetTypeId (); DeviceEnergyModel (); - virtual ~DeviceEnergyModel (); + ~DeviceEnergyModel () override; /** * \param source Pointer to energy source installed on node. diff --git a/src/energy/model/energy-harvester.h b/src/energy/model/energy-harvester.h index 7d267b91a..d82feeb12 100644 --- a/src/energy/model/energy-harvester.h +++ b/src/energy/model/energy-harvester.h @@ -52,7 +52,7 @@ public: EnergyHarvester (); - virtual ~EnergyHarvester (); + ~EnergyHarvester () override; /** * \brief Sets pointer to node containing this EnergyHarvester. @@ -99,7 +99,7 @@ private: * * Defined in ns3::Object */ - virtual void DoDispose (); + void DoDispose () override; /** * This method is called by the GetPower method and it needs to be implemented by the diff --git a/src/energy/model/energy-source.h b/src/energy/model/energy-source.h index ce9a0b869..61091d2b9 100644 --- a/src/energy/model/energy-source.h +++ b/src/energy/model/energy-source.h @@ -92,7 +92,7 @@ public: */ static TypeId GetTypeId (); EnergySource (); - virtual ~EnergySource (); + ~EnergySource () override; /** * \returns Supply voltage of the energy source. @@ -197,7 +197,7 @@ private: * * Defined in ns3::Object */ - virtual void DoDispose (); + void DoDispose () override; private: /** diff --git a/src/energy/model/li-ion-energy-source.h b/src/energy/model/li-ion-energy-source.h index 179707613..b6d17997a 100644 --- a/src/energy/model/li-ion-energy-source.h +++ b/src/energy/model/li-ion-energy-source.h @@ -78,14 +78,14 @@ public: */ static TypeId GetTypeId (); LiIonEnergySource (); - virtual ~LiIonEnergySource (); + ~LiIonEnergySource () override; /** * \return Initial energy stored in energy source, in Joules. * * Implements GetInitialEnergy. */ - virtual double GetInitialEnergy () const; + double GetInitialEnergy () const override; /** * \param initialEnergyJ Initial energy, in Joules @@ -100,7 +100,7 @@ public: * * Implements GetSupplyVoltage. */ - virtual double GetSupplyVoltage () const; + double GetSupplyVoltage () const override; /** * \param supplyVoltageV Initial Supply voltage at the energy source, in Volts. @@ -115,14 +115,14 @@ public: * * Implements GetRemainingEnergy. */ - virtual double GetRemainingEnergy (); + double GetRemainingEnergy () override; /** * \returns Energy fraction. * * Implements GetEnergyFraction. */ - virtual double GetEnergyFraction (); + double GetEnergyFraction () override; /** * \param energyJ Amount of energy (in Joules) to decrease from energy source. @@ -141,7 +141,7 @@ public: /** * Implements UpdateEnergySource. */ - virtual void UpdateEnergySource (); + void UpdateEnergySource () override; /** * \param interval Energy update interval. @@ -155,8 +155,8 @@ public: */ Time GetEnergyUpdateInterval () const; private: - void DoInitialize (); - void DoDispose (); + void DoInitialize () override; + void DoDispose () override; /** * Handles the remaining energy going to zero event. This function notifies diff --git a/src/energy/model/rv-battery-model.h b/src/energy/model/rv-battery-model.h index cbcf74b3d..cb6f35ebc 100644 --- a/src/energy/model/rv-battery-model.h +++ b/src/energy/model/rv-battery-model.h @@ -56,28 +56,28 @@ public: */ static TypeId GetTypeId (); RvBatteryModel (); - virtual ~RvBatteryModel (); + ~RvBatteryModel () override; /** * \return Initial energy stored (theoretical capacity) in the battery, in Joules. * * Implements GetInitialEnergy. */ - virtual double GetInitialEnergy () const; + double GetInitialEnergy () const override; /** * \returns Supply voltage at the energy source. * * Implements GetSupplyVoltage. */ - virtual double GetSupplyVoltage () const; + double GetSupplyVoltage () const override; /** * \return Remaining energy in energy source, in Joules * * Implements GetRemainingEnergy. */ - virtual double GetRemainingEnergy (); + double GetRemainingEnergy () override; /** * \returns Energy fraction. @@ -85,13 +85,13 @@ public: * Implements GetEnergyFraction. For the RV battery model, energy fraction is * equivalent to battery level. */ - virtual double GetEnergyFraction (); + double GetEnergyFraction () override; /** * Implements UpdateEnergySource. This function samples the total load (total * current) from all devices to discharge the battery. */ - virtual void UpdateEnergySource (); + void UpdateEnergySource () override; /** * \param interval Energy update interval. @@ -179,10 +179,10 @@ public: private: /// Defined in ns3::Object - virtual void DoInitialize (); + void DoInitialize () override; /// Defined in ns3::Object - virtual void DoDispose (); + void DoDispose () override; /** * Handles the remaining energy going to zero event. This function notifies diff --git a/src/energy/model/simple-device-energy-model.h b/src/energy/model/simple-device-energy-model.h index e86b1075e..e5d9e3363 100644 --- a/src/energy/model/simple-device-energy-model.h +++ b/src/energy/model/simple-device-energy-model.h @@ -44,7 +44,7 @@ public: */ static TypeId GetTypeId (); SimpleDeviceEnergyModel (); - virtual ~SimpleDeviceEnergyModel (); + ~SimpleDeviceEnergyModel () override; /** * \brief Sets pointer to node. @@ -71,21 +71,21 @@ public: * * Implements DeviceEnergyModel::SetEnergySource. */ - virtual void SetEnergySource (Ptr source); + void SetEnergySource (Ptr source) override; /** * \returns Total energy consumption of the vehicle. * * Implements DeviceEnergyModel::GetTotalEnergyConsumption. */ - virtual double GetTotalEnergyConsumption () const; + double GetTotalEnergyConsumption () const override; /** * \param newState New state the device is in. * * Not implemented */ - virtual void ChangeState (int newState) + void ChangeState (int newState) override { } @@ -94,7 +94,7 @@ public: * * Not implemented */ - virtual void HandleEnergyDepletion () + void HandleEnergyDepletion () override { } @@ -103,7 +103,7 @@ public: * * Not implemented */ - virtual void HandleEnergyRecharged () + void HandleEnergyRecharged () override { } @@ -112,7 +112,7 @@ public: * * Not implemented */ - virtual void HandleEnergyChanged () + void HandleEnergyChanged () override { } @@ -123,14 +123,14 @@ public: */ void SetCurrentA (double current); private: - void DoDispose (); + void DoDispose () override; /** * \returns Current draw of device, at current state. * * Implements DeviceEnergyModel::GetCurrentA. */ - virtual double DoGetCurrentA () const; + double DoGetCurrentA () const override; Time m_lastUpdateTime; //!< Last update time double m_actualCurrentA; //!< actual curred (in Ampere) diff --git a/src/energy/test/basic-energy-harvester-test.cc b/src/energy/test/basic-energy-harvester-test.cc index 200d5e7ad..07a4c0d31 100644 --- a/src/energy/test/basic-energy-harvester-test.cc +++ b/src/energy/test/basic-energy-harvester-test.cc @@ -42,9 +42,9 @@ class BasicEnergyHarvesterTestCase : public TestCase { public: BasicEnergyHarvesterTestCase (); - ~BasicEnergyHarvesterTestCase (); + ~BasicEnergyHarvesterTestCase () override; - void DoRun (); + void DoRun () override; double m_timeS; //!< Time, in seconds double m_tolerance; //!< Tolerance for energy estimation diff --git a/src/energy/test/li-ion-energy-source-test.cc b/src/energy/test/li-ion-energy-source-test.cc index 0a92b7733..a98fc128c 100644 --- a/src/energy/test/li-ion-energy-source-test.cc +++ b/src/energy/test/li-ion-energy-source-test.cc @@ -39,9 +39,9 @@ class LiIonEnergyTestCase : public TestCase { public: LiIonEnergyTestCase (); - ~LiIonEnergyTestCase (); + ~LiIonEnergyTestCase () override; - void DoRun (); + void DoRun () override; Ptr m_node; //!< Node to aggreagte the source to. }; diff --git a/src/fd-net-device/helper/emu-fd-net-device-helper.h b/src/fd-net-device/helper/emu-fd-net-device-helper.h index 990a16fc5..26e7d93b7 100644 --- a/src/fd-net-device/helper/emu-fd-net-device-helper.h +++ b/src/fd-net-device/helper/emu-fd-net-device-helper.h @@ -44,7 +44,7 @@ public: * Construct a EmuFdNetDeviceHelper. */ EmuFdNetDeviceHelper (); - virtual ~EmuFdNetDeviceHelper () + ~EmuFdNetDeviceHelper () override {} /** @@ -76,7 +76,7 @@ protected: * \param node The node to install the device in * \returns A container holding the added net device. */ - Ptr InstallPriv (Ptr node) const; + Ptr InstallPriv (Ptr node) const override; /** * Sets a file descriptor on the FileDescriptorNetDevice. diff --git a/src/fd-net-device/helper/fd-net-device-helper.h b/src/fd-net-device/helper/fd-net-device-helper.h index b74ae0fb5..5cf15ede9 100644 --- a/src/fd-net-device/helper/fd-net-device-helper.h +++ b/src/fd-net-device/helper/fd-net-device-helper.h @@ -50,7 +50,7 @@ public: * Construct a FdNetDeviceHelper. */ FdNetDeviceHelper (); - virtual ~FdNetDeviceHelper () + ~FdNetDeviceHelper () override { } @@ -119,7 +119,7 @@ private: * \param promiscuous If true capture all possible packets available at the device. * \param explicitFilename Treat the prefix as an explicit filename if true */ - virtual void EnablePcapInternal (std::string prefix, Ptr nd, bool promiscuous, bool explicitFilename); + void EnablePcapInternal (std::string prefix, Ptr nd, bool promiscuous, bool explicitFilename) override; /** * \brief Enable ascii trace output on the indicated net device. @@ -132,10 +132,10 @@ private: * \param nd Net device for which you want to enable tracing. * \param explicitFilename Treat the prefix as an explicit filename if true */ - virtual void EnableAsciiInternal (Ptr stream, + void EnableAsciiInternal (Ptr stream, std::string prefix, Ptr nd, - bool explicitFilename); + bool explicitFilename) override; ObjectFactory m_deviceFactory; //!< factory for the NetDevices }; diff --git a/src/fd-net-device/helper/tap-fd-net-device-helper.h b/src/fd-net-device/helper/tap-fd-net-device-helper.h index 7d5699603..66fec5a46 100644 --- a/src/fd-net-device/helper/tap-fd-net-device-helper.h +++ b/src/fd-net-device/helper/tap-fd-net-device-helper.h @@ -46,7 +46,7 @@ public: * Construct a TapFdNetDeviceHelper. */ TapFdNetDeviceHelper (); - virtual ~TapFdNetDeviceHelper () + ~TapFdNetDeviceHelper () override { } @@ -101,20 +101,20 @@ protected: * \param node The node to install the device in * \returns A container holding the added net device. */ - Ptr InstallPriv (Ptr node) const; + Ptr InstallPriv (Ptr node) const override; /** * Sets a file descriptor on the FileDescriptorNetDevice. * \param device the device to install the file descriptor in */ - virtual void SetFileDescriptor (Ptr device) const; + void SetFileDescriptor (Ptr device) const override; /** * Call out to a separate process running as suid root in order to create a * TAP device and obtain the file descriptor associated to it. * \returns The file descriptor associated with the TAP device. */ - virtual int CreateFileDescriptor () const; + int CreateFileDescriptor () const override; /** * The TAP device flag IFF_NO_PI. diff --git a/src/fd-net-device/model/fd-net-device.h b/src/fd-net-device/model/fd-net-device.h index dcd3710d3..4db621eee 100644 --- a/src/fd-net-device/model/fd-net-device.h +++ b/src/fd-net-device/model/fd-net-device.h @@ -63,7 +63,7 @@ public: void SetBufferSize (uint32_t bufferSize); private: - FdReader::Data DoRead (); + FdReader::Data DoRead () override; uint32_t m_bufferSize; //!< size of the read buffer }; @@ -113,7 +113,7 @@ public: /** * Destructor for the FdNetDevice. */ - virtual ~FdNetDevice (); + ~FdNetDevice () override; // Delete assignment operator to avoid misuse FdNetDevice (FdNetDevice const &) = delete; @@ -154,30 +154,30 @@ public: void Stop (Time tStop); // inherited from NetDevice base class. - virtual void SetIfIndex (const uint32_t index); - virtual uint32_t GetIfIndex () const; - virtual Ptr GetChannel () const; - virtual void SetAddress (Address address); - virtual Address GetAddress () const; - virtual bool SetMtu (const uint16_t mtu); - virtual uint16_t GetMtu () const; - virtual bool IsLinkUp () const; - virtual void AddLinkChangeCallback (Callback callback); - virtual bool IsBroadcast () const; - virtual Address GetBroadcast () const; - virtual bool IsMulticast () const; - virtual Address GetMulticast (Ipv4Address multicastGroup) const; - virtual bool IsPointToPoint () const; - virtual bool IsBridge () const; - virtual bool Send (Ptr packet, const Address& dest, uint16_t protocolNumber); - virtual bool SendFrom (Ptr packet, const Address& source, const Address& dest, uint16_t protocolNumber); - virtual Ptr GetNode () const; - virtual void SetNode (Ptr node); - virtual bool NeedsArp () const; - virtual void SetReceiveCallback (NetDevice::ReceiveCallback cb); - virtual void SetPromiscReceiveCallback (NetDevice::PromiscReceiveCallback cb); - virtual bool SupportsSendFrom () const; - virtual Address GetMulticast (Ipv6Address addr) const; + void SetIfIndex (const uint32_t index) override; + uint32_t GetIfIndex () const override; + Ptr GetChannel () const override; + void SetAddress (Address address) override; + Address GetAddress () const override; + bool SetMtu (const uint16_t mtu) override; + uint16_t GetMtu () const override; + bool IsLinkUp () const override; + void AddLinkChangeCallback (Callback callback) override; + bool IsBroadcast () const override; + Address GetBroadcast () const override; + bool IsMulticast () const override; + Address GetMulticast (Ipv4Address multicastGroup) const override; + bool IsPointToPoint () const override; + bool IsBridge () const override; + bool Send (Ptr packet, const Address& dest, uint16_t protocolNumber) override; + bool SendFrom (Ptr packet, const Address& source, const Address& dest, uint16_t protocolNumber) override; + Ptr GetNode () const override; + void SetNode (Ptr node) override; + bool NeedsArp () const override; + void SetReceiveCallback (NetDevice::ReceiveCallback cb) override; + void SetPromiscReceiveCallback (NetDevice::PromiscReceiveCallback cb) override; + bool SupportsSendFrom () const override; + Address GetMulticast (Ipv6Address addr) const override; /** * Set if the NetDevice is able to send Broadcast messages @@ -202,9 +202,9 @@ protected: /** * Method Initialization for start and stop attributes. */ - virtual void DoInitialize (); + void DoInitialize () override; - virtual void DoDispose (); + void DoDispose () override; /** * Get the associated file descriptor. diff --git a/src/flow-monitor/model/flow-monitor.h b/src/flow-monitor/model/flow-monitor.h index 300cab8b7..f38dedb29 100644 --- a/src/flow-monitor/model/flow-monitor.h +++ b/src/flow-monitor/model/flow-monitor.h @@ -143,7 +143,7 @@ public: * \return the object TypeId */ static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; FlowMonitor (); /// Add a FlowClassifier to be used by the flow monitor. @@ -261,8 +261,8 @@ public: protected: - virtual void NotifyConstructionCompleted (); - virtual void DoDispose (); + void NotifyConstructionCompleted () override; + void DoDispose () override; private: diff --git a/src/flow-monitor/model/flow-probe.h b/src/flow-monitor/model/flow-probe.h index 00b53b503..959a832af 100644 --- a/src/flow-monitor/model/flow-probe.h +++ b/src/flow-monitor/model/flow-probe.h @@ -42,10 +42,10 @@ protected: /// Constructor /// \param flowMonitor the FlowMonitor this probe is associated with FlowProbe (Ptr flowMonitor); - virtual void DoDispose (); + void DoDispose () override; public: - virtual ~FlowProbe (); + ~FlowProbe () override; // Delete copy constructor and assignment operator to avoid misuse FlowProbe (FlowProbe const &) = delete; diff --git a/src/flow-monitor/model/ipv4-flow-classifier.h b/src/flow-monitor/model/ipv4-flow-classifier.h index dbc64198e..12e232aec 100644 --- a/src/flow-monitor/model/ipv4-flow-classifier.h +++ b/src/flow-monitor/model/ipv4-flow-classifier.h @@ -88,7 +88,7 @@ public: /// \returns the vector of DSCP values std::vector > GetDscpCounts (FlowId flowId) const; - virtual void SerializeToXmlStream (std::ostream &os, uint16_t indent) const; + void SerializeToXmlStream (std::ostream &os, uint16_t indent) const override; private: diff --git a/src/flow-monitor/model/ipv4-flow-probe.cc b/src/flow-monitor/model/ipv4-flow-probe.cc index 53a3e45e0..4d7475d24 100644 --- a/src/flow-monitor/model/ipv4-flow-probe.cc +++ b/src/flow-monitor/model/ipv4-flow-probe.cc @@ -53,11 +53,11 @@ public: * \return the object TypeId */ static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId () const; - virtual uint32_t GetSerializedSize () const; - virtual void Serialize (TagBuffer buf) const; - virtual void Deserialize (TagBuffer buf); - virtual void Print (std::ostream &os) const; + TypeId GetInstanceTypeId () const override; + uint32_t GetSerializedSize () const override; + void Serialize (TagBuffer buf) const override; + void Deserialize (TagBuffer buf) override; + void Print (std::ostream &os) const override; Ipv4FlowProbeTag (); /** * \brief Consructor diff --git a/src/flow-monitor/model/ipv4-flow-probe.h b/src/flow-monitor/model/ipv4-flow-probe.h index 5d67d903c..ef6a76095 100644 --- a/src/flow-monitor/model/ipv4-flow-probe.h +++ b/src/flow-monitor/model/ipv4-flow-probe.h @@ -47,7 +47,7 @@ public: /// \param classifier the Ipv4FlowClassifier this probe is associated with /// \param node the Node this probe is associated with Ipv4FlowProbe (Ptr monitor, Ptr classifier, Ptr node); - virtual ~Ipv4FlowProbe (); + ~Ipv4FlowProbe () override; /// Register this type. /// \return The TypeId. @@ -83,7 +83,7 @@ public: protected: - virtual void DoDispose (); + void DoDispose () override; private: /// Log a packet being sent diff --git a/src/flow-monitor/model/ipv6-flow-classifier.h b/src/flow-monitor/model/ipv6-flow-classifier.h index d6b2aacc9..e11b73006 100644 --- a/src/flow-monitor/model/ipv6-flow-classifier.h +++ b/src/flow-monitor/model/ipv6-flow-classifier.h @@ -89,7 +89,7 @@ public: /// \returns the vector of DSCP values std::vector > GetDscpCounts (FlowId flowId) const; - virtual void SerializeToXmlStream (std::ostream &os, uint16_t indent) const; + void SerializeToXmlStream (std::ostream &os, uint16_t indent) const override; private: diff --git a/src/flow-monitor/model/ipv6-flow-probe.cc b/src/flow-monitor/model/ipv6-flow-probe.cc index 905bc935a..c5edb3ce5 100644 --- a/src/flow-monitor/model/ipv6-flow-probe.cc +++ b/src/flow-monitor/model/ipv6-flow-probe.cc @@ -54,11 +54,11 @@ public: * \return the object TypeId */ static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId () const; - virtual uint32_t GetSerializedSize () const; - virtual void Serialize (TagBuffer buf) const; - virtual void Deserialize (TagBuffer buf); - virtual void Print (std::ostream &os) const; + TypeId GetInstanceTypeId () const override; + uint32_t GetSerializedSize () const override; + void Serialize (TagBuffer buf) const override; + void Deserialize (TagBuffer buf) override; + void Print (std::ostream &os) const override; Ipv6FlowProbeTag (); /** * \brief Consructor diff --git a/src/flow-monitor/model/ipv6-flow-probe.h b/src/flow-monitor/model/ipv6-flow-probe.h index cc6568973..d80488921 100644 --- a/src/flow-monitor/model/ipv6-flow-probe.h +++ b/src/flow-monitor/model/ipv6-flow-probe.h @@ -48,7 +48,7 @@ public: /// \param classifier the Ipv4FlowClassifier this probe is associated with /// \param node the Node this probe is associated with Ipv6FlowProbe (Ptr monitor, Ptr classifier, Ptr node); - virtual ~Ipv6FlowProbe (); + ~Ipv6FlowProbe () override; /// Register this type. /// \return The TypeId. @@ -89,7 +89,7 @@ public: protected: - virtual void DoDispose (); + void DoDispose () override; private: /// Log a packet being sent diff --git a/src/internet-apps/model/dhcp-client.h b/src/internet-apps/model/dhcp-client.h index 535938139..a850bafea 100644 --- a/src/internet-apps/model/dhcp-client.h +++ b/src/internet-apps/model/dhcp-client.h @@ -53,7 +53,7 @@ public: GetTypeId (); DhcpClient (); - virtual ~DhcpClient (); + ~DhcpClient () override; /** * \brief Constructor @@ -90,7 +90,7 @@ public: int64_t AssignStreams (int64_t stream); protected: - virtual void DoDispose (); + void DoDispose () override; private: /// client states @@ -106,12 +106,12 @@ private: /* * \brief Starts the DHCP client application */ - virtual void StartApplication (); + void StartApplication () override; /* * \brief Stops the DHCP client application */ - virtual void StopApplication (); + void StopApplication () override; /** * \brief Handles changes in LinkState diff --git a/src/internet-apps/model/dhcp-header.h b/src/internet-apps/model/dhcp-header.h index e50ea940a..e52cc95df 100644 --- a/src/internet-apps/model/dhcp-header.h +++ b/src/internet-apps/model/dhcp-header.h @@ -98,7 +98,7 @@ public: /** * \brief Destructor */ - ~DhcpHeader (); + ~DhcpHeader () override; /// BOOTP options enum Options @@ -287,11 +287,11 @@ public: void ResetOpt (); private: - virtual TypeId GetInstanceTypeId () const; - virtual void Print (std::ostream &os) const; - virtual uint32_t GetSerializedSize () const; - virtual void Serialize (Buffer::Iterator start) const; - virtual uint32_t Deserialize (Buffer::Iterator start); + TypeId GetInstanceTypeId () const override; + void Print (std::ostream &os) const override; + uint32_t GetSerializedSize () const override; + void Serialize (Buffer::Iterator start) const override; + uint32_t Deserialize (Buffer::Iterator start) override; uint8_t m_op; //!< The DHCP Message type uint8_t m_bootp; //!< The BOOTP Message type diff --git a/src/internet-apps/model/dhcp-server.h b/src/internet-apps/model/dhcp-server.h index af8736439..c3af3a6cb 100644 --- a/src/internet-apps/model/dhcp-server.h +++ b/src/internet-apps/model/dhcp-server.h @@ -52,7 +52,7 @@ public: static TypeId GetTypeId (); DhcpServer (); - virtual ~DhcpServer (); + ~DhcpServer () override; /** * \brief Add a static entry to the pool. @@ -64,7 +64,7 @@ public: protected: - virtual void DoDispose (); + void DoDispose () override; private: static const int PORT = 67; //!< Port number of DHCP server @@ -99,12 +99,12 @@ private: /** * \brief Starts the DHCP Server application */ - virtual void StartApplication (); + void StartApplication () override; /** * \brief Stops the DHCP client application */ - virtual void StopApplication (); + void StopApplication () override; Ptr m_socket; //!< The socket bound to port 67 Ipv4Address m_poolAddress; //!< The network address available to the server diff --git a/src/internet-apps/model/ping6.h b/src/internet-apps/model/ping6.h index c2bb15964..e0d9cc182 100644 --- a/src/internet-apps/model/ping6.h +++ b/src/internet-apps/model/ping6.h @@ -57,7 +57,7 @@ public: /** * \brief Destructor. */ - virtual ~Ping6 (); + ~Ping6 () override; /** * \brief Set the local address. @@ -89,18 +89,18 @@ protected: /** * \brief Dispose this object; */ - virtual void DoDispose (); + void DoDispose () override; private: /** * \brief Start the application. */ - virtual void StartApplication (); + void StartApplication () override; /** * \brief Stop the application. */ - virtual void StopApplication (); + void StopApplication () override; /** * \brief Schedule sending a packet. diff --git a/src/internet-apps/model/radvd.h b/src/internet-apps/model/radvd.h index 9012b8722..6f52a263f 100644 --- a/src/internet-apps/model/radvd.h +++ b/src/internet-apps/model/radvd.h @@ -61,7 +61,7 @@ public: /** * \brief Destructor. */ - virtual ~Radvd (); + ~Radvd () override; /** * \brief Default value for maximum delay of RA (ms) @@ -100,7 +100,7 @@ protected: /** * \brief Dispose the instance. */ - virtual void DoDispose (); + void DoDispose () override; private: /// Container: Ptr to RadvdInterface @@ -127,12 +127,12 @@ private: /** * \brief Start the application. */ - virtual void StartApplication (); + void StartApplication () override; /** * \brief Stop the application. */ - virtual void StopApplication (); + void StopApplication () override; /** * \brief Send a packet. diff --git a/src/internet-apps/model/v4ping.h b/src/internet-apps/model/v4ping.h index 12f24eb5d..2431fcb92 100644 --- a/src/internet-apps/model/v4ping.h +++ b/src/internet-apps/model/v4ping.h @@ -51,7 +51,7 @@ public: * create a pinger applications */ V4Ping (); - virtual ~V4Ping (); + ~V4Ping () override; private: /** @@ -72,9 +72,9 @@ private: void Read32 (const uint8_t *buffer, uint32_t &data); // inherited from Application base class. - virtual void StartApplication (); - virtual void StopApplication (); - virtual void DoDispose (); + void StartApplication () override; + void StopApplication () override; + void DoDispose () override; /** * \brief Return the application ID in the node. * \returns the application id diff --git a/src/internet-apps/model/v4traceroute.h b/src/internet-apps/model/v4traceroute.h index 7bcde6dab..aacff4caf 100644 --- a/src/internet-apps/model/v4traceroute.h +++ b/src/internet-apps/model/v4traceroute.h @@ -56,7 +56,7 @@ public: */ static TypeId GetTypeId (); V4TraceRoute (); - virtual ~V4TraceRoute (); + ~V4TraceRoute () override; /** * \brief Prints the application traced routes into a given OutputStream. * \param stream the output stream @@ -64,9 +64,9 @@ public: void Print (Ptr stream); private: - virtual void StartApplication (); - virtual void StopApplication (); - virtual void DoDispose (); + void StartApplication () override; + void StopApplication () override; + void DoDispose () override; /** * \brief Return the application ID in the node. * \returns the application id diff --git a/src/internet-apps/test/dhcp-test.cc b/src/internet-apps/test/dhcp-test.cc index e86dffb71..5f7300f27 100644 --- a/src/internet-apps/test/dhcp-test.cc +++ b/src/internet-apps/test/dhcp-test.cc @@ -48,7 +48,7 @@ class DhcpTestCase : public TestCase { public: DhcpTestCase (); - virtual ~DhcpTestCase (); + ~DhcpTestCase () override; /** * Triggered by an address lease on a client. * \param context The test name. @@ -56,7 +56,7 @@ public: */ void LeaseObtained (std::string context, const Ipv4Address& newAddress); private: - virtual void DoRun (); + void DoRun () override; Ipv4Address m_leasedAddress[3]; //!< Address given to the nodes }; diff --git a/src/internet-apps/test/ipv6-radvd-test.cc b/src/internet-apps/test/ipv6-radvd-test.cc index 843ad13a7..adfa53c1f 100644 --- a/src/internet-apps/test/ipv6-radvd-test.cc +++ b/src/internet-apps/test/ipv6-radvd-test.cc @@ -48,10 +48,10 @@ class RadvdTestCase : public TestCase { public: RadvdTestCase (); - virtual ~RadvdTestCase (); + ~RadvdTestCase () override; private: - virtual void DoRun (); + void DoRun () override; /** * Checks the addresses on the selected NetDevices. diff --git a/src/internet/helper/internet-stack-helper.h b/src/internet/helper/internet-stack-helper.h index 99430c935..66bdac634 100644 --- a/src/internet/helper/internet-stack-helper.h +++ b/src/internet/helper/internet-stack-helper.h @@ -101,7 +101,7 @@ public: /** * Destroy the InternetStackHelper */ - virtual ~InternetStackHelper(); + ~InternetStackHelper() override; /** * \brief Copy constructor @@ -231,10 +231,10 @@ private: * @param interface Interface ID on the Ipv4 on which you want to enable tracing. * @param explicitFilename Treat the prefix as an explicit filename if true */ - virtual void EnablePcapIpv4Internal (std::string prefix, + void EnablePcapIpv4Internal (std::string prefix, Ptr ipv4, uint32_t interface, - bool explicitFilename); + bool explicitFilename) override; /** * @brief Enable ascii trace output on the indicated Ipv4 and interface pair. @@ -246,11 +246,11 @@ private: * @param interface Interface ID on the Ipv4 on which you want to enable tracing. * @param explicitFilename Treat the prefix as an explicit filename if true */ - virtual void EnableAsciiIpv4Internal (Ptr stream, + void EnableAsciiIpv4Internal (Ptr stream, std::string prefix, Ptr ipv4, uint32_t interface, - bool explicitFilename); + bool explicitFilename) override; /** * @brief Enable pcap output the indicated Ipv6 and interface pair. @@ -260,10 +260,10 @@ private: * @param interface Interface ID on the Ipv6 on which you want to enable tracing. * @param explicitFilename Treat the prefix as an explicit filename if true */ - virtual void EnablePcapIpv6Internal (std::string prefix, + void EnablePcapIpv6Internal (std::string prefix, Ptr ipv6, uint32_t interface, - bool explicitFilename); + bool explicitFilename) override; /** * @brief Enable ascii trace output on the indicated Ipv6 and interface pair. @@ -275,11 +275,11 @@ private: * @param interface Interface ID on the Ipv6 on which you want to enable tracing. * @param explicitFilename Treat the prefix as an explicit filename if true */ - virtual void EnableAsciiIpv6Internal (Ptr stream, + void EnableAsciiIpv6Internal (Ptr stream, std::string prefix, Ptr ipv6, uint32_t interface, - bool explicitFilename); + bool explicitFilename) override; /** * \brief Initialize the helper to its default values diff --git a/src/internet/helper/ipv4-global-routing-helper.h b/src/internet/helper/ipv4-global-routing-helper.h index 22aa71c12..8aa4916a5 100644 --- a/src/internet/helper/ipv4-global-routing-helper.h +++ b/src/internet/helper/ipv4-global-routing-helper.h @@ -55,7 +55,7 @@ public: * This method is mainly for internal use by the other helpers; * clients are expected to free the dynamic memory allocated by this method */ - Ipv4GlobalRoutingHelper* Copy () const; + Ipv4GlobalRoutingHelper* Copy () const override; /** * \param node the node on which the routing protocol will run @@ -63,7 +63,7 @@ public: * * This method will be called by ns3::InternetStackHelper::Install */ - virtual Ptr Create (Ptr node) const; + Ptr Create (Ptr node) const override; /** * \brief Build a routing database and initialize the routing tables of diff --git a/src/internet/helper/ipv4-list-routing-helper.h b/src/internet/helper/ipv4-list-routing-helper.h index 37b1b79d2..825063f07 100644 --- a/src/internet/helper/ipv4-list-routing-helper.h +++ b/src/internet/helper/ipv4-list-routing-helper.h @@ -46,7 +46,7 @@ public: /* * Destroy an Ipv4ListRoutingHelper. */ - virtual ~Ipv4ListRoutingHelper (); + ~Ipv4ListRoutingHelper () override; /** * \brief Construct an Ipv4ListRoutingHelper from another previously @@ -64,7 +64,7 @@ public: * This method is mainly for internal use by the other helpers; * clients are expected to free the dynamic memory allocated by this method */ - Ipv4ListRoutingHelper* Copy () const; + Ipv4ListRoutingHelper* Copy () const override; /** * \param routing a routing helper @@ -83,7 +83,7 @@ public: * * This method will be called by ns3::InternetStackHelper::Install */ - virtual Ptr Create (Ptr node) const; + Ptr Create (Ptr node) const override; private: /** * \brief Container for pairs of Ipv4RoutingHelper pointer / priority. diff --git a/src/internet/helper/ipv4-static-routing-helper.h b/src/internet/helper/ipv4-static-routing-helper.h index 2e447856b..399d49d3e 100644 --- a/src/internet/helper/ipv4-static-routing-helper.h +++ b/src/internet/helper/ipv4-static-routing-helper.h @@ -64,7 +64,7 @@ public: * This method is mainly for internal use by the other helpers; * clients are expected to free the dynamic memory allocated by this method */ - Ipv4StaticRoutingHelper* Copy () const; + Ipv4StaticRoutingHelper* Copy () const override; /** * \param node the node on which the routing protocol will run @@ -72,7 +72,7 @@ public: * * This method will be called by ns3::InternetStackHelper::Install */ - virtual Ptr Create (Ptr node) const; + Ptr Create (Ptr node) const override; /** * Try and find the static routing protocol as either the main routing diff --git a/src/internet/helper/ipv6-list-routing-helper.h b/src/internet/helper/ipv6-list-routing-helper.h index 30304263d..0fc1f243b 100644 --- a/src/internet/helper/ipv6-list-routing-helper.h +++ b/src/internet/helper/ipv6-list-routing-helper.h @@ -48,7 +48,7 @@ public: /** * \brief Destroy an Ipv6 Ipv6ListRoutingHelper. */ - virtual ~Ipv6ListRoutingHelper (); + ~Ipv6ListRoutingHelper () override; /** * \brief Construct an Ipv6ListRoutingHelper from another previously @@ -66,7 +66,7 @@ public: * This method is mainly for internal use by the other helpers; * clients are expected to free the dynamic memory allocated by this method */ - Ipv6ListRoutingHelper* Copy () const; + Ipv6ListRoutingHelper* Copy () const override; /** * \param routing a routing helper @@ -85,7 +85,7 @@ public: * * This method will be called by ns3::InternetStackHelper::Install */ - virtual Ptr Create (Ptr node) const; + Ptr Create (Ptr node) const override; private: /** * \brief Container for pairs of Ipv6RoutingHelper pointer / priority. diff --git a/src/internet/helper/ipv6-static-routing-helper.h b/src/internet/helper/ipv6-static-routing-helper.h index 836b9505a..c9ed387af 100644 --- a/src/internet/helper/ipv6-static-routing-helper.h +++ b/src/internet/helper/ipv6-static-routing-helper.h @@ -64,7 +64,7 @@ public: * This method is mainly for internal use by the other helpers; * clients are expected to free the dynamic memory allocated by this method */ - Ipv6StaticRoutingHelper* Copy () const; + Ipv6StaticRoutingHelper* Copy () const override; /** * \param node the node on which the routing protocol will run @@ -72,7 +72,7 @@ public: * * This method will be called by ns3::InternetStackHelper::Install */ - virtual Ptr Create (Ptr node) const; + Ptr Create (Ptr node) const override; /** * \brief Get Ipv6StaticRouting pointer from IPv6 stack. diff --git a/src/internet/helper/rip-helper.h b/src/internet/helper/rip-helper.h index 19cea3945..8b5224125 100644 --- a/src/internet/helper/rip-helper.h +++ b/src/internet/helper/rip-helper.h @@ -53,7 +53,7 @@ public: */ RipHelper (const RipHelper &o); - virtual ~RipHelper (); + ~RipHelper () override; // Delete assignment operator to avoid misuse RipHelper &operator= (const RipHelper &) = delete; @@ -64,7 +64,7 @@ public: * This method is mainly for internal use by the other helpers; * clients are expected to free the dynamic memory allocated by this method */ - RipHelper* Copy () const; + RipHelper* Copy () const override; /** * \param node the node on which the routing protocol will run @@ -72,7 +72,7 @@ public: * * This method will be called by ns3::InternetStackHelper::Install */ - virtual Ptr Create (Ptr node) const; + Ptr Create (Ptr node) const override; /** * \param name the name of the attribute to set diff --git a/src/internet/helper/ripng-helper.h b/src/internet/helper/ripng-helper.h index 539a36eae..c7d72766f 100644 --- a/src/internet/helper/ripng-helper.h +++ b/src/internet/helper/ripng-helper.h @@ -53,7 +53,7 @@ public: */ RipNgHelper (const RipNgHelper &o); - virtual ~RipNgHelper (); + ~RipNgHelper () override; // Delete assignment operator to avoid misuse RipNgHelper &operator= (const RipNgHelper &) = delete; @@ -64,7 +64,7 @@ public: * This method is mainly for internal use by the other helpers; * clients are expected to free the dynamic memory allocated by this method */ - RipNgHelper* Copy () const; + RipNgHelper* Copy () const override; /** * \param node the node on which the routing protocol will run @@ -72,7 +72,7 @@ public: * * This method will be called by ns3::InternetStackHelper::Install */ - virtual Ptr Create (Ptr node) const; + Ptr Create (Ptr node) const override; /** * \param name the name of the attribute to set diff --git a/src/internet/model/arp-cache.h b/src/internet/model/arp-cache.h index 19c6199da..9427375e7 100644 --- a/src/internet/model/arp-cache.h +++ b/src/internet/model/arp-cache.h @@ -59,7 +59,7 @@ public: class Entry; ArpCache (); - ~ArpCache (); + ~ArpCache () override; // Delete copy constructor and assignment operator to avoid misuse ArpCache (ArpCache const &) = delete; @@ -326,7 +326,7 @@ private: */ typedef std::map::iterator CacheI; - virtual void DoDispose (); + void DoDispose () override; Ptr m_device; //!< NetDevice associated with the cache Ptr m_interface; //!< Ipv4Interface associated with the cache diff --git a/src/internet/model/arp-header.h b/src/internet/model/arp-header.h index 3dda60e97..003e4b6ec 100644 --- a/src/internet/model/arp-header.h +++ b/src/internet/model/arp-header.h @@ -98,11 +98,11 @@ public: * \return the object TypeId */ static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId () const; - virtual void Print (std::ostream &os) const; - virtual uint32_t GetSerializedSize () const; - virtual void Serialize (Buffer::Iterator start) const; - virtual uint32_t Deserialize (Buffer::Iterator start); + TypeId GetInstanceTypeId () const override; + void Print (std::ostream &os) const override; + uint32_t GetSerializedSize () const override; + void Serialize (Buffer::Iterator start) const override; + uint32_t Deserialize (Buffer::Iterator start) override; /** * \brief Enumeration listing the possible ARP types diff --git a/src/internet/model/arp-l3-protocol.h b/src/internet/model/arp-l3-protocol.h index 4afce3b54..564393af3 100644 --- a/src/internet/model/arp-l3-protocol.h +++ b/src/internet/model/arp-l3-protocol.h @@ -61,7 +61,7 @@ public: static const uint16_t PROT_NUMBER; //!< ARP protocol number (0x0806) ArpL3Protocol (); - virtual ~ArpL3Protocol (); + ~ArpL3Protocol () override; // Delete copy constructor and assignment operator to avoid misuse ArpL3Protocol (const ArpL3Protocol &) = delete; @@ -124,12 +124,12 @@ public: int64_t AssignStreams (int64_t stream); protected: - virtual void DoDispose (); + void DoDispose () override; /* * This function will notify other components connected to the node that a new stack member is now connected * This will be used to notify Layer 3 protocol of layer 4 protocol stack to connect them together. */ - virtual void NotifyNewAggregate (); + void NotifyNewAggregate () override; private: typedef std::list > CacheList; //!< container of the ARP caches diff --git a/src/internet/model/arp-queue-disc-item.h b/src/internet/model/arp-queue-disc-item.h index c2526b685..4ee767c0f 100644 --- a/src/internet/model/arp-queue-disc-item.h +++ b/src/internet/model/arp-queue-disc-item.h @@ -45,7 +45,7 @@ public: ArpQueueDiscItem (Ptr p, const Address & addr, uint16_t protocol, const ArpHeader & header); /** Destructor. */ - virtual ~ArpQueueDiscItem (); + ~ArpQueueDiscItem () override; // Delete default constructor, copy constructor and assignment operator to avoid misuse ArpQueueDiscItem () = delete; @@ -55,7 +55,7 @@ public: /** * \return the correct packet size (header plus payload). */ - virtual uint32_t GetSize () const; + uint32_t GetSize () const override; /** * \return the header stored in this item.. @@ -65,19 +65,19 @@ public: /** * \brief Add the header to the packet */ - virtual void AddHeader (); + void AddHeader () override; /** * \brief Print the item contents. * \param os output stream in which the data should be printed. */ - virtual void Print (std::ostream &os) const; + void Print (std::ostream &os) const override; /** * \brief Inherited from the base class, but we cannot mark ARP packets * \return false */ - virtual bool Mark (); + bool Mark () override; /** * \brief Computes the hash of the packet's 5-tuple @@ -85,7 +85,7 @@ public: * \param perturbation hash perturbation value * \return the hash of the packet's 5-tuple */ - virtual uint32_t Hash (uint32_t perturbation) const; + uint32_t Hash (uint32_t perturbation) const override; private: ArpHeader m_header; //!< The ARP header. diff --git a/src/internet/model/global-router-interface.h b/src/internet/model/global-router-interface.h index 2b756ffa2..ece66bc58 100644 --- a/src/internet/model/global-router-interface.h +++ b/src/internet/model/global-router-interface.h @@ -732,7 +732,7 @@ public: bool WithdrawRoute (Ipv4Address network, Ipv4Mask networkMask); private: - virtual ~GlobalRouter (); + ~GlobalRouter () override; /** * \brief Clear list of LSAs @@ -881,7 +881,7 @@ private: void MarkBridgeAsVisited (Ptr device) const; // inherited from Object - virtual void DoDispose (); + void DoDispose () override; }; } // namespace ns3 diff --git a/src/internet/model/icmpv4-l4-protocol.h b/src/internet/model/icmpv4-l4-protocol.h index 0e11fcae0..cd5718d72 100644 --- a/src/internet/model/icmpv4-l4-protocol.h +++ b/src/internet/model/icmpv4-l4-protocol.h @@ -53,7 +53,7 @@ public: static const uint8_t PROT_NUMBER; //!< ICMP protocol number (0x1) Icmpv4L4Protocol (); - virtual ~Icmpv4L4Protocol (); + ~Icmpv4L4Protocol () override; /** * \brief Set the node the protocol is associated with. @@ -71,7 +71,7 @@ public: * Get the protocol number * \returns the protocol number */ - virtual int GetProtocolNumber () const; + int GetProtocolNumber () const override; /** * \brief Receive method. @@ -80,9 +80,9 @@ public: * \param incomingInterface the interface from which the packet is coming * \returns the receive status */ - virtual enum IpL4Protocol::RxStatus Receive (Ptr p, + enum IpL4Protocol::RxStatus Receive (Ptr p, Ipv4Header const &header, - Ptr incomingInterface); + Ptr incomingInterface) override; /** * \brief Receive method. @@ -91,9 +91,9 @@ public: * \param incomingInterface the interface from which the packet is coming * \returns the receive status */ - virtual enum IpL4Protocol::RxStatus Receive (Ptr p, + enum IpL4Protocol::RxStatus Receive (Ptr p, Ipv6Header const &header, - Ptr incomingInterface); + Ptr incomingInterface) override; /** * \brief Send a Destination Unreachable - Fragmentation needed ICMP error @@ -119,17 +119,17 @@ public: void SendDestUnreachPort (Ipv4Header header, Ptr orgData); // From IpL4Protocol - virtual void SetDownTarget (IpL4Protocol::DownTargetCallback cb); - virtual void SetDownTarget6 (IpL4Protocol::DownTargetCallback6 cb); + void SetDownTarget (IpL4Protocol::DownTargetCallback cb) override; + void SetDownTarget6 (IpL4Protocol::DownTargetCallback6 cb) override; // From IpL4Protocol - virtual IpL4Protocol::DownTargetCallback GetDownTarget () const; - virtual IpL4Protocol::DownTargetCallback6 GetDownTarget6 () const; + IpL4Protocol::DownTargetCallback GetDownTarget () const override; + IpL4Protocol::DownTargetCallback6 GetDownTarget6 () const override; protected: /* * This function will notify other components connected to the node that a new stack member is now connected * This will be used to notify Layer 3 protocol of layer 4 protocol stack to connect them together. */ - virtual void NotifyNewAggregate (); + void NotifyNewAggregate () override; private: /** * \brief Handles an incoming ICMP Echo packet @@ -207,7 +207,7 @@ private: uint32_t info, Ipv4Header ipHeader, const uint8_t payload[8]); - virtual void DoDispose (); + void DoDispose () override; Ptr m_node; //!< the node this protocol is associated with IpL4Protocol::DownTargetCallback m_downTarget; //!< callback to Ipv4::Send diff --git a/src/internet/model/icmpv4.h b/src/internet/model/icmpv4.h index e2c51613c..f5996f3fb 100644 --- a/src/internet/model/icmpv4.h +++ b/src/internet/model/icmpv4.h @@ -85,13 +85,13 @@ public: */ static TypeId GetTypeId (); Icmpv4Header (); - virtual ~Icmpv4Header (); + ~Icmpv4Header () override; - virtual TypeId GetInstanceTypeId () const; - virtual uint32_t GetSerializedSize () const; - virtual void Serialize (Buffer::Iterator start) const; - virtual uint32_t Deserialize (Buffer::Iterator start); - virtual void Print (std::ostream &os) const; + TypeId GetInstanceTypeId () const override; + uint32_t GetSerializedSize () const override; + void Serialize (Buffer::Iterator start) const override; + uint32_t Deserialize (Buffer::Iterator start) override; + void Print (std::ostream &os) const override; private: uint8_t m_type; //!< ICMP type @@ -151,12 +151,12 @@ public: */ static TypeId GetTypeId (); Icmpv4Echo (); - virtual ~Icmpv4Echo (); - virtual TypeId GetInstanceTypeId () const; - virtual uint32_t GetSerializedSize () const; - virtual void Serialize (Buffer::Iterator start) const; - virtual uint32_t Deserialize (Buffer::Iterator start); - virtual void Print (std::ostream &os) const; + ~Icmpv4Echo () override; + TypeId GetInstanceTypeId () const override; + uint32_t GetSerializedSize () const override; + void Serialize (Buffer::Iterator start) const override; + uint32_t Deserialize (Buffer::Iterator start) override; + void Print (std::ostream &os) const override; private: uint16_t m_identifier; //!< identifier uint16_t m_sequence; //!< sequence number @@ -190,7 +190,7 @@ public: */ static TypeId GetTypeId (); Icmpv4DestinationUnreachable (); - virtual ~Icmpv4DestinationUnreachable (); + ~Icmpv4DestinationUnreachable () override; /** * \brief Set the next hop MTU @@ -226,11 +226,11 @@ public: Ipv4Header GetHeader () const; private: - virtual TypeId GetInstanceTypeId () const; - virtual uint32_t GetSerializedSize () const; - virtual void Serialize (Buffer::Iterator start) const; - virtual uint32_t Deserialize (Buffer::Iterator start); - virtual void Print (std::ostream &os) const; + TypeId GetInstanceTypeId () const override; + uint32_t GetSerializedSize () const override; + void Serialize (Buffer::Iterator start) const override; + uint32_t Deserialize (Buffer::Iterator start) override; + void Print (std::ostream &os) const override; private: uint16_t m_nextHopMtu; //!< next hop MTU Ipv4Header m_header; //!< carried IPv4 header @@ -283,12 +283,12 @@ public: */ static TypeId GetTypeId (); Icmpv4TimeExceeded (); - virtual ~Icmpv4TimeExceeded (); - virtual TypeId GetInstanceTypeId () const; - virtual uint32_t GetSerializedSize () const; - virtual void Serialize (Buffer::Iterator start) const; - virtual uint32_t Deserialize (Buffer::Iterator start); - virtual void Print (std::ostream &os) const; + ~Icmpv4TimeExceeded () override; + TypeId GetInstanceTypeId () const override; + uint32_t GetSerializedSize () const override; + void Serialize (Buffer::Iterator start) const override; + uint32_t Deserialize (Buffer::Iterator start) override; + void Print (std::ostream &os) const override; private: Ipv4Header m_header; //!< carried IPv4 header diff --git a/src/internet/model/icmpv6-header.h b/src/internet/model/icmpv6-header.h index 2b7d11863..d4172d051 100644 --- a/src/internet/model/icmpv6-header.h +++ b/src/internet/model/icmpv6-header.h @@ -124,7 +124,7 @@ public: * \brief Get the instance type ID. * \return instance type ID */ - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * \brief Constructor. @@ -134,7 +134,7 @@ public: /** * \brief Destructor. */ - virtual ~Icmpv6Header (); + ~Icmpv6Header () override; /** * \brief Get the type field. @@ -176,26 +176,26 @@ public: * \brief Print information. * \param os output stream */ - virtual void Print (std::ostream& os) const; + void Print (std::ostream& os) const override; /** * \brief Get the serialized size. * \return serialized size */ - virtual uint32_t GetSerializedSize () const; + uint32_t GetSerializedSize () const override; /** * \brief Serialize the packet. * \param start start offset */ - virtual void Serialize (Buffer::Iterator start) const; + void Serialize (Buffer::Iterator start) const override; /** * \brief Deserialize the packet. * \param start start offset * \return length of packet */ - virtual uint32_t Deserialize (Buffer::Iterator start); + uint32_t Deserialize (Buffer::Iterator start) override; /** * \brief Calculate pseudo header checksum for IPv6. @@ -248,7 +248,7 @@ public: * \brief Get the instance type ID. * \return instance type ID */ - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * \brief Constructor. @@ -258,7 +258,7 @@ public: /** * \brief Destructor. */ - virtual ~Icmpv6OptionHeader (); + ~Icmpv6OptionHeader () override; /** * \brief Get the type of the option. @@ -288,26 +288,26 @@ public: * \brief Print information. * \param os output stream */ - virtual void Print (std::ostream& os) const; + void Print (std::ostream& os) const override; /** * \brief Get the serialized size. * \return serialized size */ - virtual uint32_t GetSerializedSize () const; + uint32_t GetSerializedSize () const override; /** * \brief Serialize the packet. * \param start start offset */ - virtual void Serialize (Buffer::Iterator start) const; + void Serialize (Buffer::Iterator start) const override; /** * \brief Deserialize the packet. * \param start start offset * \return length of packet */ - virtual uint32_t Deserialize (Buffer::Iterator start); + uint32_t Deserialize (Buffer::Iterator start) override; private: /** @@ -343,7 +343,7 @@ public: /** * \brief Destructor. */ - virtual ~Icmpv6NS (); + ~Icmpv6NS () override; /** * \brief Get the UID of this class. @@ -355,7 +355,7 @@ public: * \brief Get the instance type ID. * \return instance type ID */ - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * \brief Get the reserved field. @@ -385,26 +385,26 @@ public: * \brief Print information. * \param os output stream */ - virtual void Print (std::ostream& os) const; + void Print (std::ostream& os) const override; /** * \brief Get the serialized size. * \return serialized size */ - virtual uint32_t GetSerializedSize () const; + uint32_t GetSerializedSize () const override; /** * \brief Serialize the packet. * \param start start offset */ - virtual void Serialize (Buffer::Iterator start) const; + void Serialize (Buffer::Iterator start) const override; /** * \brief Deserialize the packet. * \param start start offset * \return length of packet */ - virtual uint32_t Deserialize (Buffer::Iterator start); + uint32_t Deserialize (Buffer::Iterator start) override; private: @@ -435,7 +435,7 @@ public: /** * \brief Destructor. */ - virtual ~Icmpv6NA (); + ~Icmpv6NA () override; /** * \brief Get the UID of this class. @@ -447,7 +447,7 @@ public: * \brief Get the instance type ID. * \return instance type ID */ - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * \brief Get the reserved field. @@ -513,26 +513,26 @@ public: * \brief Print information. * \param os output stream */ - virtual void Print (std::ostream& os) const; + void Print (std::ostream& os) const override; /** * \brief Get the serialized size. * \return serialized size */ - virtual uint32_t GetSerializedSize () const; + uint32_t GetSerializedSize () const override; /** * \brief Serialize the packet. * \param start start offset */ - virtual void Serialize (Buffer::Iterator start) const; + void Serialize (Buffer::Iterator start) const override; /** * \brief Deserialize the packet. * \param start start offset * \return length of packet */ - virtual uint32_t Deserialize (Buffer::Iterator start); + uint32_t Deserialize (Buffer::Iterator start) override; private: /** @@ -577,7 +577,7 @@ public: /** * \brief Destructor. */ - virtual ~Icmpv6RA (); + ~Icmpv6RA () override; /** * \brief Get the UID of this class. @@ -589,7 +589,7 @@ public: * \brief Get the instance type ID. * \return instance type ID */ - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * \brief Set the IPv6 maximum number of jumps. @@ -679,7 +679,7 @@ public: * \brief Print information. * \param os output stream */ - virtual void Print (std::ostream& os) const; + void Print (std::ostream& os) const override; /** * \brief Getflags. @@ -699,20 +699,20 @@ public: * \brief Get the serialized size. * \return serialized size */ - virtual uint32_t GetSerializedSize () const; + uint32_t GetSerializedSize () const override; /** * \brief Serialize the packet. * \param start start offset */ - virtual void Serialize (Buffer::Iterator start) const; + void Serialize (Buffer::Iterator start) const override; /** * \brief Deserialize the packet. * \param start start offset * \return length of packet */ - virtual uint32_t Deserialize (Buffer::Iterator start); + uint32_t Deserialize (Buffer::Iterator start) override; private: /** @@ -767,7 +767,7 @@ public: /** * \brief Destructor. */ - virtual ~Icmpv6RS (); + ~Icmpv6RS () override; /** * \brief Get the UID of this class. @@ -779,7 +779,7 @@ public: * \brief Get the instance type ID. * \return instance type ID */ - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * \brief Get the reserved field. @@ -797,26 +797,26 @@ public: * \brief Print information. * \param os output stream */ - virtual void Print (std::ostream& os) const; + void Print (std::ostream& os) const override; /** * \brief Get the serialized size. * \return serialized size */ - virtual uint32_t GetSerializedSize () const; + uint32_t GetSerializedSize () const override; /** * \brief Serialize the packet. * \param start start offset */ - virtual void Serialize (Buffer::Iterator start) const; + void Serialize (Buffer::Iterator start) const override; /** * \brief Deserialize the packet. * \param start start offset * \return length of packet */ - virtual uint32_t Deserialize (Buffer::Iterator start); + uint32_t Deserialize (Buffer::Iterator start) override; private: /** @@ -841,7 +841,7 @@ public: /** * \brief Destructor. */ - virtual ~Icmpv6Redirection (); + ~Icmpv6Redirection () override; /** * \brief Get the UID of this class. @@ -853,7 +853,7 @@ public: * \brief Get the instance type ID. * \return instance type ID */ - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * \brief Get the IPv6 target address. @@ -883,26 +883,26 @@ public: * \brief Print information. * \param os output stream */ - virtual void Print (std::ostream& os) const; + void Print (std::ostream& os) const override; /** * \brief Get the serialized size. * \return serialized size */ - virtual uint32_t GetSerializedSize () const; + uint32_t GetSerializedSize () const override; /** * \brief Serialize the packet. * \param start start offset */ - virtual void Serialize (Buffer::Iterator start) const; + void Serialize (Buffer::Iterator start) const override; /** * \brief Deserialize the packet. * \param start start offset * \return length of packet */ - virtual uint32_t Deserialize (Buffer::Iterator start); + uint32_t Deserialize (Buffer::Iterator start) override; /** * \brief Get the reserved field. @@ -951,7 +951,7 @@ public: * \brief Get the instance type ID. * \return instance type ID */ - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * \brief Default constructor. @@ -967,7 +967,7 @@ public: /** * \brief Destructor. */ - virtual ~Icmpv6Echo (); + ~Icmpv6Echo () override; /** * \brief Get the ID of the packet. @@ -997,26 +997,26 @@ public: * \brief Print information. * \param os output stream */ - virtual void Print (std::ostream& os) const; + void Print (std::ostream& os) const override; /** * \brief Get the serialized size. * \return serialized size */ - virtual uint32_t GetSerializedSize () const; + uint32_t GetSerializedSize () const override; /** * \brief Serialize the packet. * \param start start offset */ - virtual void Serialize (Buffer::Iterator start) const; + void Serialize (Buffer::Iterator start) const override; /** * \brief Deserialize the packet. * \param start start offset * \return length of packet */ - virtual uint32_t Deserialize (Buffer::Iterator start); + uint32_t Deserialize (Buffer::Iterator start) override; private: /** @@ -1046,7 +1046,7 @@ public: /** * \brief Destructor. */ - virtual ~Icmpv6DestinationUnreachable (); + ~Icmpv6DestinationUnreachable () override; /** * \brief Get the UID of this class. @@ -1058,7 +1058,7 @@ public: * \brief Get the instance type ID. * \return instance type ID */ - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * \brief Set the incorrect packet. @@ -1070,26 +1070,26 @@ public: * \brief Print information. * \param os output stream */ - virtual void Print (std::ostream& os) const; + void Print (std::ostream& os) const override; /** * \brief Get the serialized size. * \return serialized size */ - virtual uint32_t GetSerializedSize () const; + uint32_t GetSerializedSize () const override; /** * \brief Serialize the packet. * \param start start offset */ - virtual void Serialize (Buffer::Iterator start) const; + void Serialize (Buffer::Iterator start) const override; /** * \brief Deserialize the packet. * \param start start offset * \return length of packet */ - virtual uint32_t Deserialize (Buffer::Iterator start); + uint32_t Deserialize (Buffer::Iterator start) override; private: /** @@ -1114,7 +1114,7 @@ public: /** * \brief Destructor. */ - virtual ~Icmpv6TooBig (); + ~Icmpv6TooBig () override; /** * \brief Get the UID of this class. @@ -1126,7 +1126,7 @@ public: * \brief Get the instance type ID. * \return instance type ID */ - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * \brief Set the incorrect packet. @@ -1150,26 +1150,26 @@ public: * \brief Print information. * \param os output stream */ - virtual void Print (std::ostream& os) const; + void Print (std::ostream& os) const override; /** * \brief Get the serialized size. * \return serialized size */ - virtual uint32_t GetSerializedSize () const; + uint32_t GetSerializedSize () const override; /** * \brief Serialize the packet. * \param start start offset */ - virtual void Serialize (Buffer::Iterator start) const; + void Serialize (Buffer::Iterator start) const override; /** * \brief Deserialize the packet. * \param start start offset * \return length of packet */ - virtual uint32_t Deserialize (Buffer::Iterator start); + uint32_t Deserialize (Buffer::Iterator start) override; private: @@ -1200,7 +1200,7 @@ public: /** * \brief Destructor. */ - virtual ~Icmpv6TimeExceeded (); + ~Icmpv6TimeExceeded () override; /** * \brief Get the UID of this class. @@ -1212,7 +1212,7 @@ public: * \brief Get the instance type ID. * \return instance type ID */ - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * \brief Set the incorrect packet. @@ -1224,26 +1224,26 @@ public: * \brief Print information. * \param os output stream */ - virtual void Print (std::ostream& os) const; + void Print (std::ostream& os) const override; /** * \brief Get the serialized size. * \return serialized size */ - virtual uint32_t GetSerializedSize () const; + uint32_t GetSerializedSize () const override; /** * \brief Serialize the packet. * \param start start offset */ - virtual void Serialize (Buffer::Iterator start) const; + void Serialize (Buffer::Iterator start) const override; /** * \brief Deserialize the packet. * \param start start offset * \return length of packet */ - virtual uint32_t Deserialize (Buffer::Iterator start); + uint32_t Deserialize (Buffer::Iterator start) override; private: @@ -1269,7 +1269,7 @@ public: /** * \brief Destructor. */ - virtual ~Icmpv6ParameterError (); + ~Icmpv6ParameterError () override; /** * \brief Get the UID of this class. @@ -1281,7 +1281,7 @@ public: * \brief Get the instance type ID. * \return instance type ID */ - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * \brief Set the incorrect packet. @@ -1305,26 +1305,26 @@ public: * \brief Print information. * \param os output stream */ - virtual void Print (std::ostream& os) const; + void Print (std::ostream& os) const override; /** * \brief Get the serialized size. * \return serialized size */ - virtual uint32_t GetSerializedSize () const; + uint32_t GetSerializedSize () const override; /** * \brief Serialize the packet. * \param start start offset */ - virtual void Serialize (Buffer::Iterator start) const; + void Serialize (Buffer::Iterator start) const override; /** * \brief Deserialize the packet. * \param start start offset * \return length of packet */ - virtual uint32_t Deserialize (Buffer::Iterator start); + uint32_t Deserialize (Buffer::Iterator start) override; private: @@ -1361,7 +1361,7 @@ public: /** * \brief Destructor. */ - virtual ~Icmpv6OptionMtu (); + ~Icmpv6OptionMtu () override; /** * \brief Get the UID of this class. @@ -1373,7 +1373,7 @@ public: * \brief Get the instance type ID. * \return instance type ID */ - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * \brief Get the reserved field. @@ -1403,26 +1403,26 @@ public: * \brief Print information. * \param os output stream */ - virtual void Print (std::ostream& os) const; + void Print (std::ostream& os) const override; /** * \brief Get the serialized size. * \return serialized size */ - virtual uint32_t GetSerializedSize () const; + uint32_t GetSerializedSize () const override; /** * \brief Serialize the packet. * \param start start offset */ - virtual void Serialize (Buffer::Iterator start) const; + void Serialize (Buffer::Iterator start) const override; /** * \brief Deserialize the packet. * \param start start offset * \return length of packet */ - virtual uint32_t Deserialize (Buffer::Iterator start); + uint32_t Deserialize (Buffer::Iterator start) override; private: /** @@ -1459,7 +1459,7 @@ public: /** * \brief Destructor. */ - virtual ~Icmpv6OptionPrefixInformation (); + ~Icmpv6OptionPrefixInformation () override; /** * \brief Get the UID of this class. @@ -1471,7 +1471,7 @@ public: * \brief Get the instance type ID. * \return instance type ID */ - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * \brief Icmpv6 Option Prefix Information flag field values @@ -1560,26 +1560,26 @@ public: * \brief Print information. * \param os output stream */ - virtual void Print (std::ostream& os) const; + void Print (std::ostream& os) const override; /** * \brief Get the serialized size. * \return serialized size */ - virtual uint32_t GetSerializedSize () const; + uint32_t GetSerializedSize () const override; /** * \brief Serialize the packet. * \param start start offset */ - virtual void Serialize (Buffer::Iterator start) const; + void Serialize (Buffer::Iterator start) const override; /** * \brief Deserialize the packet. * \param start start offset * \return length of packet */ - virtual uint32_t Deserialize (Buffer::Iterator start); + uint32_t Deserialize (Buffer::Iterator start) override; private: /** @@ -1637,7 +1637,7 @@ public: * \brief Get the instance type ID. * \return instance type ID */ - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * \brief Constructor. @@ -1654,7 +1654,7 @@ public: /** * \brief Destructor. */ - virtual ~Icmpv6OptionLinkLayerAddress (); + ~Icmpv6OptionLinkLayerAddress () override; /** * \brief Get the hardware address. @@ -1672,26 +1672,26 @@ public: * \brief Print information. * \param os output stream */ - virtual void Print (std::ostream& os) const; + void Print (std::ostream& os) const override; /** * \brief Get the serialized size. * \return serialized size */ - virtual uint32_t GetSerializedSize () const; + uint32_t GetSerializedSize () const override; /** * \brief Serialize the packet. * \param start start offset */ - virtual void Serialize (Buffer::Iterator start) const; + void Serialize (Buffer::Iterator start) const override; /** * \brief Deserialize the packet. * \param start start offset * \return length of packet */ - virtual uint32_t Deserialize (Buffer::Iterator start); + uint32_t Deserialize (Buffer::Iterator start) override; private: /** @@ -1718,7 +1718,7 @@ public: * \brief Get the instance type ID. * \return instance type ID */ - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * \brief Constructor. @@ -1728,7 +1728,7 @@ public: /** * \brief Destructor. */ - virtual ~Icmpv6OptionRedirected (); + ~Icmpv6OptionRedirected () override; /** * \brief Set the redirected packet. @@ -1740,26 +1740,26 @@ public: * \brief Print information. * \param os output stream */ - virtual void Print (std::ostream& os) const; + void Print (std::ostream& os) const override; /** * \brief Get the serialized size. * \return serialized size */ - virtual uint32_t GetSerializedSize () const; + uint32_t GetSerializedSize () const override; /** * \brief Serialize the packet. * \param start start offset */ - virtual void Serialize (Buffer::Iterator start) const; + void Serialize (Buffer::Iterator start) const override; /** * \brief Deserialize the packet. * \param start start offset * \return length of packet */ - virtual uint32_t Deserialize (Buffer::Iterator start); + uint32_t Deserialize (Buffer::Iterator start) override; private: /** diff --git a/src/internet/model/icmpv6-l4-protocol.h b/src/internet/model/icmpv6-l4-protocol.h index 6b25454da..69fdc8075 100644 --- a/src/internet/model/icmpv6-l4-protocol.h +++ b/src/internet/model/icmpv6-l4-protocol.h @@ -57,7 +57,7 @@ public: * \return the object TypeId */ static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * \brief ICMPv6 protocol number (58). @@ -108,7 +108,7 @@ public: /** * \brief Destructor. */ - virtual ~Icmpv6L4Protocol (); + ~Icmpv6L4Protocol () override; /** * \brief Set the node. @@ -127,13 +127,13 @@ public: * by setting the node in the ICMPv6 stack and adding ICMPv6 factory to * IPv6 stack connected to the node. */ - virtual void NotifyNewAggregate (); + void NotifyNewAggregate () override; /** * \brief Get the protocol number. * \return protocol number */ - virtual int GetProtocolNumber () const; + int GetProtocolNumber () const override; /** * \brief Get the version of the protocol. @@ -299,9 +299,9 @@ public: * \param interface the interface from which the packet is coming * \returns the receive status */ - virtual enum IpL4Protocol::RxStatus Receive (Ptr p, + enum IpL4Protocol::RxStatus Receive (Ptr p, Ipv4Header const &header, - Ptr interface); + Ptr interface) override; /** * \brief Receive method. @@ -310,9 +310,9 @@ public: * \param interface the interface from which the packet is coming * \returns the receive status */ - virtual enum IpL4Protocol::RxStatus Receive (Ptr p, + enum IpL4Protocol::RxStatus Receive (Ptr p, Ipv6Header const &header, - Ptr interface); + Ptr interface) override; /** * \brief Function called when DAD timeout. @@ -390,7 +390,7 @@ protected: /** * \brief Dispose this object. */ - virtual void DoDispose (); + void DoDispose () override; typedef std::list > CacheList; //!< container of NdiscCaches @@ -521,11 +521,11 @@ protected: Ptr FindCache (Ptr device); // From IpL4Protocol - virtual void SetDownTarget (IpL4Protocol::DownTargetCallback cb); - virtual void SetDownTarget6 (IpL4Protocol::DownTargetCallback6 cb); + void SetDownTarget (IpL4Protocol::DownTargetCallback cb) override; + void SetDownTarget6 (IpL4Protocol::DownTargetCallback6 cb) override; // From IpL4Protocol - virtual IpL4Protocol::DownTargetCallback GetDownTarget () const; - virtual IpL4Protocol::DownTargetCallback6 GetDownTarget6 () const; + IpL4Protocol::DownTargetCallback GetDownTarget () const override; + IpL4Protocol::DownTargetCallback6 GetDownTarget6 () const override; /** * \brief Always do DAD ? diff --git a/src/internet/model/ip-l4-protocol.h b/src/internet/model/ip-l4-protocol.h index 72da92fcc..1b296834c 100644 --- a/src/internet/model/ip-l4-protocol.h +++ b/src/internet/model/ip-l4-protocol.h @@ -66,7 +66,7 @@ public: */ static TypeId GetTypeId (); - virtual ~IpL4Protocol (); + ~IpL4Protocol () override; /** * \brief Returns the protocol number of this protocol. diff --git a/src/internet/model/ipv4-global-routing.h b/src/internet/model/ipv4-global-routing.h index 4fac96099..8ad95e909 100644 --- a/src/internet/model/ipv4-global-routing.h +++ b/src/internet/model/ipv4-global-routing.h @@ -85,20 +85,20 @@ public: * \see Ipv4GlobalRouting */ Ipv4GlobalRouting (); - virtual ~Ipv4GlobalRouting (); + ~Ipv4GlobalRouting () override; // These methods inherited from base class - virtual Ptr RouteOutput (Ptr p, const Ipv4Header &header, Ptr oif, Socket::SocketErrno &sockerr); + Ptr RouteOutput (Ptr p, const Ipv4Header &header, Ptr oif, Socket::SocketErrno &sockerr) override; - virtual bool RouteInput (Ptr p, const Ipv4Header &header, Ptr idev, + bool RouteInput (Ptr p, const Ipv4Header &header, Ptr idev, UnicastForwardCallback ucb, MulticastForwardCallback mcb, - LocalDeliverCallback lcb, ErrorCallback ecb); - virtual void NotifyInterfaceUp (uint32_t interface); - virtual void NotifyInterfaceDown (uint32_t interface); - virtual void NotifyAddAddress (uint32_t interface, Ipv4InterfaceAddress address); - virtual void NotifyRemoveAddress (uint32_t interface, Ipv4InterfaceAddress address); - virtual void SetIpv4 (Ptr ipv4); - virtual void PrintRoutingTable (Ptr stream, Time::Unit unit = Time::S) const; + LocalDeliverCallback lcb, ErrorCallback ecb) override; + void NotifyInterfaceUp (uint32_t interface) override; + void NotifyInterfaceDown (uint32_t interface) override; + void NotifyAddAddress (uint32_t interface, Ipv4InterfaceAddress address) override; + void NotifyRemoveAddress (uint32_t interface, Ipv4InterfaceAddress address) override; + void SetIpv4 (Ptr ipv4) override; + void PrintRoutingTable (Ptr stream, Time::Unit unit = Time::S) const override; /** * \brief Add a host route to the global routing table. @@ -229,7 +229,7 @@ public: int64_t AssignStreams (int64_t stream); protected: - void DoDispose (); + void DoDispose () override; private: /// Set to true if packets are randomly routed among ECMP; set to false for using only one route consistently diff --git a/src/internet/model/ipv4-header.h b/src/internet/model/ipv4-header.h index 87dac98e0..b8a42062f 100644 --- a/src/internet/model/ipv4-header.h +++ b/src/internet/model/ipv4-header.h @@ -233,11 +233,11 @@ public: * \return the object TypeId */ static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId () const; - virtual void Print (std::ostream &os) const; - virtual uint32_t GetSerializedSize () const; - virtual void Serialize (Buffer::Iterator start) const; - virtual uint32_t Deserialize (Buffer::Iterator start); + TypeId GetInstanceTypeId () const override; + void Print (std::ostream &os) const override; + uint32_t GetSerializedSize () const override; + void Serialize (Buffer::Iterator start) const override; + uint32_t Deserialize (Buffer::Iterator start) override; private: /// flags related to IP fragmentation diff --git a/src/internet/model/ipv4-interface.h b/src/internet/model/ipv4-interface.h index 911105026..3158c0c04 100644 --- a/src/internet/model/ipv4-interface.h +++ b/src/internet/model/ipv4-interface.h @@ -60,7 +60,7 @@ public: static TypeId GetTypeId (); Ipv4Interface (); - virtual ~Ipv4Interface(); + ~Ipv4Interface() override; // Delete copy constructor and assignment operator to avoid misuse Ipv4Interface (const Ipv4Interface &) = delete; @@ -212,7 +212,7 @@ public: protected: - virtual void DoDispose (); + void DoDispose () override; private: /** diff --git a/src/internet/model/ipv4-l3-protocol.h b/src/internet/model/ipv4-l3-protocol.h index 1db9e355e..06928bb06 100644 --- a/src/internet/model/ipv4-l3-protocol.h +++ b/src/internet/model/ipv4-l3-protocol.h @@ -88,7 +88,7 @@ public: static const uint16_t PROT_NUMBER; //!< Protocol number (0x0800) Ipv4L3Protocol(); - virtual ~Ipv4L3Protocol (); + ~Ipv4L3Protocol () override; // Delete copy constructor and assignment operator to avoid misuse Ipv4L3Protocol (const Ipv4L3Protocol &) = delete; @@ -117,22 +117,22 @@ public: // functions defined in base class Ipv4 - void SetRoutingProtocol (Ptr routingProtocol); - Ptr GetRoutingProtocol () const; + void SetRoutingProtocol (Ptr routingProtocol) override; + Ptr GetRoutingProtocol () const override; - Ptr CreateRawSocket (); - void DeleteRawSocket (Ptr socket); + Ptr CreateRawSocket () override; + void DeleteRawSocket (Ptr socket) override; - virtual void Insert (Ptr protocol); - virtual void Insert (Ptr protocol, uint32_t interfaceIndex); + void Insert (Ptr protocol) override; + void Insert (Ptr protocol, uint32_t interfaceIndex) override; - virtual void Remove (Ptr protocol); - virtual void Remove (Ptr protocol, uint32_t interfaceIndex); + void Remove (Ptr protocol) override; + void Remove (Ptr protocol, uint32_t interfaceIndex) override; - virtual Ptr GetProtocol (int protocolNumber) const; - virtual Ptr GetProtocol (int protocolNumber, int32_t interfaceIndex) const; + Ptr GetProtocol (int protocolNumber) const override; + Ptr GetProtocol (int protocolNumber, int32_t interfaceIndex) const override; - virtual Ipv4Address SourceAddressSelection (uint32_t interface, Ipv4Address dest); + Ipv4Address SourceAddressSelection (uint32_t interface, Ipv4Address dest) override; /** * \param ttl default ttl to use @@ -169,7 +169,7 @@ public: * down the stack to the MAC and PHY layers. */ void Send (Ptr packet, Ipv4Address source, - Ipv4Address destination, uint8_t protocol, Ptr route); + Ipv4Address destination, uint8_t protocol, Ptr route) override; /** * \param packet packet to send * \param ipHeader IP Header @@ -178,41 +178,41 @@ public: * Higher-level layers call this method to send a packet with IPv4 Header * (Intend to be used with IpHeaderInclude attribute.) */ - void SendWithHeader (Ptr packet, Ipv4Header ipHeader, Ptr route); + void SendWithHeader (Ptr packet, Ipv4Header ipHeader, Ptr route) override; - uint32_t AddInterface (Ptr device); + uint32_t AddInterface (Ptr device) override; /** * \brief Get an interface. * \param i interface index * \return IPv4 interface pointer */ Ptr GetInterface (uint32_t i) const; - uint32_t GetNInterfaces () const; + uint32_t GetNInterfaces () const override; - int32_t GetInterfaceForAddress (Ipv4Address addr) const; - int32_t GetInterfaceForPrefix (Ipv4Address addr, Ipv4Mask mask) const; - int32_t GetInterfaceForDevice (Ptr device) const; - bool IsDestinationAddress (Ipv4Address address, uint32_t iif) const; + int32_t GetInterfaceForAddress (Ipv4Address addr) const override; + int32_t GetInterfaceForPrefix (Ipv4Address addr, Ipv4Mask mask) const override; + int32_t GetInterfaceForDevice (Ptr device) const override; + bool IsDestinationAddress (Ipv4Address address, uint32_t iif) const override; - bool AddAddress (uint32_t i, Ipv4InterfaceAddress address); - Ipv4InterfaceAddress GetAddress (uint32_t interfaceIndex, uint32_t addressIndex) const; - uint32_t GetNAddresses (uint32_t interface) const; - bool RemoveAddress (uint32_t interfaceIndex, uint32_t addressIndex); - bool RemoveAddress (uint32_t interface, Ipv4Address address); + bool AddAddress (uint32_t i, Ipv4InterfaceAddress address) override; + Ipv4InterfaceAddress GetAddress (uint32_t interfaceIndex, uint32_t addressIndex) const override; + uint32_t GetNAddresses (uint32_t interface) const override; + bool RemoveAddress (uint32_t interfaceIndex, uint32_t addressIndex) override; + bool RemoveAddress (uint32_t interface, Ipv4Address address) override; Ipv4Address SelectSourceAddress (Ptr device, - Ipv4Address dst, Ipv4InterfaceAddress::InterfaceAddressScope_e scope); + Ipv4Address dst, Ipv4InterfaceAddress::InterfaceAddressScope_e scope) override; - void SetMetric (uint32_t i, uint16_t metric); - uint16_t GetMetric (uint32_t i) const; - uint16_t GetMtu (uint32_t i) const; - bool IsUp (uint32_t i) const; - void SetUp (uint32_t i); - void SetDown (uint32_t i); - bool IsForwarding (uint32_t i) const; - void SetForwarding (uint32_t i, bool val); + void SetMetric (uint32_t i, uint16_t metric) override; + uint16_t GetMetric (uint32_t i) const override; + uint16_t GetMtu (uint32_t i) const override; + bool IsUp (uint32_t i) const override; + void SetUp (uint32_t i) override; + void SetDown (uint32_t i) override; + bool IsForwarding (uint32_t i) const override; + void SetForwarding (uint32_t i, bool val) override; - Ptr GetNetDevice (uint32_t i); + Ptr GetNetDevice (uint32_t i) override; /** * \brief Check if an IPv4 address is unicast according to the node. @@ -266,12 +266,12 @@ public: protected: - virtual void DoDispose (); + void DoDispose () override; /** * This function will notify other components connected to the node that a new stack member is now connected * This will be used to notify Layer 3 protocol of layer 4 protocol stack to connect them together. */ - virtual void NotifyNewAggregate (); + void NotifyNewAggregate () override; private: /** * \brief Ipv4L3ProtocolTestCase test case. @@ -280,10 +280,10 @@ private: friend class ::Ipv4L3ProtocolTestCase; // class Ipv4 attributes - virtual void SetIpForward (bool forward); - virtual bool GetIpForward () const; - virtual void SetWeakEsModel (bool model); - virtual bool GetWeakEsModel () const; + void SetIpForward (bool forward) override; + bool GetIpForward () const override; + void SetWeakEsModel (bool model) override; + bool GetWeakEsModel () const override; /** * \brief Decrease the identification value for a dropped or recursed packet diff --git a/src/internet/model/ipv4-list-routing.h b/src/internet/model/ipv4-list-routing.h index 4a7d56ac9..9d0662162 100644 --- a/src/internet/model/ipv4-list-routing.h +++ b/src/internet/model/ipv4-list-routing.h @@ -51,7 +51,7 @@ public: static TypeId GetTypeId (); Ipv4ListRouting (); - virtual ~Ipv4ListRouting (); + ~Ipv4ListRouting () override; /** * \brief Register a new routing protocol to be used in this IPv4 stack @@ -79,21 +79,21 @@ public: virtual Ptr GetRoutingProtocol (uint32_t index, int16_t& priority) const; // Below are from Ipv4RoutingProtocol - virtual Ptr RouteOutput (Ptr p, const Ipv4Header &header, Ptr oif, Socket::SocketErrno &sockerr); + Ptr RouteOutput (Ptr p, const Ipv4Header &header, Ptr oif, Socket::SocketErrno &sockerr) override; - virtual bool RouteInput (Ptr p, const Ipv4Header &header, Ptr idev, + bool RouteInput (Ptr p, const Ipv4Header &header, Ptr idev, UnicastForwardCallback ucb, MulticastForwardCallback mcb, - LocalDeliverCallback lcb, ErrorCallback ecb); - virtual void NotifyInterfaceUp (uint32_t interface); - virtual void NotifyInterfaceDown (uint32_t interface); - virtual void NotifyAddAddress (uint32_t interface, Ipv4InterfaceAddress address); - virtual void NotifyRemoveAddress (uint32_t interface, Ipv4InterfaceAddress address); - virtual void SetIpv4 (Ptr ipv4); - virtual void PrintRoutingTable (Ptr stream, Time::Unit unit = Time::S) const; + LocalDeliverCallback lcb, ErrorCallback ecb) override; + void NotifyInterfaceUp (uint32_t interface) override; + void NotifyInterfaceDown (uint32_t interface) override; + void NotifyAddAddress (uint32_t interface, Ipv4InterfaceAddress address) override; + void NotifyRemoveAddress (uint32_t interface, Ipv4InterfaceAddress address) override; + void SetIpv4 (Ptr ipv4) override; + void PrintRoutingTable (Ptr stream, Time::Unit unit = Time::S) const override; protected: - virtual void DoDispose (); - virtual void DoInitialize (); + void DoDispose () override; + void DoInitialize () override; private: /** * \brief Container identifying an IPv4 Routing Protocol entry in the list. diff --git a/src/internet/model/ipv4-packet-filter.h b/src/internet/model/ipv4-packet-filter.h index ec4cc04c3..7dca3cc27 100644 --- a/src/internet/model/ipv4-packet-filter.h +++ b/src/internet/model/ipv4-packet-filter.h @@ -44,11 +44,11 @@ public: static TypeId GetTypeId (); Ipv4PacketFilter (); - virtual ~Ipv4PacketFilter (); + ~Ipv4PacketFilter () override; private: - virtual bool CheckProtocol (Ptr item) const; - virtual int32_t DoClassify (Ptr item) const = 0; + bool CheckProtocol (Ptr item) const override; + int32_t DoClassify (Ptr item) const override = 0; }; } // namespace ns3 diff --git a/src/internet/model/ipv4-packet-info-tag.h b/src/internet/model/ipv4-packet-info-tag.h index 421198c34..8359481fd 100644 --- a/src/internet/model/ipv4-packet-info-tag.h +++ b/src/internet/model/ipv4-packet-info-tag.h @@ -96,11 +96,11 @@ public: * \return the object TypeId */ static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId () const; - virtual uint32_t GetSerializedSize () const; - virtual void Serialize (TagBuffer i) const; - virtual void Deserialize (TagBuffer i); - virtual void Print (std::ostream &os) const; + TypeId GetInstanceTypeId () const override; + uint32_t GetSerializedSize () const override; + void Serialize (TagBuffer i) const override; + void Deserialize (TagBuffer i) override; + void Print (std::ostream &os) const override; private: // Linux IP_PKTINFO ip(7) implementation diff --git a/src/internet/model/ipv4-packet-probe.h b/src/internet/model/ipv4-packet-probe.h index 024fa2aa7..3dcaf7314 100644 --- a/src/internet/model/ipv4-packet-probe.h +++ b/src/internet/model/ipv4-packet-probe.h @@ -55,7 +55,7 @@ public: */ static TypeId GetTypeId (); Ipv4PacketProbe (); - virtual ~Ipv4PacketProbe (); + ~Ipv4PacketProbe () override; /** * \brief Set a probe value @@ -83,7 +83,7 @@ public: * \param obj ns3::Object to connect to * \return true if the trace source was successfully connected */ - virtual bool ConnectByObject (std::string traceSource, Ptr obj); + bool ConnectByObject (std::string traceSource, Ptr obj) override; /** * \brief connect to a trace source provided by a config path @@ -93,7 +93,7 @@ public: * Note, if an invalid path is provided, the probe will not be connected * to anything. */ - virtual void ConnectByPath (std::string path); + void ConnectByPath (std::string path) override; private: /** diff --git a/src/internet/model/ipv4-queue-disc-item.h b/src/internet/model/ipv4-queue-disc-item.h index b1edc4f57..e5bc80d96 100644 --- a/src/internet/model/ipv4-queue-disc-item.h +++ b/src/internet/model/ipv4-queue-disc-item.h @@ -44,7 +44,7 @@ public: */ Ipv4QueueDiscItem (Ptr p, const Address & addr, uint16_t protocol, const Ipv4Header & header); - virtual ~Ipv4QueueDiscItem (); + ~Ipv4QueueDiscItem () override; // Delete default constructor, copy constructor and assignment operator to avoid misuse Ipv4QueueDiscItem () = delete; @@ -54,7 +54,7 @@ public: /** * \return the correct packet size (header plus payload). */ - virtual uint32_t GetSize () const; + uint32_t GetSize () const override; /** * \return the header stored in this item.. @@ -64,13 +64,13 @@ public: /** * \brief Add the header to the packet */ - virtual void AddHeader (); + void AddHeader () override; /** * \brief Print the item contents. * \param os output stream in which the data should be printed. */ - virtual void Print (std::ostream &os) const; + void Print (std::ostream &os) const override; /* * The values for the fields of the Ipv4 header are taken from m_header and @@ -79,14 +79,14 @@ public: * to be called before the header is added to the packet (i.e., before the * packet is dequeued from the queue disc) */ - virtual bool GetUint8Value (Uint8Values field, uint8_t &value) const; + bool GetUint8Value (Uint8Values field, uint8_t &value) const override; /** * \brief Marks the packet by setting ECN_CE bits if the packet has * ECN_ECT0 or ECN_ECT1 set. If ECN_CE is already set, returns true. * \return true if the method results in a marked packet, false otherwise */ - virtual bool Mark (); + bool Mark () override; /** * \brief Computes the hash of the packet's 5-tuple @@ -98,7 +98,7 @@ public: * \param perturbation hash perturbation value * \return the hash of the packet's 5-tuple */ - virtual uint32_t Hash (uint32_t perturbation) const; + uint32_t Hash (uint32_t perturbation) const override; private: Ipv4Header m_header; //!< The IPv4 header. diff --git a/src/internet/model/ipv4-raw-socket-factory-impl.h b/src/internet/model/ipv4-raw-socket-factory-impl.h index 0c92cfa15..54ef82197 100644 --- a/src/internet/model/ipv4-raw-socket-factory-impl.h +++ b/src/internet/model/ipv4-raw-socket-factory-impl.h @@ -34,7 +34,7 @@ namespace ns3 { class Ipv4RawSocketFactoryImpl : public Ipv4RawSocketFactory { public: - virtual Ptr CreateSocket (); + Ptr CreateSocket () override; }; diff --git a/src/internet/model/ipv4-raw-socket-impl.h b/src/internet/model/ipv4-raw-socket-impl.h index f3ea037d1..427f1c05f 100644 --- a/src/internet/model/ipv4-raw-socket-impl.h +++ b/src/internet/model/ipv4-raw-socket-impl.h @@ -41,33 +41,33 @@ public: */ void SetNode (Ptr node); - virtual enum Socket::SocketErrno GetErrno () const; + enum Socket::SocketErrno GetErrno () const override; /** * \brief Get socket type (NS3_SOCK_RAW) * \return socket type */ - virtual enum Socket::SocketType GetSocketType () const; + enum Socket::SocketType GetSocketType () const override; - virtual Ptr GetNode () const; - virtual int Bind (const Address &address); - virtual int Bind (); - virtual int Bind6 (); - virtual int GetSockName (Address &address) const; - virtual int GetPeerName (Address &address) const; - virtual int Close (); - virtual int ShutdownSend (); - virtual int ShutdownRecv (); - virtual int Connect (const Address &address); - virtual int Listen (); - virtual uint32_t GetTxAvailable () const; - virtual int Send (Ptr p, uint32_t flags); - virtual int SendTo (Ptr p, uint32_t flags, - const Address &toAddress); - virtual uint32_t GetRxAvailable () const; - virtual Ptr Recv (uint32_t maxSize, uint32_t flags); - virtual Ptr RecvFrom (uint32_t maxSize, uint32_t flags, - Address &fromAddress); + Ptr GetNode () const override; + int Bind (const Address &address) override; + int Bind () override; + int Bind6 () override; + int GetSockName (Address &address) const override; + int GetPeerName (Address &address) const override; + int Close () override; + int ShutdownSend () override; + int ShutdownRecv () override; + int Connect (const Address &address) override; + int Listen () override; + uint32_t GetTxAvailable () const override; + int Send (Ptr p, uint32_t flags) override; + int SendTo (Ptr p, uint32_t flags, + const Address &toAddress) override; + uint32_t GetRxAvailable () const override; + Ptr Recv (uint32_t maxSize, uint32_t flags) override; + Ptr RecvFrom (uint32_t maxSize, uint32_t flags, + Address &fromAddress) override; /** @@ -84,11 +84,11 @@ public: * \return true if forwarded, false otherwise */ bool ForwardUp (Ptr p, Ipv4Header ipHeader, Ptr incomingInterface); - virtual bool SetAllowBroadcast (bool allowBroadcast); - virtual bool GetAllowBroadcast () const; + bool SetAllowBroadcast (bool allowBroadcast) override; + bool GetAllowBroadcast () const override; private: - virtual void DoDispose (); + void DoDispose () override; /** * \struct Data diff --git a/src/internet/model/ipv4-static-routing.h b/src/internet/model/ipv4-static-routing.h index 777dcbceb..a7233db1b 100644 --- a/src/internet/model/ipv4-static-routing.h +++ b/src/internet/model/ipv4-static-routing.h @@ -72,20 +72,20 @@ public: static TypeId GetTypeId (); Ipv4StaticRouting (); - virtual ~Ipv4StaticRouting (); + ~Ipv4StaticRouting () override; - virtual Ptr RouteOutput (Ptr p, const Ipv4Header &header, Ptr oif, Socket::SocketErrno &sockerr); + Ptr RouteOutput (Ptr p, const Ipv4Header &header, Ptr oif, Socket::SocketErrno &sockerr) override; - virtual bool RouteInput (Ptr p, const Ipv4Header &header, Ptr idev, + bool RouteInput (Ptr p, const Ipv4Header &header, Ptr idev, UnicastForwardCallback ucb, MulticastForwardCallback mcb, - LocalDeliverCallback lcb, ErrorCallback ecb); + LocalDeliverCallback lcb, ErrorCallback ecb) override; - virtual void NotifyInterfaceUp (uint32_t interface); - virtual void NotifyInterfaceDown (uint32_t interface); - virtual void NotifyAddAddress (uint32_t interface, Ipv4InterfaceAddress address); - virtual void NotifyRemoveAddress (uint32_t interface, Ipv4InterfaceAddress address); - virtual void SetIpv4 (Ptr ipv4); - virtual void PrintRoutingTable (Ptr stream, Time::Unit unit = Time::S) const; + void NotifyInterfaceUp (uint32_t interface) override; + void NotifyInterfaceDown (uint32_t interface) override; + void NotifyAddAddress (uint32_t interface, Ipv4InterfaceAddress address) override; + void NotifyRemoveAddress (uint32_t interface, Ipv4InterfaceAddress address) override; + void SetIpv4 (Ptr ipv4) override; + void PrintRoutingTable (Ptr stream, Time::Unit unit = Time::S) const override; /** * \brief Add a network route to the static routing table. @@ -355,7 +355,7 @@ public: void RemoveMulticastRoute (uint32_t index); protected: - virtual void DoDispose (); + void DoDispose () override; private: /// Container for the network routes diff --git a/src/internet/model/ipv4.h b/src/internet/model/ipv4.h index dbf8e170e..cb80ca62e 100644 --- a/src/internet/model/ipv4.h +++ b/src/internet/model/ipv4.h @@ -82,7 +82,7 @@ public: */ static TypeId GetTypeId (); Ipv4 (); - virtual ~Ipv4 (); + ~Ipv4 () override; /** * \brief Register a new routing protocol to be used by this Ipv4 stack diff --git a/src/internet/model/ipv6-autoconfigured-prefix.h b/src/internet/model/ipv6-autoconfigured-prefix.h index 7fb0e13f1..50c018891 100644 --- a/src/internet/model/ipv6-autoconfigured-prefix.h +++ b/src/internet/model/ipv6-autoconfigured-prefix.h @@ -57,7 +57,7 @@ public: /** * \brief Destructor. */ - ~Ipv6AutoconfiguredPrefix (); + ~Ipv6AutoconfiguredPrefix () override; /** * \brief Set the default gateway router. diff --git a/src/internet/model/ipv6-extension-demux.h b/src/internet/model/ipv6-extension-demux.h index d03296291..22dd92b88 100644 --- a/src/internet/model/ipv6-extension-demux.h +++ b/src/internet/model/ipv6-extension-demux.h @@ -53,7 +53,7 @@ public: /** * \brief Destructor. */ - virtual ~Ipv6ExtensionDemux (); + ~Ipv6ExtensionDemux () override; /** * \brief Set the node. @@ -84,7 +84,7 @@ protected: /** * \brief Dispose object. */ - virtual void DoDispose (); + void DoDispose () override; private: diff --git a/src/internet/model/ipv6-extension-header.h b/src/internet/model/ipv6-extension-header.h index 598ff4a0e..06e37425c 100644 --- a/src/internet/model/ipv6-extension-header.h +++ b/src/internet/model/ipv6-extension-header.h @@ -50,7 +50,7 @@ public: * \brief Get the instance type ID. * \return instance type ID */ - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * \brief Constructor. @@ -60,7 +60,7 @@ public: /** * \brief Destructor. */ - virtual ~Ipv6ExtensionHeader (); + ~Ipv6ExtensionHeader () override; /** * \brief Set the "Next header" field. @@ -90,26 +90,26 @@ public: * \brief Print some information about the packet. * \param os output stream */ - virtual void Print (std::ostream &os) const; + void Print (std::ostream &os) const override; /** * \brief Get the serialized size of the packet. * \return size */ - virtual uint32_t GetSerializedSize () const; + uint32_t GetSerializedSize () const override; /** * \brief Serialize the packet. * \param start Buffer iterator */ - virtual void Serialize (Buffer::Iterator start) const; + void Serialize (Buffer::Iterator start) const override; /** * \brief Deserialize the packet. * \param start Buffer iterator * \return size of the packet */ - virtual uint32_t Deserialize (Buffer::Iterator start); + uint32_t Deserialize (Buffer::Iterator start) override; protected: /** @@ -232,7 +232,7 @@ public: * \brief Get the instance type ID. * \return instance type ID */ - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * \brief Constructor. @@ -242,32 +242,32 @@ public: /** * \brief Destructor. */ - virtual ~Ipv6ExtensionHopByHopHeader (); + ~Ipv6ExtensionHopByHopHeader () override; /** * \brief Print some information about the packet. * \param os output stream */ - virtual void Print (std::ostream &os) const; + void Print (std::ostream &os) const override; /** * \brief Get the serialized size of the packet. * \return size */ - virtual uint32_t GetSerializedSize () const; + uint32_t GetSerializedSize () const override; /** * \brief Serialize the packet. * \param start Buffer iterator */ - virtual void Serialize (Buffer::Iterator start) const; + void Serialize (Buffer::Iterator start) const override; /** * \brief Deserialize the packet. * \param start Buffer iterator * \return size of the packet */ - virtual uint32_t Deserialize (Buffer::Iterator start); + uint32_t Deserialize (Buffer::Iterator start) override; }; /** @@ -288,7 +288,7 @@ public: * \brief Get the instance type ID. * \return instance type ID */ - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * \brief Constructor. @@ -298,32 +298,32 @@ public: /** * \brief Destructor. */ - virtual ~Ipv6ExtensionDestinationHeader (); + ~Ipv6ExtensionDestinationHeader () override; /** * \brief Print some information about the packet. * \param os output stream */ - virtual void Print (std::ostream &os) const; + void Print (std::ostream &os) const override; /** * \brief Get the serialized size of the packet. * \return size */ - virtual uint32_t GetSerializedSize () const; + uint32_t GetSerializedSize () const override; /** * \brief Serialize the packet. * \param start Buffer iterator */ - virtual void Serialize (Buffer::Iterator start) const; + void Serialize (Buffer::Iterator start) const override; /** * \brief Deserialize the packet. * \param start Buffer iterator * \return size of the packet */ - virtual uint32_t Deserialize (Buffer::Iterator start); + uint32_t Deserialize (Buffer::Iterator start) override; }; /** @@ -344,7 +344,7 @@ public: * \brief Get the instance type ID. * \return instance type ID */ - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * \brief Constructor. @@ -354,7 +354,7 @@ public: /** * \brief Destructor. */ - virtual ~Ipv6ExtensionFragmentHeader (); + ~Ipv6ExtensionFragmentHeader () override; /** * \brief Set the "Offset" field. @@ -396,26 +396,26 @@ public: * \brief Print some information about the packet. * \param os output stream */ - virtual void Print (std::ostream &os) const; + void Print (std::ostream &os) const override; /** * \brief Get the serialized size of the packet. * \return size */ - virtual uint32_t GetSerializedSize () const; + uint32_t GetSerializedSize () const override; /** * \brief Serialize the packet. * \param start Buffer iterator */ - virtual void Serialize (Buffer::Iterator start) const; + void Serialize (Buffer::Iterator start) const override; /** * \brief Deserialize the packet. * \param start Buffer iterator * \return size of the packet */ - virtual uint32_t Deserialize (Buffer::Iterator start); + uint32_t Deserialize (Buffer::Iterator start) override; private: /** @@ -447,7 +447,7 @@ public: * \brief Get the instance type ID. * \return instance type ID */ - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * \brief Constructor. @@ -457,7 +457,7 @@ public: /** * \brief Destructor. */ - virtual ~Ipv6ExtensionRoutingHeader (); + ~Ipv6ExtensionRoutingHeader () override; /** * \brief Set the "Type of Routing" field. @@ -487,26 +487,26 @@ public: * \brief Print some information about the packet. * \param os output stream */ - virtual void Print (std::ostream &os) const; + void Print (std::ostream &os) const override; /** * \brief Get the serialized size of the packet. * \return size */ - virtual uint32_t GetSerializedSize () const; + uint32_t GetSerializedSize () const override; /** * \brief Serialize the packet. * \param start Buffer iterator */ - virtual void Serialize (Buffer::Iterator start) const; + void Serialize (Buffer::Iterator start) const override; /** * \brief Deserialize the packet. * \param start Buffer iterator * \return size of the packet */ - virtual uint32_t Deserialize (Buffer::Iterator start); + uint32_t Deserialize (Buffer::Iterator start) override; private: /** @@ -538,7 +538,7 @@ public: * \brief Get the instance type ID. * \return instance type ID */ - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * \brief Constructor. @@ -548,7 +548,7 @@ public: /** * \brief Destructor. */ - virtual ~Ipv6ExtensionLooseRoutingHeader (); + ~Ipv6ExtensionLooseRoutingHeader () override; /** * \brief Set the number of routers' address. @@ -586,26 +586,26 @@ public: * \brief Print some information about the packet. * \param os output stream */ - virtual void Print (std::ostream &os) const; + void Print (std::ostream &os) const override; /** * \brief Get the serialized size of the packet. * \return size */ - virtual uint32_t GetSerializedSize () const; + uint32_t GetSerializedSize () const override; /** * \brief Serialize the packet. * \param start Buffer iterator */ - virtual void Serialize (Buffer::Iterator start) const; + void Serialize (Buffer::Iterator start) const override; /** * \brief Deserialize the packet. * \param start Buffer iterator * \return size of the packet */ - virtual uint32_t Deserialize (Buffer::Iterator start); + uint32_t Deserialize (Buffer::Iterator start) override; private: /** @@ -637,7 +637,7 @@ public: * \brief Get the instance type ID. * \return instance type ID */ - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * \brief Constructor. @@ -647,32 +647,32 @@ public: /** * \brief Destructor. */ - virtual ~Ipv6ExtensionESPHeader (); + ~Ipv6ExtensionESPHeader () override; /** * \brief Print some information about the packet. * \param os output stream */ - virtual void Print (std::ostream &os) const; + void Print (std::ostream &os) const override; /** * \brief Get the serialized size of the packet. * \return size */ - virtual uint32_t GetSerializedSize () const; + uint32_t GetSerializedSize () const override; /** * \brief Serialize the packet. * \param start Buffer iterator */ - virtual void Serialize (Buffer::Iterator start) const; + void Serialize (Buffer::Iterator start) const override; /** * \brief Deserialize the packet. * \param start Buffer iterator * \return size of the packet */ - virtual uint32_t Deserialize (Buffer::Iterator start); + uint32_t Deserialize (Buffer::Iterator start) override; }; /** @@ -693,7 +693,7 @@ public: * \brief Get the instance type ID. * \return instance type ID */ - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * \brief Constructor. @@ -703,32 +703,32 @@ public: /** * \brief Destructor. */ - virtual ~Ipv6ExtensionAHHeader (); + ~Ipv6ExtensionAHHeader () override; /** * \brief Print some information about the packet. * \param os output stream */ - virtual void Print (std::ostream &os) const; + void Print (std::ostream &os) const override; /** * \brief Get the serialized size of the packet. * \return size */ - virtual uint32_t GetSerializedSize () const; + uint32_t GetSerializedSize () const override; /** * \brief Serialize the packet. * \param start Buffer iterator */ - virtual void Serialize (Buffer::Iterator start) const; + void Serialize (Buffer::Iterator start) const override; /** * \brief Deserialize the packet. * \param start Buffer iterator * \return size of the packet */ - virtual uint32_t Deserialize (Buffer::Iterator start); + uint32_t Deserialize (Buffer::Iterator start) override; }; } // namespace ns3 diff --git a/src/internet/model/ipv6-extension.h b/src/internet/model/ipv6-extension.h index f5e6d2c5f..bcf2fbb22 100644 --- a/src/internet/model/ipv6-extension.h +++ b/src/internet/model/ipv6-extension.h @@ -69,7 +69,7 @@ public: /** * \brief Destructor. */ - virtual ~Ipv6Extension (); + ~Ipv6Extension () override; /** * \brief Set the node. @@ -188,22 +188,22 @@ public: /** * \brief Destructor. */ - ~Ipv6ExtensionHopByHop (); + ~Ipv6ExtensionHopByHop () override; /** * \brief Get the extension number. * \return extension number */ - virtual uint8_t GetExtensionNumber () const; + uint8_t GetExtensionNumber () const override; - virtual uint8_t Process (Ptr& packet, + uint8_t Process (Ptr& packet, uint8_t offset, Ipv6Header const& ipv6Header, Ipv6Address dst, uint8_t *nextHeader, bool& stopProcessing, bool& isDropped, - Ipv6L3Protocol::DropReason& dropReason); + Ipv6L3Protocol::DropReason& dropReason) override; }; /** @@ -233,22 +233,22 @@ public: /** * \brief Destructor. */ - ~Ipv6ExtensionDestination (); + ~Ipv6ExtensionDestination () override; /** * \brief Get the extension number. * \return extension number */ - virtual uint8_t GetExtensionNumber () const; + uint8_t GetExtensionNumber () const override; - virtual uint8_t Process (Ptr& packet, + uint8_t Process (Ptr& packet, uint8_t offset, Ipv6Header const& ipv6Header, Ipv6Address dst, uint8_t *nextHeader, bool& stopProcessing, bool& isDropped, - Ipv6L3Protocol::DropReason& dropReason); + Ipv6L3Protocol::DropReason& dropReason) override; }; /** @@ -278,22 +278,22 @@ public: /** * \brief Destructor. */ - ~Ipv6ExtensionFragment (); + ~Ipv6ExtensionFragment () override; /** * \brief Get the extension number. * \return extension number */ - virtual uint8_t GetExtensionNumber () const; + uint8_t GetExtensionNumber () const override; - virtual uint8_t Process (Ptr& packet, + uint8_t Process (Ptr& packet, uint8_t offset, Ipv6Header const& ipv6Header, Ipv6Address dst, uint8_t *nextHeader, bool& stopProcessing, bool& isDropped, - Ipv6L3Protocol::DropReason& dropReason); + Ipv6L3Protocol::DropReason& dropReason) override; /** * \brief Pair of a packet and an Ipv6 header. @@ -314,7 +314,7 @@ protected: /** * \brief Dispose this object. */ - virtual void DoDispose (); + void DoDispose () override; private: @@ -498,13 +498,13 @@ public: /** * \brief Destructor. */ - ~Ipv6ExtensionRouting (); + ~Ipv6ExtensionRouting () override; /** * \brief Get the extension number. * \return extension number */ - virtual uint8_t GetExtensionNumber () const; + uint8_t GetExtensionNumber () const override; /** * \brief Get the type of routing. @@ -512,14 +512,14 @@ public: */ virtual uint8_t GetTypeRouting () const; - virtual uint8_t Process (Ptr& packet, + uint8_t Process (Ptr& packet, uint8_t offset, Ipv6Header const& ipv6Header, Ipv6Address dst, uint8_t *nextHeader, bool& stopProcessing, bool& isDropped, - Ipv6L3Protocol::DropReason& dropReason); + Ipv6L3Protocol::DropReason& dropReason) override; }; /** @@ -544,7 +544,7 @@ public: /** * \brief Destructor. */ - virtual ~Ipv6ExtensionRoutingDemux (); + ~Ipv6ExtensionRoutingDemux () override; /** * \brief Set the node. @@ -575,7 +575,7 @@ protected: /** * \brief Dispose this object. */ - virtual void DoDispose (); + void DoDispose () override; private: /** @@ -621,22 +621,22 @@ public: /** * \brief Destructor. */ - ~Ipv6ExtensionLooseRouting (); + ~Ipv6ExtensionLooseRouting () override; /** * \brief Get the type of routing. * \return type of routing */ - virtual uint8_t GetTypeRouting () const; + uint8_t GetTypeRouting () const override; - virtual uint8_t Process (Ptr& packet, + uint8_t Process (Ptr& packet, uint8_t offset, Ipv6Header const& ipv6Header, Ipv6Address dst, uint8_t *nextHeader, bool& stopProcessing, bool& isDropped, - Ipv6L3Protocol::DropReason& dropReason); + Ipv6L3Protocol::DropReason& dropReason) override; }; /** @@ -666,22 +666,22 @@ public: /** * \brief Destructor. */ - ~Ipv6ExtensionESP (); + ~Ipv6ExtensionESP () override; /** * \brief Get the extension number. * \return extension number */ - virtual uint8_t GetExtensionNumber () const; + uint8_t GetExtensionNumber () const override; - virtual uint8_t Process (Ptr& packet, + uint8_t Process (Ptr& packet, uint8_t offset, Ipv6Header const& ipv6Header, Ipv6Address dst, uint8_t *nextHeader, bool& stopProcessing, bool& isDropped, - Ipv6L3Protocol::DropReason& dropReason); + Ipv6L3Protocol::DropReason& dropReason) override; }; /** @@ -711,22 +711,22 @@ public: /** * \brief Destructor. */ - ~Ipv6ExtensionAH (); + ~Ipv6ExtensionAH () override; /** * \brief Get the extension number. * \return extension number */ - virtual uint8_t GetExtensionNumber () const; + uint8_t GetExtensionNumber () const override; - virtual uint8_t Process (Ptr& packet, + uint8_t Process (Ptr& packet, uint8_t offset, Ipv6Header const& ipv6Header, Ipv6Address dst, uint8_t *nextHeader, bool& stopProcessing, bool& isDropped, - Ipv6L3Protocol::DropReason& dropReason); + Ipv6L3Protocol::DropReason& dropReason) override; }; } /* namespace ns3 */ diff --git a/src/internet/model/ipv6-header.h b/src/internet/model/ipv6-header.h index caa1ffc78..8f45ccc05 100644 --- a/src/internet/model/ipv6-header.h +++ b/src/internet/model/ipv6-header.h @@ -109,7 +109,7 @@ public: * \brief Return the instance type identifier. * \return instance type ID */ - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * \brief Constructor. @@ -283,26 +283,26 @@ public: * \brief Print some information about the packet. * \param os output stream */ - virtual void Print (std::ostream& os) const; + void Print (std::ostream& os) const override; /** * \brief Get the serialized size of the packet. * \return size */ - virtual uint32_t GetSerializedSize () const; + uint32_t GetSerializedSize () const override; /** * \brief Serialize the packet. * \param start Buffer iterator */ - virtual void Serialize (Buffer::Iterator start) const; + void Serialize (Buffer::Iterator start) const override; /** * \brief Deserialize the packet. * \param start Buffer iterator * \return size of the packet */ - virtual uint32_t Deserialize (Buffer::Iterator start); + uint32_t Deserialize (Buffer::Iterator start) override; private: /** diff --git a/src/internet/model/ipv6-interface.h b/src/internet/model/ipv6-interface.h index 2cf13c022..53d71cd83 100644 --- a/src/internet/model/ipv6-interface.h +++ b/src/internet/model/ipv6-interface.h @@ -65,7 +65,7 @@ public: /** * \brief Destructor. */ - virtual ~Ipv6Interface (); + ~Ipv6Interface () override; // Delete copy constructor and assignment operator to avoid misuse Ipv6Interface (const Ipv6Interface &) = delete; @@ -298,7 +298,7 @@ protected: /** * \brief Dispose this object. */ - virtual void DoDispose (); + void DoDispose () override; private: /** diff --git a/src/internet/model/ipv6-l3-protocol.h b/src/internet/model/ipv6-l3-protocol.h index 4966f7a56..1f0617750 100644 --- a/src/internet/model/ipv6-l3-protocol.h +++ b/src/internet/model/ipv6-l3-protocol.h @@ -97,7 +97,7 @@ public: /** * \brief Destructor. */ - virtual ~Ipv6L3Protocol (); + ~Ipv6L3Protocol () override; // Delete copy constructor and assignment operator to avoid misuse Ipv6L3Protocol (const Ipv6L3Protocol &) = delete; @@ -109,14 +109,14 @@ public: */ void SetNode (Ptr node); - virtual void Insert (Ptr protocol); - virtual void Insert (Ptr protocol, uint32_t interfaceIndex); + void Insert (Ptr protocol) override; + void Insert (Ptr protocol, uint32_t interfaceIndex) override; - virtual void Remove (Ptr protocol); - virtual void Remove (Ptr protocol, uint32_t interfaceIndex); + void Remove (Ptr protocol) override; + void Remove (Ptr protocol, uint32_t interfaceIndex) override; - virtual Ptr GetProtocol (int protocolNumber) const; - virtual Ptr GetProtocol (int protocolNumber, int32_t interfaceIndex) const; + Ptr GetProtocol (int protocolNumber) const override; + Ptr GetProtocol (int protocolNumber, int32_t interfaceIndex) const override; /** * \brief Create raw IPv6 socket. @@ -155,26 +155,26 @@ public: */ void Receive (Ptr device, Ptr p, uint16_t protocol, const Address &from, const Address &to, NetDevice::PacketType packetType); - virtual void Send (Ptr packet, Ipv6Address source, Ipv6Address destination, uint8_t protocol, Ptr route); + void Send (Ptr packet, Ipv6Address source, Ipv6Address destination, uint8_t protocol, Ptr route) override; /** * \brief Set routing protocol for this stack. * \param routingProtocol IPv6 routing protocol to set */ - void SetRoutingProtocol (Ptr routingProtocol); + void SetRoutingProtocol (Ptr routingProtocol) override; /** * \brief Get current routing protocol used. * \return routing protocol */ - Ptr GetRoutingProtocol () const; + Ptr GetRoutingProtocol () const override; /** * \brief Add IPv6 interface for a device. * \param device net device * \return interface index */ - uint32_t AddInterface (Ptr device); + uint32_t AddInterface (Ptr device) override; /** * \brief Get an interface. @@ -187,14 +187,14 @@ public: * \brief Get current number of interface on this stack. * \return number of interface registered */ - uint32_t GetNInterfaces () const; + uint32_t GetNInterfaces () const override; /** * \brief Get interface index which has specified IPv6 address * \param addr IPv6 address * \return interface index or -1 if not found */ - int32_t GetInterfaceForAddress (Ipv6Address addr) const; + int32_t GetInterfaceForAddress (Ipv6Address addr) const override; /** * \brief Get interface index which match specified address/prefix. @@ -202,14 +202,14 @@ public: * \param mask IPv6 prefix (mask) * \return interface index or -1 if not found */ - int32_t GetInterfaceForPrefix (Ipv6Address addr, Ipv6Prefix mask) const; + int32_t GetInterfaceForPrefix (Ipv6Address addr, Ipv6Prefix mask) const override; /** * \brief Get interface index which is on a specified net device. * \param device net device * \returns the interface index */ - int32_t GetInterfaceForDevice (Ptr device) const; + int32_t GetInterfaceForDevice (Ptr device) const override; /** * \brief Add an address on interface. @@ -218,7 +218,7 @@ public: * \param addOnLinkRoute add on-link route to the network (default true) * \returns true if the operation succeeded */ - bool AddAddress (uint32_t i, Ipv6InterfaceAddress address, bool addOnLinkRoute = true); + bool AddAddress (uint32_t i, Ipv6InterfaceAddress address, bool addOnLinkRoute = true) override; /** * \brief Get an address. @@ -226,14 +226,14 @@ public: * \param addressIndex address index on the interface * \return Ipv6InterfaceAddress or assert if not found */ - Ipv6InterfaceAddress GetAddress (uint32_t interfaceIndex, uint32_t addressIndex) const; + Ipv6InterfaceAddress GetAddress (uint32_t interfaceIndex, uint32_t addressIndex) const override; /** * \brief Get number of address for an interface. * \param interface interface index * \return number of address */ - uint32_t GetNAddresses (uint32_t interface) const; + uint32_t GetNAddresses (uint32_t interface) const override; /** * \brief Remove an address from an interface. @@ -241,7 +241,7 @@ public: * \param addressIndex address index on the interface * \returns true if the operation succeeded */ - bool RemoveAddress (uint32_t interfaceIndex, uint32_t addressIndex); + bool RemoveAddress (uint32_t interfaceIndex, uint32_t addressIndex) override; /** * \brief Remove a specified Ipv6 address from an interface. @@ -249,77 +249,77 @@ public: * \param address Ipv6Address to be removed from the interface * \returns true if the operation succeeded */ - bool RemoveAddress (uint32_t interfaceIndex, Ipv6Address address); + bool RemoveAddress (uint32_t interfaceIndex, Ipv6Address address) override; /** * \brief Set metric for an interface. * \param i index * \param metric */ - void SetMetric (uint32_t i, uint16_t metric); + void SetMetric (uint32_t i, uint16_t metric) override; /** * \brief Get metric for an interface. * \param i index * \return metric */ - uint16_t GetMetric (uint32_t i) const; + uint16_t GetMetric (uint32_t i) const override; /** * \brief Get MTU for an interface. * \param i index * \return MTU */ - uint16_t GetMtu (uint32_t i) const; + uint16_t GetMtu (uint32_t i) const override; /** * \brief Set the Path MTU for the specified IPv6 destination address. * \param dst Ipv6 destination address * \param pmtu the Path MTU */ - virtual void SetPmtu (Ipv6Address dst, uint32_t pmtu); + void SetPmtu (Ipv6Address dst, uint32_t pmtu) override; /** * \brief Is specified interface up ? * \param i interface index * \returns true if the interface is up */ - bool IsUp (uint32_t i) const; + bool IsUp (uint32_t i) const override; /** * \brief Set an interface up. * \param i interface index */ - void SetUp (uint32_t i); + void SetUp (uint32_t i) override; /** * \brief set an interface down. * \param i interface index */ - void SetDown (uint32_t i); + void SetDown (uint32_t i) override; /** * \brief Is interface allows forwarding ? * \param i interface index * \returns true if the interface is forwarding */ - bool IsForwarding (uint32_t i) const; + bool IsForwarding (uint32_t i) const override; /** * \brief Enable or disable forwarding on interface * \param i interface index * \param val true = enable forwarding, false = disable */ - void SetForwarding (uint32_t i, bool val); + void SetForwarding (uint32_t i, bool val) override; - Ipv6Address SourceAddressSelection (uint32_t interface, Ipv6Address dest); + Ipv6Address SourceAddressSelection (uint32_t interface, Ipv6Address dest) override; /** * \brief Get device by index. * \param i device index on this stack * \return NetDevice pointer */ - Ptr GetNetDevice (uint32_t i); + Ptr GetNetDevice (uint32_t i) override; /** * \brief Get ICMPv6 protocol. @@ -353,12 +353,12 @@ public: /** * \brief Register the IPv6 Extensions. */ - virtual void RegisterExtensions (); + void RegisterExtensions () override; /** * \brief Register the IPv6 Options. */ - virtual void RegisterOptions (); + void RegisterOptions () override; /** * \brief Report a packet drop @@ -475,14 +475,14 @@ protected: /** * \brief Dispose object. */ - virtual void DoDispose (); + void DoDispose () override; /** * \brief Notify other components connected to the node that a new stack member is now connected. * * This will be used to notify Layer 3 protocol of layer 4 protocol stack to connect them together. */ - virtual void NotifyNewAggregate (); + void NotifyNewAggregate () override; private: /** @@ -642,25 +642,25 @@ private: * \brief Set IPv6 forwarding state. * \param forward IPv6 forwarding enabled or not */ - virtual void SetIpForward (bool forward); + void SetIpForward (bool forward) override; /** * \brief Get IPv6 forwarding state. * \return forwarding state (enabled or not) */ - virtual bool GetIpForward () const; + bool GetIpForward () const override; /** * \brief Set IPv6 MTU discover state. * \param mtuDiscover IPv6 MTU discover enabled or not */ - virtual void SetMtuDiscover (bool mtuDiscover); + void SetMtuDiscover (bool mtuDiscover) override; /** * \brief Get IPv6 MTU discover state. * \return MTU discover state (enabled or not) */ - virtual bool GetMtuDiscover () const; + bool GetMtuDiscover () const override; /** * \brief Set the ICMPv6 Redirect sending state. diff --git a/src/internet/model/ipv6-list-routing.h b/src/internet/model/ipv6-list-routing.h index b0bc96015..713d850b7 100644 --- a/src/internet/model/ipv6-list-routing.h +++ b/src/internet/model/ipv6-list-routing.h @@ -56,7 +56,7 @@ public: /** * \brief Destructor. */ - virtual ~Ipv6ListRouting (); + ~Ipv6ListRouting () override; /** * \brief Register a new routing protocol to be used in this IPv4 stack @@ -86,25 +86,25 @@ public: virtual Ptr GetRoutingProtocol (uint32_t index, int16_t& priority) const; // Below are from Ipv6RoutingProtocol - virtual Ptr RouteOutput (Ptr p, const Ipv6Header &header, Ptr oif, Socket::SocketErrno &sockerr); + Ptr RouteOutput (Ptr p, const Ipv6Header &header, Ptr oif, Socket::SocketErrno &sockerr) override; - virtual bool RouteInput (Ptr p, const Ipv6Header &header, Ptr idev, + bool RouteInput (Ptr p, const Ipv6Header &header, Ptr idev, UnicastForwardCallback ucb, MulticastForwardCallback mcb, - LocalDeliverCallback lcb, ErrorCallback ecb); - virtual void NotifyInterfaceUp (uint32_t interface); - virtual void NotifyInterfaceDown (uint32_t interface); - virtual void NotifyAddAddress (uint32_t interface, Ipv6InterfaceAddress address); - virtual void NotifyRemoveAddress (uint32_t interface, Ipv6InterfaceAddress address); - virtual void NotifyAddRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse = Ipv6Address::GetZero ()); - virtual void NotifyRemoveRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse = Ipv6Address::GetZero ()); - virtual void SetIpv6 (Ptr ipv6); - virtual void PrintRoutingTable (Ptr stream, Time::Unit unit = Time::S) const; + LocalDeliverCallback lcb, ErrorCallback ecb) override; + void NotifyInterfaceUp (uint32_t interface) override; + void NotifyInterfaceDown (uint32_t interface) override; + void NotifyAddAddress (uint32_t interface, Ipv6InterfaceAddress address) override; + void NotifyRemoveAddress (uint32_t interface, Ipv6InterfaceAddress address) override; + void NotifyAddRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse = Ipv6Address::GetZero ()) override; + void NotifyRemoveRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse = Ipv6Address::GetZero ()) override; + void SetIpv6 (Ptr ipv6) override; + void PrintRoutingTable (Ptr stream, Time::Unit unit = Time::S) const override; protected: /** * \brief Dispose this object. */ - virtual void DoDispose (); + void DoDispose () override; private: /** diff --git a/src/internet/model/ipv6-option-demux.h b/src/internet/model/ipv6-option-demux.h index fd2afdbba..e96729ac8 100644 --- a/src/internet/model/ipv6-option-demux.h +++ b/src/internet/model/ipv6-option-demux.h @@ -53,7 +53,7 @@ public: /** * \brief Destructor. */ - virtual ~Ipv6OptionDemux (); + ~Ipv6OptionDemux () override; /** * \brief Set the node. @@ -84,7 +84,7 @@ protected: /** * \brief Dispose this object. */ - virtual void DoDispose (); + void DoDispose () override; private: /** diff --git a/src/internet/model/ipv6-option-header.h b/src/internet/model/ipv6-option-header.h index e1dc41410..012e39dff 100644 --- a/src/internet/model/ipv6-option-header.h +++ b/src/internet/model/ipv6-option-header.h @@ -60,7 +60,7 @@ public: * \brief Get the instance type ID. * \return instance type ID */ - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * \brief Constructor. @@ -70,7 +70,7 @@ public: /** * \brief Destructor. */ - virtual ~Ipv6OptionHeader (); + ~Ipv6OptionHeader () override; /** * \brief Set the type of the option. @@ -100,26 +100,26 @@ public: * \brief Print some information about the packet. * \param os output stream */ - virtual void Print (std::ostream &os) const; + void Print (std::ostream &os) const override; /** * \brief Get the serialized size of the packet. * \return size */ - virtual uint32_t GetSerializedSize () const; + uint32_t GetSerializedSize () const override; /** * \brief Serialize the packet. * \param start Buffer iterator */ - virtual void Serialize (Buffer::Iterator start) const; + void Serialize (Buffer::Iterator start) const override; /** * \brief Deserialize the packet. * \param start Buffer iterator * \return size of the packet */ - virtual uint32_t Deserialize (Buffer::Iterator start); + uint32_t Deserialize (Buffer::Iterator start) override; /** * \brief Get the Alignment requirement of this option header @@ -165,7 +165,7 @@ public: * \brief Get the instance type ID. * \return instance type ID */ - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * \brief Constructor. @@ -175,32 +175,32 @@ public: /** * \brief Destructor. */ - virtual ~Ipv6OptionPad1Header (); + ~Ipv6OptionPad1Header () override; /** * \brief Print some information about the packet. * \param os output stream */ - virtual void Print (std::ostream &os) const; + void Print (std::ostream &os) const override; /** * \brief Get the serialized size of the packet. * \return size */ - virtual uint32_t GetSerializedSize () const; + uint32_t GetSerializedSize () const override; /** * \brief Serialize the packet. * \param start Buffer iterator */ - virtual void Serialize (Buffer::Iterator start) const; + void Serialize (Buffer::Iterator start) const override; /** * \brief Deserialize the packet. * \param start Buffer iterator * \return size of the packet */ - virtual uint32_t Deserialize (Buffer::Iterator start); + uint32_t Deserialize (Buffer::Iterator start) override; }; /** @@ -221,7 +221,7 @@ public: * \brief Get the instance type ID. * \return instance type ID */ - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * \brief Constructor. @@ -232,32 +232,32 @@ public: /** * \brief Destructor. */ - virtual ~Ipv6OptionPadnHeader (); + ~Ipv6OptionPadnHeader () override; /** * \brief Print some information about the packet. * \param os output stream */ - virtual void Print (std::ostream &os) const; + void Print (std::ostream &os) const override; /** * \brief Get the serialized size of the packet. * \return size */ - virtual uint32_t GetSerializedSize () const; + uint32_t GetSerializedSize () const override; /** * \brief Serialize the packet. * \param start Buffer iterator */ - virtual void Serialize (Buffer::Iterator start) const; + void Serialize (Buffer::Iterator start) const override; /** * \brief Deserialize the packet. * \param start Buffer iterator * \return size of the packet */ - virtual uint32_t Deserialize (Buffer::Iterator start); + uint32_t Deserialize (Buffer::Iterator start) override; }; /** @@ -278,7 +278,7 @@ public: * \brief Get the instance type ID. * \return instance type ID */ - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * \brief Constructor. @@ -288,7 +288,7 @@ public: /** * \brief Destructor. */ - virtual ~Ipv6OptionJumbogramHeader (); + ~Ipv6OptionJumbogramHeader () override; /** * \brief Set the data length. @@ -306,32 +306,32 @@ public: * \brief Print some information about the packet. * \param os output stream */ - virtual void Print (std::ostream &os) const; + void Print (std::ostream &os) const override; /** * \brief Get the serialized size of the packet. * \return size */ - virtual uint32_t GetSerializedSize () const; + uint32_t GetSerializedSize () const override; /** * \brief Serialize the packet. * \param start Buffer iterator */ - virtual void Serialize (Buffer::Iterator start) const; + void Serialize (Buffer::Iterator start) const override; /** * \brief Deserialize the packet. * \param start Buffer iterator * \return size of the packet */ - virtual uint32_t Deserialize (Buffer::Iterator start); + uint32_t Deserialize (Buffer::Iterator start) override; /** * \brief Get the Alignment requirement of this option header * \return The required alignment */ - virtual Alignment GetAlignment () const; + Alignment GetAlignment () const override; private: /** @@ -358,7 +358,7 @@ public: * \brief Get the instance type ID. * \return instance type ID */ - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * \brief Constructor. @@ -368,7 +368,7 @@ public: /** * \brief Destructor. */ - virtual ~Ipv6OptionRouterAlertHeader (); + ~Ipv6OptionRouterAlertHeader () override; /** * \brief Set the field "value". @@ -386,32 +386,32 @@ public: * \brief Print some information about the packet. * \param os output stream */ - virtual void Print (std::ostream &os) const; + void Print (std::ostream &os) const override; /** * \brief Get the serialized size of the packet. * \return size */ - virtual uint32_t GetSerializedSize () const; + uint32_t GetSerializedSize () const override; /** * \brief Serialize the packet. * \param start Buffer iterator */ - virtual void Serialize (Buffer::Iterator start) const; + void Serialize (Buffer::Iterator start) const override; /** * \brief Deserialize the packet. * \param start Buffer iterator * \return size of the packet */ - virtual uint32_t Deserialize (Buffer::Iterator start); + uint32_t Deserialize (Buffer::Iterator start) override; /** * \brief Get the Alignment requirement of this option header * \return The required alignment */ - virtual Alignment GetAlignment () const; + Alignment GetAlignment () const override; private: /** diff --git a/src/internet/model/ipv6-option.h b/src/internet/model/ipv6-option.h index a657c3d4b..9f9571691 100644 --- a/src/internet/model/ipv6-option.h +++ b/src/internet/model/ipv6-option.h @@ -55,7 +55,7 @@ public: /** * \brief Destructor. */ - virtual ~Ipv6Option (); + ~Ipv6Option () override; /** * \brief Set the node. @@ -115,13 +115,13 @@ public: /** * \brief Destructor. */ - ~Ipv6OptionPad1 (); + ~Ipv6OptionPad1 () override; /** * \brief Get the option number. * \return option number */ - virtual uint8_t GetOptionNumber () const; + uint8_t GetOptionNumber () const override; /** * \brief Process method @@ -133,7 +133,7 @@ public: * \param isDropped if the packet must be dropped * \return the processed size */ - virtual uint8_t Process (Ptr packet, uint8_t offset, Ipv6Header const& ipv6Header, bool& isDropped); + uint8_t Process (Ptr packet, uint8_t offset, Ipv6Header const& ipv6Header, bool& isDropped) override; }; /** @@ -163,13 +163,13 @@ public: /** * \brief Destructor. */ - ~Ipv6OptionPadn (); + ~Ipv6OptionPadn () override; /** * \brief Get the option number. * \return option number */ - virtual uint8_t GetOptionNumber () const; + uint8_t GetOptionNumber () const override; /** * \brief Process method @@ -181,7 +181,7 @@ public: * \param isDropped if the packet must be dropped * \return the processed size */ - virtual uint8_t Process (Ptr packet, uint8_t offset, Ipv6Header const& ipv6Header, bool& isDropped); + uint8_t Process (Ptr packet, uint8_t offset, Ipv6Header const& ipv6Header, bool& isDropped) override; }; /** @@ -211,13 +211,13 @@ public: /** * \brief Destructor. */ - ~Ipv6OptionJumbogram (); + ~Ipv6OptionJumbogram () override; /** * \brief Get the option number. * \return option number */ - virtual uint8_t GetOptionNumber () const; + uint8_t GetOptionNumber () const override; /** * \brief Process method @@ -228,7 +228,7 @@ public: * \param isDropped if the packet must be dropped * \return the processed size */ - virtual uint8_t Process (Ptr packet, uint8_t offset, Ipv6Header const& ipv6Header, bool& isDropped); + uint8_t Process (Ptr packet, uint8_t offset, Ipv6Header const& ipv6Header, bool& isDropped) override; }; /** @@ -258,13 +258,13 @@ public: /** * \brief Destructor. */ - ~Ipv6OptionRouterAlert (); + ~Ipv6OptionRouterAlert () override; /** * \brief Get the option number. * \return option number */ - virtual uint8_t GetOptionNumber () const; + uint8_t GetOptionNumber () const override; /** * \brief Process method @@ -276,7 +276,7 @@ public: * \param isDropped if the packet must be dropped * \return the processed size */ - virtual uint8_t Process (Ptr packet, uint8_t offset, Ipv6Header const& ipv6Header, bool& isDropped); + uint8_t Process (Ptr packet, uint8_t offset, Ipv6Header const& ipv6Header, bool& isDropped) override; }; } /* namespace ns3 */ diff --git a/src/internet/model/ipv6-packet-filter.h b/src/internet/model/ipv6-packet-filter.h index da5c88570..7f191f3b2 100644 --- a/src/internet/model/ipv6-packet-filter.h +++ b/src/internet/model/ipv6-packet-filter.h @@ -44,11 +44,11 @@ public: static TypeId GetTypeId (); Ipv6PacketFilter (); - virtual ~Ipv6PacketFilter (); + ~Ipv6PacketFilter () override; private: - virtual bool CheckProtocol (Ptr item) const; - virtual int32_t DoClassify (Ptr item) const = 0; + bool CheckProtocol (Ptr item) const override; + int32_t DoClassify (Ptr item) const override = 0; }; } // namespace ns3 diff --git a/src/internet/model/ipv6-packet-info-tag.h b/src/internet/model/ipv6-packet-info-tag.h index 374e1f611..424863d67 100644 --- a/src/internet/model/ipv6-packet-info-tag.h +++ b/src/internet/model/ipv6-packet-info-tag.h @@ -113,11 +113,11 @@ public: uint8_t GetTrafficClass () const; // inherited functions, no doc necessary - virtual TypeId GetInstanceTypeId () const; - virtual uint32_t GetSerializedSize () const; - virtual void Serialize (TagBuffer i) const; - virtual void Deserialize (TagBuffer i); - virtual void Print (std::ostream &os) const; + TypeId GetInstanceTypeId () const override; + uint32_t GetSerializedSize () const override; + void Serialize (TagBuffer i) const override; + void Deserialize (TagBuffer i) override; + void Print (std::ostream &os) const override; private: /* diff --git a/src/internet/model/ipv6-packet-probe.h b/src/internet/model/ipv6-packet-probe.h index f79f96542..fd0fecbe9 100644 --- a/src/internet/model/ipv6-packet-probe.h +++ b/src/internet/model/ipv6-packet-probe.h @@ -57,7 +57,7 @@ public: static TypeId GetTypeId (); Ipv6PacketProbe (); - virtual ~Ipv6PacketProbe (); + ~Ipv6PacketProbe () override; /** * \brief Set a probe value @@ -85,7 +85,7 @@ public: * \param obj ns3::Object to connect to * \return true if the trace source was successfully connected */ - virtual bool ConnectByObject (std::string traceSource, Ptr obj); + bool ConnectByObject (std::string traceSource, Ptr obj) override; /** * \brief connect to a trace source provided by a config path @@ -95,7 +95,7 @@ public: * Note, if an invalid path is provided, the probe will not be connected * to anything. */ - virtual void ConnectByPath (std::string path); + void ConnectByPath (std::string path) override; private: /** diff --git a/src/internet/model/ipv6-pmtu-cache.h b/src/internet/model/ipv6-pmtu-cache.h index 6285408ae..3efd9bf0c 100644 --- a/src/internet/model/ipv6-pmtu-cache.h +++ b/src/internet/model/ipv6-pmtu-cache.h @@ -63,12 +63,12 @@ public: /** * \brief Destructor. */ - ~Ipv6PmtuCache (); + ~Ipv6PmtuCache () override; /** * \brief Dispose object. */ - virtual void DoDispose (); + void DoDispose () override; /** * \brief Gets the known Path MTU for the specific destination diff --git a/src/internet/model/ipv6-queue-disc-item.h b/src/internet/model/ipv6-queue-disc-item.h index 8b0901991..a2c86844e 100644 --- a/src/internet/model/ipv6-queue-disc-item.h +++ b/src/internet/model/ipv6-queue-disc-item.h @@ -44,7 +44,7 @@ public: */ Ipv6QueueDiscItem (Ptr p, const Address & addr, uint16_t protocol, const Ipv6Header & header); - virtual ~Ipv6QueueDiscItem (); + ~Ipv6QueueDiscItem () override; // Delete default constructor, copy constructor and assignment operator to avoid misuse Ipv6QueueDiscItem () = delete; @@ -54,7 +54,7 @@ public: /** * \return the correct packet size (header plus payload). */ - virtual uint32_t GetSize () const; + uint32_t GetSize () const override; /** * \return the header stored in this item.. @@ -64,13 +64,13 @@ public: /** * \brief Add the header to the packet */ - virtual void AddHeader (); + void AddHeader () override; /** * \brief Print the item contents. * \param os output stream in which the data should be printed. */ - virtual void Print (std::ostream &os) const; + void Print (std::ostream &os) const override; /* * The values for the fields of the Ipv6 header are taken from m_header and @@ -79,14 +79,14 @@ public: * to be called before the header is added to the packet (i.e., before the * packet is dequeued from the queue disc) */ - virtual bool GetUint8Value (Uint8Values field, uint8_t &value) const; + bool GetUint8Value (Uint8Values field, uint8_t &value) const override; /** * \brief Marks the packet by setting ECN_CE bits if the packet has * ECN_ECT0 or ECN_ECT1 set. If ECN_CE is already set, returns true. * \return true if the method results in a marked packet, false otherwise */ - virtual bool Mark (); + bool Mark () override; /** * \brief Computes the hash of the packet's 5-tuple @@ -98,7 +98,7 @@ public: * \param perturbation hash perturbation value * \return the hash of the packet's 5-tuple */ - virtual uint32_t Hash (uint32_t perturbation) const; + uint32_t Hash (uint32_t perturbation) const override; private: Ipv6Header m_header; //!< The IPv6 header. diff --git a/src/internet/model/ipv6-raw-socket-factory-impl.h b/src/internet/model/ipv6-raw-socket-factory-impl.h index 4931bc78a..20852f142 100644 --- a/src/internet/model/ipv6-raw-socket-factory-impl.h +++ b/src/internet/model/ipv6-raw-socket-factory-impl.h @@ -39,7 +39,7 @@ public: * \brief Create a raw IPv6 socket. * \returns A new RAW IPv6 socket. */ - virtual Ptr CreateSocket (); + Ptr CreateSocket () override; }; } /* namespace ns3 */ diff --git a/src/internet/model/ipv6-raw-socket-impl.h b/src/internet/model/ipv6-raw-socket-impl.h index c6bd13535..d147fa94a 100644 --- a/src/internet/model/ipv6-raw-socket-impl.h +++ b/src/internet/model/ipv6-raw-socket-impl.h @@ -73,7 +73,7 @@ public: static TypeId GetTypeId (); Ipv6RawSocketImpl (); - virtual ~Ipv6RawSocketImpl (); + ~Ipv6RawSocketImpl () override; /** * \brief Set the node associated with this socket. @@ -81,35 +81,35 @@ public: */ void SetNode (Ptr node); - virtual enum Socket::SocketErrno GetErrno () const; + enum Socket::SocketErrno GetErrno () const override; /** * \brief Get socket type (NS3_SOCK_RAW) * \return socket type */ - virtual enum Socket::SocketType GetSocketType () const; + enum Socket::SocketType GetSocketType () const override; - virtual Ptr GetNode () const; + Ptr GetNode () const override; - virtual int Bind (const Address& address); - virtual int Bind (); - virtual int Bind6 (); + int Bind (const Address& address) override; + int Bind () override; + int Bind6 () override; - virtual int GetSockName (Address& address) const; - virtual int GetPeerName (Address& address) const; + int GetSockName (Address& address) const override; + int GetPeerName (Address& address) const override; - virtual int Close (); - virtual int ShutdownSend (); - virtual int ShutdownRecv (); - virtual int Connect (const Address& address); - virtual int Listen (); - virtual uint32_t GetTxAvailable () const; - virtual uint32_t GetRxAvailable () const; - virtual int Send (Ptr p, uint32_t flags); - virtual int SendTo (Ptr p, uint32_t flags, const Address& toAddress); - virtual Ptr Recv (uint32_t maxSize, uint32_t flags); - virtual Ptr RecvFrom (uint32_t maxSize, uint32_t flags, Address& fromAddress); - virtual void Ipv6JoinGroup (Ipv6Address address, Socket::Ipv6MulticastFilterMode filterMode, std::vector sourceAddresses); + int Close () override; + int ShutdownSend () override; + int ShutdownRecv () override; + int Connect (const Address& address) override; + int Listen () override; + uint32_t GetTxAvailable () const override; + uint32_t GetRxAvailable () const override; + int Send (Ptr p, uint32_t flags) override; + int SendTo (Ptr p, uint32_t flags, const Address& toAddress) override; + Ptr Recv (uint32_t maxSize, uint32_t flags) override; + Ptr RecvFrom (uint32_t maxSize, uint32_t flags, Address& fromAddress) override; + void Ipv6JoinGroup (Ipv6Address address, Socket::Ipv6MulticastFilterMode filterMode, std::vector sourceAddresses) override; /** * \brief Set protocol field. @@ -126,8 +126,8 @@ public: */ bool ForwardUp (Ptr p, Ipv6Header hdr, Ptr device); - virtual bool SetAllowBroadcast (bool allowBroadcast); - virtual bool GetAllowBroadcast () const; + bool SetAllowBroadcast (bool allowBroadcast) override; + bool GetAllowBroadcast () const override; /** * \brief Clean the ICMPv6 filter structure @@ -180,7 +180,7 @@ private: /** * \brief Dispose object. */ - virtual void DoDispose (); + void DoDispose () override; /** * \brief Last error number. diff --git a/src/internet/model/ipv6-static-routing.h b/src/internet/model/ipv6-static-routing.h index 822b9ad0e..7b7dbfb87 100644 --- a/src/internet/model/ipv6-static-routing.h +++ b/src/internet/model/ipv6-static-routing.h @@ -70,7 +70,7 @@ public: static TypeId GetTypeId (); Ipv6StaticRouting (); - virtual ~Ipv6StaticRouting (); + ~Ipv6StaticRouting () override; /** * \brief Add route to host. @@ -224,26 +224,26 @@ public: */ bool HasNetworkDest (Ipv6Address dest, uint32_t interfaceIndex); - virtual Ptr RouteOutput (Ptr p, const Ipv6Header &header, Ptr oif, Socket::SocketErrno &sockerr); + Ptr RouteOutput (Ptr p, const Ipv6Header &header, Ptr oif, Socket::SocketErrno &sockerr) override; - virtual bool RouteInput (Ptr p, const Ipv6Header &header, Ptr idev, + bool RouteInput (Ptr p, const Ipv6Header &header, Ptr idev, UnicastForwardCallback ucb, MulticastForwardCallback mcb, - LocalDeliverCallback lcb, ErrorCallback ecb); + LocalDeliverCallback lcb, ErrorCallback ecb) override; - virtual void NotifyInterfaceUp (uint32_t interface); - virtual void NotifyInterfaceDown (uint32_t interface); - virtual void NotifyAddAddress (uint32_t interface, Ipv6InterfaceAddress address); - virtual void NotifyRemoveAddress (uint32_t interface, Ipv6InterfaceAddress address); - virtual void NotifyAddRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse = Ipv6Address::GetZero ()); - virtual void NotifyRemoveRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse = Ipv6Address::GetZero ()); - virtual void SetIpv6 (Ptr ipv6); - virtual void PrintRoutingTable (Ptr stream, Time::Unit unit = Time::S) const; + void NotifyInterfaceUp (uint32_t interface) override; + void NotifyInterfaceDown (uint32_t interface) override; + void NotifyAddAddress (uint32_t interface, Ipv6InterfaceAddress address) override; + void NotifyRemoveAddress (uint32_t interface, Ipv6InterfaceAddress address) override; + void NotifyAddRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse = Ipv6Address::GetZero ()) override; + void NotifyRemoveRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse = Ipv6Address::GetZero ()) override; + void SetIpv6 (Ptr ipv6) override; + void PrintRoutingTable (Ptr stream, Time::Unit unit = Time::S) const override; protected: /** * \brief Dispose this object. */ - virtual void DoDispose (); + void DoDispose () override; private: /// Container for the network routes diff --git a/src/internet/model/ipv6.h b/src/internet/model/ipv6.h index ea24f7db3..6e966e353 100644 --- a/src/internet/model/ipv6.h +++ b/src/internet/model/ipv6.h @@ -95,7 +95,7 @@ public: /** * \brief Destructor. */ - virtual ~Ipv6 (); + ~Ipv6 () override; /** * \brief Register a new routing protocol to be used by this IPv6 stack diff --git a/src/internet/model/loopback-net-device.h b/src/internet/model/loopback-net-device.h index 744f700a5..6ad77333a 100644 --- a/src/internet/model/loopback-net-device.h +++ b/src/internet/model/loopback-net-device.h @@ -50,35 +50,35 @@ public: LoopbackNetDevice (); // inherited from NetDevice base class. - virtual void SetIfIndex (const uint32_t index); - virtual uint32_t GetIfIndex () const; - virtual Ptr GetChannel () const; - virtual void SetAddress (Address address); - virtual Address GetAddress () const; - virtual bool SetMtu (const uint16_t mtu); - virtual uint16_t GetMtu () const; - virtual bool IsLinkUp () const; - virtual void AddLinkChangeCallback (Callback callback); - virtual bool IsBroadcast () const; - virtual Address GetBroadcast () const; - virtual bool IsMulticast () const; - virtual Address GetMulticast (Ipv4Address multicastGroup) const; - virtual bool IsPointToPoint () const; - virtual bool IsBridge () const; - virtual bool Send (Ptr packet, const Address& dest, uint16_t protocolNumber); - virtual bool SendFrom (Ptr packet, const Address& source, const Address& dest, uint16_t protocolNumber); - virtual Ptr GetNode () const; - virtual void SetNode (Ptr node); - virtual bool NeedsArp () const; - virtual void SetReceiveCallback (NetDevice::ReceiveCallback cb); + void SetIfIndex (const uint32_t index) override; + uint32_t GetIfIndex () const override; + Ptr GetChannel () const override; + void SetAddress (Address address) override; + Address GetAddress () const override; + bool SetMtu (const uint16_t mtu) override; + uint16_t GetMtu () const override; + bool IsLinkUp () const override; + void AddLinkChangeCallback (Callback callback) override; + bool IsBroadcast () const override; + Address GetBroadcast () const override; + bool IsMulticast () const override; + Address GetMulticast (Ipv4Address multicastGroup) const override; + bool IsPointToPoint () const override; + bool IsBridge () const override; + bool Send (Ptr packet, const Address& dest, uint16_t protocolNumber) override; + bool SendFrom (Ptr packet, const Address& source, const Address& dest, uint16_t protocolNumber) override; + Ptr GetNode () const override; + void SetNode (Ptr node) override; + bool NeedsArp () const override; + void SetReceiveCallback (NetDevice::ReceiveCallback cb) override; - virtual Address GetMulticast (Ipv6Address addr) const; + Address GetMulticast (Ipv6Address addr) const override; - virtual void SetPromiscReceiveCallback (PromiscReceiveCallback cb); - virtual bool SupportsSendFrom () const; + void SetPromiscReceiveCallback (PromiscReceiveCallback cb) override; + bool SupportsSendFrom () const override; protected: - virtual void DoDispose (); + void DoDispose () override; private: /** * Receive a packet from tge Loopback NetDevice. diff --git a/src/internet/model/ndisc-cache.h b/src/internet/model/ndisc-cache.h index 4d62a19d3..b0d720a08 100644 --- a/src/internet/model/ndisc-cache.h +++ b/src/internet/model/ndisc-cache.h @@ -70,7 +70,7 @@ public: /** * \brief Destructor. */ - ~NdiscCache (); + ~NdiscCache () override; // Delete default and copy constructor, and assignment operator to avoid misuse NdiscCache (NdiscCache const &) = delete; @@ -452,7 +452,7 @@ protected: /** * \brief Dispose this object. */ - void DoDispose (); + void DoDispose () override; /** * \brief Neighbor Discovery Cache container diff --git a/src/internet/model/rip-header.h b/src/internet/model/rip-header.h index 7be02c416..a5485f738 100644 --- a/src/internet/model/rip-header.h +++ b/src/internet/model/rip-header.h @@ -49,28 +49,28 @@ public: * \brief Return the instance type identifier. * \return Instance type ID. */ - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; - virtual void Print (std::ostream& os) const; + void Print (std::ostream& os) const override; /** * \brief Get the serialized size of the packet. * \return Size. */ - virtual uint32_t GetSerializedSize () const; + uint32_t GetSerializedSize () const override; /** * \brief Serialize the packet. * \param start Buffer iterator. */ - virtual void Serialize (Buffer::Iterator start) const; + void Serialize (Buffer::Iterator start) const override; /** * \brief Deserialize the packet. * \param start Buffer iterator. * \return Size of the packet. */ - virtual uint32_t Deserialize (Buffer::Iterator start); + uint32_t Deserialize (Buffer::Iterator start) override; /** * \brief Set the prefix. @@ -169,28 +169,28 @@ public: * \brief Return the instance type identifier. * \return instance type ID */ - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; - virtual void Print (std::ostream& os) const; + void Print (std::ostream& os) const override; /** * \brief Get the serialized size of the packet. * \return size */ - virtual uint32_t GetSerializedSize () const; + uint32_t GetSerializedSize () const override; /** * \brief Serialize the packet. * \param start Buffer iterator */ - virtual void Serialize (Buffer::Iterator start) const; + void Serialize (Buffer::Iterator start) const override; /** * \brief Deserialize the packet. * \param start Buffer iterator * \return size of the packet */ - virtual uint32_t Deserialize (Buffer::Iterator start); + uint32_t Deserialize (Buffer::Iterator start) override; /** * Commands to be used in Rip headers diff --git a/src/internet/model/rip.h b/src/internet/model/rip.h index 08aca7b19..7313b295a 100644 --- a/src/internet/model/rip.h +++ b/src/internet/model/rip.h @@ -175,7 +175,7 @@ class Rip : public Ipv4RoutingProtocol public: // /< C-tor Rip (); - virtual ~Rip (); + ~Rip () override; /** * \brief Get the type ID @@ -185,16 +185,16 @@ public: // From Ipv4RoutingProtocol Ptr RouteOutput (Ptr p, const Ipv4Header &header, Ptr oif, - Socket::SocketErrno &sockerr); + Socket::SocketErrno &sockerr) override; bool RouteInput (Ptr p, const Ipv4Header &header, Ptr idev, UnicastForwardCallback ucb, MulticastForwardCallback mcb, - LocalDeliverCallback lcb, ErrorCallback ecb); - virtual void NotifyInterfaceUp (uint32_t interface); - virtual void NotifyInterfaceDown (uint32_t interface); - virtual void NotifyAddAddress (uint32_t interface, Ipv4InterfaceAddress address); - virtual void NotifyRemoveAddress (uint32_t interface, Ipv4InterfaceAddress address); - virtual void SetIpv4 (Ptr ipv4); - virtual void PrintRoutingTable (Ptr stream, Time::Unit unit = Time::S) const; + LocalDeliverCallback lcb, ErrorCallback ecb) override; + void NotifyInterfaceUp (uint32_t interface) override; + void NotifyInterfaceDown (uint32_t interface) override; + void NotifyAddAddress (uint32_t interface, Ipv4InterfaceAddress address) override; + void NotifyRemoveAddress (uint32_t interface, Ipv4InterfaceAddress address) override; + void SetIpv4 (Ptr ipv4) override; + void PrintRoutingTable (Ptr stream, Time::Unit unit = Time::S) const override; /** * Split Horizon strategy type. See \RFC{2453}. @@ -256,12 +256,12 @@ protected: /** * \brief Dispose this object. */ - virtual void DoDispose (); + void DoDispose () override; /** * Start protocol operation */ - void DoInitialize (); + void DoInitialize () override; private: /// Container for the network routes - pair RipRoutingTableEntry *, EventId (update event) diff --git a/src/internet/model/ripng-header.h b/src/internet/model/ripng-header.h index 266c4d1d3..c3eaacf18 100644 --- a/src/internet/model/ripng-header.h +++ b/src/internet/model/ripng-header.h @@ -50,28 +50,28 @@ public: * \brief Return the instance type identifier. * \return instance type ID */ - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; - virtual void Print (std::ostream& os) const; + void Print (std::ostream& os) const override; /** * \brief Get the serialized size of the packet. * \return size */ - virtual uint32_t GetSerializedSize () const; + uint32_t GetSerializedSize () const override; /** * \brief Serialize the packet. * \param start Buffer iterator */ - virtual void Serialize (Buffer::Iterator start) const; + void Serialize (Buffer::Iterator start) const override; /** * \brief Deserialize the packet. * \param start Buffer iterator * \return size of the packet */ - virtual uint32_t Deserialize (Buffer::Iterator start); + uint32_t Deserialize (Buffer::Iterator start) override; /** * \brief Set the prefix @@ -158,28 +158,28 @@ public: * \brief Return the instance type identifier. * \return instance type ID */ - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; - virtual void Print (std::ostream& os) const; + void Print (std::ostream& os) const override; /** * \brief Get the serialized size of the packet. * \return size */ - virtual uint32_t GetSerializedSize () const; + uint32_t GetSerializedSize () const override; /** * \brief Serialize the packet. * \param start Buffer iterator */ - virtual void Serialize (Buffer::Iterator start) const; + void Serialize (Buffer::Iterator start) const override; /** * \brief Deserialize the packet. * \param start Buffer iterator * \return size of the packet */ - virtual uint32_t Deserialize (Buffer::Iterator start); + uint32_t Deserialize (Buffer::Iterator start) override; /** * Commands to be used in RipNg headers diff --git a/src/internet/model/ripng.h b/src/internet/model/ripng.h index b4eecd87b..fbb7ee490 100644 --- a/src/internet/model/ripng.h +++ b/src/internet/model/ripng.h @@ -92,7 +92,7 @@ public: */ RipNgRoutingTableEntry (Ipv6Address network, Ipv6Prefix networkPrefix, uint32_t interface); - virtual ~RipNgRoutingTableEntry (); + ~RipNgRoutingTableEntry () override; /** * \brief Set the route tag @@ -176,7 +176,7 @@ class RipNg : public Ipv6RoutingProtocol public: // /< C-tor RipNg (); - virtual ~RipNg (); + ~RipNg () override; /** * \brief Get the type ID @@ -186,20 +186,20 @@ public: // From Ipv6RoutingProtocol Ptr RouteOutput (Ptr p, const Ipv6Header &header, Ptr oif, - Socket::SocketErrno &sockerr); + Socket::SocketErrno &sockerr) override; bool RouteInput (Ptr p, const Ipv6Header &header, Ptr idev, UnicastForwardCallback ucb, MulticastForwardCallback mcb, - LocalDeliverCallback lcb, ErrorCallback ecb); - virtual void NotifyInterfaceUp (uint32_t interface); - virtual void NotifyInterfaceDown (uint32_t interface); - virtual void NotifyAddAddress (uint32_t interface, Ipv6InterfaceAddress address); - virtual void NotifyRemoveAddress (uint32_t interface, Ipv6InterfaceAddress address); - virtual void NotifyAddRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, - uint32_t interface, Ipv6Address prefixToUse = Ipv6Address::GetZero ()); - virtual void NotifyRemoveRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, - uint32_t interface, Ipv6Address prefixToUse = Ipv6Address::GetZero ()); - virtual void SetIpv6 (Ptr ipv6); - virtual void PrintRoutingTable (Ptr stream, Time::Unit unit = Time::S) const; + LocalDeliverCallback lcb, ErrorCallback ecb) override; + void NotifyInterfaceUp (uint32_t interface) override; + void NotifyInterfaceDown (uint32_t interface) override; + void NotifyAddAddress (uint32_t interface, Ipv6InterfaceAddress address) override; + void NotifyRemoveAddress (uint32_t interface, Ipv6InterfaceAddress address) override; + void NotifyAddRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, + uint32_t interface, Ipv6Address prefixToUse = Ipv6Address::GetZero ()) override; + void NotifyRemoveRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, + uint32_t interface, Ipv6Address prefixToUse = Ipv6Address::GetZero ()) override; + void SetIpv6 (Ptr ipv6) override; + void PrintRoutingTable (Ptr stream, Time::Unit unit = Time::S) const override; /** * Split Horizon strategy type. See \RFC{2080}. @@ -261,12 +261,12 @@ protected: /** * \brief Dispose this object. */ - virtual void DoDispose (); + void DoDispose () override; /** * Start protocol operation */ - void DoInitialize (); + void DoInitialize () override; private: /// Container for the network routes - pair RipNgRoutingTableEntry *, EventId (update event) diff --git a/src/internet/model/rtt-estimator.h b/src/internet/model/rtt-estimator.h index 8e90d1c72..6d8b42b3b 100644 --- a/src/internet/model/rtt-estimator.h +++ b/src/internet/model/rtt-estimator.h @@ -55,9 +55,9 @@ public: */ RttEstimator (const RttEstimator& r); - virtual ~RttEstimator(); + ~RttEstimator() override; - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * \brief Add a new measurement to the estimator. Pure virtual function. @@ -136,20 +136,20 @@ public: */ RttMeanDeviation (const RttMeanDeviation& r); - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * \brief Add a new measurement to the estimator. * \param measure the new RTT measure. */ - void Measurement (Time measure); + void Measurement (Time measure) override; - Ptr Copy () const; + Ptr Copy () const override; /** * \brief Resets the estimator. */ - void Reset (); + void Reset () override; private: /** diff --git a/src/internet/model/tcp-bbr.h b/src/internet/model/tcp-bbr.h index 97690e7f5..53c362e1a 100644 --- a/src/internet/model/tcp-bbr.h +++ b/src/internet/model/tcp-bbr.h @@ -101,18 +101,18 @@ public: */ virtual void SetStream (uint32_t stream); - virtual std::string GetName () const; - virtual bool HasCongControl () const; - virtual void CongControl (Ptr tcb, + std::string GetName () const override; + bool HasCongControl () const override; + void CongControl (Ptr tcb, const TcpRateOps::TcpRateConnection &rc, - const TcpRateOps::TcpRateSample &rs); - virtual void CongestionStateSet (Ptr tcb, - const TcpSocketState::TcpCongState_t newState); - virtual void CwndEvent (Ptr tcb, - const TcpSocketState::TcpCAEvent_t event); - virtual uint32_t GetSsThresh (Ptr tcb, - uint32_t bytesInFlight); - virtual Ptr Fork (); + const TcpRateOps::TcpRateSample &rs) override; + void CongestionStateSet (Ptr tcb, + const TcpSocketState::TcpCongState_t newState) override; + void CwndEvent (Ptr tcb, + const TcpSocketState::TcpCAEvent_t event) override; + uint32_t GetSsThresh (Ptr tcb, + uint32_t bytesInFlight) override; + Ptr Fork () override; protected: /** diff --git a/src/internet/model/tcp-bic.h b/src/internet/model/tcp-bic.h index d66374805..44d759d4d 100644 --- a/src/internet/model/tcp-bic.h +++ b/src/internet/model/tcp-bic.h @@ -98,13 +98,13 @@ public: */ TcpBic (const TcpBic &sock); - virtual std::string GetName () const; - virtual void IncreaseWindow (Ptr tcb, - uint32_t segmentsAcked); - virtual uint32_t GetSsThresh (Ptr tcb, - uint32_t bytesInFlight); + std::string GetName () const override; + void IncreaseWindow (Ptr tcb, + uint32_t segmentsAcked) override; + uint32_t GetSsThresh (Ptr tcb, + uint32_t bytesInFlight) override; - virtual Ptr Fork (); + Ptr Fork () override; protected: /** diff --git a/src/internet/model/tcp-congestion-ops.h b/src/internet/model/tcp-congestion-ops.h index 807ae3a95..d88283473 100644 --- a/src/internet/model/tcp-congestion-ops.h +++ b/src/internet/model/tcp-congestion-ops.h @@ -65,7 +65,7 @@ public: */ TcpCongestionOps (const TcpCongestionOps &other); - virtual ~TcpCongestionOps (); + ~TcpCongestionOps () override; /** * \brief Get the name of the congestion control algorithm @@ -228,14 +228,14 @@ public: */ TcpNewReno (const TcpNewReno& sock); - ~TcpNewReno (); + ~TcpNewReno () override; - std::string GetName () const; + std::string GetName () const override; - virtual void IncreaseWindow (Ptr tcb, uint32_t segmentsAcked); - virtual uint32_t GetSsThresh (Ptr tcb, - uint32_t bytesInFlight); - virtual Ptr Fork (); + void IncreaseWindow (Ptr tcb, uint32_t segmentsAcked) override; + uint32_t GetSsThresh (Ptr tcb, + uint32_t bytesInFlight) override; + Ptr Fork () override; protected: virtual uint32_t SlowStart (Ptr tcb, uint32_t segmentsAcked); diff --git a/src/internet/model/tcp-cubic.h b/src/internet/model/tcp-cubic.h index 0a9a0cfa8..02961c450 100644 --- a/src/internet/model/tcp-cubic.h +++ b/src/internet/model/tcp-cubic.h @@ -84,14 +84,14 @@ public: */ TcpCubic (const TcpCubic& sock); - virtual std::string GetName () const; - virtual void PktsAcked (Ptr tcb, uint32_t segmentsAcked, const Time& rtt); - virtual void IncreaseWindow (Ptr tcb, uint32_t segmentsAcked); - virtual uint32_t GetSsThresh (Ptr tcb, uint32_t bytesInFlight); - virtual void CongestionStateSet (Ptr tcb, - const TcpSocketState::TcpCongState_t newState); + std::string GetName () const override; + void PktsAcked (Ptr tcb, uint32_t segmentsAcked, const Time& rtt) override; + void IncreaseWindow (Ptr tcb, uint32_t segmentsAcked) override; + uint32_t GetSsThresh (Ptr tcb, uint32_t bytesInFlight) override; + void CongestionStateSet (Ptr tcb, + const TcpSocketState::TcpCongState_t newState) override; - virtual Ptr Fork (); + Ptr Fork () override; private: /** diff --git a/src/internet/model/tcp-dctcp.h b/src/internet/model/tcp-dctcp.h index 407113d65..5691c663f 100644 --- a/src/internet/model/tcp-dctcp.h +++ b/src/internet/model/tcp-dctcp.h @@ -58,10 +58,10 @@ public: /** * \brief Destructor */ - virtual ~TcpDctcp (); + ~TcpDctcp () override; // Documented in base class - virtual std::string GetName () const; + std::string GetName () const override; /** * \brief Set configuration required by congestion control algorithm, @@ -71,7 +71,7 @@ public: * * \param tcb internal congestion state */ - virtual void Init (Ptr tcb); + void Init (Ptr tcb) override; /** * TracedCallback signature for DCTCP update of congestion state @@ -83,13 +83,13 @@ public: typedef void (* CongestionEstimateTracedCallback)(uint32_t bytesAcked, uint32_t bytesMarked, double alpha); // Documented in base class - virtual uint32_t GetSsThresh (Ptr tcb, - uint32_t bytesInFlight); - virtual Ptr Fork (); - virtual void PktsAcked (Ptr tcb, uint32_t segmentsAcked, - const Time &rtt); - virtual void CwndEvent (Ptr tcb, - const TcpSocketState::TcpCAEvent_t event); + uint32_t GetSsThresh (Ptr tcb, + uint32_t bytesInFlight) override; + Ptr Fork () override; + void PktsAcked (Ptr tcb, uint32_t segmentsAcked, + const Time &rtt) override; + void CwndEvent (Ptr tcb, + const TcpSocketState::TcpCAEvent_t event) override; private: /** * \brief Changes state of m_ceState to true diff --git a/src/internet/model/tcp-header.h b/src/internet/model/tcp-header.h index 3557cc21c..427b38022 100644 --- a/src/internet/model/tcp-header.h +++ b/src/internet/model/tcp-header.h @@ -45,7 +45,7 @@ class TcpHeader : public Header { public: TcpHeader (); - virtual ~TcpHeader (); + ~TcpHeader () override; typedef std::list< Ptr > TcpOptionList; //!< List of TcpOption @@ -294,11 +294,11 @@ public: * \return the object TypeId */ static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId () const; - virtual void Print (std::ostream &os) const; - virtual uint32_t GetSerializedSize () const; - virtual void Serialize (Buffer::Iterator start) const; - virtual uint32_t Deserialize (Buffer::Iterator start); + TypeId GetInstanceTypeId () const override; + void Print (std::ostream &os) const override; + uint32_t GetSerializedSize () const override; + void Serialize (Buffer::Iterator start) const override; + uint32_t Deserialize (Buffer::Iterator start) override; /** * \brief Is the TCP checksum correct ? diff --git a/src/internet/model/tcp-highspeed.h b/src/internet/model/tcp-highspeed.h index e9a44af21..4f86e192e 100644 --- a/src/internet/model/tcp-highspeed.h +++ b/src/internet/model/tcp-highspeed.h @@ -65,14 +65,14 @@ public: * \param sock the object to copy */ TcpHighSpeed (const TcpHighSpeed& sock); - virtual ~TcpHighSpeed (); + ~TcpHighSpeed () override; - virtual std::string GetName () const; + std::string GetName () const override; - virtual uint32_t GetSsThresh (Ptr tcb, - uint32_t bytesInFlight); + uint32_t GetSsThresh (Ptr tcb, + uint32_t bytesInFlight) override; - virtual Ptr Fork (); + Ptr Fork () override; /** * \brief Lookup table for the coefficient a (from RFC 3649) @@ -93,7 +93,7 @@ public: static double TableLookupB (uint32_t w); protected: - virtual void CongestionAvoidance (Ptr tcb, uint32_t segmentsAcked); + void CongestionAvoidance (Ptr tcb, uint32_t segmentsAcked) override; private: uint32_t m_ackCnt; //!< Number of received ACK, corrected with the coefficient a diff --git a/src/internet/model/tcp-htcp.h b/src/internet/model/tcp-htcp.h index 18447f1f9..289923c33 100644 --- a/src/internet/model/tcp-htcp.h +++ b/src/internet/model/tcp-htcp.h @@ -63,18 +63,18 @@ public: * \param sock the object to copy */ TcpHtcp (const TcpHtcp& sock); - virtual ~TcpHtcp (); - virtual std::string GetName () const; - virtual Ptr Fork (); - virtual uint32_t GetSsThresh (Ptr tcb, - uint32_t bytesInFlight); + ~TcpHtcp () override; + std::string GetName () const override; + Ptr Fork () override; + uint32_t GetSsThresh (Ptr tcb, + uint32_t bytesInFlight) override; - virtual void PktsAcked (Ptr tcb, uint32_t segmentsAcked, - const Time &rtt); + void PktsAcked (Ptr tcb, uint32_t segmentsAcked, + const Time &rtt) override; protected: - virtual void CongestionAvoidance (Ptr tcb, - uint32_t segmentsAcked); + void CongestionAvoidance (Ptr tcb, + uint32_t segmentsAcked) override; private: /** diff --git a/src/internet/model/tcp-hybla.h b/src/internet/model/tcp-hybla.h index e0d29118f..deab48ee7 100644 --- a/src/internet/model/tcp-hybla.h +++ b/src/internet/model/tcp-hybla.h @@ -63,17 +63,17 @@ public: */ TcpHybla (const TcpHybla& sock); - virtual ~TcpHybla () override; + ~TcpHybla () override; // Inherited - virtual void PktsAcked (Ptr tcb, uint32_t segmentsAcked, + void PktsAcked (Ptr tcb, uint32_t segmentsAcked, const Time& rtt) override; - virtual std::string GetName () const override; - virtual Ptr Fork () override; + std::string GetName () const override; + Ptr Fork () override; protected: - virtual uint32_t SlowStart (Ptr tcb, uint32_t segmentsAcked) override; - virtual void CongestionAvoidance (Ptr tcb, uint32_t segmentsAcked) override; + uint32_t SlowStart (Ptr tcb, uint32_t segmentsAcked) override; + void CongestionAvoidance (Ptr tcb, uint32_t segmentsAcked) override; private: TracedValue m_rho; //!< Rho parameter diff --git a/src/internet/model/tcp-illinois.h b/src/internet/model/tcp-illinois.h index e3a9bb05e..fc4bcfe6f 100644 --- a/src/internet/model/tcp-illinois.h +++ b/src/internet/model/tcp-illinois.h @@ -124,9 +124,9 @@ public: * \param sock the object to copy */ TcpIllinois (const TcpIllinois& sock); - virtual ~TcpIllinois (); + ~TcpIllinois () override; - virtual std::string GetName () const; + std::string GetName () const override; /** * \brief Get slow start threshold after congestion event @@ -136,10 +136,10 @@ public: * * \return the slow start threshold value */ - virtual uint32_t GetSsThresh (Ptr tcb, - uint32_t bytesInFlight); + uint32_t GetSsThresh (Ptr tcb, + uint32_t bytesInFlight) override; - virtual Ptr Fork (); + Ptr Fork () override; /** * \brief Reset Illinois parameters to default values upon a loss @@ -147,8 +147,8 @@ public: * \param tcb internal congestion state * \param newState new congestion state to which the TCP is going to switch */ - virtual void CongestionStateSet (Ptr tcb, - const TcpSocketState::TcpCongState_t newState); + void CongestionStateSet (Ptr tcb, + const TcpSocketState::TcpCongState_t newState) override; /** * \brief Adjust cwnd following Illinois congestion avoidance algorithm @@ -156,7 +156,7 @@ public: * \param tcb internal congestion state * \param segmentsAcked count of segments ACKed */ - virtual void IncreaseWindow (Ptr tcb, uint32_t segmentsAcked); + void IncreaseWindow (Ptr tcb, uint32_t segmentsAcked) override; /** * \brief Measure RTT for each ACK @@ -166,8 +166,8 @@ public: * \param segmentsAcked count of segments ACKed * \param rtt last RTT */ - virtual void PktsAcked (Ptr tcb, uint32_t segmentsAcked, - const Time& rtt); + void PktsAcked (Ptr tcb, uint32_t segmentsAcked, + const Time& rtt) override; protected: private: diff --git a/src/internet/model/tcp-l4-protocol.h b/src/internet/model/tcp-l4-protocol.h index 81cce12df..05be21bbe 100644 --- a/src/internet/model/tcp-l4-protocol.h +++ b/src/internet/model/tcp-l4-protocol.h @@ -87,7 +87,7 @@ public: static const uint8_t PROT_NUMBER; //!< protocol number (0x6) TcpL4Protocol (); - virtual ~TcpL4Protocol (); + ~TcpL4Protocol () override; // Delete copy constructor and assignment operator to avoid misuse TcpL4Protocol (const TcpL4Protocol &) = delete; @@ -251,30 +251,30 @@ public: void DeAllocate (Ipv6EndPoint *endPoint); // From IpL4Protocol - virtual enum IpL4Protocol::RxStatus Receive (Ptr p, + enum IpL4Protocol::RxStatus Receive (Ptr p, Ipv4Header const &incomingIpHeader, - Ptr incomingInterface); - virtual enum IpL4Protocol::RxStatus Receive (Ptr p, + Ptr incomingInterface) override; + enum IpL4Protocol::RxStatus Receive (Ptr p, Ipv6Header const &incomingIpHeader, - Ptr incomingInterface); + Ptr incomingInterface) override; - virtual void ReceiveIcmp (Ipv4Address icmpSource, uint8_t icmpTtl, + void ReceiveIcmp (Ipv4Address icmpSource, uint8_t icmpTtl, uint8_t icmpType, uint8_t icmpCode, uint32_t icmpInfo, Ipv4Address payloadSource,Ipv4Address payloadDestination, - const uint8_t payload[8]); - virtual void ReceiveIcmp (Ipv6Address icmpSource, uint8_t icmpTtl, + const uint8_t payload[8]) override; + void ReceiveIcmp (Ipv6Address icmpSource, uint8_t icmpTtl, uint8_t icmpType, uint8_t icmpCode, uint32_t icmpInfo, Ipv6Address payloadSource,Ipv6Address payloadDestination, - const uint8_t payload[8]); + const uint8_t payload[8]) override; - virtual void SetDownTarget (IpL4Protocol::DownTargetCallback cb); - virtual void SetDownTarget6 (IpL4Protocol::DownTargetCallback6 cb); - virtual int GetProtocolNumber () const; - virtual IpL4Protocol::DownTargetCallback GetDownTarget () const; - virtual IpL4Protocol::DownTargetCallback6 GetDownTarget6 () const; + void SetDownTarget (IpL4Protocol::DownTargetCallback cb) override; + void SetDownTarget6 (IpL4Protocol::DownTargetCallback6 cb) override; + int GetProtocolNumber () const override; + IpL4Protocol::DownTargetCallback GetDownTarget () const override; + IpL4Protocol::DownTargetCallback6 GetDownTarget6 () const override; protected: - virtual void DoDispose (); + void DoDispose () override; /** * \brief Setup socket factory and callbacks when aggregated to a node @@ -285,7 +285,7 @@ protected: * The aggregation is completed by setting the node in the TCP stack, link * it to the ipv4 or ipv6 stack and adding TCP socket factory to the node. */ - virtual void NotifyNewAggregate (); + void NotifyNewAggregate () override; /** * \brief Get the tcp header of the incoming packet and checks its checksum if needed diff --git a/src/internet/model/tcp-ledbat.h b/src/internet/model/tcp-ledbat.h index f60647c66..4c998d206 100644 --- a/src/internet/model/tcp-ledbat.h +++ b/src/internet/model/tcp-ledbat.h @@ -79,14 +79,14 @@ public: /** * \brief Destructor */ - virtual ~TcpLedbat (); + ~TcpLedbat () override; /** * \brief Get the name of the TCP flavour * * \return The name of the TCP */ - virtual std::string GetName () const; + std::string GetName () const override; /** * \brief Get information from the acked packet @@ -95,11 +95,11 @@ public: * \param segmentsAcked count of segments ACKed * \param rtt The estimated rtt */ - virtual void PktsAcked (Ptr tcb, uint32_t segmentsAcked, - const Time& rtt); + void PktsAcked (Ptr tcb, uint32_t segmentsAcked, + const Time& rtt) override; // Inherited - virtual Ptr Fork (); + Ptr Fork () override; /** * \brief Adjust cwnd following LEDBAT algorithm @@ -107,7 +107,7 @@ public: * \param tcb internal congestion state * \param segmentsAcked count of segments ACKed */ - virtual void IncreaseWindow (Ptr tcb, uint32_t segmentsAcked); + void IncreaseWindow (Ptr tcb, uint32_t segmentsAcked) override; /** * \brief Change the Slow Start Capability @@ -123,7 +123,7 @@ protected: * \param tcb internal congestion state * \param segmentsAcked count of segments ACKed */ - virtual void CongestionAvoidance (Ptr tcb, uint32_t segmentsAcked); + void CongestionAvoidance (Ptr tcb, uint32_t segmentsAcked) override; private: /** diff --git a/src/internet/model/tcp-linux-reno.h b/src/internet/model/tcp-linux-reno.h index 58daef2c8..e9e0f09af 100644 --- a/src/internet/model/tcp-linux-reno.h +++ b/src/internet/model/tcp-linux-reno.h @@ -53,14 +53,14 @@ public: */ TcpLinuxReno (const TcpLinuxReno& sock); - ~TcpLinuxReno (); + ~TcpLinuxReno () override; - std::string GetName () const; + std::string GetName () const override; - virtual void IncreaseWindow (Ptr tcb, uint32_t segmentsAcked); - virtual uint32_t GetSsThresh (Ptr tcb, - uint32_t bytesInFlight); - virtual Ptr Fork (); + void IncreaseWindow (Ptr tcb, uint32_t segmentsAcked) override; + uint32_t GetSsThresh (Ptr tcb, + uint32_t bytesInFlight) override; + Ptr Fork () override; protected: /** diff --git a/src/internet/model/tcp-lp.h b/src/internet/model/tcp-lp.h index e99bf1a05..6d794d952 100644 --- a/src/internet/model/tcp-lp.h +++ b/src/internet/model/tcp-lp.h @@ -60,7 +60,7 @@ public: */ TcpLp (const TcpLp& sock); - virtual ~TcpLp (); + ~TcpLp () override; /** * \brief Timing information on received ACK @@ -72,12 +72,12 @@ public: * \param segmentsAcked count of segments acked * \param rtt last rtt */ - virtual void PktsAcked (Ptr tcb, uint32_t segmentsAcked, - const Time& rtt); + void PktsAcked (Ptr tcb, uint32_t segmentsAcked, + const Time& rtt) override; - virtual std::string GetName () const; + std::string GetName () const override; - virtual Ptr Fork (); + Ptr Fork () override; protected: /** @@ -86,7 +86,7 @@ protected: * \param tcb internal congestion state * \param segmentsAcked count of segments acked */ - virtual void CongestionAvoidance (Ptr tcb, uint32_t segmentsAcked); + void CongestionAvoidance (Ptr tcb, uint32_t segmentsAcked) override; private: /** diff --git a/src/internet/model/tcp-option-rfc793.h b/src/internet/model/tcp-option-rfc793.h index 61078aa30..cd0947c5a 100644 --- a/src/internet/model/tcp-option-rfc793.h +++ b/src/internet/model/tcp-option-rfc793.h @@ -33,21 +33,21 @@ class TcpOptionEnd : public TcpOption { public: TcpOptionEnd (); - virtual ~TcpOptionEnd (); + ~TcpOptionEnd () override; /** * \brief Get the type ID. * \return the object TypeId */ static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; - virtual void Print (std::ostream &os) const; - virtual void Serialize (Buffer::Iterator start) const; - virtual uint32_t Deserialize (Buffer::Iterator start); + void Print (std::ostream &os) const override; + void Serialize (Buffer::Iterator start) const override; + uint32_t Deserialize (Buffer::Iterator start) override; - virtual uint8_t GetKind () const; - virtual uint32_t GetSerializedSize () const; + uint8_t GetKind () const override; + uint32_t GetSerializedSize () const override; }; @@ -58,21 +58,21 @@ class TcpOptionNOP : public TcpOption { public: TcpOptionNOP (); - virtual ~TcpOptionNOP (); + ~TcpOptionNOP () override; /** * \brief Get the type ID. * \return the object TypeId */ static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; - virtual void Print (std::ostream &os) const; - virtual void Serialize (Buffer::Iterator start) const; - virtual uint32_t Deserialize (Buffer::Iterator start); + void Print (std::ostream &os) const override; + void Serialize (Buffer::Iterator start) const override; + uint32_t Deserialize (Buffer::Iterator start) override; - virtual uint8_t GetKind () const; - virtual uint32_t GetSerializedSize () const; + uint8_t GetKind () const override; + uint32_t GetSerializedSize () const override; }; /** @@ -82,21 +82,21 @@ class TcpOptionMSS : public TcpOption { public: TcpOptionMSS (); - virtual ~TcpOptionMSS (); + ~TcpOptionMSS () override; /** * \brief Get the type ID. * \return the object TypeId */ static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; - virtual void Print (std::ostream &os) const; - virtual void Serialize (Buffer::Iterator start) const; - virtual uint32_t Deserialize (Buffer::Iterator start); + void Print (std::ostream &os) const override; + void Serialize (Buffer::Iterator start) const override; + uint32_t Deserialize (Buffer::Iterator start) override; - virtual uint8_t GetKind () const; - virtual uint32_t GetSerializedSize () const; + uint8_t GetKind () const override; + uint32_t GetSerializedSize () const override; /** * \brief Get the Maximum Segment Size stored in the Option diff --git a/src/internet/model/tcp-option-sack-permitted.h b/src/internet/model/tcp-option-sack-permitted.h index cd3f63780..caacbcfa2 100644 --- a/src/internet/model/tcp-option-sack-permitted.h +++ b/src/internet/model/tcp-option-sack-permitted.h @@ -47,17 +47,17 @@ public: * \return the object TypeId */ static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; TcpOptionSackPermitted (); - virtual ~TcpOptionSackPermitted (); + ~TcpOptionSackPermitted () override; - virtual void Print (std::ostream &os) const; - virtual void Serialize (Buffer::Iterator start) const; - virtual uint32_t Deserialize (Buffer::Iterator start); + void Print (std::ostream &os) const override; + void Serialize (Buffer::Iterator start) const override; + uint32_t Deserialize (Buffer::Iterator start) override; - virtual uint8_t GetKind () const; - virtual uint32_t GetSerializedSize () const; + uint8_t GetKind () const override; + uint32_t GetSerializedSize () const override; }; } // namespace ns3 diff --git a/src/internet/model/tcp-option-sack.h b/src/internet/model/tcp-option-sack.h index 5c9b7aa26..8608be078 100644 --- a/src/internet/model/tcp-option-sack.h +++ b/src/internet/model/tcp-option-sack.h @@ -54,20 +54,20 @@ public: * \return the object TypeId */ static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; typedef std::pair SackBlock; //!< SACK block definition typedef std::list SackList; //!< SACK list definition TcpOptionSack (); - virtual ~TcpOptionSack (); + ~TcpOptionSack () override; - virtual void Print (std::ostream &os) const; - virtual void Serialize (Buffer::Iterator start) const; - virtual uint32_t Deserialize (Buffer::Iterator start); + void Print (std::ostream &os) const override; + void Serialize (Buffer::Iterator start) const override; + uint32_t Deserialize (Buffer::Iterator start) override; - virtual uint8_t GetKind () const; - virtual uint32_t GetSerializedSize () const; + uint8_t GetKind () const override; + uint32_t GetSerializedSize () const override; /** * \brief Add a SACK block diff --git a/src/internet/model/tcp-option-ts.h b/src/internet/model/tcp-option-ts.h index 612d85793..8fa00f2b0 100644 --- a/src/internet/model/tcp-option-ts.h +++ b/src/internet/model/tcp-option-ts.h @@ -36,21 +36,21 @@ class TcpOptionTS : public TcpOption { public: TcpOptionTS (); - virtual ~TcpOptionTS (); + ~TcpOptionTS () override; /** * \brief Get the type ID. * \return the object TypeId */ static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; - virtual void Print (std::ostream &os) const; - virtual void Serialize (Buffer::Iterator start) const; - virtual uint32_t Deserialize (Buffer::Iterator start); + void Print (std::ostream &os) const override; + void Serialize (Buffer::Iterator start) const override; + uint32_t Deserialize (Buffer::Iterator start) override; - virtual uint8_t GetKind () const; - virtual uint32_t GetSerializedSize () const; + uint8_t GetKind () const override; + uint32_t GetSerializedSize () const override; /** * \brief Get the timestamp stored in the Option diff --git a/src/internet/model/tcp-option-winscale.h b/src/internet/model/tcp-option-winscale.h index cf4629d0c..7404ed12b 100644 --- a/src/internet/model/tcp-option-winscale.h +++ b/src/internet/model/tcp-option-winscale.h @@ -55,17 +55,17 @@ public: * \return the object TypeId */ static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; TcpOptionWinScale (); - virtual ~TcpOptionWinScale (); + ~TcpOptionWinScale () override; - virtual void Print (std::ostream &os) const; - virtual void Serialize (Buffer::Iterator start) const; - virtual uint32_t Deserialize (Buffer::Iterator start); + void Print (std::ostream &os) const override; + void Serialize (Buffer::Iterator start) const override; + uint32_t Deserialize (Buffer::Iterator start) override; - virtual uint8_t GetKind () const; - virtual uint32_t GetSerializedSize () const; + uint8_t GetKind () const override; + uint32_t GetSerializedSize () const override; /** * \brief Get the scale value (uint8_t) diff --git a/src/internet/model/tcp-option.h b/src/internet/model/tcp-option.h index 1d9d0bc09..397d1111f 100644 --- a/src/internet/model/tcp-option.h +++ b/src/internet/model/tcp-option.h @@ -37,7 +37,7 @@ class TcpOption : public Object { public: TcpOption (); - virtual ~TcpOption (); + ~TcpOption () override; /** * \brief Get the type ID. @@ -45,7 +45,7 @@ public: */ static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * The option Kind, as defined in the respective RFCs. @@ -123,21 +123,21 @@ class TcpOptionUnknown : public TcpOption { public: TcpOptionUnknown (); - virtual ~TcpOptionUnknown (); + ~TcpOptionUnknown () override; /** * \brief Get the type ID. * \return the object TypeId */ static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; - virtual void Print (std::ostream &os) const; - virtual void Serialize (Buffer::Iterator start) const; - virtual uint32_t Deserialize (Buffer::Iterator start); + void Print (std::ostream &os) const override; + void Serialize (Buffer::Iterator start) const override; + uint32_t Deserialize (Buffer::Iterator start) override; - virtual uint8_t GetKind () const; - virtual uint32_t GetSerializedSize () const; + uint8_t GetKind () const override; + uint32_t GetSerializedSize () const override; private: uint8_t m_kind; //!< The unknown option kind diff --git a/src/internet/model/tcp-prr-recovery.h b/src/internet/model/tcp-prr-recovery.h index 81d9779d3..2ade26cd5 100644 --- a/src/internet/model/tcp-prr-recovery.h +++ b/src/internet/model/tcp-prr-recovery.h @@ -59,7 +59,7 @@ public: */ TcpPrrRecovery (const TcpPrrRecovery& sock); - virtual ~TcpPrrRecovery () override; + ~TcpPrrRecovery () override; /** * \brief Reduction Bound variant (CRB or SSRB) @@ -72,16 +72,16 @@ public: std::string GetName () const override; - virtual void EnterRecovery (Ptr tcb, uint32_t dupAckCount, + void EnterRecovery (Ptr tcb, uint32_t dupAckCount, uint32_t unAckDataCount, uint32_t deliveredBytes) override; - virtual void DoRecovery (Ptr tcb, uint32_t deliveredBytes) override; + void DoRecovery (Ptr tcb, uint32_t deliveredBytes) override; - virtual void ExitRecovery (Ptr tcb) override; + void ExitRecovery (Ptr tcb) override; - virtual void UpdateBytesSent (uint32_t bytesSent) override; + void UpdateBytesSent (uint32_t bytesSent) override; - virtual Ptr Fork () override; + Ptr Fork () override; private: uint32_t m_prrDelivered {0}; //!< total bytes delivered during recovery phase diff --git a/src/internet/model/tcp-rate-ops.h b/src/internet/model/tcp-rate-ops.h index d76e4f51c..e9d1c8209 100644 --- a/src/internet/model/tcp-rate-ops.h +++ b/src/internet/model/tcp-rate-ops.h @@ -186,20 +186,20 @@ public: * \return the object TypeId */ static TypeId GetTypeId (); - virtual ~TcpRateLinux () override + ~TcpRateLinux () override { } - virtual void SkbSent (TcpTxItem *skb, bool isStartOfTransmission) override; - virtual void SkbDelivered (TcpTxItem * skb) override; - virtual void CalculateAppLimited (uint32_t cWnd, uint32_t in_flight, + void SkbSent (TcpTxItem *skb, bool isStartOfTransmission) override; + void SkbDelivered (TcpTxItem * skb) override; + void CalculateAppLimited (uint32_t cWnd, uint32_t in_flight, uint32_t segmentSize, const SequenceNumber32 &tailSeq, const SequenceNumber32 &nextTx, const uint32_t lostOut, const uint32_t retransOut) override; - virtual const TcpRateSample & GenerateSample (uint32_t delivered, uint32_t lost, + const TcpRateSample & GenerateSample (uint32_t delivered, uint32_t lost, bool is_sack_reneg, uint32_t priorInFlight, const Time &minRtt) override; - virtual const TcpRateConnection & GetConnectionRate () override + const TcpRateConnection & GetConnectionRate () override { return m_rate; } diff --git a/src/internet/model/tcp-recovery-ops.h b/src/internet/model/tcp-recovery-ops.h index b9ab4dbfd..07f3b913c 100644 --- a/src/internet/model/tcp-recovery-ops.h +++ b/src/internet/model/tcp-recovery-ops.h @@ -80,7 +80,7 @@ public: /** * \brief Deconstructor */ - virtual ~TcpRecoveryOps (); + ~TcpRecoveryOps () override; /** * \brief Get the name of the recovery algorithm @@ -178,18 +178,18 @@ public: /** * \brief Constructor */ - virtual ~TcpClassicRecovery () override; + ~TcpClassicRecovery () override; - virtual std::string GetName () const override; + std::string GetName () const override; - virtual void EnterRecovery (Ptr tcb, uint32_t dupAckCount, + void EnterRecovery (Ptr tcb, uint32_t dupAckCount, uint32_t unAckDataCount, uint32_t deliveredBytes) override; - virtual void DoRecovery (Ptr tcb, uint32_t deliveredBytes) override; + void DoRecovery (Ptr tcb, uint32_t deliveredBytes) override; - virtual void ExitRecovery (Ptr tcb) override; + void ExitRecovery (Ptr tcb) override; - virtual Ptr Fork () override; + Ptr Fork () override; }; } // namespace ns3 diff --git a/src/internet/model/tcp-rx-buffer.h b/src/internet/model/tcp-rx-buffer.h index 5383df9f3..963fb948f 100644 --- a/src/internet/model/tcp-rx-buffer.h +++ b/src/internet/model/tcp-rx-buffer.h @@ -83,7 +83,7 @@ public: * \param n initial Sequence number to be received */ TcpRxBuffer (uint32_t n = 0); - virtual ~TcpRxBuffer (); + ~TcpRxBuffer () override; // Accessors /** diff --git a/src/internet/model/tcp-scalable.h b/src/internet/model/tcp-scalable.h index 44388cd8b..1e21aaa65 100644 --- a/src/internet/model/tcp-scalable.h +++ b/src/internet/model/tcp-scalable.h @@ -80,9 +80,9 @@ public: * \param sock the object to copy */ TcpScalable (const TcpScalable& sock); - virtual ~TcpScalable (); + ~TcpScalable () override; - virtual std::string GetName () const; + std::string GetName () const override; /** * \brief Get slow start threshold following Scalable principle (Equation 2) @@ -92,10 +92,10 @@ public: * * \return the slow start threshold value */ - virtual uint32_t GetSsThresh (Ptr tcb, - uint32_t bytesInFlight); + uint32_t GetSsThresh (Ptr tcb, + uint32_t bytesInFlight) override; - virtual Ptr Fork (); + Ptr Fork () override; protected: /** @@ -104,8 +104,8 @@ protected: * \param tcb internal congestion state * \param segmentsAcked count of segments acked */ - virtual void CongestionAvoidance (Ptr tcb, - uint32_t segmentsAcked); + void CongestionAvoidance (Ptr tcb, + uint32_t segmentsAcked) override; private: uint32_t m_ackCnt; //!< Number of received ACK diff --git a/src/internet/model/tcp-socket-base.h b/src/internet/model/tcp-socket-base.h index bb88ee8ce..3583ffd00 100644 --- a/src/internet/model/tcp-socket-base.h +++ b/src/internet/model/tcp-socket-base.h @@ -228,7 +228,7 @@ public: * \brief Get the instance TypeId * \return the instance TypeId */ - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * \brief TcpGeneralTest friend class (for tests). @@ -247,7 +247,7 @@ public: * \param sock the original Tcp Socket */ TcpSocketBase (const TcpSocketBase& sock); - virtual ~TcpSocketBase (); + ~TcpSocketBase () override; // Set associated Node, TcpL4Protocol, RttEstimator to this socket @@ -573,26 +573,26 @@ public: void SetPaceInitialWindow (bool paceWindow); // Necessary implementations of null functions from ns3::Socket - virtual enum SocketErrno GetErrno () const; // returns m_errno - virtual enum SocketType GetSocketType () const; // returns socket type - virtual Ptr GetNode () const; // returns m_node - virtual int Bind (); // Bind a socket by setting up endpoint in TcpL4Protocol - virtual int Bind6 (); // Bind a socket by setting up endpoint in TcpL4Protocol - virtual int Bind (const Address &address); // ... endpoint of specific addr or port - virtual int Connect (const Address &address); // Setup endpoint and call ProcessAction() to connect - virtual int Listen (); // Verify the socket is in a correct state and call ProcessAction() to listen - virtual int Close (); // Close by app: Kill socket upon tx buffer emptied - virtual int ShutdownSend (); // Assert the m_shutdownSend flag to prevent send to network - virtual int ShutdownRecv (); // Assert the m_shutdownRecv flag to prevent forward to app - virtual int Send (Ptr p, uint32_t flags); // Call by app to send data to network - virtual int SendTo (Ptr p, uint32_t flags, const Address &toAddress); // Same as Send(), toAddress is insignificant - virtual Ptr Recv (uint32_t maxSize, uint32_t flags); // Return a packet to be forwarded to app - virtual Ptr RecvFrom (uint32_t maxSize, uint32_t flags, Address &fromAddress); // ... and write the remote address at fromAddress - virtual uint32_t GetTxAvailable () const; // Available Tx buffer size - virtual uint32_t GetRxAvailable () const; // Available-to-read data size, i.e. value of m_rxAvailable - virtual int GetSockName (Address &address) const; // Return local addr:port in address - virtual int GetPeerName (Address &address) const; - virtual void BindToNetDevice (Ptr netdevice); // NetDevice with my m_endPoint + enum SocketErrno GetErrno () const override; // returns m_errno + enum SocketType GetSocketType () const override; // returns socket type + Ptr GetNode () const override; // returns m_node + int Bind () override; // Bind a socket by setting up endpoint in TcpL4Protocol + int Bind6 () override; // Bind a socket by setting up endpoint in TcpL4Protocol + int Bind (const Address &address) override; // ... endpoint of specific addr or port + int Connect (const Address &address) override; // Setup endpoint and call ProcessAction() to connect + int Listen () override; // Verify the socket is in a correct state and call ProcessAction() to listen + int Close () override; // Close by app: Kill socket upon tx buffer emptied + int ShutdownSend () override; // Assert the m_shutdownSend flag to prevent send to network + int ShutdownRecv () override; // Assert the m_shutdownRecv flag to prevent forward to app + int Send (Ptr p, uint32_t flags) override; // Call by app to send data to network + int SendTo (Ptr p, uint32_t flags, const Address &toAddress) override; // Same as Send(), toAddress is insignificant + Ptr Recv (uint32_t maxSize, uint32_t flags) override; // Return a packet to be forwarded to app + Ptr RecvFrom (uint32_t maxSize, uint32_t flags, Address &fromAddress) override; // ... and write the remote address at fromAddress + uint32_t GetTxAvailable () const override; // Available Tx buffer size + uint32_t GetRxAvailable () const override; // Available-to-read data size, i.e. value of m_rxAvailable + int GetSockName (Address &address) const override; // Return local addr:port in address + int GetPeerName (Address &address) const override; + void BindToNetDevice (Ptr netdevice) override; // NetDevice with my m_endPoint /** * TracedCallback signature for tcp packet transmission or reception events. @@ -608,32 +608,32 @@ protected: // Implementing ns3::TcpSocket -- Attribute get/set // inherited, no need to doc - virtual void SetSndBufSize (uint32_t size); - virtual uint32_t GetSndBufSize () const; - virtual void SetRcvBufSize (uint32_t size); - virtual uint32_t GetRcvBufSize () const; - virtual void SetSegSize (uint32_t size); - virtual uint32_t GetSegSize () const; - virtual void SetInitialSSThresh (uint32_t threshold); - virtual uint32_t GetInitialSSThresh () const; - virtual void SetInitialCwnd (uint32_t cwnd); - virtual uint32_t GetInitialCwnd () const; - virtual void SetConnTimeout (Time timeout); - virtual Time GetConnTimeout () const; - virtual void SetSynRetries (uint32_t count); - virtual uint32_t GetSynRetries () const; - virtual void SetDataRetries (uint32_t retries); - virtual uint32_t GetDataRetries () const; - virtual void SetDelAckTimeout (Time timeout); - virtual Time GetDelAckTimeout () const; - virtual void SetDelAckMaxCount (uint32_t count); - virtual uint32_t GetDelAckMaxCount () const; - virtual void SetTcpNoDelay (bool noDelay); - virtual bool GetTcpNoDelay () const; - virtual void SetPersistTimeout (Time timeout); - virtual Time GetPersistTimeout () const; - virtual bool SetAllowBroadcast (bool allowBroadcast); - virtual bool GetAllowBroadcast () const; + void SetSndBufSize (uint32_t size) override; + uint32_t GetSndBufSize () const override; + void SetRcvBufSize (uint32_t size) override; + uint32_t GetRcvBufSize () const override; + void SetSegSize (uint32_t size) override; + uint32_t GetSegSize () const override; + void SetInitialSSThresh (uint32_t threshold) override; + uint32_t GetInitialSSThresh () const override; + void SetInitialCwnd (uint32_t cwnd) override; + uint32_t GetInitialCwnd () const override; + void SetConnTimeout (Time timeout) override; + Time GetConnTimeout () const override; + void SetSynRetries (uint32_t count) override; + uint32_t GetSynRetries () const override; + void SetDataRetries (uint32_t retries) override; + uint32_t GetDataRetries () const override; + void SetDelAckTimeout (Time timeout) override; + Time GetDelAckTimeout () const override; + void SetDelAckMaxCount (uint32_t count) override; + uint32_t GetDelAckMaxCount () const override; + void SetTcpNoDelay (bool noDelay) override; + bool GetTcpNoDelay () const override; + void SetPersistTimeout (Time timeout) override; + Time GetPersistTimeout () const override; + bool SetAllowBroadcast (bool allowBroadcast) override; + bool GetAllowBroadcast () const override; diff --git a/src/internet/model/tcp-socket-factory-impl.h b/src/internet/model/tcp-socket-factory-impl.h index 832e45dce..3796e27c9 100644 --- a/src/internet/model/tcp-socket-factory-impl.h +++ b/src/internet/model/tcp-socket-factory-impl.h @@ -40,7 +40,7 @@ class TcpSocketFactoryImpl : public TcpSocketFactory { public: TcpSocketFactoryImpl (); - virtual ~TcpSocketFactoryImpl (); + ~TcpSocketFactoryImpl () override; /** * \brief Set the associated TCP L4 protocol. @@ -48,10 +48,10 @@ public: */ void SetTcp (Ptr tcp); - virtual Ptr CreateSocket (); + Ptr CreateSocket () override; protected: - virtual void DoDispose (); + void DoDispose () override; private: Ptr m_tcp; //!< the associated TCP L4 protocol }; diff --git a/src/internet/model/tcp-socket.h b/src/internet/model/tcp-socket.h index 204297bc4..91c81c353 100644 --- a/src/internet/model/tcp-socket.h +++ b/src/internet/model/tcp-socket.h @@ -55,7 +55,7 @@ public: static TypeId GetTypeId (); TcpSocket (); - virtual ~TcpSocket (); + ~TcpSocket () override; /** * \ingroup tcp diff --git a/src/internet/model/tcp-tx-buffer.h b/src/internet/model/tcp-tx-buffer.h index 10d39c320..643f219e1 100644 --- a/src/internet/model/tcp-tx-buffer.h +++ b/src/internet/model/tcp-tx-buffer.h @@ -132,7 +132,7 @@ public: * \param n initial Sequence number to be transmitted */ TcpTxBuffer (uint32_t n = 0); - virtual ~TcpTxBuffer (); + ~TcpTxBuffer () override; // Accessors diff --git a/src/internet/model/tcp-vegas.h b/src/internet/model/tcp-vegas.h index 843264f93..3b445473a 100644 --- a/src/internet/model/tcp-vegas.h +++ b/src/internet/model/tcp-vegas.h @@ -81,9 +81,9 @@ public: * \param sock the object to copy */ TcpVegas (const TcpVegas& sock); - virtual ~TcpVegas (); + ~TcpVegas () override; - virtual std::string GetName () const; + std::string GetName () const override; /** * \brief Compute RTTs needed to execute Vegas algorithm @@ -100,8 +100,8 @@ public: * \param rtt last RTT * */ - virtual void PktsAcked (Ptr tcb, uint32_t segmentsAcked, - const Time& rtt); + void PktsAcked (Ptr tcb, uint32_t segmentsAcked, + const Time& rtt) override; /** * \brief Enable/disable Vegas algorithm depending on the congestion state @@ -111,8 +111,8 @@ public: * \param tcb internal congestion state * \param newState new congestion state to which the TCP is going to switch */ - virtual void CongestionStateSet (Ptr tcb, - const TcpSocketState::TcpCongState_t newState); + void CongestionStateSet (Ptr tcb, + const TcpSocketState::TcpCongState_t newState) override; /** * \brief Adjust cwnd following Vegas linear increase/decrease algorithm @@ -120,7 +120,7 @@ public: * \param tcb internal congestion state * \param segmentsAcked count of segments ACKed */ - virtual void IncreaseWindow (Ptr tcb, uint32_t segmentsAcked); + void IncreaseWindow (Ptr tcb, uint32_t segmentsAcked) override; /** * \brief Get slow start threshold following Vegas principle @@ -130,10 +130,10 @@ public: * * \return the slow start threshold value */ - virtual uint32_t GetSsThresh (Ptr tcb, - uint32_t bytesInFlight); + uint32_t GetSsThresh (Ptr tcb, + uint32_t bytesInFlight) override; - virtual Ptr Fork (); + Ptr Fork () override; protected: private: diff --git a/src/internet/model/tcp-veno.h b/src/internet/model/tcp-veno.h index 01a90da6f..71e53b8fd 100644 --- a/src/internet/model/tcp-veno.h +++ b/src/internet/model/tcp-veno.h @@ -87,9 +87,9 @@ public: * \param sock the object to copy */ TcpVeno (const TcpVeno& sock); - virtual ~TcpVeno (); + ~TcpVeno () override; - virtual std::string GetName () const; + std::string GetName () const override; /** * \brief Perform RTT sampling needed to execute Veno algorithm @@ -106,8 +106,8 @@ public: * \param rtt last RTT * */ - virtual void PktsAcked (Ptr tcb, uint32_t segmentsAcked, - const Time& rtt); + void PktsAcked (Ptr tcb, uint32_t segmentsAcked, + const Time& rtt) override; /** * \brief Enable/disable Veno depending on the congestion state @@ -117,8 +117,8 @@ public: * \param tcb internal congestion state * \param newState new congestion state to which the TCP is going to switch */ - virtual void CongestionStateSet (Ptr tcb, - const TcpSocketState::TcpCongState_t newState); + void CongestionStateSet (Ptr tcb, + const TcpSocketState::TcpCongState_t newState) override; /** * \brief Adjust cwnd following Veno additive increase algorithm @@ -126,7 +126,7 @@ public: * \param tcb internal congestion state * \param segmentsAcked count of segments ACKed */ - virtual void IncreaseWindow (Ptr tcb, uint32_t segmentsAcked); + void IncreaseWindow (Ptr tcb, uint32_t segmentsAcked) override; /** * \brief Get slow start threshold during Veno multiplicative-decrease phase @@ -136,10 +136,10 @@ public: * * \return the slow start threshold value */ - virtual uint32_t GetSsThresh (Ptr tcb, - uint32_t bytesInFlight); + uint32_t GetSsThresh (Ptr tcb, + uint32_t bytesInFlight) override; - virtual Ptr Fork (); + Ptr Fork () override; protected: private: diff --git a/src/internet/model/tcp-westwood.h b/src/internet/model/tcp-westwood.h index 35b084e87..537839e96 100644 --- a/src/internet/model/tcp-westwood.h +++ b/src/internet/model/tcp-westwood.h @@ -78,7 +78,7 @@ public: * \param sock the object to copy */ TcpWestwood (const TcpWestwood& sock); - virtual ~TcpWestwood (); + ~TcpWestwood () override; /** * \brief Protocol variant (Westwood or Westwood+) @@ -98,13 +98,13 @@ public: TUSTIN }; - virtual uint32_t GetSsThresh (Ptr tcb, - uint32_t bytesInFlight); + uint32_t GetSsThresh (Ptr tcb, + uint32_t bytesInFlight) override; - virtual void PktsAcked (Ptr tcb, uint32_t packetsAcked, - const Time& rtt); + void PktsAcked (Ptr tcb, uint32_t packetsAcked, + const Time& rtt) override; - virtual Ptr Fork (); + Ptr Fork () override; private: /** diff --git a/src/internet/model/tcp-yeah.h b/src/internet/model/tcp-yeah.h index 4698f5bf6..907ad002d 100644 --- a/src/internet/model/tcp-yeah.h +++ b/src/internet/model/tcp-yeah.h @@ -88,9 +88,9 @@ public: * \param sock the object to copy */ TcpYeah (const TcpYeah& sock); - virtual ~TcpYeah (); + ~TcpYeah () override; - virtual std::string GetName () const; + std::string GetName () const override; /** * \brief Compute RTTs needed to execute YeAH algorithm @@ -107,8 +107,8 @@ public: * \param rtt last RTT * */ - virtual void PktsAcked (Ptr tcb, uint32_t segmentsAcked, - const Time& rtt); + void PktsAcked (Ptr tcb, uint32_t segmentsAcked, + const Time& rtt) override; /** * \brief Enable/disable YeAH algorithm depending on the congestion state @@ -118,8 +118,8 @@ public: * \param tcb internal congestion state * \param newState new congestion state to which the TCP is going to switch */ - virtual void CongestionStateSet (Ptr tcb, - const TcpSocketState::TcpCongState_t newState); + void CongestionStateSet (Ptr tcb, + const TcpSocketState::TcpCongState_t newState) override; /** * \brief Adjust cwnd following YeAH dual-mode algorithm @@ -127,7 +127,7 @@ public: * \param tcb internal congestion state * \param segmentsAcked count of segments ACKed */ - virtual void IncreaseWindow (Ptr tcb, uint32_t segmentsAcked); + void IncreaseWindow (Ptr tcb, uint32_t segmentsAcked) override; /** * \brief Get slow start threshold upon the receipt of 3 dupACKs @@ -137,10 +137,10 @@ public: * * \return the slow start threshold value */ - virtual uint32_t GetSsThresh (Ptr tcb, - uint32_t bytesInFlight); + uint32_t GetSsThresh (Ptr tcb, + uint32_t bytesInFlight) override; - virtual Ptr Fork (); + Ptr Fork () override; protected: private: diff --git a/src/internet/model/udp-header.h b/src/internet/model/udp-header.h index 71a009c52..99dec42df 100644 --- a/src/internet/model/udp-header.h +++ b/src/internet/model/udp-header.h @@ -46,7 +46,7 @@ public: * Creates a null header */ UdpHeader (); - ~UdpHeader (); + ~UdpHeader () override; /** * \brief Enable checksum calculation for UDP @@ -119,11 +119,11 @@ public: * \return the object TypeId */ static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId () const; - virtual void Print (std::ostream &os) const; - virtual uint32_t GetSerializedSize () const; - virtual void Serialize (Buffer::Iterator start) const; - virtual uint32_t Deserialize (Buffer::Iterator start); + TypeId GetInstanceTypeId () const override; + void Print (std::ostream &os) const override; + uint32_t GetSerializedSize () const override; + void Serialize (Buffer::Iterator start) const override; + uint32_t Deserialize (Buffer::Iterator start) override; /** * \brief Is the UDP checksum correct ? diff --git a/src/internet/model/udp-l4-protocol.h b/src/internet/model/udp-l4-protocol.h index a33e2b97f..f2d40d3ee 100644 --- a/src/internet/model/udp-l4-protocol.h +++ b/src/internet/model/udp-l4-protocol.h @@ -68,7 +68,7 @@ public: static const uint8_t PROT_NUMBER; //!< protocol number (0x11) UdpL4Protocol (); - virtual ~UdpL4Protocol (); + ~UdpL4Protocol () override; // Delete copy constructor and assignment operator to avoid misuse UdpL4Protocol (const UdpL4Protocol &) = delete; @@ -80,7 +80,7 @@ public: */ void SetNode (Ptr node); - virtual int GetProtocolNumber () const; + int GetProtocolNumber () const override; /** * \return A smart Socket pointer to a UdpSocket, allocated by this instance @@ -226,36 +226,36 @@ public: uint16_t sport, uint16_t dport, Ptr route); // inherited from Ipv4L4Protocol - virtual enum IpL4Protocol::RxStatus Receive (Ptr p, + enum IpL4Protocol::RxStatus Receive (Ptr p, Ipv4Header const &header, - Ptr interface); - virtual enum IpL4Protocol::RxStatus Receive (Ptr p, + Ptr interface) override; + enum IpL4Protocol::RxStatus Receive (Ptr p, Ipv6Header const &header, - Ptr interface); + Ptr interface) override; - virtual void ReceiveIcmp (Ipv4Address icmpSource, uint8_t icmpTtl, + void ReceiveIcmp (Ipv4Address icmpSource, uint8_t icmpTtl, uint8_t icmpType, uint8_t icmpCode, uint32_t icmpInfo, Ipv4Address payloadSource,Ipv4Address payloadDestination, - const uint8_t payload[8]); - virtual void ReceiveIcmp (Ipv6Address icmpSource, uint8_t icmpTtl, + const uint8_t payload[8]) override; + void ReceiveIcmp (Ipv6Address icmpSource, uint8_t icmpTtl, uint8_t icmpType, uint8_t icmpCode, uint32_t icmpInfo, Ipv6Address payloadSource,Ipv6Address payloadDestination, - const uint8_t payload[8]); + const uint8_t payload[8]) override; // From IpL4Protocol - virtual void SetDownTarget (IpL4Protocol::DownTargetCallback cb); - virtual void SetDownTarget6 (IpL4Protocol::DownTargetCallback6 cb); + void SetDownTarget (IpL4Protocol::DownTargetCallback cb) override; + void SetDownTarget6 (IpL4Protocol::DownTargetCallback6 cb) override; // From IpL4Protocol - virtual IpL4Protocol::DownTargetCallback GetDownTarget () const; - virtual IpL4Protocol::DownTargetCallback6 GetDownTarget6 () const; + IpL4Protocol::DownTargetCallback GetDownTarget () const override; + IpL4Protocol::DownTargetCallback6 GetDownTarget6 () const override; protected: - virtual void DoDispose (); + void DoDispose () override; /* * This function will notify other components connected to the node that a new stack member is now connected * This will be used to notify Layer 3 protocol of layer 4 protocol stack to connect them together. */ - virtual void NotifyNewAggregate (); + void NotifyNewAggregate () override; private: Ptr m_node; //!< the node this stack is associated with Ipv4EndPointDemux *m_endPoints; //!< A list of IPv4 end points. diff --git a/src/internet/model/udp-socket-factory-impl.h b/src/internet/model/udp-socket-factory-impl.h index d20c3a2f0..3ede391ff 100644 --- a/src/internet/model/udp-socket-factory-impl.h +++ b/src/internet/model/udp-socket-factory-impl.h @@ -40,7 +40,7 @@ class UdpSocketFactoryImpl : public UdpSocketFactory { public: UdpSocketFactoryImpl (); - virtual ~UdpSocketFactoryImpl (); + ~UdpSocketFactoryImpl () override; /** * \brief Set the associated UDP L4 protocol. @@ -54,10 +54,10 @@ public: * * \return smart pointer to Socket */ - virtual Ptr CreateSocket (); + Ptr CreateSocket () override; protected: - virtual void DoDispose (); + void DoDispose () override; private: Ptr m_udp; //!< the associated UDP L4 protocol }; diff --git a/src/internet/model/udp-socket-impl.h b/src/internet/model/udp-socket-impl.h index f4a391c05..2ccc8288e 100644 --- a/src/internet/model/udp-socket-impl.h +++ b/src/internet/model/udp-socket-impl.h @@ -78,7 +78,7 @@ public: * Create an unbound udp socket. */ UdpSocketImpl (); - virtual ~UdpSocketImpl (); + ~UdpSocketImpl () override; /** * \brief Set the associated node. @@ -91,45 +91,45 @@ public: */ void SetUdp (Ptr udp); - virtual enum SocketErrno GetErrno () const; - virtual enum SocketType GetSocketType () const; - virtual Ptr GetNode () const; - virtual int Bind (); - virtual int Bind6 (); - virtual int Bind (const Address &address); - virtual int Close (); - virtual int ShutdownSend (); - virtual int ShutdownRecv (); - virtual int Connect (const Address &address); - virtual int Listen (); - virtual uint32_t GetTxAvailable () const; - virtual int Send (Ptr p, uint32_t flags); - virtual int SendTo (Ptr p, uint32_t flags, const Address &address); - virtual uint32_t GetRxAvailable () const; - virtual Ptr Recv (uint32_t maxSize, uint32_t flags); - virtual Ptr RecvFrom (uint32_t maxSize, uint32_t flags, - Address &fromAddress); - virtual int GetSockName (Address &address) const; - virtual int GetPeerName (Address &address) const; - virtual int MulticastJoinGroup (uint32_t interfaceIndex, const Address &groupAddress); - virtual int MulticastLeaveGroup (uint32_t interfaceIndex, const Address &groupAddress); - virtual void BindToNetDevice (Ptr netdevice); - virtual bool SetAllowBroadcast (bool allowBroadcast); - virtual bool GetAllowBroadcast () const; - virtual void Ipv6JoinGroup (Ipv6Address address, Socket::Ipv6MulticastFilterMode filterMode, std::vector sourceAddresses); + enum SocketErrno GetErrno () const override; + enum SocketType GetSocketType () const override; + Ptr GetNode () const override; + int Bind () override; + int Bind6 () override; + int Bind (const Address &address) override; + int Close () override; + int ShutdownSend () override; + int ShutdownRecv () override; + int Connect (const Address &address) override; + int Listen () override; + uint32_t GetTxAvailable () const override; + int Send (Ptr p, uint32_t flags) override; + int SendTo (Ptr p, uint32_t flags, const Address &address) override; + uint32_t GetRxAvailable () const override; + Ptr Recv (uint32_t maxSize, uint32_t flags) override; + Ptr RecvFrom (uint32_t maxSize, uint32_t flags, + Address &fromAddress) override; + int GetSockName (Address &address) const override; + int GetPeerName (Address &address) const override; + int MulticastJoinGroup (uint32_t interfaceIndex, const Address &groupAddress) override; + int MulticastLeaveGroup (uint32_t interfaceIndex, const Address &groupAddress) override; + void BindToNetDevice (Ptr netdevice) override; + bool SetAllowBroadcast (bool allowBroadcast) override; + bool GetAllowBroadcast () const override; + void Ipv6JoinGroup (Ipv6Address address, Socket::Ipv6MulticastFilterMode filterMode, std::vector sourceAddresses) override; private: // Attributes set through UdpSocket base class - virtual void SetRcvBufSize (uint32_t size); - virtual uint32_t GetRcvBufSize () const; - virtual void SetIpMulticastTtl (uint8_t ipTtl); - virtual uint8_t GetIpMulticastTtl () const; - virtual void SetIpMulticastIf (int32_t ipIf); - virtual int32_t GetIpMulticastIf () const; - virtual void SetIpMulticastLoop (bool loop); - virtual bool GetIpMulticastLoop () const; - virtual void SetMtuDiscover (bool discover); - virtual bool GetMtuDiscover () const; + void SetRcvBufSize (uint32_t size) override; + uint32_t GetRcvBufSize () const override; + void SetIpMulticastTtl (uint8_t ipTtl) override; + uint8_t GetIpMulticastTtl () const override; + void SetIpMulticastIf (int32_t ipIf) override; + int32_t GetIpMulticastIf () const override; + void SetIpMulticastLoop (bool loop) override; + bool GetIpMulticastLoop () const override; + void SetMtuDiscover (bool discover) override; + bool GetMtuDiscover () const override; /** diff --git a/src/internet/model/udp-socket.h b/src/internet/model/udp-socket.h index ee8633443..0dab26480 100644 --- a/src/internet/model/udp-socket.h +++ b/src/internet/model/udp-socket.h @@ -55,7 +55,7 @@ public: static TypeId GetTypeId (); UdpSocket (); - virtual ~UdpSocket (); + ~UdpSocket () override; /** * \brief Corresponds to socket option MCAST_JOIN_GROUP diff --git a/src/internet/test/global-route-manager-impl-test-suite.cc b/src/internet/test/global-route-manager-impl-test-suite.cc index 81fa0ce58..7b7cb9ae3 100644 --- a/src/internet/test/global-route-manager-impl-test-suite.cc +++ b/src/internet/test/global-route-manager-impl-test-suite.cc @@ -46,7 +46,7 @@ class GlobalRouteManagerImplTestCase : public TestCase { public: GlobalRouteManagerImplTestCase(); - virtual void DoRun (); + void DoRun () override; }; GlobalRouteManagerImplTestCase::GlobalRouteManagerImplTestCase() diff --git a/src/internet/test/icmp-test.cc b/src/internet/test/icmp-test.cc index 7d2d53811..a09a0c4cb 100644 --- a/src/internet/test/icmp-test.cc +++ b/src/internet/test/icmp-test.cc @@ -98,7 +98,7 @@ class IcmpEchoReplyTestCase : public TestCase { public: IcmpEchoReplyTestCase (); - virtual ~IcmpEchoReplyTestCase (); + ~IcmpEchoReplyTestCase () override; /** * Send data @@ -113,7 +113,7 @@ public: void ReceivePkt (Ptr socket); private: - virtual void DoRun (); + void DoRun () override; Ptr m_receivedPacket; //!< received packet }; @@ -230,7 +230,7 @@ class IcmpTimeExceedTestCase : public TestCase { public: IcmpTimeExceedTestCase (); - virtual ~IcmpTimeExceedTestCase (); + ~IcmpTimeExceedTestCase () override; /** * Send data @@ -245,7 +245,7 @@ public: void ReceivePkt (Ptr socket); private: - virtual void DoRun (); + void DoRun () override; Ptr m_receivedPacket; //!< received packet }; @@ -374,7 +374,7 @@ class IcmpV6EchoReplyTestCase : public TestCase { public: IcmpV6EchoReplyTestCase (); - virtual ~IcmpV6EchoReplyTestCase (); + ~IcmpV6EchoReplyTestCase () override; /** * Send data @@ -389,7 +389,7 @@ public: void ReceivePkt (Ptr socket); private: - virtual void DoRun (); + void DoRun () override; Ptr m_receivedPacket; //!< received packet }; @@ -515,7 +515,7 @@ class IcmpV6TimeExceedTestCase : public TestCase { public: IcmpV6TimeExceedTestCase (); - virtual ~IcmpV6TimeExceedTestCase (); + ~IcmpV6TimeExceedTestCase () override; /** * Send data @@ -530,7 +530,7 @@ public: void ReceivePkt (Ptr socket); private: - virtual void DoRun (); + void DoRun () override; Ptr m_receivedPacket; //!< received packet }; diff --git a/src/internet/test/ipv4-address-generator-test-suite.cc b/src/internet/test/ipv4-address-generator-test-suite.cc index 21dad3416..6a201bc7f 100644 --- a/src/internet/test/ipv4-address-generator-test-suite.cc +++ b/src/internet/test/ipv4-address-generator-test-suite.cc @@ -32,8 +32,8 @@ class NetworkNumberAllocatorTestCase : public TestCase { public: NetworkNumberAllocatorTestCase (); - virtual void DoRun (); - virtual void DoTeardown (); + void DoRun () override; + void DoTeardown () override; }; NetworkNumberAllocatorTestCase::NetworkNumberAllocatorTestCase () @@ -89,8 +89,8 @@ class AddressAllocatorTestCase : public TestCase public: AddressAllocatorTestCase (); private: - virtual void DoRun (); - virtual void DoTeardown (); + void DoRun () override; + void DoTeardown () override; }; AddressAllocatorTestCase::AddressAllocatorTestCase () @@ -143,8 +143,8 @@ class NetworkAndAddressTestCase : public TestCase { public: NetworkAndAddressTestCase (); - virtual void DoRun (); - virtual void DoTeardown (); + void DoRun () override; + void DoTeardown () override; }; NetworkAndAddressTestCase::NetworkAndAddressTestCase () @@ -213,8 +213,8 @@ class ExampleAddressGeneratorTestCase : public TestCase public: ExampleAddressGeneratorTestCase (); private: - virtual void DoRun (); - virtual void DoTeardown (); + void DoRun () override; + void DoTeardown () override; }; ExampleAddressGeneratorTestCase::ExampleAddressGeneratorTestCase () @@ -271,8 +271,8 @@ class AddressCollisionTestCase : public TestCase public: AddressCollisionTestCase (); private: - void DoRun (); - void DoTeardown (); + void DoRun () override; + void DoTeardown () override; }; AddressCollisionTestCase::AddressCollisionTestCase () diff --git a/src/internet/test/ipv4-address-helper-test-suite.cc b/src/internet/test/ipv4-address-helper-test-suite.cc index dd31be55d..40ae5af12 100644 --- a/src/internet/test/ipv4-address-helper-test-suite.cc +++ b/src/internet/test/ipv4-address-helper-test-suite.cc @@ -34,8 +34,8 @@ class NetworkAllocatorHelperTestCase : public TestCase public: NetworkAllocatorHelperTestCase (); private: - virtual void DoRun (); - virtual void DoTeardown (); + void DoRun () override; + void DoTeardown () override; }; NetworkAllocatorHelperTestCase::NetworkAllocatorHelperTestCase () @@ -86,8 +86,8 @@ class AddressAllocatorHelperTestCase : public TestCase public: AddressAllocatorHelperTestCase (); private: - virtual void DoRun (); - virtual void DoTeardown (); + void DoRun () override; + void DoTeardown () override; }; AddressAllocatorHelperTestCase::AddressAllocatorHelperTestCase () @@ -138,8 +138,8 @@ class ResetAllocatorHelperTestCase : public TestCase { public: ResetAllocatorHelperTestCase (); - virtual void DoRun (); - virtual void DoTeardown (); + void DoRun () override; + void DoTeardown () override; }; ResetAllocatorHelperTestCase::ResetAllocatorHelperTestCase () @@ -207,11 +207,11 @@ class IpAddressHelperTestCasev4 : public TestCase { public: IpAddressHelperTestCasev4 (); - virtual ~IpAddressHelperTestCasev4 (); + ~IpAddressHelperTestCasev4 () override; private: - virtual void DoRun (); - virtual void DoTeardown (); + void DoRun () override; + void DoTeardown () override; }; IpAddressHelperTestCasev4::IpAddressHelperTestCasev4 () diff --git a/src/internet/test/ipv4-deduplication-test.cc b/src/internet/test/ipv4-deduplication-test.cc index 718325e20..7b940d47f 100644 --- a/src/internet/test/ipv4-deduplication-test.cc +++ b/src/internet/test/ipv4-deduplication-test.cc @@ -148,7 +148,7 @@ class Ipv4DeduplicationTest : public TestCase std::map m_dropCountMap; //!< map of received packets (node name, counter) public: - virtual void DoRun (); + void DoRun () override; /** * Constructor @@ -549,7 +549,7 @@ class Ipv4DeduplicationPerformanceTest : public TestCase { public: Ipv4DeduplicationPerformanceTest (); - virtual void DoRun (); + void DoRun () override; private: std::vector > m_sockets; //!< sockets in use std::vector m_txPackets; //!< transmitted packets for each socket diff --git a/src/internet/test/ipv4-forwarding-test.cc b/src/internet/test/ipv4-forwarding-test.cc index 849d38510..879f2dfd8 100644 --- a/src/internet/test/ipv4-forwarding-test.cc +++ b/src/internet/test/ipv4-forwarding-test.cc @@ -71,7 +71,7 @@ class Ipv4ForwardingTest : public TestCase void SendData (Ptr socket, std::string to); public: - virtual void DoRun (); + void DoRun () override; Ipv4ForwardingTest (); /** diff --git a/src/internet/test/ipv4-fragmentation-test.cc b/src/internet/test/ipv4-fragmentation-test.cc index 6e1c4dd9c..0b1c5e4d0 100644 --- a/src/internet/test/ipv4-fragmentation-test.cc +++ b/src/internet/test/ipv4-fragmentation-test.cc @@ -73,11 +73,11 @@ public: static TypeId tid = TypeId ("ns3::IPv4TestTag").SetParent ().AddConstructor (); return tid; } - virtual TypeId GetInstanceTypeId () const { return GetTypeId (); } - virtual uint32_t GetSerializedSize () const { return sizeof (token); } - virtual void Serialize (TagBuffer buffer) const { buffer.WriteU64 (token); } - virtual void Deserialize (TagBuffer buffer) { token = buffer.ReadU64 (); } - virtual void Print (std::ostream &os) const { os << "token=" << token; } + TypeId GetInstanceTypeId () const override { return GetTypeId (); } + uint32_t GetSerializedSize () const override { return sizeof (token); } + void Serialize (TagBuffer buffer) const override { buffer.WriteU64 (token); } + void Deserialize (TagBuffer buffer) override { token = buffer.ReadU64 (); } + void Print (std::ostream &os) const override { os << "token=" << token; } /** * \brief Set the token. * \param token The token. @@ -112,13 +112,13 @@ class Ipv4FragmentationTest: public TestCase bool m_broadcast; //!< broadcast packets public: - virtual void DoRun (); + void DoRun () override; /** * Constructor * \param broadcast send broadcast packets (true) or unicast packets (false) */ Ipv4FragmentationTest (bool broadcast); - ~Ipv4FragmentationTest (); + ~Ipv4FragmentationTest () override; // server part diff --git a/src/internet/test/ipv4-global-routing-test-suite.cc b/src/internet/test/ipv4-global-routing-test-suite.cc index f925f114a..12b46d30e 100644 --- a/src/internet/test/ipv4-global-routing-test-suite.cc +++ b/src/internet/test/ipv4-global-routing-test-suite.cc @@ -126,8 +126,8 @@ NS_LOG_COMPONENT_DEFINE ("Ipv4GlobalRoutingTestSuite"); class LinkTest : public TestCase { public: - virtual void DoSetup (); - virtual void DoRun (); + void DoSetup () override; + void DoRun () override; LinkTest (); private: NodeContainer m_nodes; //!< Nodes used in the test. @@ -210,8 +210,8 @@ LinkTest::DoRun () class LanTest : public TestCase { public: - virtual void DoSetup (); - virtual void DoRun (); + void DoSetup () override; + void DoRun () override; LanTest (); private: NodeContainer m_nodes; //!< Nodes used in the test. @@ -291,8 +291,8 @@ LanTest::DoRun () class TwoLinkTest : public TestCase { public: - virtual void DoSetup (); - virtual void DoRun (); + void DoSetup () override; + void DoRun () override; TwoLinkTest (); private: NodeContainer m_nodes; //!< Nodes used in the test. @@ -410,8 +410,8 @@ TwoLinkTest::DoRun () class TwoLanTest : public TestCase { public: - virtual void DoSetup (); - virtual void DoRun (); + void DoSetup () override; + void DoRun () override; TwoLanTest (); private: NodeContainer m_nodes; //!< Nodes used in the test. @@ -510,8 +510,8 @@ TwoLanTest::DoRun () class BridgeTest : public TestCase { public: - virtual void DoSetup (); - virtual void DoRun (); + void DoSetup () override; + void DoRun () override; BridgeTest (); private: NodeContainer m_nodes; //!< Nodes used in the test. @@ -682,8 +682,8 @@ BridgeTest::DoRun () class TwoBridgeTest : public TestCase { public: - virtual void DoSetup (); - virtual void DoRun (); + void DoSetup () override; + void DoRun () override; TwoBridgeTest (); private: NodeContainer m_nodes; //!< Nodes used in the test. @@ -833,7 +833,7 @@ class Ipv4DynamicGlobalRoutingTestCase : public TestCase { public: Ipv4DynamicGlobalRoutingTestCase (); - virtual ~Ipv4DynamicGlobalRoutingTestCase (); + ~Ipv4DynamicGlobalRoutingTestCase () override; private: /** @@ -853,7 +853,7 @@ private: * \param socket The input socket. */ void HandleRead (Ptr socket); - virtual void DoRun (); + void DoRun () override; uint16_t m_count; //!< Number of packets received. std::vector, bool> > m_sendSocks; //!< Sending sockets. @@ -1097,7 +1097,7 @@ class Ipv4GlobalRoutingSlash32TestCase : public TestCase { public: Ipv4GlobalRoutingSlash32TestCase (); - virtual ~Ipv4GlobalRoutingSlash32TestCase (); + ~Ipv4GlobalRoutingSlash32TestCase () override; Ptr m_receivedPacket; //!< number of received packets @@ -1120,7 +1120,7 @@ public: void SendData (Ptr socket, std::string to); private: - virtual void DoRun (); + void DoRun () override; }; // Add some help text to this case to describe what it is intended to test diff --git a/src/internet/test/ipv4-header-test.cc b/src/internet/test/ipv4-header-test.cc index 495192c4b..4fa1e67e8 100644 --- a/src/internet/test/ipv4-header-test.cc +++ b/src/internet/test/ipv4-header-test.cc @@ -80,7 +80,7 @@ class Ipv4HeaderTest : public TestCase void SendData_IpHdr_Dscp (Ptr socket, std::string to, Ipv4Header::DscpType dscp, Ipv4Header::EcnType ecn); public: - virtual void DoRun (); + void DoRun () override; Ipv4HeaderTest (); /** diff --git a/src/internet/test/ipv4-list-routing-test-suite.cc b/src/internet/test/ipv4-list-routing-test-suite.cc index 18ebc9db9..7a2830164 100644 --- a/src/internet/test/ipv4-list-routing-test-suite.cc +++ b/src/internet/test/ipv4-list-routing-test-suite.cc @@ -31,16 +31,16 @@ using namespace ns3; */ class Ipv4ARouting : public Ipv4RoutingProtocol { public: - Ptr RouteOutput (Ptr p, const Ipv4Header &header, Ptr oif, Socket::SocketErrno &sockerr) { return 0; } + Ptr RouteOutput (Ptr p, const Ipv4Header &header, Ptr oif, Socket::SocketErrno &sockerr) override { return 0; } bool RouteInput (Ptr p, const Ipv4Header &header, Ptr idev, UnicastForwardCallback ucb, MulticastForwardCallback mcb, - LocalDeliverCallback lcb, ErrorCallback ecb) { return false; } - void NotifyInterfaceUp (uint32_t interface) {} - void NotifyInterfaceDown (uint32_t interface) {} - void NotifyAddAddress (uint32_t interface, Ipv4InterfaceAddress address) {} - void NotifyRemoveAddress (uint32_t interface, Ipv4InterfaceAddress address) {} - void SetIpv4 (Ptr ipv4) {} - void PrintRoutingTable (Ptr stream, Time::Unit unit) const {} + LocalDeliverCallback lcb, ErrorCallback ecb) override { return false; } + void NotifyInterfaceUp (uint32_t interface) override {} + void NotifyInterfaceDown (uint32_t interface) override {} + void NotifyAddAddress (uint32_t interface, Ipv4InterfaceAddress address) override {} + void NotifyRemoveAddress (uint32_t interface, Ipv4InterfaceAddress address) override {} + void SetIpv4 (Ptr ipv4) override {} + void PrintRoutingTable (Ptr stream, Time::Unit unit) const override {} }; /** @@ -51,16 +51,16 @@ public: */ class Ipv4BRouting : public Ipv4RoutingProtocol { public: - Ptr RouteOutput (Ptr p, const Ipv4Header &header, Ptr oif, Socket::SocketErrno &sockerr) { return 0; } + Ptr RouteOutput (Ptr p, const Ipv4Header &header, Ptr oif, Socket::SocketErrno &sockerr) override { return 0; } bool RouteInput (Ptr p, const Ipv4Header &header, Ptr idev, UnicastForwardCallback ucb, MulticastForwardCallback mcb, - LocalDeliverCallback lcb, ErrorCallback ecb) { return false; } - void NotifyInterfaceUp (uint32_t interface) {} - void NotifyInterfaceDown (uint32_t interface) {} - void NotifyAddAddress (uint32_t interface, Ipv4InterfaceAddress address) {} - void NotifyRemoveAddress (uint32_t interface, Ipv4InterfaceAddress address) {} - void SetIpv4 (Ptr ipv4) {} - void PrintRoutingTable (Ptr stream, Time::Unit unit) const {} + LocalDeliverCallback lcb, ErrorCallback ecb) override { return false; } + void NotifyInterfaceUp (uint32_t interface) override {} + void NotifyInterfaceDown (uint32_t interface) override {} + void NotifyAddAddress (uint32_t interface, Ipv4InterfaceAddress address) override {} + void NotifyRemoveAddress (uint32_t interface, Ipv4InterfaceAddress address) override {} + void SetIpv4 (Ptr ipv4) override {} + void PrintRoutingTable (Ptr stream, Time::Unit unit) const override {} }; /** @@ -73,7 +73,7 @@ class Ipv4ListRoutingNegativeTestCase : public TestCase { public: Ipv4ListRoutingNegativeTestCase(); - virtual void DoRun (); + void DoRun () override; }; Ipv4ListRoutingNegativeTestCase::Ipv4ListRoutingNegativeTestCase() @@ -107,7 +107,7 @@ class Ipv4ListRoutingPositiveTestCase : public TestCase { public: Ipv4ListRoutingPositiveTestCase(); - virtual void DoRun (); + void DoRun () override; }; Ipv4ListRoutingPositiveTestCase::Ipv4ListRoutingPositiveTestCase() diff --git a/src/internet/test/ipv4-packet-info-tag-test-suite.cc b/src/internet/test/ipv4-packet-info-tag-test-suite.cc index 16500efc1..0b6b154ee 100644 --- a/src/internet/test/ipv4-packet-info-tag-test-suite.cc +++ b/src/internet/test/ipv4-packet-info-tag-test-suite.cc @@ -64,7 +64,7 @@ class Ipv4PacketInfoTagTest : public TestCase public: Ipv4PacketInfoTagTest (); private: - virtual void DoRun (); + void DoRun () override; /** * \brief Receive callback. diff --git a/src/internet/test/ipv4-raw-test.cc b/src/internet/test/ipv4-raw-test.cc index e1bf41dcd..910bd0b39 100644 --- a/src/internet/test/ipv4-raw-test.cc +++ b/src/internet/test/ipv4-raw-test.cc @@ -88,7 +88,7 @@ class Ipv4RawSocketImplTest : public TestCase void SendData_IpHdr (Ptr socket, std::string to); public: - virtual void DoRun (); + void DoRun () override; Ipv4RawSocketImplTest (); /** diff --git a/src/internet/test/ipv4-rip-test.cc b/src/internet/test/ipv4-rip-test.cc index b569b6314..f1cf185eb 100644 --- a/src/internet/test/ipv4-rip-test.cc +++ b/src/internet/test/ipv4-rip-test.cc @@ -71,7 +71,7 @@ class Ipv4RipTest : public TestCase void SendData (Ptr socket, std::string to); public: - virtual void DoRun (); + void DoRun () override; Ipv4RipTest (); /** @@ -293,7 +293,7 @@ class Ipv4RipCountToInfinityTest : public TestCase void SendData (Ptr socket, std::string to); public: - virtual void DoRun (); + void DoRun () override; Ipv4RipCountToInfinityTest (); /** @@ -508,7 +508,7 @@ class Ipv4RipSplitHorizonStrategyTest : public TestCase Rip::SplitHorizonType_e m_detectedStrategy; //!< Strategy detected. public: - virtual void DoRun (); + void DoRun () override; /** * \brief Constructor. diff --git a/src/internet/test/ipv4-static-routing-test-suite.cc b/src/internet/test/ipv4-static-routing-test-suite.cc index 37b8197b3..cc01d10b9 100644 --- a/src/internet/test/ipv4-static-routing-test-suite.cc +++ b/src/internet/test/ipv4-static-routing-test-suite.cc @@ -48,7 +48,7 @@ class Ipv4StaticRoutingSlash32TestCase : public TestCase { public: Ipv4StaticRoutingSlash32TestCase (); - virtual ~Ipv4StaticRoutingSlash32TestCase (); + ~Ipv4StaticRoutingSlash32TestCase () override; Ptr m_receivedPacket; //!< Received packet @@ -72,7 +72,7 @@ public: void ReceivePkt (Ptr socket); private: - virtual void DoRun (); + void DoRun () override; }; // Add some help text to this case to describe what it is intended to test diff --git a/src/internet/test/ipv4-test.cc b/src/internet/test/ipv4-test.cc index 792a5ed25..bf61e16e8 100644 --- a/src/internet/test/ipv4-test.cc +++ b/src/internet/test/ipv4-test.cc @@ -42,8 +42,8 @@ class Ipv4L3ProtocolTestCase : public TestCase { public: Ipv4L3ProtocolTestCase (); - virtual ~Ipv4L3ProtocolTestCase (); - virtual void DoRun (); + ~Ipv4L3ProtocolTestCase () override; + void DoRun () override; }; diff --git a/src/internet/test/ipv6-address-duplication-test.cc b/src/internet/test/ipv6-address-duplication-test.cc index 53bf25d0d..91b886de0 100644 --- a/src/internet/test/ipv6-address-duplication-test.cc +++ b/src/internet/test/ipv6-address-duplication-test.cc @@ -54,7 +54,7 @@ using namespace ns3; class Ipv6DadTest : public TestCase { public: - virtual void DoRun (); + void DoRun () override; Ipv6DadTest (); }; diff --git a/src/internet/test/ipv6-address-generator-test-suite.cc b/src/internet/test/ipv6-address-generator-test-suite.cc index 8b274beda..e46ffa179 100644 --- a/src/internet/test/ipv6-address-generator-test-suite.cc +++ b/src/internet/test/ipv6-address-generator-test-suite.cc @@ -33,8 +33,8 @@ class NetworkNumber6AllocatorTestCase : public TestCase { public: NetworkNumber6AllocatorTestCase (); - virtual void DoRun (); - virtual void DoTeardown (); + void DoRun () override; + void DoTeardown () override; }; NetworkNumber6AllocatorTestCase::NetworkNumber6AllocatorTestCase () @@ -85,8 +85,8 @@ class AddressAllocator6TestCase : public TestCase public: AddressAllocator6TestCase (); private: - virtual void DoRun (); - virtual void DoTeardown (); + void DoRun () override; + void DoTeardown () override; }; AddressAllocator6TestCase::AddressAllocator6TestCase () @@ -139,8 +139,8 @@ class NetworkAndAddress6TestCase : public TestCase { public: NetworkAndAddress6TestCase (); - virtual void DoRun (); - virtual void DoTeardown (); + void DoRun () override; + void DoTeardown () override; }; NetworkAndAddress6TestCase::NetworkAndAddress6TestCase () @@ -186,8 +186,8 @@ class ExampleAddress6GeneratorTestCase : public TestCase public: ExampleAddress6GeneratorTestCase (); private: - virtual void DoRun (); - virtual void DoTeardown (); + void DoRun () override; + void DoTeardown () override; }; ExampleAddress6GeneratorTestCase::ExampleAddress6GeneratorTestCase () @@ -242,8 +242,8 @@ class AddressCollision6TestCase : public TestCase public: AddressCollision6TestCase (); private: - void DoRun (); - void DoTeardown (); + void DoRun () override; + void DoTeardown () override; }; AddressCollision6TestCase::AddressCollision6TestCase () diff --git a/src/internet/test/ipv6-address-helper-test-suite.cc b/src/internet/test/ipv6-address-helper-test-suite.cc index 0188b2b31..eada15e48 100644 --- a/src/internet/test/ipv6-address-helper-test-suite.cc +++ b/src/internet/test/ipv6-address-helper-test-suite.cc @@ -38,11 +38,11 @@ class IpAddressHelperTestCasev6 : public TestCase { public: IpAddressHelperTestCasev6 (); - virtual ~IpAddressHelperTestCasev6 (); + ~IpAddressHelperTestCasev6 () override; private: - virtual void DoRun (); - virtual void DoTeardown (); + void DoRun () override; + void DoTeardown () override; }; IpAddressHelperTestCasev6::IpAddressHelperTestCasev6 () diff --git a/src/internet/test/ipv6-dual-stack-test-suite.cc b/src/internet/test/ipv6-dual-stack-test-suite.cc index 9ac2014d5..59032d009 100644 --- a/src/internet/test/ipv6-dual-stack-test-suite.cc +++ b/src/internet/test/ipv6-dual-stack-test-suite.cc @@ -63,8 +63,8 @@ class DualStackTestCase : public TestCase public: DualStackTestCase (); private: - virtual void DoRun (); - virtual void DoTeardown (); + void DoRun () override; + void DoTeardown () override; /** * \brief Setup the test. diff --git a/src/internet/test/ipv6-extension-header-test-suite.cc b/src/internet/test/ipv6-extension-header-test-suite.cc index db34dcc7a..3ffd1ac22 100644 --- a/src/internet/test/ipv6-extension-header-test-suite.cc +++ b/src/internet/test/ipv6-extension-header-test-suite.cc @@ -45,7 +45,7 @@ class TestEmptyOptionField : public TestCase public: TestEmptyOptionField () : TestCase ("TestEmptyOptionField") {} - virtual void DoRun () + void DoRun () override { Ipv6ExtensionDestinationHeader header; NS_TEST_EXPECT_MSG_EQ (header.GetSerializedSize () % 8, 0, "length of extension header is not a multiple of 8"); @@ -81,12 +81,12 @@ class OptionWithoutAlignmentHeader : public Ipv6OptionHeader public: static const uint8_t TYPE = 42; //!< Option type. - virtual uint32_t GetSerializedSize () const + uint32_t GetSerializedSize () const override { return 4; } - virtual void Serialize (Buffer::Iterator start) const + void Serialize (Buffer::Iterator start) const override { start.WriteU8 (TYPE); start.WriteU8 (GetSerializedSize ()-2); @@ -106,7 +106,7 @@ class TestOptionWithoutAlignment : public TestCase public: TestOptionWithoutAlignment () : TestCase ("TestOptionWithoutAlignment") {} - virtual void DoRun () + void DoRun () override { Ipv6ExtensionDestinationHeader header; OptionWithoutAlignmentHeader optionHeader; @@ -151,19 +151,19 @@ class OptionWithAlignmentHeader : public Ipv6OptionHeader public: static const uint8_t TYPE = 73; //!< Option Type. - virtual uint32_t GetSerializedSize () const + uint32_t GetSerializedSize () const override { return 4; } - virtual void Serialize (Buffer::Iterator start) const + void Serialize (Buffer::Iterator start) const override { start.WriteU8 (TYPE); start.WriteU8 (GetSerializedSize ()-2); start.WriteU16 (0); } - virtual Alignment GetAlignment () const + Alignment GetAlignment () const override { return (Alignment){ 4,0}; } @@ -181,7 +181,7 @@ class TestOptionWithAlignment : public TestCase public: TestOptionWithAlignment () : TestCase ("TestOptionWithAlignment") {} - virtual void DoRun () + void DoRun () override { Ipv6ExtensionDestinationHeader header; OptionWithAlignmentHeader optionHeader; @@ -230,7 +230,7 @@ class TestFulfilledAlignment : public TestCase public: TestFulfilledAlignment () : TestCase ("TestCorrectAlignment") {} - virtual void DoRun () + void DoRun () override { Ipv6ExtensionDestinationHeader header; Ipv6OptionJumbogramHeader jumboHeader; //has an alignment of 4n+2 diff --git a/src/internet/test/ipv6-forwarding-test.cc b/src/internet/test/ipv6-forwarding-test.cc index c90be544f..8d883c422 100644 --- a/src/internet/test/ipv6-forwarding-test.cc +++ b/src/internet/test/ipv6-forwarding-test.cc @@ -69,7 +69,7 @@ class Ipv6ForwardingTest : public TestCase void SendData (Ptr socket, std::string to); public: - virtual void DoRun (); + void DoRun () override; Ipv6ForwardingTest (); /** diff --git a/src/internet/test/ipv6-fragmentation-test.cc b/src/internet/test/ipv6-fragmentation-test.cc index e0518ecba..df2e50840 100644 --- a/src/internet/test/ipv6-fragmentation-test.cc +++ b/src/internet/test/ipv6-fragmentation-test.cc @@ -83,11 +83,11 @@ public: static TypeId tid = TypeId ("ns3::IPv6TestTag").SetParent ().AddConstructor (); return tid; } - virtual TypeId GetInstanceTypeId () const { return GetTypeId (); } - virtual uint32_t GetSerializedSize () const { return sizeof (token); } - virtual void Serialize (TagBuffer buffer) const { buffer.WriteU64 (token); } - virtual void Deserialize (TagBuffer buffer) { token = buffer.ReadU64 (); } - virtual void Print (std::ostream &os) const { os << "token=" << token; } + TypeId GetInstanceTypeId () const override { return GetTypeId (); } + uint32_t GetSerializedSize () const override { return sizeof (token); } + void Serialize (TagBuffer buffer) const override { buffer.WriteU64 (token); } + void Deserialize (TagBuffer buffer) override { token = buffer.ReadU64 (); } + void Print (std::ostream &os) const override { os << "token=" << token; } /** * \brief Set the token. * \param token The token. @@ -123,9 +123,9 @@ class Ipv6FragmentationTest : public TestCase uint8_t m_icmpCode; //!< ICMP code. public: - virtual void DoRun (); + void DoRun () override; Ipv6FragmentationTest (); - ~Ipv6FragmentationTest (); + ~Ipv6FragmentationTest () override; // server part diff --git a/src/internet/test/ipv6-list-routing-test-suite.cc b/src/internet/test/ipv6-list-routing-test-suite.cc index 9e17c604e..5bc9116bb 100644 --- a/src/internet/test/ipv6-list-routing-test-suite.cc +++ b/src/internet/test/ipv6-list-routing-test-suite.cc @@ -32,19 +32,19 @@ using namespace ns3; */ class Ipv6ARouting : public Ipv6RoutingProtocol { public: - Ptr RouteOutput (Ptr p, const Ipv6Header &header, Ptr oif, Socket::SocketErrno &sockerr) { return 0; } + Ptr RouteOutput (Ptr p, const Ipv6Header &header, Ptr oif, Socket::SocketErrno &sockerr) override { return 0; } bool RouteInput (Ptr p, const Ipv6Header &header, Ptr idev, UnicastForwardCallback ucb, MulticastForwardCallback mcb, - LocalDeliverCallback lcb, ErrorCallback ecb) { return false; } - void NotifyInterfaceUp (uint32_t interface) {} - void NotifyInterfaceDown (uint32_t interface) {} - void NotifyAddAddress (uint32_t interface, Ipv6InterfaceAddress address) {} - void NotifyRemoveAddress (uint32_t interface, Ipv6InterfaceAddress address) {} + LocalDeliverCallback lcb, ErrorCallback ecb) override { return false; } + void NotifyInterfaceUp (uint32_t interface) override {} + void NotifyInterfaceDown (uint32_t interface) override {} + void NotifyAddAddress (uint32_t interface, Ipv6InterfaceAddress address) override {} + void NotifyRemoveAddress (uint32_t interface, Ipv6InterfaceAddress address) override {} void NotifyAddRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse = Ipv6Address:: - GetZero ()) {} - void NotifyRemoveRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse) {} - void SetIpv6 (Ptr ipv6) {} - virtual void PrintRoutingTable (Ptr stream, Time::Unit unit) const {}; + GetZero ()) override {} + void NotifyRemoveRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse) override {} + void SetIpv6 (Ptr ipv6) override {} + void PrintRoutingTable (Ptr stream, Time::Unit unit) const override {}; }; /** @@ -55,19 +55,19 @@ public: */ class Ipv6BRouting : public Ipv6RoutingProtocol { public: - Ptr RouteOutput (Ptr p, const Ipv6Header &header, Ptr oif, Socket::SocketErrno &sockerr) { return 0; } + Ptr RouteOutput (Ptr p, const Ipv6Header &header, Ptr oif, Socket::SocketErrno &sockerr) override { return 0; } bool RouteInput (Ptr p, const Ipv6Header &header, Ptr idev, UnicastForwardCallback ucb, MulticastForwardCallback mcb, - LocalDeliverCallback lcb, ErrorCallback ecb) { return false; } - void NotifyInterfaceUp (uint32_t interface) {} - void NotifyInterfaceDown (uint32_t interface) {} - void NotifyAddAddress (uint32_t interface, Ipv6InterfaceAddress address) {} - void NotifyRemoveAddress (uint32_t interface, Ipv6InterfaceAddress address) {} + LocalDeliverCallback lcb, ErrorCallback ecb) override { return false; } + void NotifyInterfaceUp (uint32_t interface) override {} + void NotifyInterfaceDown (uint32_t interface) override {} + void NotifyAddAddress (uint32_t interface, Ipv6InterfaceAddress address) override {} + void NotifyRemoveAddress (uint32_t interface, Ipv6InterfaceAddress address) override {} void NotifyAddRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse = Ipv6Address:: - GetZero ()) {} - void NotifyRemoveRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse) {} - void SetIpv6 (Ptr ipv6) {} - virtual void PrintRoutingTable (Ptr stream, Time::Unit unit) const {}; + GetZero ()) override {} + void NotifyRemoveRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse) override {} + void SetIpv6 (Ptr ipv6) override {} + void PrintRoutingTable (Ptr stream, Time::Unit unit) const override {}; }; /** @@ -80,7 +80,7 @@ class Ipv6ListRoutingNegativeTestCase : public TestCase { public: Ipv6ListRoutingNegativeTestCase(); - virtual void DoRun (); + void DoRun () override; }; Ipv6ListRoutingNegativeTestCase::Ipv6ListRoutingNegativeTestCase() @@ -114,7 +114,7 @@ class Ipv6ListRoutingPositiveTestCase : public TestCase { public: Ipv6ListRoutingPositiveTestCase(); - virtual void DoRun (); + void DoRun () override; }; Ipv6ListRoutingPositiveTestCase::Ipv6ListRoutingPositiveTestCase() diff --git a/src/internet/test/ipv6-packet-info-tag-test-suite.cc b/src/internet/test/ipv6-packet-info-tag-test-suite.cc index b7c740b59..ac694a0ef 100644 --- a/src/internet/test/ipv6-packet-info-tag-test-suite.cc +++ b/src/internet/test/ipv6-packet-info-tag-test-suite.cc @@ -86,7 +86,7 @@ class Ipv6PacketInfoTagTest : public TestCase public: Ipv6PacketInfoTagTest (); private: - virtual void DoRun (); + void DoRun () override; /** * \brief Receive callback. * \param socket Receiving socket. diff --git a/src/internet/test/ipv6-raw-test.cc b/src/internet/test/ipv6-raw-test.cc index 6be78b8ae..6abca8068 100644 --- a/src/internet/test/ipv6-raw-test.cc +++ b/src/internet/test/ipv6-raw-test.cc @@ -77,7 +77,7 @@ class Ipv6RawSocketImplTest : public TestCase void SendData (Ptr socket, std::string to); public: - virtual void DoRun (); + void DoRun () override; Ipv6RawSocketImplTest (); /** diff --git a/src/internet/test/ipv6-ripng-test.cc b/src/internet/test/ipv6-ripng-test.cc index 10fa3e144..54eab3562 100644 --- a/src/internet/test/ipv6-ripng-test.cc +++ b/src/internet/test/ipv6-ripng-test.cc @@ -70,7 +70,7 @@ class Ipv6RipngTest : public TestCase void SendData (Ptr socket, std::string to); public: - virtual void DoRun (); + void DoRun () override; Ipv6RipngTest (); /** @@ -293,7 +293,7 @@ class Ipv6RipngCountToInfinityTest : public TestCase void SendData (Ptr socket, std::string to); public: - virtual void DoRun (); + void DoRun () override; Ipv6RipngCountToInfinityTest (); /** @@ -506,7 +506,7 @@ class Ipv6RipngSplitHorizonStrategyTest : public TestCase RipNg::SplitHorizonType_e m_detectedStrategy; //!< Strategy detected. public: - virtual void DoRun (); + void DoRun () override; /** * \brief Constructor. * \param strategy The SplitHorizon strategy. diff --git a/src/internet/test/ipv6-test.cc b/src/internet/test/ipv6-test.cc index 32ed87ad1..b1762f3c7 100644 --- a/src/internet/test/ipv6-test.cc +++ b/src/internet/test/ipv6-test.cc @@ -43,8 +43,8 @@ class Ipv6L3ProtocolTestCase : public TestCase public: Ipv6L3ProtocolTestCase (); - virtual ~Ipv6L3ProtocolTestCase (); - virtual void DoRun (); + ~Ipv6L3ProtocolTestCase () override; + void DoRun () override; }; Ipv6L3ProtocolTestCase::Ipv6L3ProtocolTestCase () : diff --git a/src/internet/test/neighbor-cache-test.cc b/src/internet/test/neighbor-cache-test.cc index b1ea7eb09..9e818248a 100644 --- a/src/internet/test/neighbor-cache-test.cc +++ b/src/internet/test/neighbor-cache-test.cc @@ -108,7 +108,7 @@ class DynamicNeighborCacheTest : public TestCase void RemoveIpv6Address (Ptr ipv6Interface, uint32_t index); public: - virtual void DoRun (); + void DoRun () override; DynamicNeighborCacheTest (); @@ -504,7 +504,7 @@ DynamicNeighborCacheTest::DoRun () class ChannelTest : public TestCase { public: - virtual void DoRun (); + void DoRun () override; ChannelTest (); private: @@ -591,7 +591,7 @@ ChannelTest::DoRun () class NetDeviceContainerTest : public TestCase { public: - virtual void DoRun (); + void DoRun () override; NetDeviceContainerTest (); private: @@ -678,7 +678,7 @@ NetDeviceContainerTest::DoRun () class InterfaceContainerTest : public TestCase { public: - virtual void DoRun (); + void DoRun () override; InterfaceContainerTest (); private: @@ -767,7 +767,7 @@ InterfaceContainerTest::DoRun () class FlushTest : public TestCase { public: - virtual void DoRun (); + void DoRun () override; FlushTest (); private: @@ -872,7 +872,7 @@ FlushTest::DoRun () class DuplicateTest : public TestCase { public: - virtual void DoRun (); + void DoRun () override; DuplicateTest (); private: @@ -970,7 +970,7 @@ DuplicateTest::DoRun () class DynamicPartialTest : public TestCase { public: - virtual void DoRun (); + void DoRun () override; DynamicPartialTest (); /** diff --git a/src/internet/test/rtt-test.cc b/src/internet/test/rtt-test.cc index 5131ef0d8..2b41c97b3 100644 --- a/src/internet/test/rtt-test.cc +++ b/src/internet/test/rtt-test.cc @@ -39,8 +39,8 @@ public: RttEstimatorTestCase (); private: - virtual void DoRun (); - virtual void DoTeardown (); + void DoRun () override; + void DoTeardown () override; /** * \brief Check RTT values. diff --git a/src/internet/test/tcp-advertised-window-test.cc b/src/internet/test/tcp-advertised-window-test.cc index 47b09defa..b2e04a8fe 100644 --- a/src/internet/test/tcp-advertised-window-test.cc +++ b/src/internet/test/tcp-advertised-window-test.cc @@ -79,8 +79,8 @@ public: void SetExpectedSegmentSize (uint16_t seg) { m_segmentSize = seg; }; protected: - virtual Ptr Fork (); - virtual uint16_t AdvertisedWindowSize (bool scale = true) const; + Ptr Fork () override; + uint16_t AdvertisedWindowSize (bool scale = true) const override; private: uint16_t OldAdvertisedWindowSize (bool scale = true) const; @@ -227,11 +227,11 @@ public: } protected: - virtual bool ShouldDrop (const Ipv4Header &ipHeader, const TcpHeader &tcpHeader, - uint32_t packetSize); + bool ShouldDrop (const Ipv4Header &ipHeader, const TcpHeader &tcpHeader, + uint32_t packetSize) override; private: - virtual void DoReset () { }; + void DoReset () override { }; double m_dropRatio; //!< Drop ratio Ptr m_prng; //!< Random variable }; @@ -290,9 +290,9 @@ public: TcpAdvertisedWindowTest (const std::string &desc, uint32_t size, uint32_t packets, double lossRatio); protected: - virtual void ConfigureEnvironment (); - virtual Ptr CreateReceiverSocket (Ptr node); - virtual Ptr CreateReceiverErrorModel (); + void ConfigureEnvironment () override; + Ptr CreateReceiverSocket (Ptr node) override; + Ptr CreateReceiverErrorModel () override; private: /** \brief Callback called for the update of the awnd @@ -371,10 +371,10 @@ public: std::vector &toDrop); protected: - virtual void ConfigureEnvironment (); - virtual Ptr CreateReceiverSocket (Ptr node); - virtual Ptr CreateSenderSocket (Ptr node); - virtual Ptr CreateReceiverErrorModel (); + void ConfigureEnvironment () override; + Ptr CreateReceiverSocket (Ptr node) override; + Ptr CreateSenderSocket (Ptr node) override; + Ptr CreateReceiverErrorModel () override; private: /** \brief Callback called for the update of the awnd diff --git a/src/internet/test/tcp-bbr-test.cc b/src/internet/test/tcp-bbr-test.cc index fe227edd3..fada0652c 100644 --- a/src/internet/test/tcp-bbr-test.cc +++ b/src/internet/test/tcp-bbr-test.cc @@ -45,7 +45,7 @@ public: TcpBbrPacingEnableTest (bool pacing, const std::string &name); private: - virtual void DoRun (); + void DoRun () override; /** * \brief Execute the test. */ @@ -95,7 +95,7 @@ public: TcpBbrCheckGainValuesTest (TcpBbr::BbrMode_t state, double highGain, const std::string &name); private: - virtual void DoRun (); + void DoRun () override; /** * \brief Execute the test. */ diff --git a/src/internet/test/tcp-bic-test.cc b/src/internet/test/tcp-bic-test.cc index dd285da27..c9a014ee3 100644 --- a/src/internet/test/tcp-bic-test.cc +++ b/src/internet/test/tcp-bic-test.cc @@ -53,7 +53,7 @@ public: const std::string &name); private: - virtual void DoRun (); + void DoRun () override; /** * \brief Update the TCP socket state. @@ -212,7 +212,7 @@ public: const std::string &name); private: - virtual void DoRun (); + void DoRun () override; /** * \brief Execute the test. diff --git a/src/internet/test/tcp-bytes-in-flight-test.cc b/src/internet/test/tcp-bytes-in-flight-test.cc index ef800f296..53c3cc279 100644 --- a/src/internet/test/tcp-bytes-in-flight-test.cc +++ b/src/internet/test/tcp-bytes-in-flight-test.cc @@ -55,27 +55,27 @@ protected: * \brief Create a receiver error model. * \returns The receiver error model. */ - virtual Ptr CreateReceiverErrorModel (); + Ptr CreateReceiverErrorModel () override; /** * \brief Receive a packet. * \param p The packet. * \param h The TCP header. * \param who Who the socket belongs to (sender or receiver). */ - virtual void Rx (const Ptr p, const TcpHeader&h, SocketWho who); + void Rx (const Ptr p, const TcpHeader&h, SocketWho who) override; /** * \brief Transmit a packet. * \param p The packet. * \param h The TCP header. * \param who Who the socket belongs to (sender or receiver). */ - virtual void Tx (const Ptr p, const TcpHeader&h, SocketWho who); + void Tx (const Ptr p, const TcpHeader&h, SocketWho who) override; /** * \brief Track the bytes in flight. * \param oldValue previous value. * \param newValue actual value. */ - virtual void BytesInFlightTrace (uint32_t oldValue, uint32_t newValue); + void BytesInFlightTrace (uint32_t oldValue, uint32_t newValue) override; /** * \brief Called when a packet is dropped. @@ -88,14 +88,14 @@ protected: /** * \brief Configure the test. */ - void ConfigureEnvironment (); + void ConfigureEnvironment () override; /** * \brief Do the checks before the RTO expires. * \param tcb The TcpSocketState. * \param who The socket. */ - void BeforeRTOExpired (const Ptr tcb, SocketWho who); + void BeforeRTOExpired (const Ptr tcb, SocketWho who) override; /** * \brief Update when RTO expires @@ -107,7 +107,7 @@ protected: /** * \brief Do the final checks. */ - void FinalChecks (); + void FinalChecks () override; private: uint32_t m_guessedBytesInFlight; //!< Guessed bytes in flight. diff --git a/src/internet/test/tcp-classic-recovery-test.cc b/src/internet/test/tcp-classic-recovery-test.cc index c0f76bd13..03a0b929b 100644 --- a/src/internet/test/tcp-classic-recovery-test.cc +++ b/src/internet/test/tcp-classic-recovery-test.cc @@ -53,7 +53,7 @@ public: const std::string &name); private: - virtual void DoRun (); + void DoRun () override; uint32_t m_cWnd; //!< Congestion window. uint32_t m_segmentSize; //!< Segment size. diff --git a/src/internet/test/tcp-close-test.cc b/src/internet/test/tcp-close-test.cc index 0c47915fe..a4298ff98 100644 --- a/src/internet/test/tcp-close-test.cc +++ b/src/internet/test/tcp-close-test.cc @@ -41,13 +41,13 @@ public: TcpCloseWithLossTestCase (bool sackEnabled); protected: - Ptr CreateReceiverErrorModel (); - virtual void ConfigureProperties (); - void Tx (const Ptr p, const TcpHeader&h, SocketWho who); - void Rx (const Ptr p, const TcpHeader&h, SocketWho who); - void FinalChecks (); + Ptr CreateReceiverErrorModel () override; + void ConfigureProperties () override; + void Tx (const Ptr p, const TcpHeader&h, SocketWho who) override; + void Rx (const Ptr p, const TcpHeader&h, SocketWho who) override; + void FinalChecks () override; - virtual void NormalClose (SocketWho who) + void NormalClose (SocketWho who) override { if (who == SENDER) m_sendClose = true; diff --git a/src/internet/test/tcp-cong-avoid-test.cc b/src/internet/test/tcp-cong-avoid-test.cc index bfbc508a1..7f8a8c6ac 100644 --- a/src/internet/test/tcp-cong-avoid-test.cc +++ b/src/internet/test/tcp-cong-avoid-test.cc @@ -68,18 +68,18 @@ public: uint32_t packets, const TypeId& congControl, const std::string &desc); protected: - virtual void CWndTrace (uint32_t oldValue, uint32_t newValue); - virtual void QueueDrop (SocketWho who); - virtual void PhyDrop (SocketWho who); - virtual void NormalClose (SocketWho who); + void CWndTrace (uint32_t oldValue, uint32_t newValue) override; + void QueueDrop (SocketWho who) override; + void PhyDrop (SocketWho who) override; + void NormalClose (SocketWho who) override; /** * \brief Called each RTT (1.0 sec in the testing environment) and check * that the overall increment in this RTT is less or equal than 1 MSS */ void Check (); - virtual void ConfigureEnvironment (); - virtual void ConfigureProperties (); + void ConfigureEnvironment () override; + void ConfigureProperties () override; private: uint32_t m_segmentSize; //!< Segment size. diff --git a/src/internet/test/tcp-datasentcb-test.cc b/src/internet/test/tcp-datasentcb-test.cc index ac3c1cc29..81bf85916 100644 --- a/src/internet/test/tcp-datasentcb-test.cc +++ b/src/internet/test/tcp-datasentcb-test.cc @@ -47,8 +47,8 @@ public: } protected: - virtual Ptr Fork (); - virtual void ReceivedData (Ptr packet, const TcpHeader& tcpHeader); + Ptr Fork () override; + void ReceivedData (Ptr packet, const TcpHeader& tcpHeader) override; }; NS_OBJECT_ENSURE_REGISTERED (TcpSocketHalfAck); @@ -117,11 +117,11 @@ public: { } protected: - virtual Ptr CreateReceiverSocket (Ptr node); + Ptr CreateReceiverSocket (Ptr node) override; - virtual void DataSent (uint32_t size, SocketWho who); - virtual void ConfigureEnvironment (); - virtual void FinalChecks (); + void DataSent (uint32_t size, SocketWho who) override; + void ConfigureEnvironment () override; + void FinalChecks () override; private: uint32_t m_pktSize; //!< Packet size. diff --git a/src/internet/test/tcp-dctcp-test.cc b/src/internet/test/tcp-dctcp-test.cc index 35d9fde62..a934a748d 100644 --- a/src/internet/test/tcp-dctcp-test.cc +++ b/src/internet/test/tcp-dctcp-test.cc @@ -55,12 +55,12 @@ public: TcpDctcpCodePointsTest (uint8_t testCase, const std::string &desc); protected: - virtual void Tx (const Ptr p, const TcpHeader&h, SocketWho who); - virtual void Rx (const Ptr p, const TcpHeader&h, SocketWho who); - virtual Ptr CreateSenderSocket (Ptr node); - virtual Ptr CreateReceiverSocket (Ptr node); - void ConfigureProperties (); - void ConfigureEnvironment (); + void Tx (const Ptr p, const TcpHeader&h, SocketWho who) override; + void Rx (const Ptr p, const TcpHeader&h, SocketWho who) override; + Ptr CreateSenderSocket (Ptr node) override; + Ptr CreateReceiverSocket (Ptr node) override; + void ConfigureProperties () override; + void ConfigureEnvironment () override; private: uint32_t m_senderSent; //!< Number of packets sent by the sender @@ -221,9 +221,9 @@ public: */ void SetTestCase (uint8_t testCase); protected: - virtual uint32_t SendDataPacket (SequenceNumber32 seq, uint32_t maxSize, bool withAck); - virtual void ReTxTimeout (); - Ptr Fork (); + uint32_t SendDataPacket (SequenceNumber32 seq, uint32_t maxSize, bool withAck) override; + void ReTxTimeout () override; + Ptr Fork () override; }; NS_OBJECT_ENSURE_REGISTERED (TcpDctcpCongestedRouter); @@ -535,7 +535,7 @@ public: SequenceNumber32 lastAckedSeq, Time rtt, const std::string &name); private: - virtual void DoRun (); + void DoRun () override; /** \brief Execute the test */ void ExecuteTest (); diff --git a/src/internet/test/tcp-ecn-test.cc b/src/internet/test/tcp-ecn-test.cc index a026cf4a0..657c9c844 100644 --- a/src/internet/test/tcp-ecn-test.cc +++ b/src/internet/test/tcp-ecn-test.cc @@ -62,11 +62,11 @@ public: TcpEcnTest (uint32_t testcase, const std::string &desc); protected: - virtual void CWndTrace (uint32_t oldValue, uint32_t newValue); - virtual void Rx (const Ptr p, const TcpHeader&h, SocketWho who); - virtual void Tx (const Ptr p, const TcpHeader&h, SocketWho who); - virtual Ptr CreateSenderSocket (Ptr node); - void ConfigureProperties (); + void CWndTrace (uint32_t oldValue, uint32_t newValue) override; + void Rx (const Ptr p, const TcpHeader&h, SocketWho who) override; + void Tx (const Ptr p, const TcpHeader&h, SocketWho who) override; + Ptr CreateSenderSocket (Ptr node) override; + void ConfigureProperties () override; private: uint32_t m_cwndChangeCount; //!< Number of times the congestion window did change @@ -123,9 +123,9 @@ public: void SetTestCase (uint8_t testCase); protected: - virtual uint32_t SendDataPacket (SequenceNumber32 seq, uint32_t maxSize, bool withAck); - virtual void ReTxTimeout (); - Ptr Fork (); + uint32_t SendDataPacket (SequenceNumber32 seq, uint32_t maxSize, bool withAck) override; + void ReTxTimeout () override; + Ptr Fork () override; }; NS_OBJECT_ENSURE_REGISTERED (TcpSocketCongestedRouter); diff --git a/src/internet/test/tcp-endpoint-bug2211.cc b/src/internet/test/tcp-endpoint-bug2211.cc index 0a3a6ccf2..f6012056b 100644 --- a/src/internet/test/tcp-endpoint-bug2211.cc +++ b/src/internet/test/tcp-endpoint-bug2211.cc @@ -75,7 +75,7 @@ public: * \param socket The receiving socket. */ void HandleConnect (Ptr socket); - virtual void DoRun (); + void DoRun () override; private: bool m_v6; //!< True to use IPv6. }; diff --git a/src/internet/test/tcp-error-model.h b/src/internet/test/tcp-error-model.h index 7703d3b65..f3ebea6c5 100644 --- a/src/internet/test/tcp-error-model.h +++ b/src/internet/test/tcp-error-model.h @@ -67,7 +67,7 @@ protected: private: - virtual bool DoCorrupt (Ptr p); + bool DoCorrupt (Ptr p) override; Callback > m_dropCallback; //!< Drop callback. }; @@ -103,14 +103,14 @@ public: } protected: - virtual bool ShouldDrop (const Ipv4Header &ipHeader, const TcpHeader &tcpHeader, - uint32_t packetSize); + bool ShouldDrop (const Ipv4Header &ipHeader, const TcpHeader &tcpHeader, + uint32_t packetSize) override; protected: std::list m_seqToKill; //!< List of the sequence numbers to be dropped. private: - virtual void DoReset (); + void DoReset () override; }; /** @@ -163,15 +163,15 @@ public: } protected: - virtual bool ShouldDrop (const Ipv4Header &ipHeader, const TcpHeader &tcpHeader, - uint32_t packetSize); + bool ShouldDrop (const Ipv4Header &ipHeader, const TcpHeader &tcpHeader, + uint32_t packetSize) override; protected: TcpHeader::Flags_t m_flagsToKill; //!< Flags a packet should have to be dropped. int16_t m_killNumber; //!< The number of times the packet should be killed. private: - virtual void DoReset (); + void DoReset () override; }; } // namespace ns3 diff --git a/src/internet/test/tcp-fast-retr-test.cc b/src/internet/test/tcp-fast-retr-test.cc index 3c8dace7c..bec8dfa03 100644 --- a/src/internet/test/tcp-fast-retr-test.cc +++ b/src/internet/test/tcp-fast-retr-test.cc @@ -49,24 +49,24 @@ public: */ TcpFastRetrTest (TypeId congControl, uint32_t seqToKill, const std::string &msg); - virtual Ptr CreateSenderErrorModel (); - virtual Ptr CreateReceiverErrorModel (); + Ptr CreateSenderErrorModel () override; + Ptr CreateReceiverErrorModel () override; - virtual Ptr CreateSenderSocket (Ptr node); + Ptr CreateSenderSocket (Ptr node) override; protected: - virtual void RcvAck (const Ptr tcb, - const TcpHeader& h, SocketWho who); - virtual void ProcessedAck (const Ptr tcb, - const TcpHeader& h, SocketWho who); + void RcvAck (const Ptr tcb, + const TcpHeader& h, SocketWho who) override; + void ProcessedAck (const Ptr tcb, + const TcpHeader& h, SocketWho who) override; - virtual void CongStateTrace (const TcpSocketState::TcpCongState_t oldValue, - const TcpSocketState::TcpCongState_t newValue); + void CongStateTrace (const TcpSocketState::TcpCongState_t oldValue, + const TcpSocketState::TcpCongState_t newValue) override; - virtual void Tx (const Ptr p, const TcpHeader&h, SocketWho who); - virtual void Rx (const Ptr p, const TcpHeader&h, SocketWho who); + void Tx (const Ptr p, const TcpHeader&h, SocketWho who) override; + void Rx (const Ptr p, const TcpHeader&h, SocketWho who) override; - virtual void AfterRTOExpired (const Ptr tcb, SocketWho who); + void AfterRTOExpired (const Ptr tcb, SocketWho who) override; /** * \brief Check if the packet being dropped is the right one. @@ -75,10 +75,10 @@ protected: * \param p The packet. */ void PktDropped (const Ipv4Header &ipH, const TcpHeader& tcpH, Ptr p); - virtual void FinalChecks (); + void FinalChecks () override; - virtual void ConfigureProperties (); - virtual void ConfigureEnvironment (); + void ConfigureProperties () override; + void ConfigureEnvironment () override; bool m_pktDropped; //!< The packet has been dropped. bool m_pktWasDropped; //!< The packet was dropped (according to the receiver). diff --git a/src/internet/test/tcp-general-test.h b/src/internet/test/tcp-general-test.h index c5d5f7646..2ebcfa7f6 100644 --- a/src/internet/test/tcp-general-test.h +++ b/src/internet/test/tcp-general-test.h @@ -130,13 +130,13 @@ public: void SetUpdateRttHistoryCb (UpdateRttCallback cb); protected: - virtual void ReceivedAck (Ptr packet, const TcpHeader& tcpHeader); - virtual void ReTxTimeout (); - virtual Ptr Fork (); - virtual void CompleteFork (Ptr p, const TcpHeader& tcpHeader, - const Address& fromAddress, const Address& toAddress); - virtual void UpdateRttHistory (const SequenceNumber32 &seq, uint32_t sz, - bool isRetransmission); + void ReceivedAck (Ptr packet, const TcpHeader& tcpHeader) override; + void ReTxTimeout () override; + Ptr Fork () override; + void CompleteFork (Ptr p, const TcpHeader& tcpHeader, + const Address& fromAddress, const Address& toAddress) override; + void UpdateRttHistory (const SequenceNumber32 &seq, uint32_t sz, + bool isRetransmission) override; private: AckManagementCb m_rcvAckCb; //!< Receive ACK callback. @@ -204,8 +204,8 @@ public: } protected: - virtual void SendEmptyPacket (uint8_t flags); - Ptr Fork (); + void SendEmptyPacket (uint8_t flags) override; + Ptr Fork () override; uint32_t m_bytesToAck; //!< Number of bytes to be ACKed. uint32_t m_bytesLeftToBeAcked; //!< Number of bytes to be ACKed left. @@ -265,7 +265,7 @@ public: * \param desc description of the test */ TcpGeneralTest (const std::string &desc); - ~TcpGeneralTest (); + ~TcpGeneralTest () override; /** * \brief Used as parameter of methods, specifies on what node @@ -370,7 +370,7 @@ protected: * * \see ConfigureEnvironment */ - virtual void DoRun (); + void DoRun () override; /** * \brief Change the configuration of the environment @@ -385,7 +385,7 @@ protected: /** * \brief Teardown the TCP test */ - virtual void DoTeardown (); + void DoTeardown () override; /** * \brief Scheduled at 0.0, SENDER starts the connection to RECEIVER diff --git a/src/internet/test/tcp-header-test.cc b/src/internet/test/tcp-header-test.cc index f36bf02c8..c67840f51 100644 --- a/src/internet/test/tcp-header-test.cc +++ b/src/internet/test/tcp-header-test.cc @@ -57,8 +57,8 @@ public: TcpHeaderGetSetTestCase (std::string name); protected: private: - virtual void DoRun (); - virtual void DoTeardown (); + void DoRun () override; + void DoTeardown () override; }; @@ -162,8 +162,8 @@ public: TcpHeaderWithRFC793OptionTestCase (std::string name); private: - virtual void DoRun (); - virtual void DoTeardown (); + void DoRun () override; + void DoTeardown () override; /** * \brief Check an header with only one kind of option. @@ -367,7 +367,7 @@ public: TcpHeaderFlagsToString (std::string name); private: - virtual void DoRun (); + void DoRun () override; }; TcpHeaderFlagsToString::TcpHeaderFlagsToString (std::string name) diff --git a/src/internet/test/tcp-highspeed-test.cc b/src/internet/test/tcp-highspeed-test.cc index ec85f4634..ed07392f2 100644 --- a/src/internet/test/tcp-highspeed-test.cc +++ b/src/internet/test/tcp-highspeed-test.cc @@ -46,7 +46,7 @@ public: const std::string &name); private: - virtual void DoRun (); + void DoRun () override; uint32_t m_cWnd; //!< Congestion window. uint32_t m_segmentSize; //!< Segment size. @@ -103,7 +103,7 @@ public: const std::string &name); private: - virtual void DoRun (); + void DoRun () override; uint32_t m_cWnd; //!< Congestion window. uint32_t m_segmentSize; //!< Segment size. diff --git a/src/internet/test/tcp-htcp-test.cc b/src/internet/test/tcp-htcp-test.cc index 162fec885..7e16d4332 100644 --- a/src/internet/test/tcp-htcp-test.cc +++ b/src/internet/test/tcp-htcp-test.cc @@ -60,7 +60,7 @@ public: Time secondAck, uint32_t expectedCwnd, const std::string &name); private: - virtual void DoRun (); + void DoRun () override; uint32_t m_cWnd; //!< Congestion window. uint32_t m_segmentSize; //!< Segment size. diff --git a/src/internet/test/tcp-hybla-test.cc b/src/internet/test/tcp-hybla-test.cc index 44bf213aa..c6d08eb6f 100644 --- a/src/internet/test/tcp-hybla-test.cc +++ b/src/internet/test/tcp-hybla-test.cc @@ -49,7 +49,7 @@ public: const std::string &name); private: - virtual void DoRun (); + void DoRun () override; /** * \brief Tracks TCP Hybla rho parameter changes. diff --git a/src/internet/test/tcp-illinois-test.cc b/src/internet/test/tcp-illinois-test.cc index 8cb98d458..53e9c2219 100644 --- a/src/internet/test/tcp-illinois-test.cc +++ b/src/internet/test/tcp-illinois-test.cc @@ -66,7 +66,7 @@ public: const std::string &name); private: - virtual void DoRun (); + void DoRun () override; /** * \brief Increases the TCP window. * \param cong The congestion control. diff --git a/src/internet/test/tcp-ledbat-test.cc b/src/internet/test/tcp-ledbat-test.cc index 173324b65..8ff97cca6 100644 --- a/src/internet/test/tcp-ledbat-test.cc +++ b/src/internet/test/tcp-ledbat-test.cc @@ -56,7 +56,7 @@ public: SequenceNumber32 lastAckedSeq, Time rtt, const std::string &name); private: - virtual void DoRun (); + void DoRun () override; /** \brief Execute the test */ void ExecuteTest (); @@ -145,7 +145,7 @@ public: SequenceNumber32 lastAckedSeq, Time rtt, const std::string &name); private: - virtual void DoRun (); + void DoRun () override; /** \brief Execute the test */ void ExecuteTest (); @@ -238,7 +238,7 @@ public: SequenceNumber32 lastAckedSeq, Time rtt, const std::string &name); private: - virtual void DoRun (); + void DoRun () override; /** \brief Execute the test */ void ExecuteTest (); diff --git a/src/internet/test/tcp-linux-reno-test.cc b/src/internet/test/tcp-linux-reno-test.cc index 726497825..5eab64c78 100644 --- a/src/internet/test/tcp-linux-reno-test.cc +++ b/src/internet/test/tcp-linux-reno-test.cc @@ -65,19 +65,19 @@ public: TypeId& congControl, const std::string &desc); protected: - virtual void CWndTrace (uint32_t oldValue, uint32_t newValue); - void QueueDrop (SocketWho who); - void PhyDrop (SocketWho who); + void CWndTrace (uint32_t oldValue, uint32_t newValue) override; + void QueueDrop (SocketWho who) override; + void PhyDrop (SocketWho who) override; - virtual void ConfigureEnvironment (); - virtual void ConfigureProperties (); - virtual void DoTeardown (); + void ConfigureEnvironment () override; + void ConfigureProperties () override; + void DoTeardown () override; bool m_initial; //!< First cycle flag. private: - virtual void Tx (const Ptr p, const TcpHeader&h, SocketWho who); - virtual void Rx (const Ptr p, const TcpHeader&h, SocketWho who); + void Tx (const Ptr p, const TcpHeader&h, SocketWho who) override; + void Rx (const Ptr p, const TcpHeader&h, SocketWho who) override; uint32_t m_segmentSize; //!< Segment size. uint32_t m_packetSize; //!< Packet size. uint32_t m_packets; //!< Packet counter. @@ -225,17 +225,17 @@ public: TypeId& congControl, const std::string &desc); protected: - virtual void CWndTrace (uint32_t oldValue, uint32_t newValue); - virtual void QueueDrop (SocketWho who); - virtual void PhyDrop (SocketWho who); + void CWndTrace (uint32_t oldValue, uint32_t newValue) override; + void QueueDrop (SocketWho who) override; + void PhyDrop (SocketWho who) override; - virtual void ConfigureEnvironment (); - virtual void ConfigureProperties (); - virtual void DoTeardown (); + void ConfigureEnvironment () override; + void ConfigureProperties () override; + void DoTeardown () override; private: - virtual void Tx (const Ptr p, const TcpHeader&h, SocketWho who); - virtual void Rx (const Ptr p, const TcpHeader&h, SocketWho who); + void Tx (const Ptr p, const TcpHeader&h, SocketWho who) override; + void Rx (const Ptr p, const TcpHeader&h, SocketWho who) override; uint32_t m_segmentSize; //!< Segment size. uint32_t m_packetSize; //!< Size of the packets used in socket writes. uint32_t m_packets; //!< Number of packets to send to the socket. diff --git a/src/internet/test/tcp-loss-test.cc b/src/internet/test/tcp-loss-test.cc index 52c3b6caa..1ef847e40 100644 --- a/src/internet/test/tcp-loss-test.cc +++ b/src/internet/test/tcp-loss-test.cc @@ -65,14 +65,14 @@ public: TcpLargeTransferLossTest (uint32_t firstLoss, uint32_t secondLoss, uint32_t lastSegment, const std::string& desc); protected: - void ConfigureProperties (); - void ConfigureEnvironment (); - void FinalChecks (); - void Tx (const Ptr p, const TcpHeader&h, SocketWho who); - void Rx (const Ptr p, const TcpHeader&h, SocketWho who); + void ConfigureProperties () override; + void ConfigureEnvironment () override; + void FinalChecks () override; + void Tx (const Ptr p, const TcpHeader&h, SocketWho who) override; + void Rx (const Ptr p, const TcpHeader&h, SocketWho who) override; void CongStateTrace (const TcpSocketState::TcpCongState_t oldValue, - const TcpSocketState::TcpCongState_t newValue); - Ptr CreateReceiverErrorModel (); + const TcpSocketState::TcpCongState_t newValue) override; + Ptr CreateReceiverErrorModel () override; private: uint32_t m_firstLoss; //!< First segment loss uint32_t m_secondLoss; //!< Second segment loss diff --git a/src/internet/test/tcp-lp-test.cc b/src/internet/test/tcp-lp-test.cc index 5b3be5413..39bd1ea4b 100644 --- a/src/internet/test/tcp-lp-test.cc +++ b/src/internet/test/tcp-lp-test.cc @@ -53,7 +53,7 @@ public: uint32_t segmentsAcked, uint32_t ssThresh, Time rtt, const std::string &name); private: - virtual void DoRun (); + void DoRun () override; uint32_t m_cWnd; //!< Congestion window size uint32_t m_segmentSize; //!< Segment size uint32_t m_ssThresh; //!< Slow start threshold @@ -124,7 +124,7 @@ public: uint32_t segmentsAcked, Time rtt, const std::string &name); private: - virtual void DoRun (); + void DoRun () override; uint32_t m_cWnd; //!< Congestion window size uint32_t m_segmentSize; //!< Segment size @@ -189,7 +189,7 @@ public: uint32_t segmentsAcked, Time rtt, const std::string &name); private: - virtual void DoRun (); + void DoRun () override; uint32_t m_cWnd; //!< Congestion window size uint32_t m_segmentSize; //!< Segment size diff --git a/src/internet/test/tcp-option-test.cc b/src/internet/test/tcp-option-test.cc index 2e3d5dd0e..6affa0aca 100644 --- a/src/internet/test/tcp-option-test.cc +++ b/src/internet/test/tcp-option-test.cc @@ -53,8 +53,8 @@ public: void TestDeserialize (); private: - virtual void DoRun (); - virtual void DoTeardown (); + void DoRun () override; + void DoTeardown () override; uint8_t m_scale; //!< Window scaling. Buffer m_buffer; //!< Buffer. @@ -134,8 +134,8 @@ public: void TestDeserialize (); private: - virtual void DoRun (); - virtual void DoTeardown (); + void DoRun () override; + void DoTeardown () override; uint32_t m_timestamp; //!< TimeStamp. uint32_t m_echo; //!< Echoed TimeStamp. diff --git a/src/internet/test/tcp-pacing-test.cc b/src/internet/test/tcp-pacing-test.cc index c8fbab675..1a5199941 100644 --- a/src/internet/test/tcp-pacing-test.cc +++ b/src/internet/test/tcp-pacing-test.cc @@ -110,22 +110,22 @@ public: const TypeId& congControl, const std::string &desc); protected: - virtual void CWndTrace (uint32_t oldValue, uint32_t newValue); - virtual void RttTrace (Time oldTime, Time newTime); - virtual void BytesInFlightTrace (uint32_t oldValue, uint32_t newValue); - virtual void Tx (const Ptr p, const TcpHeader &h, SocketWho who); - virtual void Rx (const Ptr p, const TcpHeader &h, SocketWho who); - virtual void QueueDrop (SocketWho who); - virtual void PhyDrop (SocketWho who); - virtual void NormalClose (SocketWho who); + void CWndTrace (uint32_t oldValue, uint32_t newValue) override; + void RttTrace (Time oldTime, Time newTime) override; + void BytesInFlightTrace (uint32_t oldValue, uint32_t newValue) override; + void Tx (const Ptr p, const TcpHeader &h, SocketWho who) override; + void Rx (const Ptr p, const TcpHeader &h, SocketWho who) override; + void QueueDrop (SocketWho who) override; + void PhyDrop (SocketWho who) override; + void NormalClose (SocketWho who) override; /** * \brief Update the expected interval at which next packet will be sent */ virtual void UpdateExpectedInterval (); - virtual void ConfigureEnvironment (); - virtual void ConfigureProperties (); + void ConfigureEnvironment () override; + void ConfigureProperties () override; private: uint32_t m_segmentSize; //!< Segment size diff --git a/src/internet/test/tcp-pkts-acked-test.cc b/src/internet/test/tcp-pkts-acked-test.cc index 186264479..64be17b02 100644 --- a/src/internet/test/tcp-pkts-acked-test.cc +++ b/src/internet/test/tcp-pkts-acked-test.cc @@ -60,12 +60,12 @@ public: void PktsAckedCalled (uint32_t segmentsAcked); protected: - virtual Ptr CreateSenderSocket (Ptr node); - virtual void Rx (const Ptr p, const TcpHeader&h, SocketWho who); + Ptr CreateSenderSocket (Ptr node) override; + void Rx (const Ptr p, const TcpHeader&h, SocketWho who) override; - virtual void ConfigureEnvironment (); + void ConfigureEnvironment () override; - void FinalChecks (); + void FinalChecks () override; private: uint32_t m_segmentsAcked; //!< Contains the number of times PktsAcked is called @@ -104,7 +104,7 @@ public: } void PktsAcked (Ptr tcb, uint32_t segmentsAcked, - const Time& rtt) + const Time& rtt) override { m_test (segmentsAcked); } diff --git a/src/internet/test/tcp-prr-recovery-test.cc b/src/internet/test/tcp-prr-recovery-test.cc index 6e3173e6e..70578c5f2 100644 --- a/src/internet/test/tcp-prr-recovery-test.cc +++ b/src/internet/test/tcp-prr-recovery-test.cc @@ -62,7 +62,7 @@ public: const std::string &name); private: - virtual void DoRun (); + void DoRun () override; uint32_t m_cWnd; //!< Congestion window. uint32_t m_segmentSize; //!< Segment size. diff --git a/src/internet/test/tcp-rate-ops-test.cc b/src/internet/test/tcp-rate-ops-test.cc index 917e1ab81..17bdad192 100644 --- a/src/internet/test/tcp-rate-ops-test.cc +++ b/src/internet/test/tcp-rate-ops-test.cc @@ -57,7 +57,7 @@ public: uint32_t testCase, std::string testName); private: - virtual void DoRun (); + void DoRun () override; /** * Send an application packet @@ -179,7 +179,7 @@ public: { } - virtual bool HasCongControl () const + bool HasCongControl () const override { return true; } @@ -226,13 +226,13 @@ protected: * \param node sender node pointer * \return the socket to be installed in the sender */ - virtual Ptr CreateSenderSocket (Ptr node); + Ptr CreateSenderSocket (Ptr node) override; /** * \brief Create a receiver error model. * \returns The receiver error model. */ - virtual Ptr CreateReceiverErrorModel (); + Ptr CreateReceiverErrorModel () override; /** * \brief Receive a packet. @@ -240,14 +240,14 @@ protected: * \param h The TCP header. * \param who Who the socket belongs to (sender or receiver). */ - virtual void Rx (const Ptr p, const TcpHeader&h, SocketWho who); + void Rx (const Ptr p, const TcpHeader&h, SocketWho who) override; /** * \brief Track the bytes in flight. * \param oldValue previous value. * \param newValue actual value. */ - virtual void BytesInFlightTrace (uint32_t oldValue, uint32_t newValue); + void BytesInFlightTrace (uint32_t oldValue, uint32_t newValue) override; /** * \brief Called when a packet is dropped. @@ -260,24 +260,24 @@ protected: /** * \brief Configure the test. */ - void ConfigureEnvironment (); + void ConfigureEnvironment () override; /** * \brief Do the final checks. */ - void FinalChecks (); + void FinalChecks () override; /** * \brief Track the rate value of TcpRateLinux. * \param rate updated value of TcpRate. */ - virtual void RateUpdatedTrace (const TcpRateLinux::TcpRateConnection &rate); + void RateUpdatedTrace (const TcpRateLinux::TcpRateConnection &rate) override; /** * \brief Track the rate sample value of TcpRateLinux. * \param sample updated value of TcpRateSample. */ - virtual void RateSampleUpdatedTrace (const TcpRateLinux::TcpRateSample &sample); + void RateSampleUpdatedTrace (const TcpRateLinux::TcpRateSample &sample) override; private: Ptr m_congCtl; //!< Dummy congestion control. @@ -421,8 +421,8 @@ public: TcpRateLinuxWithBufferTest (uint32_t segmentSize, std::string desc); private: - virtual void DoRun (); - virtual void DoTeardown (); + void DoRun () override; + void DoTeardown () override; /** * \brief Track the rate value of TcpRateLinux. diff --git a/src/internet/test/tcp-rto-test.cc b/src/internet/test/tcp-rto-test.cc index a39ce6dd2..1f75288f8 100644 --- a/src/internet/test/tcp-rto-test.cc +++ b/src/internet/test/tcp-rto-test.cc @@ -53,15 +53,15 @@ public: protected: - virtual Ptr CreateSenderSocket (Ptr node); - virtual void AfterRTOExpired (const Ptr tcb, SocketWho who); - virtual void RcvAck (const Ptr tcb, - const TcpHeader& h, SocketWho who); - virtual void ProcessedAck (const Ptr tcb, - const TcpHeader& h, SocketWho who); - virtual void FinalChecks (); - virtual void ConfigureProperties (); - virtual void ConfigureEnvironment (); + Ptr CreateSenderSocket (Ptr node) override; + void AfterRTOExpired (const Ptr tcb, SocketWho who) override; + void RcvAck (const Ptr tcb, + const TcpHeader& h, SocketWho who) override; + void ProcessedAck (const Ptr tcb, + const TcpHeader& h, SocketWho who) override; + void FinalChecks () override; + void ConfigureProperties () override; + void ConfigureEnvironment () override; private: bool m_afterRTOExpired; //!< True if RTO is expired. @@ -191,14 +191,14 @@ public: protected: - virtual Ptr CreateSenderSocket (Ptr node); - virtual Ptr CreateReceiverErrorModel (); - virtual void BytesInFlightTrace (uint32_t oldValue, uint32_t newValue); - virtual void SsThreshTrace (uint32_t oldValue, uint32_t newValue); - virtual void BeforeRTOExpired (const Ptr tcb, SocketWho who); - virtual void AfterRTOExpired (const Ptr tcb, SocketWho who); + Ptr CreateSenderSocket (Ptr node) override; + Ptr CreateReceiverErrorModel () override; + void BytesInFlightTrace (uint32_t oldValue, uint32_t newValue) override; + void SsThreshTrace (uint32_t oldValue, uint32_t newValue) override; + void BeforeRTOExpired (const Ptr tcb, SocketWho who) override; + void AfterRTOExpired (const Ptr tcb, SocketWho who) override; - virtual void ConfigureEnvironment (); + void ConfigureEnvironment () override; /** * \brief Called when a packet has been dropped. @@ -330,14 +330,14 @@ public: TcpTimeRtoTest (const TypeId &congControl, const std::string &msg); protected: - virtual Ptr CreateSenderSocket (Ptr node); - virtual Ptr CreateReceiverErrorModel (); - virtual void ErrorClose (SocketWho who); - virtual void AfterRTOExpired (const Ptr tcb, SocketWho who); - virtual void Tx (const Ptr p, const TcpHeader&h, SocketWho who); - virtual void FinalChecks (); + Ptr CreateSenderSocket (Ptr node) override; + Ptr CreateReceiverErrorModel () override; + void ErrorClose (SocketWho who) override; + void AfterRTOExpired (const Ptr tcb, SocketWho who) override; + void Tx (const Ptr p, const TcpHeader&h, SocketWho who) override; + void FinalChecks () override; - virtual void ConfigureEnvironment (); + void ConfigureEnvironment () override; /** * \brief Called when a packet has been dropped. diff --git a/src/internet/test/tcp-rtt-estimation.cc b/src/internet/test/tcp-rtt-estimation.cc index b04c048f0..05874c4b0 100644 --- a/src/internet/test/tcp-rtt-estimation.cc +++ b/src/internet/test/tcp-rtt-estimation.cc @@ -50,17 +50,17 @@ public: TcpRttEstimationTest (const std::string &desc, bool enableTs, uint32_t pktCount); protected: - virtual Ptr CreateReceiverSocket (Ptr node); - virtual Ptr CreateSenderSocket (Ptr node); + Ptr CreateReceiverSocket (Ptr node) override; + Ptr CreateSenderSocket (Ptr node) override; - virtual void Rx (const Ptr p, const TcpHeader&h, SocketWho who); - virtual void Tx (const Ptr p, const TcpHeader&h, SocketWho who); - virtual void UpdatedRttHistory (const SequenceNumber32 & seq, uint32_t sz, - bool isRetransmission, SocketWho who); - virtual void RttTrace (Time oldTime, Time newTime); - void FinalChecks (); + void Rx (const Ptr p, const TcpHeader&h, SocketWho who) override; + void Tx (const Ptr p, const TcpHeader&h, SocketWho who) override; + void UpdatedRttHistory (const SequenceNumber32 & seq, uint32_t sz, + bool isRetransmission, SocketWho who) override; + void RttTrace (Time oldTime, Time newTime) override; + void FinalChecks () override; - virtual void ConfigureEnvironment (); + void ConfigureEnvironment () override; private: bool m_enableTs; //!< Enable TimeStamp option @@ -206,7 +206,7 @@ public: uint32_t pktCount, std::vector toDrop); protected: - Ptr CreateReceiverErrorModel (); + Ptr CreateReceiverErrorModel () override; private: std::vector m_toDrop; //!< Packets to drop. diff --git a/src/internet/test/tcp-rx-buffer-test.cc b/src/internet/test/tcp-rx-buffer-test.cc index 31b137c3f..898cc868d 100644 --- a/src/internet/test/tcp-rx-buffer-test.cc +++ b/src/internet/test/tcp-rx-buffer-test.cc @@ -37,8 +37,8 @@ public: TcpRxBufferTestCase (); private: - virtual void DoRun (); - virtual void DoTeardown (); + void DoRun () override; + void DoTeardown () override; /** * \brief Test the SACK list update. diff --git a/src/internet/test/tcp-sack-permitted-test.cc b/src/internet/test/tcp-sack-permitted-test.cc index e575f3f84..4a4a63e88 100644 --- a/src/internet/test/tcp-sack-permitted-test.cc +++ b/src/internet/test/tcp-sack-permitted-test.cc @@ -52,10 +52,10 @@ public: * */ SackPermittedTestCase (SackPermittedTestCase::Configuration conf); protected: - virtual Ptr CreateReceiverSocket (Ptr node); - virtual Ptr CreateSenderSocket (Ptr node); + Ptr CreateReceiverSocket (Ptr node) override; + Ptr CreateSenderSocket (Ptr node) override; - virtual void Tx (const Ptr p, const TcpHeader&h, SocketWho who); + void Tx (const Ptr p, const TcpHeader&h, SocketWho who) override; Configuration m_configuration; //!< The configuration }; diff --git a/src/internet/test/tcp-scalable-test.cc b/src/internet/test/tcp-scalable-test.cc index 03b7d6795..7e37fec82 100644 --- a/src/internet/test/tcp-scalable-test.cc +++ b/src/internet/test/tcp-scalable-test.cc @@ -56,7 +56,7 @@ public: const std::string &name); private: - virtual void DoRun (); + void DoRun () override; uint32_t m_cWnd; //!< Congestion window. uint32_t m_segmentSize; //!< Segment size. @@ -122,7 +122,7 @@ public: const std::string &name); private: - virtual void DoRun (); + void DoRun () override; uint32_t m_cWnd; //!< Congestion window. uint32_t m_segmentSize; //!< Segment size. diff --git a/src/internet/test/tcp-slow-start-test.cc b/src/internet/test/tcp-slow-start-test.cc index 81ce59556..c0909e43b 100644 --- a/src/internet/test/tcp-slow-start-test.cc +++ b/src/internet/test/tcp-slow-start-test.cc @@ -61,14 +61,14 @@ public: const std::string &desc); protected: - virtual void CWndTrace (uint32_t oldValue, uint32_t newValue); - virtual void Tx (const Ptr p, const TcpHeader &h, SocketWho who); - virtual void Rx (const Ptr p, const TcpHeader &h, SocketWho who); - void QueueDrop (SocketWho who); - void PhyDrop (SocketWho who); + void CWndTrace (uint32_t oldValue, uint32_t newValue) override; + void Tx (const Ptr p, const TcpHeader &h, SocketWho who) override; + void Rx (const Ptr p, const TcpHeader &h, SocketWho who) override; + void QueueDrop (SocketWho who) override; + void PhyDrop (SocketWho who) override; - virtual void ConfigureEnvironment (); - virtual void ConfigureProperties (); + void ConfigureEnvironment () override; + void ConfigureProperties () override; uint32_t m_ackedBytes; //!< ACKed bytes. uint32_t m_sentBytes; //!< Sent bytes. @@ -234,7 +234,7 @@ public: const std::string &desc); protected: - virtual Ptr CreateReceiverSocket (Ptr node); + Ptr CreateReceiverSocket (Ptr node) override; }; TcpSlowStartAttackerTest::TcpSlowStartAttackerTest (uint32_t segmentSize, diff --git a/src/internet/test/tcp-syn-connection-failed-test.cc b/src/internet/test/tcp-syn-connection-failed-test.cc index 4a31076c5..1ebca4768 100644 --- a/src/internet/test/tcp-syn-connection-failed-test.cc +++ b/src/internet/test/tcp-syn-connection-failed-test.cc @@ -48,7 +48,7 @@ public: * \param socket The receiving socket. */ void HandleConnectionFailed (Ptr socket); - virtual void DoRun (); + void DoRun () override; private: bool m_connectionFailed{false}; //!< Connection failure indicator diff --git a/src/internet/test/tcp-test.cc b/src/internet/test/tcp-test.cc index 7f3227e8e..7d9b8f535 100644 --- a/src/internet/test/tcp-test.cc +++ b/src/internet/test/tcp-test.cc @@ -78,8 +78,8 @@ public: uint32_t serverReadSize, bool useIpv6); private: - virtual void DoRun (); - virtual void DoTeardown (); + void DoRun () override; + void DoTeardown () override; /** * \brief Setup the test (IPv4 version). diff --git a/src/internet/test/tcp-timestamp-test.cc b/src/internet/test/tcp-timestamp-test.cc index 5a3a09ddc..f70160092 100644 --- a/src/internet/test/tcp-timestamp-test.cc +++ b/src/internet/test/tcp-timestamp-test.cc @@ -54,11 +54,11 @@ public: TimestampTestCase (TimestampTestCase::Configuration conf); protected: - virtual Ptr CreateReceiverSocket (Ptr node); - virtual Ptr CreateSenderSocket (Ptr node); + Ptr CreateReceiverSocket (Ptr node) override; + Ptr CreateSenderSocket (Ptr node) override; - virtual void Tx (const Ptr p, const TcpHeader&h, SocketWho who); - virtual void Rx (const Ptr p, const TcpHeader&h, SocketWho who); + void Tx (const Ptr p, const TcpHeader&h, SocketWho who) override; + void Rx (const Ptr p, const TcpHeader&h, SocketWho who) override; Configuration m_configuration; //!< Test configuration. }; @@ -221,8 +221,8 @@ public: std::string name); private: - virtual void DoRun (); - virtual void DoTeardown (); + void DoRun () override; + void DoTeardown () override; /** * \brief Perform the test checks. diff --git a/src/internet/test/tcp-tx-buffer-test.cc b/src/internet/test/tcp-tx-buffer-test.cc index d94fef98e..c21b71ba3 100644 --- a/src/internet/test/tcp-tx-buffer-test.cc +++ b/src/internet/test/tcp-tx-buffer-test.cc @@ -39,8 +39,8 @@ public: TcpTxBufferTestCase (); private: - virtual void DoRun (); - virtual void DoTeardown (); + void DoRun () override; + void DoTeardown () override; /** \brief Test if a segment is really set as lost */ void TestIsLost (); diff --git a/src/internet/test/tcp-vegas-test.cc b/src/internet/test/tcp-vegas-test.cc index a18c3a6dc..6207b17e6 100644 --- a/src/internet/test/tcp-vegas-test.cc +++ b/src/internet/test/tcp-vegas-test.cc @@ -61,7 +61,7 @@ public: const std::string &name); private: - virtual void DoRun (); + void DoRun () override; /** * \brief Increases the TCP window. * \param cong The congestion control. diff --git a/src/internet/test/tcp-veno-test.cc b/src/internet/test/tcp-veno-test.cc index 16200fba0..84940de09 100644 --- a/src/internet/test/tcp-veno-test.cc +++ b/src/internet/test/tcp-veno-test.cc @@ -62,7 +62,7 @@ public: const std::string &name); private: - virtual void DoRun (); + void DoRun () override; /** * \brief TCP Veno additive increase formula. diff --git a/src/internet/test/tcp-wscaling-test.cc b/src/internet/test/tcp-wscaling-test.cc index 3c2adc12d..e805bfb3f 100644 --- a/src/internet/test/tcp-wscaling-test.cc +++ b/src/internet/test/tcp-wscaling-test.cc @@ -63,10 +63,10 @@ public: uint32_t maxSndBufferSize, std::string name); protected: - virtual Ptr CreateReceiverSocket (Ptr node); - virtual Ptr CreateSenderSocket (Ptr node); + Ptr CreateReceiverSocket (Ptr node) override; + Ptr CreateSenderSocket (Ptr node) override; - virtual void Tx (const Ptr p, const TcpHeader&h, SocketWho who); + void Tx (const Ptr p, const TcpHeader&h, SocketWho who) override; Configuration m_configuration; //!< Test configuration. uint32_t m_maxRcvBufferSize; //!< Maximum receiver buffer size. diff --git a/src/internet/test/tcp-yeah-test.cc b/src/internet/test/tcp-yeah-test.cc index df7f740af..e634de762 100644 --- a/src/internet/test/tcp-yeah-test.cc +++ b/src/internet/test/tcp-yeah-test.cc @@ -64,7 +64,7 @@ public: const std::string &name); private: - virtual void DoRun (); + void DoRun () override; /** * \brief Increases the TCP window. * \param cong The congestion control. @@ -250,7 +250,7 @@ public: const std::string &name); private: - virtual void DoRun (); + void DoRun () override; /** * \brief Calculate the Slow Start threshold. * \param cong The TCP state. diff --git a/src/internet/test/tcp-zero-window-test.cc b/src/internet/test/tcp-zero-window-test.cc index c8572030f..622486ce2 100644 --- a/src/internet/test/tcp-zero-window-test.cc +++ b/src/internet/test/tcp-zero-window-test.cc @@ -44,17 +44,17 @@ public: protected: //virtual void ReceivePacket (Ptr socket); - virtual Ptr CreateReceiverSocket (Ptr node); + Ptr CreateReceiverSocket (Ptr node) override; - virtual void Tx (const Ptr p, const TcpHeader&h, SocketWho who); - virtual void Rx (const Ptr p, const TcpHeader&h, SocketWho who); - virtual void ProcessedAck (const Ptr tcb, - const TcpHeader& h, SocketWho who); - void NormalClose (SocketWho who); - void FinalChecks (); + void Tx (const Ptr p, const TcpHeader&h, SocketWho who) override; + void Rx (const Ptr p, const TcpHeader&h, SocketWho who) override; + void ProcessedAck (const Ptr tcb, + const TcpHeader& h, SocketWho who) override; + void NormalClose (SocketWho who) override; + void FinalChecks () override; - virtual void ConfigureEnvironment (); - virtual void ConfigureProperties (); + void ConfigureEnvironment () override; + void ConfigureProperties () override; /** * \brief Increase the receiver buffer size. diff --git a/src/internet/test/udp-test.cc b/src/internet/test/udp-test.cc index fc3a48964..b19bc8672 100644 --- a/src/internet/test/udp-test.cc +++ b/src/internet/test/udp-test.cc @@ -69,7 +69,7 @@ class UdpSocketLoopbackTest : public TestCase { public: UdpSocketLoopbackTest (); - virtual void DoRun (); + void DoRun () override; /** * \brief Receive a packet. @@ -121,7 +121,7 @@ class Udp6SocketLoopbackTest : public TestCase { public: Udp6SocketLoopbackTest (); - virtual void DoRun (); + void DoRun () override; /** * \brief Receive a packet. @@ -214,7 +214,7 @@ class UdpSocketImplTest : public TestCase void SendData (Ptr socket); public: - virtual void DoRun (); + void DoRun () override; UdpSocketImplTest (); /** @@ -503,7 +503,7 @@ class Udp6SocketImplTest : public TestCase void SendDataTo (Ptr socket, std::string to); public: - virtual void DoRun (); + void DoRun () override; Udp6SocketImplTest (); /** diff --git a/src/lr-wpan/helper/lr-wpan-helper.h b/src/lr-wpan/helper/lr-wpan-helper.h index 790eafe2b..ffabffd5d 100644 --- a/src/lr-wpan/helper/lr-wpan-helper.h +++ b/src/lr-wpan/helper/lr-wpan-helper.h @@ -70,7 +70,7 @@ public: */ LrWpanHelper (bool useMultiModelSpectrumChannel); - virtual ~LrWpanHelper (); + ~LrWpanHelper () override; // Delete copy constructor and assignment operator to avoid misuse LrWpanHelper (const LrWpanHelper &) = delete; @@ -173,7 +173,7 @@ private: * \param promiscuous If true capture all possible packets available at the device. * \param explicitFilename Treat the prefix as an explicit filename if true */ - virtual void EnablePcapInternal (std::string prefix, Ptr nd, bool promiscuous, bool explicitFilename); + void EnablePcapInternal (std::string prefix, Ptr nd, bool promiscuous, bool explicitFilename) override; /** * \brief Enable ascii trace output on the indicated net device. @@ -186,10 +186,10 @@ private: * \param nd Net device for which you want to enable tracing. * \param explicitFilename Treat the prefix as an explicit filename if true */ - virtual void EnableAsciiInternal (Ptr stream, + void EnableAsciiInternal (Ptr stream, std::string prefix, Ptr nd, - bool explicitFilename); + bool explicitFilename) override; private: Ptr m_channel; //!< channel to be used for the devices diff --git a/src/lr-wpan/model/lr-wpan-csmaca.h b/src/lr-wpan/model/lr-wpan-csmaca.h index 5aee861cb..dedaf83e6 100644 --- a/src/lr-wpan/model/lr-wpan-csmaca.h +++ b/src/lr-wpan/model/lr-wpan-csmaca.h @@ -67,7 +67,7 @@ public: * Default constructor. */ LrWpanCsmaCa (); - virtual ~LrWpanCsmaCa (); + ~LrWpanCsmaCa () override; // Delete copy constructor and assignment operator to avoid misuse LrWpanCsmaCa (const LrWpanCsmaCa &) = delete; @@ -258,7 +258,7 @@ public: bool GetBatteryLifeExtension (); private: - virtual void DoDispose (); + void DoDispose () override; /** * \brief Get the time left in the CAP portion of the Outgoing or Incoming superframe. * \return the time left in the CAP diff --git a/src/lr-wpan/model/lr-wpan-lqi-tag.h b/src/lr-wpan/model/lr-wpan-lqi-tag.h index e41a0dc3b..368114aaa 100644 --- a/src/lr-wpan/model/lr-wpan-lqi-tag.h +++ b/src/lr-wpan/model/lr-wpan-lqi-tag.h @@ -44,7 +44,7 @@ public: */ static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * Create a LrWpanLqiTag with the default LQI 0. @@ -57,10 +57,10 @@ public: */ LrWpanLqiTag (uint8_t lqi); - virtual uint32_t GetSerializedSize () const; - virtual void Serialize (TagBuffer i) const; - virtual void Deserialize (TagBuffer i); - virtual void Print (std::ostream &os) const; + uint32_t GetSerializedSize () const override; + void Serialize (TagBuffer i) const override; + void Deserialize (TagBuffer i) override; + void Print (std::ostream &os) const override; /** * Set the LQI to the given value. diff --git a/src/lr-wpan/model/lr-wpan-mac-header.h b/src/lr-wpan/model/lr-wpan-mac-header.h index 75755b895..a9a0e28a9 100644 --- a/src/lr-wpan/model/lr-wpan-mac-header.h +++ b/src/lr-wpan/model/lr-wpan-mac-header.h @@ -101,7 +101,7 @@ public: */ LrWpanMacHeader (enum LrWpanMacType wpanMacType, uint8_t seqNum); - ~LrWpanMacHeader (); + ~LrWpanMacHeader () override; /** * Get the header type @@ -391,12 +391,12 @@ public: * \return the object TypeId */ static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; - void Print (std::ostream &os) const; - uint32_t GetSerializedSize () const; - void Serialize (Buffer::Iterator start) const; - uint32_t Deserialize (Buffer::Iterator start); + void Print (std::ostream &os) const override; + uint32_t GetSerializedSize () const override; + void Serialize (Buffer::Iterator start) const override; + uint32_t Deserialize (Buffer::Iterator start) override; private: diff --git a/src/lr-wpan/model/lr-wpan-mac-pl-headers.h b/src/lr-wpan/model/lr-wpan-mac-pl-headers.h index 6e5d7e503..29de758bd 100644 --- a/src/lr-wpan/model/lr-wpan-mac-pl-headers.h +++ b/src/lr-wpan/model/lr-wpan-mac-pl-headers.h @@ -46,11 +46,11 @@ public: * \return the object TypeId */ static TypeId GetTypeId (); - TypeId GetInstanceTypeId () const; - uint32_t GetSerializedSize () const; - virtual void Serialize (Buffer::Iterator start) const; - uint32_t Deserialize (Buffer::Iterator start); - void Print (std::ostream &os) const; + TypeId GetInstanceTypeId () const override; + uint32_t GetSerializedSize () const override; + void Serialize (Buffer::Iterator start) const override; + uint32_t Deserialize (Buffer::Iterator start) override; + void Print (std::ostream &os) const override; /** * Set the superframe specification field to the beacon payload header. * \param sfrmField The superframe specification field @@ -147,11 +147,11 @@ public: * \return the object TypeId */ static TypeId GetTypeId (); - TypeId GetInstanceTypeId () const; - uint32_t GetSerializedSize () const; - virtual void Serialize (Buffer::Iterator start) const; - uint32_t Deserialize (Buffer::Iterator start); - void Print (std::ostream &os) const; + TypeId GetInstanceTypeId () const override; + uint32_t GetSerializedSize () const override; + void Serialize (Buffer::Iterator start) const override; + uint32_t Deserialize (Buffer::Iterator start) override; + void Print (std::ostream &os) const override; /** * Set the command frame type diff --git a/src/lr-wpan/model/lr-wpan-mac-trailer.h b/src/lr-wpan/model/lr-wpan-mac-trailer.h index dbb5bf847..31a3b3f75 100644 --- a/src/lr-wpan/model/lr-wpan-mac-trailer.h +++ b/src/lr-wpan/model/lr-wpan-mac-trailer.h @@ -56,11 +56,11 @@ public: LrWpanMacTrailer (); // Inherited from the Trailer class. - virtual TypeId GetInstanceTypeId () const; - virtual void Print (std::ostream &os) const; - virtual uint32_t GetSerializedSize () const; - virtual void Serialize (Buffer::Iterator start) const; - virtual uint32_t Deserialize (Buffer::Iterator start); + TypeId GetInstanceTypeId () const override; + void Print (std::ostream &os) const override; + uint32_t GetSerializedSize () const override; + void Serialize (Buffer::Iterator start) const override; + uint32_t Deserialize (Buffer::Iterator start) override; /** * Get this trailers FCS value. If FCS calculation is disabled for this diff --git a/src/lr-wpan/model/lr-wpan-mac.h b/src/lr-wpan/model/lr-wpan-mac.h index 235e41382..51e6f2c0e 100644 --- a/src/lr-wpan/model/lr-wpan-mac.h +++ b/src/lr-wpan/model/lr-wpan-mac.h @@ -713,7 +713,7 @@ public: * Default constructor. */ LrWpanMac (); - virtual ~LrWpanMac (); + ~LrWpanMac () override; /** * Check if the receiver will be enabled when the MAC is idle. @@ -1393,8 +1393,8 @@ public: protected: // Inherited from Object. - virtual void DoInitialize (); - virtual void DoDispose (); + void DoInitialize () override; + void DoDispose () override; private: diff --git a/src/lr-wpan/model/lr-wpan-net-device.h b/src/lr-wpan/model/lr-wpan-net-device.h index 01e289ed0..89aed7ea6 100644 --- a/src/lr-wpan/model/lr-wpan-net-device.h +++ b/src/lr-wpan/model/lr-wpan-net-device.h @@ -57,7 +57,7 @@ public: static TypeId GetTypeId (); LrWpanNetDevice (); - virtual ~LrWpanNetDevice (); + ~LrWpanNetDevice () override; /** * How the pseudo-MAC address is built from @@ -121,39 +121,39 @@ public: Ptr GetCsmaCa () const; // From class NetDevice - virtual void SetIfIndex (const uint32_t index); - virtual uint32_t GetIfIndex () const; - virtual Ptr GetChannel () const; + void SetIfIndex (const uint32_t index) override; + uint32_t GetIfIndex () const override; + Ptr GetChannel () const override; /** * This method indirects to LrWpanMac::SetShortAddress () * \param address The short address. */ - virtual void SetAddress (Address address); + void SetAddress (Address address) override; /** * This method indirects to LrWpanMac::SetShortAddress () * \returns The short address. */ - virtual Address GetAddress () const; - virtual bool SetMtu (const uint16_t mtu); - virtual uint16_t GetMtu () const; - virtual bool IsLinkUp () const; - virtual void AddLinkChangeCallback (Callback callback); - virtual bool IsBroadcast () const; - virtual Address GetBroadcast () const; - virtual bool IsMulticast () const; - virtual Address GetMulticast (Ipv4Address multicastGroup) const; - virtual Address GetMulticast (Ipv6Address addr) const; - virtual bool IsBridge () const; - virtual bool IsPointToPoint () const; - virtual bool Send (Ptr packet, const Address& dest, uint16_t protocolNumber); - virtual bool SendFrom (Ptr packet, const Address& source, const Address& dest, uint16_t protocolNumber); - virtual Ptr GetNode () const; - virtual void SetNode (Ptr node); - virtual bool NeedsArp () const; + Address GetAddress () const override; + bool SetMtu (const uint16_t mtu) override; + uint16_t GetMtu () const override; + bool IsLinkUp () const override; + void AddLinkChangeCallback (Callback callback) override; + bool IsBroadcast () const override; + Address GetBroadcast () const override; + bool IsMulticast () const override; + Address GetMulticast (Ipv4Address multicastGroup) const override; + Address GetMulticast (Ipv6Address addr) const override; + bool IsBridge () const override; + bool IsPointToPoint () const override; + bool Send (Ptr packet, const Address& dest, uint16_t protocolNumber) override; + bool SendFrom (Ptr packet, const Address& source, const Address& dest, uint16_t protocolNumber) override; + Ptr GetNode () const override; + void SetNode (Ptr node) override; + bool NeedsArp () const override; - virtual void SetReceiveCallback (NetDevice::ReceiveCallback cb); - virtual void SetPromiscReceiveCallback (PromiscReceiveCallback cb); - virtual bool SupportsSendFrom () const; + void SetReceiveCallback (NetDevice::ReceiveCallback cb) override; + void SetPromiscReceiveCallback (PromiscReceiveCallback cb) override; + bool SupportsSendFrom () const override; /** * The callback used by the MAC to hand over incoming packets to the @@ -176,8 +176,8 @@ public: private: // Inherited from NetDevice/Object - virtual void DoDispose (); - virtual void DoInitialize (); + void DoDispose () override; + void DoInitialize () override; /** * Mark NetDevice link as up. diff --git a/src/lr-wpan/model/lr-wpan-phy.h b/src/lr-wpan/model/lr-wpan-phy.h index 5b78eb930..feb9090da 100644 --- a/src/lr-wpan/model/lr-wpan-phy.h +++ b/src/lr-wpan/model/lr-wpan-phy.h @@ -274,12 +274,12 @@ public: * Default constructor. */ LrWpanPhy (); - virtual ~LrWpanPhy (); + ~LrWpanPhy () override; // inherited from SpectrumPhy - void SetMobility (Ptr m); - Ptr GetMobility () const; - void SetChannel (Ptr c); + void SetMobility (Ptr m) override; + Ptr GetMobility () const override; + void SetChannel (Ptr c) override; /** * Get the currently attached channel. @@ -287,8 +287,8 @@ public: * \return the channel */ Ptr GetChannel (); - void SetDevice (Ptr d); - Ptr GetDevice () const; + void SetDevice (Ptr d) override; + Ptr GetDevice () const override; /** * Set the attached antenna. @@ -296,8 +296,8 @@ public: * \param a the antenna */ void SetAntenna (Ptr a); - Ptr GetAntenna () const; - virtual Ptr GetRxSpectrumModel () const; + Ptr GetAntenna () const override; + Ptr GetRxSpectrumModel () const override; /** * Set the Power Spectral Density of outgoing signals in W/Hz. @@ -334,7 +334,7 @@ public: * * @param params the SpectrumSignalParameters associated with the incoming waveform */ - virtual void StartRx (Ptr params); + void StartRx (Ptr params) override; /** * IEEE 802.15.4-2006 section 6.2.1.1 @@ -547,8 +547,8 @@ private: typedef std::pair, bool> PacketAndStatus; // Inherited from Object. - virtual void DoInitialize (); - virtual void DoDispose (); + void DoInitialize () override; + void DoDispose () override; /** * Change the PHY state to the given new state, firing the state change trace. diff --git a/src/lr-wpan/test/lr-wpan-ack-test.cc b/src/lr-wpan/test/lr-wpan-ack-test.cc index 801ae28ec..9deddc59f 100644 --- a/src/lr-wpan/test/lr-wpan-ack-test.cc +++ b/src/lr-wpan/test/lr-wpan-ack-test.cc @@ -99,7 +99,7 @@ public: void DataConfirmDev1 (McpsDataConfirmParams params); private: - virtual void DoRun (); + void DoRun () override; std::string m_prefix; //!< Filename prefix Time m_requestTime; //!< Request time. diff --git a/src/lr-wpan/test/lr-wpan-cca-test.cc b/src/lr-wpan/test/lr-wpan-cca-test.cc index 46e59a758..07be14c6c 100644 --- a/src/lr-wpan/test/lr-wpan-cca-test.cc +++ b/src/lr-wpan/test/lr-wpan-cca-test.cc @@ -93,7 +93,7 @@ private: */ static void PhyRxDrop (LrWpanCcaTestCase *testcase, Ptr device, Ptr packet); - virtual void DoRun (); + void DoRun () override; LrWpanPhyEnumeration m_status; //!< PHY status. diff --git a/src/lr-wpan/test/lr-wpan-collision-test.cc b/src/lr-wpan/test/lr-wpan-collision-test.cc index e7fd8f66f..17b8948b4 100644 --- a/src/lr-wpan/test/lr-wpan-collision-test.cc +++ b/src/lr-wpan/test/lr-wpan-collision-test.cc @@ -43,7 +43,7 @@ class LrWpanCollisionTestCase : public TestCase { public: LrWpanCollisionTestCase (); - virtual ~LrWpanCollisionTestCase (); + ~LrWpanCollisionTestCase () override; /** * \brief Function called when DataIndication is hit. @@ -52,7 +52,7 @@ public: */ void DataIndication (McpsDataIndicationParams params, Ptr p); private: - virtual void DoRun (); + void DoRun () override; uint8_t m_rxPackets; //!< Rx packets counter. }; diff --git a/src/lr-wpan/test/lr-wpan-ed-test.cc b/src/lr-wpan/test/lr-wpan-ed-test.cc index f4925ecc5..5dbfae32a 100644 --- a/src/lr-wpan/test/lr-wpan-ed-test.cc +++ b/src/lr-wpan/test/lr-wpan-ed-test.cc @@ -48,7 +48,7 @@ public: LrWpanEdTestCase (); private: - virtual void DoRun (); + void DoRun () override; /** * \brief Function called when PlmeEdConfirm is hit. diff --git a/src/lr-wpan/test/lr-wpan-error-model-test.cc b/src/lr-wpan/test/lr-wpan-error-model-test.cc index 73e4e2ed6..e20c7f2cf 100644 --- a/src/lr-wpan/test/lr-wpan-error-model-test.cc +++ b/src/lr-wpan/test/lr-wpan-error-model-test.cc @@ -47,7 +47,7 @@ class LrWpanErrorDistanceTestCase : public TestCase { public: LrWpanErrorDistanceTestCase (); - virtual ~LrWpanErrorDistanceTestCase (); + ~LrWpanErrorDistanceTestCase () override; /** * \brief Get the number of received packets. @@ -59,7 +59,7 @@ public: } private: - virtual void DoRun (); + void DoRun () override; /** * \brief Function to be called when a packet is received. @@ -80,10 +80,10 @@ class LrWpanErrorModelTestCase : public TestCase { public: LrWpanErrorModelTestCase (); - virtual ~LrWpanErrorModelTestCase (); + ~LrWpanErrorModelTestCase () override; private: - virtual void DoRun (); + void DoRun () override; }; LrWpanErrorDistanceTestCase::LrWpanErrorDistanceTestCase () diff --git a/src/lr-wpan/test/lr-wpan-ifs-test.cc b/src/lr-wpan/test/lr-wpan-ifs-test.cc index 9cc241db6..501b7b10c 100644 --- a/src/lr-wpan/test/lr-wpan-ifs-test.cc +++ b/src/lr-wpan/test/lr-wpan-ifs-test.cc @@ -48,7 +48,7 @@ class LrWpanDataIfsTestCase : public TestCase { public: LrWpanDataIfsTestCase (); - virtual ~LrWpanDataIfsTestCase (); + ~LrWpanDataIfsTestCase () override; private: /** @@ -103,7 +103,7 @@ private: - virtual void DoRun (); + void DoRun () override; Time m_lastTxTime; //!< The time of the last transmitted packet Time m_ackRxTime; //!< The time of the received acknowledgment. Time m_endIfs; //!< The time where the Interframe Space ended. diff --git a/src/lr-wpan/test/lr-wpan-mac-test.cc b/src/lr-wpan/test/lr-wpan-mac-test.cc index 96c0ade3f..ef107c7ba 100644 --- a/src/lr-wpan/test/lr-wpan-mac-test.cc +++ b/src/lr-wpan/test/lr-wpan-mac-test.cc @@ -43,7 +43,7 @@ class TestRxOffWhenIdleAfterCsmaFailure : public TestCase { public: TestRxOffWhenIdleAfterCsmaFailure (); - virtual ~TestRxOffWhenIdleAfterCsmaFailure (); + ~TestRxOffWhenIdleAfterCsmaFailure () override; private: @@ -75,7 +75,7 @@ private: */ void StateChangeNotificationDev2 (std::string context, Time now, LrWpanPhyEnumeration oldState, LrWpanPhyEnumeration newState); - virtual void DoRun (); + void DoRun () override; LrWpanPhyEnumeration m_dev0State; //!< Stores the PHY state of device 0 [00:01] @@ -276,7 +276,7 @@ class TestActiveScanPanDescriptors : public TestCase { public: TestActiveScanPanDescriptors (); - virtual ~TestActiveScanPanDescriptors (); + ~TestActiveScanPanDescriptors () override; private: @@ -287,7 +287,7 @@ private: */ void ScanConfirm (MlmeScanConfirmParams params); - virtual void DoRun (); + void DoRun () override; std::vector m_panDescriptorList; //!< The list of PAN descriptors accumulated during the scan diff --git a/src/lr-wpan/test/lr-wpan-packet-test.cc b/src/lr-wpan/test/lr-wpan-packet-test.cc index f80cf2fbb..257ee3aa0 100644 --- a/src/lr-wpan/test/lr-wpan-packet-test.cc +++ b/src/lr-wpan/test/lr-wpan-packet-test.cc @@ -41,10 +41,10 @@ class LrWpanPacketTestCase : public TestCase { public: LrWpanPacketTestCase (); - virtual ~LrWpanPacketTestCase (); + ~LrWpanPacketTestCase () override; private: - virtual void DoRun (); + void DoRun () override; }; LrWpanPacketTestCase::LrWpanPacketTestCase () diff --git a/src/lr-wpan/test/lr-wpan-pd-plme-sap-test.cc b/src/lr-wpan/test/lr-wpan-pd-plme-sap-test.cc index 489d1a6b7..532cc4e6c 100644 --- a/src/lr-wpan/test/lr-wpan-pd-plme-sap-test.cc +++ b/src/lr-wpan/test/lr-wpan-pd-plme-sap-test.cc @@ -37,10 +37,10 @@ class LrWpanPlmeAndPdInterfaceTestCase : public TestCase { public: LrWpanPlmeAndPdInterfaceTestCase (); - virtual ~LrWpanPlmeAndPdInterfaceTestCase (); + ~LrWpanPlmeAndPdInterfaceTestCase () override; private: - virtual void DoRun (); + void DoRun () override; /** * \brief Receives a PdData indication diff --git a/src/lr-wpan/test/lr-wpan-slotted-csmaca-test.cc b/src/lr-wpan/test/lr-wpan-slotted-csmaca-test.cc index d03b788aa..79c3f81ee 100644 --- a/src/lr-wpan/test/lr-wpan-slotted-csmaca-test.cc +++ b/src/lr-wpan/test/lr-wpan-slotted-csmaca-test.cc @@ -46,7 +46,7 @@ class LrWpanSlottedCsmacaTestCase : public TestCase { public: LrWpanSlottedCsmacaTestCase (); - virtual ~LrWpanSlottedCsmacaTestCase (); + ~LrWpanSlottedCsmacaTestCase () override; @@ -103,7 +103,7 @@ private: Ptr dev, uint32_t trans); - virtual void DoRun (); + void DoRun () override; Time m_startCap; //!< The time of the start of the Contention Access Period (CAP). Time m_apBoundary; //!< Indicates the time after the calculation of the transaction cost (A boundary of an Active Period in the CAP) diff --git a/src/lr-wpan/test/lr-wpan-spectrum-value-helper-test.cc b/src/lr-wpan/test/lr-wpan-spectrum-value-helper-test.cc index 1d24ad43b..44d92f638 100644 --- a/src/lr-wpan/test/lr-wpan-spectrum-value-helper-test.cc +++ b/src/lr-wpan/test/lr-wpan-spectrum-value-helper-test.cc @@ -36,10 +36,10 @@ class LrWpanSpectrumValueHelperTestCase : public TestCase { public: LrWpanSpectrumValueHelperTestCase (); - virtual ~LrWpanSpectrumValueHelperTestCase (); + ~LrWpanSpectrumValueHelperTestCase () override; private: - virtual void DoRun (); + void DoRun () override; }; LrWpanSpectrumValueHelperTestCase::LrWpanSpectrumValueHelperTestCase () diff --git a/src/lte/helper/cc-helper.h b/src/lte/helper/cc-helper.h index 14037ea9d..7921337e5 100644 --- a/src/lte/helper/cc-helper.h +++ b/src/lte/helper/cc-helper.h @@ -58,14 +58,14 @@ class CcHelper : public Object { public: CcHelper (); - virtual ~CcHelper (); + ~CcHelper () override; /** * Register this type. * \return The object TypeId. */ static TypeId GetTypeId (); - virtual void DoDispose (); + void DoDispose () override; /** * Create single CC. @@ -166,7 +166,7 @@ public: protected: // inherited from Object - virtual void DoInitialize (); + void DoInitialize () override; private: /** diff --git a/src/lte/helper/emu-epc-helper.h b/src/lte/helper/emu-epc-helper.h index bae29bd15..4e7188840 100644 --- a/src/lte/helper/emu-epc-helper.h +++ b/src/lte/helper/emu-epc-helper.h @@ -49,7 +49,7 @@ public: /** * Destructor */ - virtual ~EmuEpcHelper (); + ~EmuEpcHelper () override; // inherited from Object /** @@ -57,12 +57,12 @@ public: * \return The object TypeId. */ static TypeId GetTypeId (); - TypeId GetInstanceTypeId () const; - virtual void DoDispose (); + TypeId GetInstanceTypeId () const override; + void DoDispose () override; // inherited from EpcHelper - virtual void AddEnb (Ptr enbNode, Ptr lteEnbNetDevice, std::vector cellIds); - virtual void AddX2Interface (Ptr enbNode1, Ptr enbNode2); + void AddEnb (Ptr enbNode, Ptr lteEnbNetDevice, std::vector cellIds) override; + void AddX2Interface (Ptr enbNode1, Ptr enbNode2) override; private: diff --git a/src/lte/helper/epc-helper.h b/src/lte/helper/epc-helper.h index 44ab8ce81..1e398deb8 100644 --- a/src/lte/helper/epc-helper.h +++ b/src/lte/helper/epc-helper.h @@ -58,7 +58,7 @@ public: /** * Destructor */ - virtual ~EpcHelper (); + ~EpcHelper () override; // inherited from Object /** @@ -66,7 +66,7 @@ public: * \return The object TypeId. */ static TypeId GetTypeId (); - virtual void DoDispose (); + void DoDispose () override; /** diff --git a/src/lte/helper/lte-global-pathloss-database.h b/src/lte/helper/lte-global-pathloss-database.h index 36337ecb1..dc7339197 100644 --- a/src/lte/helper/lte-global-pathloss-database.h +++ b/src/lte/helper/lte-global-pathloss-database.h @@ -87,7 +87,7 @@ class DownlinkLteGlobalPathlossDatabase : public LteGlobalPathlossDatabase { public: // inherited from LteGlobalPathlossDatabase - virtual void UpdatePathloss (std::string context, Ptr txPhy, Ptr rxPhy, double lossDb); + void UpdatePathloss (std::string context, Ptr txPhy, Ptr rxPhy, double lossDb) override; }; /** @@ -98,7 +98,7 @@ class UplinkLteGlobalPathlossDatabase : public LteGlobalPathlossDatabase { public: // inherited from LteGlobalPathlossDatabase - virtual void UpdatePathloss (std::string context, Ptr txPhy, Ptr rxPhy, double lossDb); + void UpdatePathloss (std::string context, Ptr txPhy, Ptr rxPhy, double lossDb) override; }; diff --git a/src/lte/helper/lte-helper.h b/src/lte/helper/lte-helper.h index 723f8dad1..dca89cb08 100644 --- a/src/lte/helper/lte-helper.h +++ b/src/lte/helper/lte-helper.h @@ -103,14 +103,14 @@ class LteHelper : public Object { public: LteHelper (); - virtual ~LteHelper (); + ~LteHelper () override; /** * Register this type. * \return The object TypeId. */ static TypeId GetTypeId (); - virtual void DoDispose (); + void DoDispose () override; /** * Set the EpcHelper to be used to setup the EPC network in @@ -676,7 +676,7 @@ public: protected: // inherited from Object - virtual void DoInitialize (); + void DoInitialize () override; private: diff --git a/src/lte/helper/lte-hex-grid-enb-topology-helper.h b/src/lte/helper/lte-hex-grid-enb-topology-helper.h index 9f276b8f2..02b3fdc8b 100644 --- a/src/lte/helper/lte-hex-grid-enb-topology-helper.h +++ b/src/lte/helper/lte-hex-grid-enb-topology-helper.h @@ -37,14 +37,14 @@ class LteHexGridEnbTopologyHelper : public Object { public: LteHexGridEnbTopologyHelper (); - virtual ~LteHexGridEnbTopologyHelper (); + ~LteHexGridEnbTopologyHelper () override; /** * Register this type. * \return The object TypeId. */ static TypeId GetTypeId (); - virtual void DoDispose (); + void DoDispose () override; /** diff --git a/src/lte/helper/lte-stats-calculator.h b/src/lte/helper/lte-stats-calculator.h index 6bfb45d35..a1d4e1965 100644 --- a/src/lte/helper/lte-stats-calculator.h +++ b/src/lte/helper/lte-stats-calculator.h @@ -46,7 +46,7 @@ public: /** * Destructor */ - virtual ~LteStatsCalculator (); + ~LteStatsCalculator () override; /** * Register this type. diff --git a/src/lte/helper/mac-stats-calculator.h b/src/lte/helper/mac-stats-calculator.h index 07c68b40b..a25e87518 100644 --- a/src/lte/helper/mac-stats-calculator.h +++ b/src/lte/helper/mac-stats-calculator.h @@ -56,7 +56,7 @@ public: /** * Destructor */ - virtual ~MacStatsCalculator (); + ~MacStatsCalculator () override; // Inherited from ns3::Object /** diff --git a/src/lte/helper/no-backhaul-epc-helper.h b/src/lte/helper/no-backhaul-epc-helper.h index 7959756b8..67b0b809d 100644 --- a/src/lte/helper/no-backhaul-epc-helper.h +++ b/src/lte/helper/no-backhaul-epc-helper.h @@ -54,7 +54,7 @@ public: /** * Destructor */ - virtual ~NoBackhaulEpcHelper (); + ~NoBackhaulEpcHelper () override; // inherited from Object /** diff --git a/src/lte/helper/phy-rx-stats-calculator.h b/src/lte/helper/phy-rx-stats-calculator.h index f046dc2fb..67c5f18d5 100644 --- a/src/lte/helper/phy-rx-stats-calculator.h +++ b/src/lte/helper/phy-rx-stats-calculator.h @@ -58,7 +58,7 @@ public: /** * Destructor */ - virtual ~PhyRxStatsCalculator (); + ~PhyRxStatsCalculator () override; // Inherited from ns3::Object /** diff --git a/src/lte/helper/phy-stats-calculator.h b/src/lte/helper/phy-stats-calculator.h index 888d1fb08..1857fbb0e 100644 --- a/src/lte/helper/phy-stats-calculator.h +++ b/src/lte/helper/phy-stats-calculator.h @@ -65,7 +65,7 @@ public: /** * Destructor */ - virtual ~PhyStatsCalculator (); + ~PhyStatsCalculator () override; // Inherited from ns3::Object /** diff --git a/src/lte/helper/phy-tx-stats-calculator.h b/src/lte/helper/phy-tx-stats-calculator.h index 4282847c7..8d80ba223 100644 --- a/src/lte/helper/phy-tx-stats-calculator.h +++ b/src/lte/helper/phy-tx-stats-calculator.h @@ -58,7 +58,7 @@ public: /** * Destructor */ - virtual ~PhyTxStatsCalculator (); + ~PhyTxStatsCalculator () override; // Inherited from ns3::Object /** diff --git a/src/lte/helper/point-to-point-epc-helper.h b/src/lte/helper/point-to-point-epc-helper.h index 0a8e8d6f3..9049d9438 100644 --- a/src/lte/helper/point-to-point-epc-helper.h +++ b/src/lte/helper/point-to-point-epc-helper.h @@ -46,7 +46,7 @@ public: /** * Destructor */ - virtual ~PointToPointEpcHelper (); + ~PointToPointEpcHelper () override; // inherited from Object /** @@ -54,11 +54,11 @@ public: * \return The object TypeId. */ static TypeId GetTypeId (); - TypeId GetInstanceTypeId () const; - virtual void DoDispose (); + TypeId GetInstanceTypeId () const override; + void DoDispose () override; // inherited from EpcHelper - virtual void AddEnb (Ptr enbNode, Ptr lteEnbNetDevice, std::vector cellIds); + void AddEnb (Ptr enbNode, Ptr lteEnbNetDevice, std::vector cellIds) override; private: diff --git a/src/lte/helper/radio-bearer-stats-calculator.h b/src/lte/helper/radio-bearer-stats-calculator.h index f656f6ae1..8a658192c 100644 --- a/src/lte/helper/radio-bearer-stats-calculator.h +++ b/src/lte/helper/radio-bearer-stats-calculator.h @@ -84,8 +84,8 @@ public: /** * Class destructor */ - virtual - ~RadioBearerStatsCalculator (); + + ~RadioBearerStatsCalculator () override; // Inherited from ns3::Object /** @@ -93,7 +93,7 @@ public: * \return The object TypeId. */ static TypeId GetTypeId (); - void DoDispose (); + void DoDispose () override; /** * Get the name of the file where the uplink statistics will be stored. diff --git a/src/lte/helper/radio-environment-map-helper.h b/src/lte/helper/radio-environment-map-helper.h index 516309b0d..f387047f6 100644 --- a/src/lte/helper/radio-environment-map-helper.h +++ b/src/lte/helper/radio-environment-map-helper.h @@ -48,10 +48,10 @@ class RadioEnvironmentMapHelper : public Object public: RadioEnvironmentMapHelper (); - virtual ~RadioEnvironmentMapHelper (); + ~RadioEnvironmentMapHelper () override; // inherited from Object - virtual void DoDispose (); + void DoDispose () override; /** * Register this type. * \return The object TypeId. diff --git a/src/lte/model/a2-a4-rsrq-handover-algorithm.h b/src/lte/model/a2-a4-rsrq-handover-algorithm.h index 66cd7cac3..8a39cf375 100644 --- a/src/lte/model/a2-a4-rsrq-handover-algorithm.h +++ b/src/lte/model/a2-a4-rsrq-handover-algorithm.h @@ -83,7 +83,7 @@ public: /// Creates an A2-A4-RSRQ handover algorithm instance. A2A4RsrqHandoverAlgorithm (); - virtual ~A2A4RsrqHandoverAlgorithm (); + ~A2A4RsrqHandoverAlgorithm () override; /** * \brief Get the type ID. @@ -92,19 +92,19 @@ public: static TypeId GetTypeId (); // inherited from LteHandoverAlgorithm - virtual void SetLteHandoverManagementSapUser (LteHandoverManagementSapUser* s); - virtual LteHandoverManagementSapProvider* GetLteHandoverManagementSapProvider (); + void SetLteHandoverManagementSapUser (LteHandoverManagementSapUser* s) override; + LteHandoverManagementSapProvider* GetLteHandoverManagementSapProvider () override; /// let the forwarder class access the protected and private members friend class MemberLteHandoverManagementSapProvider; protected: // inherited from Object - virtual void DoInitialize (); - virtual void DoDispose (); + void DoInitialize () override; + void DoDispose () override; // inherited from LteHandoverAlgorithm as a Handover Management SAP implementation - void DoReportUeMeas (uint16_t rnti, LteRrcSap::MeasResults measResults); + void DoReportUeMeas (uint16_t rnti, LteRrcSap::MeasResults measResults) override; private: /** diff --git a/src/lte/model/a3-rsrp-handover-algorithm.h b/src/lte/model/a3-rsrp-handover-algorithm.h index 518f3391e..e2423578b 100644 --- a/src/lte/model/a3-rsrp-handover-algorithm.h +++ b/src/lte/model/a3-rsrp-handover-algorithm.h @@ -68,7 +68,7 @@ public: /// Creates a strongest cell handover algorithm instance. A3RsrpHandoverAlgorithm (); - virtual ~A3RsrpHandoverAlgorithm (); + ~A3RsrpHandoverAlgorithm () override; /** * \brief Get the type ID. @@ -77,19 +77,19 @@ public: static TypeId GetTypeId (); // inherited from LteHandoverAlgorithm - virtual void SetLteHandoverManagementSapUser (LteHandoverManagementSapUser* s); - virtual LteHandoverManagementSapProvider* GetLteHandoverManagementSapProvider (); + void SetLteHandoverManagementSapUser (LteHandoverManagementSapUser* s) override; + LteHandoverManagementSapProvider* GetLteHandoverManagementSapProvider () override; /// let the forwarder class access the protected and private members friend class MemberLteHandoverManagementSapProvider; protected: // inherited from Object - virtual void DoInitialize (); - virtual void DoDispose (); + void DoInitialize () override; + void DoDispose () override; // inherited from LteHandoverAlgorithm as a Handover Management SAP implementation - void DoReportUeMeas (uint16_t rnti, LteRrcSap::MeasResults measResults); + void DoReportUeMeas (uint16_t rnti, LteRrcSap::MeasResults measResults) override; private: /** diff --git a/src/lte/model/component-carrier-enb.h b/src/lte/model/component-carrier-enb.h index 293f5424a..b30bd107a 100644 --- a/src/lte/model/component-carrier-enb.h +++ b/src/lte/model/component-carrier-enb.h @@ -55,8 +55,8 @@ public: ComponentCarrierEnb (); - virtual ~ComponentCarrierEnb (); - virtual void DoDispose (); + ~ComponentCarrierEnb () override; + void DoDispose () override; /** * \return a pointer to the physical layer. @@ -103,7 +103,7 @@ public: protected: - virtual void DoInitialize (); + void DoInitialize () override; private: Ptr m_phy; ///< the Phy instance of this eNodeB component carrier diff --git a/src/lte/model/component-carrier-ue.h b/src/lte/model/component-carrier-ue.h index 373e35ae7..d34ace151 100644 --- a/src/lte/model/component-carrier-ue.h +++ b/src/lte/model/component-carrier-ue.h @@ -48,8 +48,8 @@ public: ComponentCarrierUe (); - virtual ~ComponentCarrierUe (); - virtual void DoDispose (); + ~ComponentCarrierUe () override; + void DoDispose () override; /** @@ -76,7 +76,7 @@ public: protected: // inherited from Object - virtual void DoInitialize (); + void DoInitialize () override; private: diff --git a/src/lte/model/component-carrier.h b/src/lte/model/component-carrier.h index 4a9351c29..092e2a1e2 100644 --- a/src/lte/model/component-carrier.h +++ b/src/lte/model/component-carrier.h @@ -47,8 +47,8 @@ public: ComponentCarrier (); - virtual ~ComponentCarrier (); - virtual void DoDispose (); + ~ComponentCarrier () override; + void DoDispose () override; /** * \return the uplink bandwidth in RBs @@ -183,7 +183,7 @@ public: /** * \brief ~ComponentCarrierBaseStation */ - virtual ~ComponentCarrierBaseStation () override; + ~ComponentCarrierBaseStation () override; /** * Get cell identifier diff --git a/src/lte/model/cqa-ff-mac-scheduler.h b/src/lte/model/cqa-ff-mac-scheduler.h index 1e5ffb384..d20486119 100644 --- a/src/lte/model/cqa-ff-mac-scheduler.h +++ b/src/lte/model/cqa-ff-mac-scheduler.h @@ -91,10 +91,10 @@ public: /** * Destructor */ - virtual ~CqaFfMacScheduler (); + ~CqaFfMacScheduler () override; // inherited from Object - virtual void DoDispose (); + void DoDispose () override; /** * \brief Get the type ID. * \return the object TypeId @@ -102,14 +102,14 @@ public: static TypeId GetTypeId (); // inherited from FfMacScheduler - virtual void SetFfMacCschedSapUser (FfMacCschedSapUser* s); - virtual void SetFfMacSchedSapUser (FfMacSchedSapUser* s); - virtual FfMacCschedSapProvider* GetFfMacCschedSapProvider (); - virtual FfMacSchedSapProvider* GetFfMacSchedSapProvider (); + void SetFfMacCschedSapUser (FfMacCschedSapUser* s) override; + void SetFfMacSchedSapUser (FfMacSchedSapUser* s) override; + FfMacCschedSapProvider* GetFfMacCschedSapProvider () override; + FfMacSchedSapProvider* GetFfMacSchedSapProvider () override; // FFR SAPs - virtual void SetLteFfrSapProvider (LteFfrSapProvider* s); - virtual LteFfrSapUser* GetLteFfrSapUser (); + void SetLteFfrSapProvider (LteFfrSapProvider* s) override; + LteFfrSapUser* GetLteFfrSapUser () override; /// allow MemberCschedSapProvider class friend access friend class MemberCschedSapProvider; diff --git a/src/lte/model/epc-enb-application.h b/src/lte/model/epc-enb-application.h index e9986f4df..3f4bb2dbb 100644 --- a/src/lte/model/epc-enb-application.h +++ b/src/lte/model/epc-enb-application.h @@ -62,7 +62,7 @@ public: */ static TypeId GetTypeId (); protected: - void DoDispose (); + void DoDispose () override; public: @@ -91,7 +91,7 @@ public: * Destructor * */ - virtual ~EpcEnbApplication (); + ~EpcEnbApplication () override; /** diff --git a/src/lte/model/epc-enb-s1-sap.h b/src/lte/model/epc-enb-s1-sap.h index 9bf7b2540..77259e081 100644 --- a/src/lte/model/epc-enb-s1-sap.h +++ b/src/lte/model/epc-enb-s1-sap.h @@ -176,11 +176,11 @@ public: MemberEpcEnbS1SapProvider (C* owner); // inherited from EpcEnbS1SapProvider - virtual void InitialUeMessage (uint64_t imsi, uint16_t rnti); - virtual void DoSendReleaseIndication (uint64_t imsi, uint16_t rnti, uint8_t bearerId); + void InitialUeMessage (uint64_t imsi, uint16_t rnti) override; + void DoSendReleaseIndication (uint64_t imsi, uint16_t rnti, uint8_t bearerId) override; - virtual void PathSwitchRequest (PathSwitchRequestParameters params); - virtual void UeContextRelease (uint16_t rnti); + void PathSwitchRequest (PathSwitchRequestParameters params) override; + void UeContextRelease (uint16_t rnti) override; private: MemberEpcEnbS1SapProvider (); @@ -240,9 +240,9 @@ public: MemberEpcEnbS1SapUser (C* owner); // inherited from EpcEnbS1SapUser - virtual void InitialContextSetupRequest (InitialContextSetupRequestParameters params); - virtual void DataRadioBearerSetupRequest (DataRadioBearerSetupRequestParameters params); - virtual void PathSwitchRequestAcknowledge (PathSwitchRequestAcknowledgeParameters params); + void InitialContextSetupRequest (InitialContextSetupRequestParameters params) override; + void DataRadioBearerSetupRequest (DataRadioBearerSetupRequestParameters params) override; + void PathSwitchRequestAcknowledge (PathSwitchRequestAcknowledgeParameters params) override; private: MemberEpcEnbS1SapUser (); diff --git a/src/lte/model/epc-gtpc-header.h b/src/lte/model/epc-gtpc-header.h index ddd94d705..ff1892e66 100644 --- a/src/lte/model/epc-gtpc-header.h +++ b/src/lte/model/epc-gtpc-header.h @@ -39,17 +39,17 @@ class GtpcHeader : public Header { public: GtpcHeader (); - virtual ~GtpcHeader (); + ~GtpcHeader () override; /** * \brief Get the type ID. * \return the object TypeId */ static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId () const; - virtual uint32_t GetSerializedSize () const; - virtual void Serialize (Buffer::Iterator start) const; - virtual uint32_t Deserialize (Buffer::Iterator start); - virtual void Print (std::ostream &os) const; + TypeId GetInstanceTypeId () const override; + uint32_t GetSerializedSize () const override; + void Serialize (Buffer::Iterator start) const override; + uint32_t Deserialize (Buffer::Iterator start) override; + void Print (std::ostream &os) const override; /** * Get the message size. @@ -359,18 +359,18 @@ class GtpcCreateSessionRequestMessage : public GtpcHeader, public GtpcIes { public: GtpcCreateSessionRequestMessage (); - virtual ~GtpcCreateSessionRequestMessage (); + ~GtpcCreateSessionRequestMessage () override; /** * \brief Get the type ID. * \return the object TypeId */ static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId () const; - virtual uint32_t GetSerializedSize () const; - virtual void Serialize (Buffer::Iterator start) const; - virtual uint32_t Deserialize (Buffer::Iterator start); - virtual void Print (std::ostream &os) const; - virtual uint32_t GetMessageSize () const; + TypeId GetInstanceTypeId () const override; + uint32_t GetSerializedSize () const override; + void Serialize (Buffer::Iterator start) const override; + uint32_t Deserialize (Buffer::Iterator start) override; + void Print (std::ostream &os) const override; + uint32_t GetMessageSize () const override; /** * Get the IMSI @@ -444,18 +444,18 @@ class GtpcCreateSessionResponseMessage : public GtpcHeader, public GtpcIes { public: GtpcCreateSessionResponseMessage (); - virtual ~GtpcCreateSessionResponseMessage (); + ~GtpcCreateSessionResponseMessage () override; /** * \brief Get the type ID. * \return the object TypeId */ static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId () const; - virtual uint32_t GetSerializedSize () const; - virtual void Serialize (Buffer::Iterator start) const; - virtual uint32_t Deserialize (Buffer::Iterator start); - virtual void Print (std::ostream &os) const; - virtual uint32_t GetMessageSize () const; + TypeId GetInstanceTypeId () const override; + uint32_t GetSerializedSize () const override; + void Serialize (Buffer::Iterator start) const override; + uint32_t Deserialize (Buffer::Iterator start) override; + void Print (std::ostream &os) const override; + uint32_t GetMessageSize () const override; /** * Get the Cause @@ -518,18 +518,18 @@ class GtpcModifyBearerRequestMessage : public GtpcHeader, public GtpcIes { public: GtpcModifyBearerRequestMessage (); - virtual ~GtpcModifyBearerRequestMessage (); + ~GtpcModifyBearerRequestMessage () override; /** * \brief Get the type ID. * \return the object TypeId */ static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId () const; - virtual uint32_t GetSerializedSize () const; - virtual void Serialize (Buffer::Iterator start) const; - virtual uint32_t Deserialize (Buffer::Iterator start); - virtual void Print (std::ostream &os) const; - virtual uint32_t GetMessageSize () const; + TypeId GetInstanceTypeId () const override; + uint32_t GetSerializedSize () const override; + void Serialize (Buffer::Iterator start) const override; + uint32_t Deserialize (Buffer::Iterator start) override; + void Print (std::ostream &os) const override; + uint32_t GetMessageSize () const override; /** * Get the IMSI @@ -589,18 +589,18 @@ class GtpcModifyBearerResponseMessage : public GtpcHeader, public GtpcIes { public: GtpcModifyBearerResponseMessage (); - virtual ~GtpcModifyBearerResponseMessage (); + ~GtpcModifyBearerResponseMessage () override; /** * \brief Get the type ID. * \return the object TypeId */ static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId () const; - virtual uint32_t GetSerializedSize () const; - virtual void Serialize (Buffer::Iterator start) const; - virtual uint32_t Deserialize (Buffer::Iterator start); - virtual void Print (std::ostream &os) const; - virtual uint32_t GetMessageSize () const; + TypeId GetInstanceTypeId () const override; + uint32_t GetSerializedSize () const override; + void Serialize (Buffer::Iterator start) const override; + uint32_t Deserialize (Buffer::Iterator start) override; + void Print (std::ostream &os) const override; + uint32_t GetMessageSize () const override; /** * Get the Cause @@ -625,18 +625,18 @@ class GtpcDeleteBearerCommandMessage : public GtpcHeader, public GtpcIes { public: GtpcDeleteBearerCommandMessage (); - virtual ~GtpcDeleteBearerCommandMessage (); + ~GtpcDeleteBearerCommandMessage () override; /** * \brief Get the type ID. * \return the object TypeId */ static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId () const; - virtual uint32_t GetSerializedSize () const; - virtual void Serialize (Buffer::Iterator start) const; - virtual uint32_t Deserialize (Buffer::Iterator start); - virtual void Print (std::ostream &os) const; - virtual uint32_t GetMessageSize () const; + TypeId GetInstanceTypeId () const override; + uint32_t GetSerializedSize () const override; + void Serialize (Buffer::Iterator start) const override; + uint32_t Deserialize (Buffer::Iterator start) override; + void Print (std::ostream &os) const override; + uint32_t GetMessageSize () const override; /// Bearer context struct BearerContext @@ -667,18 +667,18 @@ class GtpcDeleteBearerRequestMessage : public GtpcHeader, public GtpcIes { public: GtpcDeleteBearerRequestMessage (); - virtual ~GtpcDeleteBearerRequestMessage (); + ~GtpcDeleteBearerRequestMessage () override; /** * \brief Get the type ID. * \return the object TypeId */ static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId () const; - virtual uint32_t GetSerializedSize () const; - virtual void Serialize (Buffer::Iterator start) const; - virtual uint32_t Deserialize (Buffer::Iterator start); - virtual void Print (std::ostream &os) const; - virtual uint32_t GetMessageSize () const; + TypeId GetInstanceTypeId () const override; + uint32_t GetSerializedSize () const override; + void Serialize (Buffer::Iterator start) const override; + uint32_t Deserialize (Buffer::Iterator start) override; + void Print (std::ostream &os) const override; + uint32_t GetMessageSize () const override; /** * Get the Bearers IDs @@ -703,18 +703,18 @@ class GtpcDeleteBearerResponseMessage : public GtpcHeader, public GtpcIes { public: GtpcDeleteBearerResponseMessage (); - virtual ~GtpcDeleteBearerResponseMessage (); + ~GtpcDeleteBearerResponseMessage () override; /** * \brief Get the type ID. * \return the object TypeId */ static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId () const; - virtual uint32_t GetSerializedSize () const; - virtual void Serialize (Buffer::Iterator start) const; - virtual uint32_t Deserialize (Buffer::Iterator start); - virtual void Print (std::ostream &os) const; - virtual uint32_t GetMessageSize () const; + TypeId GetInstanceTypeId () const override; + uint32_t GetSerializedSize () const override; + void Serialize (Buffer::Iterator start) const override; + uint32_t Deserialize (Buffer::Iterator start) override; + void Print (std::ostream &os) const override; + uint32_t GetMessageSize () const override; /** * Get the Cause diff --git a/src/lte/model/epc-gtpu-header.h b/src/lte/model/epc-gtpu-header.h index 18763d4a3..a87d6631c 100644 --- a/src/lte/model/epc-gtpu-header.h +++ b/src/lte/model/epc-gtpu-header.h @@ -47,12 +47,12 @@ public: */ static TypeId GetTypeId (); GtpuHeader (); - virtual ~GtpuHeader (); - virtual TypeId GetInstanceTypeId () const; - virtual uint32_t GetSerializedSize () const; - virtual void Serialize (Buffer::Iterator start) const; - virtual uint32_t Deserialize (Buffer::Iterator start); - virtual void Print (std::ostream &os) const; + ~GtpuHeader () override; + TypeId GetInstanceTypeId () const override; + uint32_t GetSerializedSize () const override; + void Serialize (Buffer::Iterator start) const override; + uint32_t Deserialize (Buffer::Iterator start) override; + void Print (std::ostream &os) const override; /** * Get extension header flag function diff --git a/src/lte/model/epc-mme-application.h b/src/lte/model/epc-mme-application.h index 59ae1d6b8..e93fd6067 100644 --- a/src/lte/model/epc-mme-application.h +++ b/src/lte/model/epc-mme-application.h @@ -55,13 +55,13 @@ public: * \return the object TypeId */ static TypeId GetTypeId (); - virtual void DoDispose (); + void DoDispose () override; /** Constructor */ EpcMmeApplication (); /** Destructor */ - virtual ~EpcMmeApplication (); + ~EpcMmeApplication () override; /** * diff --git a/src/lte/model/epc-pgw-application.h b/src/lte/model/epc-pgw-application.h index dff4730e2..1ed7ae42e 100644 --- a/src/lte/model/epc-pgw-application.h +++ b/src/lte/model/epc-pgw-application.h @@ -57,7 +57,7 @@ public: * \return the object TypeId */ static TypeId GetTypeId (); - virtual void DoDispose (); + void DoDispose () override; /** * Constructor that binds the tap device to the callback methods. @@ -73,7 +73,7 @@ public: const Ptr s5uSocket, const Ptr s5cSocket); /** Destructor */ - virtual ~EpcPgwApplication (); + ~EpcPgwApplication () override; /** * Method to be assigned to the callback of the SGi TUN VirtualNetDevice. diff --git a/src/lte/model/epc-s11-sap.h b/src/lte/model/epc-s11-sap.h index 28e70ee6d..d26ff8aaa 100644 --- a/src/lte/model/epc-s11-sap.h +++ b/src/lte/model/epc-s11-sap.h @@ -274,9 +274,9 @@ public: MemberEpcS11SapMme (C* owner); // inherited from EpcS11SapMme - virtual void CreateSessionResponse (CreateSessionResponseMessage msg); - virtual void ModifyBearerResponse (ModifyBearerResponseMessage msg); - virtual void DeleteBearerRequest (DeleteBearerRequestMessage msg); + void CreateSessionResponse (CreateSessionResponseMessage msg) override; + void ModifyBearerResponse (ModifyBearerResponseMessage msg) override; + void DeleteBearerRequest (DeleteBearerRequestMessage msg) override; private: MemberEpcS11SapMme (); @@ -338,10 +338,10 @@ public: MemberEpcS11SapSgw (C* owner); // inherited from EpcS11SapSgw - virtual void CreateSessionRequest (CreateSessionRequestMessage msg); - virtual void ModifyBearerRequest (ModifyBearerRequestMessage msg); - virtual void DeleteBearerCommand (DeleteBearerCommandMessage msg); - virtual void DeleteBearerResponse (DeleteBearerResponseMessage msg); + void CreateSessionRequest (CreateSessionRequestMessage msg) override; + void ModifyBearerRequest (ModifyBearerRequestMessage msg) override; + void DeleteBearerCommand (DeleteBearerCommandMessage msg) override; + void DeleteBearerResponse (DeleteBearerResponseMessage msg) override; private: MemberEpcS11SapSgw (); diff --git a/src/lte/model/epc-s1ap-sap.h b/src/lte/model/epc-s1ap-sap.h index bba0e2c2d..8d46fc442 100644 --- a/src/lte/model/epc-s1ap-sap.h +++ b/src/lte/model/epc-s1ap-sap.h @@ -220,14 +220,14 @@ public: * \param imsi the IMSI * \param ecgi */ - virtual void InitialUeMessage (uint64_t mmeUeS1Id, uint16_t enbUeS1Id, uint64_t imsi, uint16_t ecgi); + void InitialUeMessage (uint64_t mmeUeS1Id, uint16_t enbUeS1Id, uint64_t imsi, uint16_t ecgi) override; /** * ERAB Release Indiation function * \param mmeUeS1Id in practice, we use the IMSI * \param enbUeS1Id in practice, we use the RNTI * \param erabToBeReleaseIndication */ - virtual void ErabReleaseIndication (uint64_t mmeUeS1Id, uint16_t enbUeS1Id, std::list erabToBeReleaseIndication ); + void ErabReleaseIndication (uint64_t mmeUeS1Id, uint16_t enbUeS1Id, std::list erabToBeReleaseIndication ) override; /** * Initial context setup response @@ -235,7 +235,7 @@ public: * \param enbUeS1Id in practice, we use the RNTI * \param erabSetupList */ - virtual void InitialContextSetupResponse (uint64_t mmeUeS1Id, uint16_t enbUeS1Id, std::list erabSetupList); + void InitialContextSetupResponse (uint64_t mmeUeS1Id, uint16_t enbUeS1Id, std::list erabSetupList) override; /** * Path switch request * \param enbUeS1Id in practice, we use the RNTI @@ -243,7 +243,7 @@ public: * \param cgi * \param erabToBeSwitchedInDownlinkList */ - virtual void PathSwitchRequest (uint64_t enbUeS1Id, uint64_t mmeUeS1Id, uint16_t cgi, std::list erabToBeSwitchedInDownlinkList); + void PathSwitchRequest (uint64_t enbUeS1Id, uint64_t mmeUeS1Id, uint16_t cgi, std::list erabToBeSwitchedInDownlinkList) override; private: MemberEpcS1apSapMme (); @@ -314,7 +314,7 @@ public: * \param enbUeS1Id in practice, we use the RNTI * \param erabToBeSetupList */ - virtual void InitialContextSetupRequest (uint64_t mmeUeS1Id, uint16_t enbUeS1Id, std::list erabToBeSetupList); + void InitialContextSetupRequest (uint64_t mmeUeS1Id, uint16_t enbUeS1Id, std::list erabToBeSetupList) override; /** * Path switch request acknowledge function * \param enbUeS1Id in practice, we use the RNTI @@ -322,7 +322,7 @@ public: * \param cgi * \param erabToBeSwitchedInUplinkList */ - virtual void PathSwitchRequestAcknowledge (uint64_t enbUeS1Id, uint64_t mmeUeS1Id, uint16_t cgi, std::list erabToBeSwitchedInUplinkList); + void PathSwitchRequestAcknowledge (uint64_t enbUeS1Id, uint64_t mmeUeS1Id, uint16_t cgi, std::list erabToBeSwitchedInUplinkList) override; private: MemberEpcS1apSapEnb (); diff --git a/src/lte/model/epc-sgw-application.h b/src/lte/model/epc-sgw-application.h index fc34c6919..926694f5c 100644 --- a/src/lte/model/epc-sgw-application.h +++ b/src/lte/model/epc-sgw-application.h @@ -54,7 +54,7 @@ public: * \return the object TypeId */ static TypeId GetTypeId (); - virtual void DoDispose (); + void DoDispose () override; /** * Constructor that binds callback methods of sockets. @@ -68,7 +68,7 @@ public: const Ptr s5uSocket, const Ptr s5cSocket); /** Destructor */ - virtual ~EpcSgwApplication (); + ~EpcSgwApplication () override; /** diff --git a/src/lte/model/epc-ue-nas.h b/src/lte/model/epc-ue-nas.h index af6965a4c..de5e9c982 100644 --- a/src/lte/model/epc-ue-nas.h +++ b/src/lte/model/epc-ue-nas.h @@ -48,10 +48,10 @@ public: /** * Destructor */ - virtual ~EpcUeNas (); + ~EpcUeNas () override; // inherited from Object - virtual void DoDispose (); + void DoDispose () override; /** * \brief Get the type ID. * \return the object TypeId diff --git a/src/lte/model/epc-x2-header.h b/src/lte/model/epc-x2-header.h index 825b88623..26b10ab47 100644 --- a/src/lte/model/epc-x2-header.h +++ b/src/lte/model/epc-x2-header.h @@ -34,18 +34,18 @@ class EpcX2Header : public Header { public: EpcX2Header (); - virtual ~EpcX2Header (); + ~EpcX2Header () override; /** * \brief Get the type ID. * \return the object TypeId */ static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId () const; - virtual uint32_t GetSerializedSize () const; - virtual void Serialize (Buffer::Iterator start) const; - virtual uint32_t Deserialize (Buffer::Iterator start); - virtual void Print (std::ostream &os) const; + TypeId GetInstanceTypeId () const override; + uint32_t GetSerializedSize () const override; + void Serialize (Buffer::Iterator start) const override; + uint32_t Deserialize (Buffer::Iterator start) override; + void Print (std::ostream &os) const override; /** @@ -115,18 +115,18 @@ class EpcX2HandoverRequestHeader : public Header { public: EpcX2HandoverRequestHeader (); - virtual ~EpcX2HandoverRequestHeader (); + ~EpcX2HandoverRequestHeader () override; /** * \brief Get the type ID. * \return the object TypeId */ static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId () const; - virtual uint32_t GetSerializedSize () const; - virtual void Serialize (Buffer::Iterator start) const; - virtual uint32_t Deserialize (Buffer::Iterator start); - virtual void Print (std::ostream &os) const; + TypeId GetInstanceTypeId () const override; + uint32_t GetSerializedSize () const override; + void Serialize (Buffer::Iterator start) const override; + uint32_t Deserialize (Buffer::Iterator start) override; + void Print (std::ostream &os) const override; /** @@ -237,18 +237,18 @@ class EpcX2HandoverRequestAckHeader : public Header { public: EpcX2HandoverRequestAckHeader (); - virtual ~EpcX2HandoverRequestAckHeader (); + ~EpcX2HandoverRequestAckHeader () override; /** * \brief Get the type ID. * \return the object TypeId */ static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId () const; - virtual uint32_t GetSerializedSize () const; - virtual void Serialize (Buffer::Iterator start) const; - virtual uint32_t Deserialize (Buffer::Iterator start); - virtual void Print (std::ostream &os) const; + TypeId GetInstanceTypeId () const override; + uint32_t GetSerializedSize () const override; + void Serialize (Buffer::Iterator start) const override; + uint32_t Deserialize (Buffer::Iterator start) override; + void Print (std::ostream &os) const override; /** @@ -324,18 +324,18 @@ class EpcX2HandoverPreparationFailureHeader : public Header { public: EpcX2HandoverPreparationFailureHeader (); - virtual ~EpcX2HandoverPreparationFailureHeader (); + ~EpcX2HandoverPreparationFailureHeader () override; /** * \brief Get the type ID. * \return the object TypeId */ static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId () const; - virtual uint32_t GetSerializedSize () const; - virtual void Serialize (Buffer::Iterator start) const; - virtual uint32_t Deserialize (Buffer::Iterator start); - virtual void Print (std::ostream &os) const; + TypeId GetInstanceTypeId () const override; + uint32_t GetSerializedSize () const override; + void Serialize (Buffer::Iterator start) const override; + uint32_t Deserialize (Buffer::Iterator start) override; + void Print (std::ostream &os) const override; /** @@ -399,18 +399,18 @@ class EpcX2SnStatusTransferHeader : public Header { public: EpcX2SnStatusTransferHeader (); - virtual ~EpcX2SnStatusTransferHeader (); + ~EpcX2SnStatusTransferHeader () override; /** * \brief Get the type ID. * \return the object TypeId */ static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId () const; - virtual uint32_t GetSerializedSize () const; - virtual void Serialize (Buffer::Iterator start) const; - virtual uint32_t Deserialize (Buffer::Iterator start); - virtual void Print (std::ostream &os) const; + TypeId GetInstanceTypeId () const override; + uint32_t GetSerializedSize () const override; + void Serialize (Buffer::Iterator start) const override; + uint32_t Deserialize (Buffer::Iterator start) override; + void Print (std::ostream &os) const override; /** @@ -473,18 +473,18 @@ class EpcX2UeContextReleaseHeader : public Header { public: EpcX2UeContextReleaseHeader (); - virtual ~EpcX2UeContextReleaseHeader (); + ~EpcX2UeContextReleaseHeader () override; /** * \brief Get the type ID. * \return the object TypeId */ static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId () const; - virtual uint32_t GetSerializedSize () const; - virtual void Serialize (Buffer::Iterator start) const; - virtual uint32_t Deserialize (Buffer::Iterator start); - virtual void Print (std::ostream &os) const; + TypeId GetInstanceTypeId () const override; + uint32_t GetSerializedSize () const override; + void Serialize (Buffer::Iterator start) const override; + uint32_t Deserialize (Buffer::Iterator start) override; + void Print (std::ostream &os) const override; /** @@ -536,18 +536,18 @@ class EpcX2LoadInformationHeader : public Header { public: EpcX2LoadInformationHeader (); - virtual ~EpcX2LoadInformationHeader (); + ~EpcX2LoadInformationHeader () override; /** * \brief Get the type ID. * \return the object TypeId */ static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId () const; - virtual uint32_t GetSerializedSize () const; - virtual void Serialize (Buffer::Iterator start) const; - virtual uint32_t Deserialize (Buffer::Iterator start); - virtual void Print (std::ostream &os) const; + TypeId GetInstanceTypeId () const override; + uint32_t GetSerializedSize () const override; + void Serialize (Buffer::Iterator start) const override; + uint32_t Deserialize (Buffer::Iterator start) override; + void Print (std::ostream &os) const override; /** @@ -587,18 +587,18 @@ class EpcX2ResourceStatusUpdateHeader : public Header { public: EpcX2ResourceStatusUpdateHeader (); - virtual ~EpcX2ResourceStatusUpdateHeader (); + ~EpcX2ResourceStatusUpdateHeader () override; /** * \brief Get the type ID. * \return the object TypeId */ static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId () const; - virtual uint32_t GetSerializedSize () const; - virtual void Serialize (Buffer::Iterator start) const; - virtual uint32_t Deserialize (Buffer::Iterator start); - virtual void Print (std::ostream &os) const; + TypeId GetInstanceTypeId () const override; + uint32_t GetSerializedSize () const override; + void Serialize (Buffer::Iterator start) const override; + uint32_t Deserialize (Buffer::Iterator start) override; + void Print (std::ostream &os) const override; /** @@ -661,18 +661,18 @@ class EpcX2HandoverCancelHeader : public Header { public: EpcX2HandoverCancelHeader (); - virtual ~EpcX2HandoverCancelHeader (); + ~EpcX2HandoverCancelHeader () override; /** * \brief Get the type ID. * \return the object TypeId */ static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId () const; - virtual uint32_t GetSerializedSize () const; - virtual void Serialize (Buffer::Iterator start) const; - virtual uint32_t Deserialize (Buffer::Iterator start); - virtual void Print (std::ostream &os) const; + TypeId GetInstanceTypeId () const override; + uint32_t GetSerializedSize () const override; + void Serialize (Buffer::Iterator start) const override; + uint32_t Deserialize (Buffer::Iterator start) override; + void Print (std::ostream &os) const override; /** * \brief Get old ENB UE X2 AP ID function diff --git a/src/lte/model/epc-x2-sap.h b/src/lte/model/epc-x2-sap.h index b0ea38ec1..1b7f4b030 100644 --- a/src/lte/model/epc-x2-sap.h +++ b/src/lte/model/epc-x2-sap.h @@ -358,7 +358,7 @@ public: class EpcX2SapProvider : public EpcX2Sap { public: - virtual ~EpcX2SapProvider (); + ~EpcX2SapProvider () override; // // Service primitives @@ -427,7 +427,7 @@ public: class EpcX2SapUser : public EpcX2Sap { public: - virtual ~EpcX2SapUser (); + ~EpcX2SapUser () override; /* * Service primitives @@ -513,55 +513,55 @@ public: * Send handover request function * \param params the hadnover request parameters */ - virtual void SendHandoverRequest (HandoverRequestParams params); + void SendHandoverRequest (HandoverRequestParams params) override; /** * Send handover request ack function * \param params the handover request ack pararameters */ - virtual void SendHandoverRequestAck (HandoverRequestAckParams params); + void SendHandoverRequestAck (HandoverRequestAckParams params) override; /** * Send handover preparation failure function * \param params the handover preparation failure parameters */ - virtual void SendHandoverPreparationFailure (HandoverPreparationFailureParams params); + void SendHandoverPreparationFailure (HandoverPreparationFailureParams params) override; /** * Send SN status transfer function * \param params the SN status transfer parameters */ - virtual void SendSnStatusTransfer (SnStatusTransferParams params); + void SendSnStatusTransfer (SnStatusTransferParams params) override; /** * Send UE context release function * \param params the UE context release parameters */ - virtual void SendUeContextRelease (UeContextReleaseParams params); + void SendUeContextRelease (UeContextReleaseParams params) override; /** * Send load information function * \param params the load information parameters */ - virtual void SendLoadInformation (LoadInformationParams params); + void SendLoadInformation (LoadInformationParams params) override; /** * Send resource status update function * \param params the resource status update parameters */ - virtual void SendResourceStatusUpdate (ResourceStatusUpdateParams params); + void SendResourceStatusUpdate (ResourceStatusUpdateParams params) override; /** * Send UE data function * \param params the UE data parameters */ - virtual void SendUeData (UeDataParams params); + void SendUeData (UeDataParams params) override; /** * \brief Send handover Cancel to the target eNB * \param params the handover cancel parameters */ - virtual void SendHandoverCancel (HandoverCancelParams params); + void SendHandoverCancel (HandoverCancelParams params) override; private: EpcX2SpecificEpcX2SapProvider (); @@ -664,56 +664,56 @@ public: * Receive handover request function * \param params the receive handover request parameters */ - virtual void RecvHandoverRequest (HandoverRequestParams params); + void RecvHandoverRequest (HandoverRequestParams params) override; /** * Receive handover request ack function * \param params the receive handover request ack parameters */ - virtual void RecvHandoverRequestAck (HandoverRequestAckParams params); + void RecvHandoverRequestAck (HandoverRequestAckParams params) override; /** * Receive handover preparation failure function * \param params the receive handover preparation failure parameters */ - virtual void RecvHandoverPreparationFailure (HandoverPreparationFailureParams params); + void RecvHandoverPreparationFailure (HandoverPreparationFailureParams params) override; /** * Receive SN status transfer function * \param params the SN status transfer parameters */ - virtual void RecvSnStatusTransfer (SnStatusTransferParams params); + void RecvSnStatusTransfer (SnStatusTransferParams params) override; /** * Receive UE context release function * \param params the UE context release parameters */ - virtual void RecvUeContextRelease (UeContextReleaseParams params); + void RecvUeContextRelease (UeContextReleaseParams params) override; /** * Receive load information function * \param params the load information parameters */ - virtual void RecvLoadInformation (LoadInformationParams params); + void RecvLoadInformation (LoadInformationParams params) override; /** * Receive resource status update function * \param params the receive resource status update */ - virtual void RecvResourceStatusUpdate (ResourceStatusUpdateParams params); + void RecvResourceStatusUpdate (ResourceStatusUpdateParams params) override; /** * Receive UE data function * \param params the UE data parameters */ - virtual void RecvUeData (UeDataParams params); + void RecvUeData (UeDataParams params) override; /** * Receive handover cancel function * \param params the receive handover cancel parameters * */ - virtual void RecvHandoverCancel (HandoverCancelParams params); + void RecvHandoverCancel (HandoverCancelParams params) override; private: EpcX2SpecificEpcX2SapUser (); diff --git a/src/lte/model/epc-x2.h b/src/lte/model/epc-x2.h index 8cfaf8fcd..de6326f1c 100644 --- a/src/lte/model/epc-x2.h +++ b/src/lte/model/epc-x2.h @@ -110,14 +110,14 @@ public: /** * Destructor */ - virtual ~EpcX2 (); + ~EpcX2 () override; /** * \brief Get the type ID. * \return the object TypeId */ static TypeId GetTypeId (); - virtual void DoDispose (); + void DoDispose () override; /** diff --git a/src/lte/model/eps-bearer-tag.h b/src/lte/model/eps-bearer-tag.h index 7a24a4c58..52795a882 100644 --- a/src/lte/model/eps-bearer-tag.h +++ b/src/lte/model/eps-bearer-tag.h @@ -41,7 +41,7 @@ public: * \return the object TypeId */ static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * Create an empty EpsBearerTag @@ -70,10 +70,10 @@ public: */ void SetBid (uint8_t bid); - virtual void Serialize (TagBuffer i) const; - virtual void Deserialize (TagBuffer i); - virtual uint32_t GetSerializedSize () const; - virtual void Print (std::ostream &os) const; + void Serialize (TagBuffer i) const override; + void Deserialize (TagBuffer i) override; + uint32_t GetSerializedSize () const override; + void Print (std::ostream &os) const override; /** * Get RNTI function diff --git a/src/lte/model/eps-bearer.h b/src/lte/model/eps-bearer.h index 4db99dde5..1fd9523fa 100644 --- a/src/lte/model/eps-bearer.h +++ b/src/lte/model/eps-bearer.h @@ -97,7 +97,7 @@ public: */ static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId () const override; + TypeId GetInstanceTypeId () const override; /** * QoS Class Indicator. See 3GPP 23.203 Section 6.1.7.2 for standard values. @@ -161,7 +161,7 @@ public: /** * \brief Deconstructor */ - virtual ~EpsBearer () { } + ~EpsBearer () override { } /** * \brief SetRelease diff --git a/src/lte/model/fdbet-ff-mac-scheduler.h b/src/lte/model/fdbet-ff-mac-scheduler.h index 29cfa3745..736960c6a 100644 --- a/src/lte/model/fdbet-ff-mac-scheduler.h +++ b/src/lte/model/fdbet-ff-mac-scheduler.h @@ -83,10 +83,10 @@ public: /** * Destructor */ - virtual ~FdBetFfMacScheduler (); + ~FdBetFfMacScheduler () override; // inherited from Object - virtual void DoDispose (); + void DoDispose () override; /** * \brief Get the type ID. * \return the object TypeId @@ -94,14 +94,14 @@ public: static TypeId GetTypeId (); // inherited from FfMacScheduler - virtual void SetFfMacCschedSapUser (FfMacCschedSapUser* s); - virtual void SetFfMacSchedSapUser (FfMacSchedSapUser* s); - virtual FfMacCschedSapProvider* GetFfMacCschedSapProvider (); - virtual FfMacSchedSapProvider* GetFfMacSchedSapProvider (); + void SetFfMacCschedSapUser (FfMacCschedSapUser* s) override; + void SetFfMacSchedSapUser (FfMacSchedSapUser* s) override; + FfMacCschedSapProvider* GetFfMacCschedSapProvider () override; + FfMacSchedSapProvider* GetFfMacSchedSapProvider () override; // FFR SAPs - virtual void SetLteFfrSapProvider (LteFfrSapProvider* s); - virtual LteFfrSapUser* GetLteFfrSapUser (); + void SetLteFfrSapProvider (LteFfrSapProvider* s) override; + LteFfrSapUser* GetLteFfrSapUser () override; /// allow MemberCschedSapProvider class friend access friend class MemberCschedSapProvider; diff --git a/src/lte/model/fdmt-ff-mac-scheduler.h b/src/lte/model/fdmt-ff-mac-scheduler.h index 4cd26c51f..2ce9fc7d3 100644 --- a/src/lte/model/fdmt-ff-mac-scheduler.h +++ b/src/lte/model/fdmt-ff-mac-scheduler.h @@ -78,10 +78,10 @@ public: /** * Destructor */ - virtual ~FdMtFfMacScheduler (); + ~FdMtFfMacScheduler () override; // inherited from Object - virtual void DoDispose (); + void DoDispose () override; /** * \brief Get the type ID. * \return the object TypeId @@ -89,14 +89,14 @@ public: static TypeId GetTypeId (); // inherited from FfMacScheduler - virtual void SetFfMacCschedSapUser (FfMacCschedSapUser* s); - virtual void SetFfMacSchedSapUser (FfMacSchedSapUser* s); - virtual FfMacCschedSapProvider* GetFfMacCschedSapProvider (); - virtual FfMacSchedSapProvider* GetFfMacSchedSapProvider (); + void SetFfMacCschedSapUser (FfMacCschedSapUser* s) override; + void SetFfMacSchedSapUser (FfMacSchedSapUser* s) override; + FfMacCschedSapProvider* GetFfMacCschedSapProvider () override; + FfMacSchedSapProvider* GetFfMacSchedSapProvider () override; // FFR SAPs - virtual void SetLteFfrSapProvider (LteFfrSapProvider* s); - virtual LteFfrSapUser* GetLteFfrSapUser (); + void SetLteFfrSapProvider (LteFfrSapProvider* s) override; + LteFfrSapUser* GetLteFfrSapUser () override; /// allow MemberCschedSapProvider class friend access friend class MemberCschedSapProvider; diff --git a/src/lte/model/fdtbfq-ff-mac-scheduler.h b/src/lte/model/fdtbfq-ff-mac-scheduler.h index 86a6c1f6f..184566b6e 100644 --- a/src/lte/model/fdtbfq-ff-mac-scheduler.h +++ b/src/lte/model/fdtbfq-ff-mac-scheduler.h @@ -93,10 +93,10 @@ public: /** * Destructor */ - virtual ~FdTbfqFfMacScheduler (); + ~FdTbfqFfMacScheduler () override; // inherited from Object - virtual void DoDispose (); + void DoDispose () override; /** * \brief Get the type ID. * \return the object TypeId @@ -108,34 +108,34 @@ public: * Set FF MAC Csched SAP user function * \param s the FF MAC Csched SAP user */ - virtual void SetFfMacCschedSapUser (FfMacCschedSapUser* s); + void SetFfMacCschedSapUser (FfMacCschedSapUser* s) override; /** * Set FF MAC sched SAP user function * \param s the FF MAC sched SAP user */ - virtual void SetFfMacSchedSapUser (FfMacSchedSapUser* s); + void SetFfMacSchedSapUser (FfMacSchedSapUser* s) override; /** * Get FF MAC CSched SAP provider function * \returns the FF MAC CSched SAP provider */ - virtual FfMacCschedSapProvider* GetFfMacCschedSapProvider (); + FfMacCschedSapProvider* GetFfMacCschedSapProvider () override; /** * Get FF MAC sched SAP provider function * \returns the FF MAC Sched SAP Provider */ - virtual FfMacSchedSapProvider* GetFfMacSchedSapProvider (); + FfMacSchedSapProvider* GetFfMacSchedSapProvider () override; // FFR SAPs /** * Set FFR SAP provider function * \param s the FFR SAP provider */ - virtual void SetLteFfrSapProvider (LteFfrSapProvider* s); + void SetLteFfrSapProvider (LteFfrSapProvider* s) override; /** * Get FFR SAP user function * \returns the FFR SAP User */ - virtual LteFfrSapUser* GetLteFfrSapUser (); + LteFfrSapUser* GetLteFfrSapUser () override; /// allow MemberCschedSapProvider class friend access friend class MemberCschedSapProvider; diff --git a/src/lte/model/ff-mac-csched-sap.h b/src/lte/model/ff-mac-csched-sap.h index 4ffcf4982..6f6ff1220 100644 --- a/src/lte/model/ff-mac-csched-sap.h +++ b/src/lte/model/ff-mac-csched-sap.h @@ -453,11 +453,11 @@ public: MemberCschedSapProvider (C* scheduler); // inherited from FfMacCschedSapProvider - virtual void CschedCellConfigReq (const struct CschedCellConfigReqParameters& params); - virtual void CschedUeConfigReq (const struct CschedUeConfigReqParameters& params); - virtual void CschedLcConfigReq (const struct CschedLcConfigReqParameters& params); - virtual void CschedLcReleaseReq (const struct CschedLcReleaseReqParameters& params); - virtual void CschedUeReleaseReq (const struct CschedUeReleaseReqParameters& params); + void CschedCellConfigReq (const struct CschedCellConfigReqParameters& params) override; + void CschedUeConfigReq (const struct CschedUeConfigReqParameters& params) override; + void CschedLcConfigReq (const struct CschedLcConfigReqParameters& params) override; + void CschedLcReleaseReq (const struct CschedLcReleaseReqParameters& params) override; + void CschedUeReleaseReq (const struct CschedUeReleaseReqParameters& params) override; private: MemberCschedSapProvider (); diff --git a/src/lte/model/ff-mac-sched-sap.h b/src/lte/model/ff-mac-sched-sap.h index 64c486474..df2250410 100644 --- a/src/lte/model/ff-mac-sched-sap.h +++ b/src/lte/model/ff-mac-sched-sap.h @@ -350,17 +350,17 @@ public: MemberSchedSapProvider (C* scheduler); // inherited from FfMacSchedSapProvider - virtual void SchedDlRlcBufferReq (const struct SchedDlRlcBufferReqParameters& params); - virtual void SchedDlPagingBufferReq (const struct SchedDlPagingBufferReqParameters& params); - virtual void SchedDlMacBufferReq (const struct SchedDlMacBufferReqParameters& params); - virtual void SchedDlTriggerReq (const struct SchedDlTriggerReqParameters& params); - virtual void SchedDlRachInfoReq (const struct SchedDlRachInfoReqParameters& params); - virtual void SchedDlCqiInfoReq (const struct SchedDlCqiInfoReqParameters& params); - virtual void SchedUlTriggerReq (const struct SchedUlTriggerReqParameters& params); - virtual void SchedUlNoiseInterferenceReq (const struct SchedUlNoiseInterferenceReqParameters& params); - virtual void SchedUlSrInfoReq (const struct SchedUlSrInfoReqParameters& params); - virtual void SchedUlMacCtrlInfoReq (const struct SchedUlMacCtrlInfoReqParameters& params); - virtual void SchedUlCqiInfoReq (const struct SchedUlCqiInfoReqParameters& params); + void SchedDlRlcBufferReq (const struct SchedDlRlcBufferReqParameters& params) override; + void SchedDlPagingBufferReq (const struct SchedDlPagingBufferReqParameters& params) override; + void SchedDlMacBufferReq (const struct SchedDlMacBufferReqParameters& params) override; + void SchedDlTriggerReq (const struct SchedDlTriggerReqParameters& params) override; + void SchedDlRachInfoReq (const struct SchedDlRachInfoReqParameters& params) override; + void SchedDlCqiInfoReq (const struct SchedDlCqiInfoReqParameters& params) override; + void SchedUlTriggerReq (const struct SchedUlTriggerReqParameters& params) override; + void SchedUlNoiseInterferenceReq (const struct SchedUlNoiseInterferenceReqParameters& params) override; + void SchedUlSrInfoReq (const struct SchedUlSrInfoReqParameters& params) override; + void SchedUlMacCtrlInfoReq (const struct SchedUlMacCtrlInfoReqParameters& params) override; + void SchedUlCqiInfoReq (const struct SchedUlCqiInfoReqParameters& params) override; private: diff --git a/src/lte/model/ff-mac-scheduler.h b/src/lte/model/ff-mac-scheduler.h index 6b68eaace..d5e890eb0 100644 --- a/src/lte/model/ff-mac-scheduler.h +++ b/src/lte/model/ff-mac-scheduler.h @@ -72,10 +72,10 @@ public: * destructor * */ - virtual ~FfMacScheduler (); + ~FfMacScheduler () override; // inherited from Object - virtual void DoDispose (); + void DoDispose () override; /** * \brief Get the type ID. * \return the object TypeId diff --git a/src/lte/model/lte-amc.h b/src/lte/model/lte-amc.h index e72affa95..f314afd64 100644 --- a/src/lte/model/lte-amc.h +++ b/src/lte/model/lte-amc.h @@ -48,7 +48,7 @@ public: static TypeId GetTypeId (); LteAmc (); - virtual ~LteAmc(); + ~LteAmc() override; /// Types of AMC model. enum AmcModel diff --git a/src/lte/model/lte-anr-sap.h b/src/lte/model/lte-anr-sap.h index 46e205d60..69260c900 100644 --- a/src/lte/model/lte-anr-sap.h +++ b/src/lte/model/lte-anr-sap.h @@ -139,11 +139,11 @@ public: MemberLteAnrSapProvider () = delete; // inherited from LteAnrSapProvider - virtual void ReportUeMeas (LteRrcSap::MeasResults measResults); - virtual void AddNeighbourRelation (uint16_t cellId); - virtual bool GetNoRemove (uint16_t cellId) const; - virtual bool GetNoHo (uint16_t cellId) const; - virtual bool GetNoX2 (uint16_t cellId) const; + void ReportUeMeas (LteRrcSap::MeasResults measResults) override; + void AddNeighbourRelation (uint16_t cellId) override; + bool GetNoRemove (uint16_t cellId) const override; + bool GetNoHo (uint16_t cellId) const override; + bool GetNoX2 (uint16_t cellId) const override; private: C* m_owner; ///< the owner class @@ -218,7 +218,7 @@ public: MemberLteAnrSapUser () = delete; // inherited from LteAnrSapUser - virtual uint8_t AddUeMeasReportConfigForAnr (LteRrcSap::ReportConfigEutra reportConfig); + uint8_t AddUeMeasReportConfigForAnr (LteRrcSap::ReportConfigEutra reportConfig) override; private: C* m_owner; ///< the owner class diff --git a/src/lte/model/lte-anr.h b/src/lte/model/lte-anr.h index d2686cc19..195b050a6 100644 --- a/src/lte/model/lte-anr.h +++ b/src/lte/model/lte-anr.h @@ -86,7 +86,7 @@ public: * instance is to be associated with */ LteAnr (uint16_t servingCellId); - virtual ~LteAnr (); + ~LteAnr () override; /** * \brief Get the type ID. @@ -140,8 +140,8 @@ public: protected: // inherited from Object - virtual void DoInitialize (); - virtual void DoDispose (); + void DoInitialize () override; + void DoDispose () override; private: diff --git a/src/lte/model/lte-as-sap.h b/src/lte/model/lte-as-sap.h index 0bfdcb99f..6bbb1f73f 100644 --- a/src/lte/model/lte-as-sap.h +++ b/src/lte/model/lte-as-sap.h @@ -153,12 +153,12 @@ public: MemberLteAsSapProvider (C* owner); // inherited from LteAsSapProvider - virtual void SetCsgWhiteList (uint32_t csgId); - virtual void StartCellSelection (uint32_t dlEarfcn); - virtual void ForceCampedOnEnb (uint16_t cellId, uint32_t dlEarfcn); - virtual void Connect (); - virtual void SendData (Ptr packet, uint8_t bid); - virtual void Disconnect (); + void SetCsgWhiteList (uint32_t csgId) override; + void StartCellSelection (uint32_t dlEarfcn) override; + void ForceCampedOnEnb (uint16_t cellId, uint32_t dlEarfcn) override; + void Connect () override; + void SendData (Ptr packet, uint8_t bid) override; + void Disconnect () override; private: MemberLteAsSapProvider (); @@ -236,10 +236,10 @@ public: MemberLteAsSapUser (C* owner); // inherited from LteAsSapUser - virtual void NotifyConnectionSuccessful (); - virtual void NotifyConnectionFailed (); - virtual void RecvData (Ptr packet); - virtual void NotifyConnectionReleased (); + void NotifyConnectionSuccessful () override; + void NotifyConnectionFailed () override; + void RecvData (Ptr packet) override; + void NotifyConnectionReleased () override; private: MemberLteAsSapUser (); diff --git a/src/lte/model/lte-asn1-header.h b/src/lte/model/lte-asn1-header.h index e481128f8..b59b52529 100644 --- a/src/lte/model/lte-asn1-header.h +++ b/src/lte/model/lte-asn1-header.h @@ -37,21 +37,21 @@ class Asn1Header : public Header { public: Asn1Header (); - virtual ~Asn1Header (); + ~Asn1Header () override; /** * \brief Get the type ID. * \return the object TypeId */ static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId () const; - uint32_t GetSerializedSize () const; - void Serialize (Buffer::Iterator bIterator) const; + TypeId GetInstanceTypeId () const override; + uint32_t GetSerializedSize () const override; + void Serialize (Buffer::Iterator bIterator) const override; // Inherited from ns3::Header base class // Pure virtual methods, to be implemented in child classes - virtual uint32_t Deserialize (Buffer::Iterator bIterator) = 0; - virtual void Print (std::ostream &os) const = 0; + uint32_t Deserialize (Buffer::Iterator bIterator) override = 0; + void Print (std::ostream &os) const override = 0; /** * This function serializes class attributes to m_serializationResult diff --git a/src/lte/model/lte-ccm-mac-sap.h b/src/lte/model/lte-ccm-mac-sap.h index 5c88e2be2..de3950bf9 100644 --- a/src/lte/model/lte-ccm-mac-sap.h +++ b/src/lte/model/lte-ccm-mac-sap.h @@ -78,7 +78,7 @@ public: class LteCcmMacSapUser : public LteMacSapUser { public: - virtual ~LteCcmMacSapUser (); + ~LteCcmMacSapUser () override; /** * \brief When the Primary Component carrier receive a buffer status report * it is sent to the CCM. @@ -122,8 +122,8 @@ public: */ MemberLteCcmMacSapProvider (C* owner); // inherited from LteCcmRrcSapProvider - virtual void ReportMacCeToScheduler (MacCeListElement_s bsr) override; - virtual void ReportSrToScheduler (uint16_t rnti) override; + void ReportMacCeToScheduler (MacCeListElement_s bsr) override; + void ReportSrToScheduler (uint16_t rnti) override; private: C* m_owner; ///< the owner class @@ -159,13 +159,13 @@ public: */ MemberLteCcmMacSapUser (C* owner); // inherited from LteCcmRrcSapUser - virtual void UlReceiveMacCe (MacCeListElement_s bsr, uint8_t componentCarrierId); - virtual void UlReceiveSr (uint16_t rnti, uint8_t componentCarrierId); - virtual void NotifyPrbOccupancy (double prbOccupancy, uint8_t componentCarrierId); + void UlReceiveMacCe (MacCeListElement_s bsr, uint8_t componentCarrierId) override; + void UlReceiveSr (uint16_t rnti, uint8_t componentCarrierId) override; + void NotifyPrbOccupancy (double prbOccupancy, uint8_t componentCarrierId) override; // inherited from LteMacSapUser - virtual void NotifyTxOpportunity (LteMacSapUser::TxOpportunityParameters txOpParams); - virtual void ReceivePdu (LteMacSapUser::ReceivePduParameters rxPduParams); - virtual void NotifyHarqDeliveryFailure (); + void NotifyTxOpportunity (LteMacSapUser::TxOpportunityParameters txOpParams) override; + void ReceivePdu (LteMacSapUser::ReceivePduParameters rxPduParams) override; + void NotifyHarqDeliveryFailure () override; private: diff --git a/src/lte/model/lte-ccm-rrc-sap.h b/src/lte/model/lte-ccm-rrc-sap.h index 87703526a..703951fc2 100644 --- a/src/lte/model/lte-ccm-rrc-sap.h +++ b/src/lte/model/lte-ccm-rrc-sap.h @@ -233,13 +233,13 @@ public: MemberLteCcmRrcSapProvider (C* owner); // inherited from LteCcmRrcSapProvider - virtual void ReportUeMeas (uint16_t rnti, LteRrcSap::MeasResults measResults); - virtual void AddUe (uint16_t rnti, uint8_t state); - virtual void AddLc (LteEnbCmacSapProvider::LcInfo lcInfo, LteMacSapUser* msu); - virtual void RemoveUe (uint16_t rnti); - virtual std::vector SetupDataRadioBearer (EpsBearer bearer, uint8_t bearerId, uint16_t rnti, uint8_t lcid, uint8_t lcGroup, LteMacSapUser *msu); - virtual std::vector ReleaseDataRadioBearer (uint16_t rnti, uint8_t lcid); - virtual LteMacSapUser* ConfigureSignalBearer(LteEnbCmacSapProvider::LcInfo lcInfo, LteMacSapUser* rlcMacSapUser); + void ReportUeMeas (uint16_t rnti, LteRrcSap::MeasResults measResults) override; + void AddUe (uint16_t rnti, uint8_t state) override; + void AddLc (LteEnbCmacSapProvider::LcInfo lcInfo, LteMacSapUser* msu) override; + void RemoveUe (uint16_t rnti) override; + std::vector SetupDataRadioBearer (EpsBearer bearer, uint8_t bearerId, uint16_t rnti, uint8_t lcid, uint8_t lcGroup, LteMacSapUser *msu) override; + std::vector ReleaseDataRadioBearer (uint16_t rnti, uint8_t lcid) override; + LteMacSapUser* ConfigureSignalBearer(LteEnbCmacSapProvider::LcInfo lcInfo, LteMacSapUser* rlcMacSapUser) override; private: C* m_owner; ///< the owner class @@ -307,12 +307,12 @@ public: MemberLteCcmRrcSapUser (C* owner); // inherited from LteCcmRrcSapUser - virtual void AddLcs (std::vector lcConfig); - virtual void ReleaseLcs (uint16_t rnti, uint8_t lcid); - virtual uint8_t AddUeMeasReportConfigForComponentCarrier (LteRrcSap::ReportConfigEutra reportConfig); - virtual void TriggerComponentCarrier (uint16_t rnti, uint16_t targetCellId); - virtual Ptr GetUeManager (uint16_t rnti); - virtual void SetNumberOfComponentCarriers (uint16_t noOfComponentCarriers); + void AddLcs (std::vector lcConfig) override; + void ReleaseLcs (uint16_t rnti, uint8_t lcid) override; + uint8_t AddUeMeasReportConfigForComponentCarrier (LteRrcSap::ReportConfigEutra reportConfig) override; + void TriggerComponentCarrier (uint16_t rnti, uint16_t targetCellId) override; + Ptr GetUeManager (uint16_t rnti) override; + void SetNumberOfComponentCarriers (uint16_t noOfComponentCarriers) override; private: C* m_owner; ///< the owner class diff --git a/src/lte/model/lte-control-messages.h b/src/lte/model/lte-control-messages.h index 394935cf5..3410fc191 100644 --- a/src/lte/model/lte-control-messages.h +++ b/src/lte/model/lte-control-messages.h @@ -93,7 +93,7 @@ class DlDciLteControlMessage : public LteControlMessage { public: DlDciLteControlMessage (); - virtual ~DlDciLteControlMessage (); + ~DlDciLteControlMessage () override; /** * \brief add a DCI into the message @@ -123,7 +123,7 @@ class UlDciLteControlMessage : public LteControlMessage { public: UlDciLteControlMessage (); - virtual ~UlDciLteControlMessage (); + ~UlDciLteControlMessage () override; /** * \brief add a DCI into the message @@ -153,7 +153,7 @@ class DlCqiLteControlMessage : public LteControlMessage { public: DlCqiLteControlMessage (); - virtual ~DlCqiLteControlMessage (); + ~DlCqiLteControlMessage () override; /** * \brief add a DL-CQI feedback record into the message. @@ -183,7 +183,7 @@ class BsrLteControlMessage : public LteControlMessage { public: BsrLteControlMessage (); - virtual ~BsrLteControlMessage (); + ~BsrLteControlMessage () override; /** * \brief add a BSR feedback record into the message. @@ -214,7 +214,7 @@ class DlHarqFeedbackLteControlMessage : public LteControlMessage { public: DlHarqFeedbackLteControlMessage (); - virtual ~DlHarqFeedbackLteControlMessage (); + ~DlHarqFeedbackLteControlMessage () override; /** * \brief add a DL HARQ feedback record into the message. diff --git a/src/lte/model/lte-enb-component-carrier-manager.h b/src/lte/model/lte-enb-component-carrier-manager.h index 755594b35..ba0bbb718 100644 --- a/src/lte/model/lte-enb-component-carrier-manager.h +++ b/src/lte/model/lte-enb-component-carrier-manager.h @@ -80,7 +80,7 @@ class LteEnbComponentCarrierManager : public Object public: LteEnbComponentCarrierManager (); - virtual ~LteEnbComponentCarrierManager (); + ~LteEnbComponentCarrierManager () override; /** * \brief Get the type ID. * \return the object TypeId @@ -155,7 +155,7 @@ public: protected: // inherited from Object - virtual void DoDispose (); + void DoDispose () override; /** * \brief Implementation of ReportUeMeas. diff --git a/src/lte/model/lte-enb-cphy-sap.h b/src/lte/model/lte-enb-cphy-sap.h index d958a51d4..f4cccaa1b 100644 --- a/src/lte/model/lte-enb-cphy-sap.h +++ b/src/lte/model/lte-enb-cphy-sap.h @@ -154,17 +154,17 @@ public: MemberLteEnbCphySapProvider (C* owner); // inherited from LteEnbCphySapProvider - virtual void SetCellId (uint16_t cellId); - virtual void SetBandwidth (uint16_t ulBandwidth, uint16_t dlBandwidth); - virtual void SetEarfcn (uint32_t ulEarfcn, uint32_t dlEarfcn); - virtual void AddUe (uint16_t rnti); - virtual void RemoveUe (uint16_t rnti); - virtual void SetPa (uint16_t rnti, double pa); - virtual void SetTransmissionMode (uint16_t rnti, uint8_t txMode); - virtual void SetSrsConfigurationIndex (uint16_t rnti, uint16_t srsCi); - virtual void SetMasterInformationBlock (LteRrcSap::MasterInformationBlock mib); - virtual void SetSystemInformationBlockType1 (LteRrcSap::SystemInformationBlockType1 sib1); - virtual int8_t GetReferenceSignalPower (); + void SetCellId (uint16_t cellId) override; + void SetBandwidth (uint16_t ulBandwidth, uint16_t dlBandwidth) override; + void SetEarfcn (uint32_t ulEarfcn, uint32_t dlEarfcn) override; + void AddUe (uint16_t rnti) override; + void RemoveUe (uint16_t rnti) override; + void SetPa (uint16_t rnti, double pa) override; + void SetTransmissionMode (uint16_t rnti, uint8_t txMode) override; + void SetSrsConfigurationIndex (uint16_t rnti, uint16_t srsCi) override; + void SetMasterInformationBlock (LteRrcSap::MasterInformationBlock mib) override; + void SetSystemInformationBlockType1 (LteRrcSap::SystemInformationBlockType1 sib1) override; + int8_t GetReferenceSignalPower () override; private: MemberLteEnbCphySapProvider (); diff --git a/src/lte/model/lte-enb-mac.cc b/src/lte/model/lte-enb-mac.cc index 9001c619c..f0272f62c 100644 --- a/src/lte/model/lte-enb-mac.cc +++ b/src/lte/model/lte-enb-mac.cc @@ -67,15 +67,15 @@ public: EnbMacMemberLteEnbCmacSapProvider (LteEnbMac* mac); // inherited from LteEnbCmacSapProvider - virtual void ConfigureMac (uint16_t ulBandwidth, uint16_t dlBandwidth); - virtual void AddUe (uint16_t rnti); - virtual void RemoveUe (uint16_t rnti); - virtual void AddLc (LcInfo lcinfo, LteMacSapUser* msu); - virtual void ReconfigureLc (LcInfo lcinfo); - virtual void ReleaseLc (uint16_t rnti, uint8_t lcid); - virtual void UeUpdateConfigurationReq (UeConfig params); - virtual RachConfig GetRachConfig (); - virtual AllocateNcRaPreambleReturnValue AllocateNcRaPreamble (uint16_t rnti); + void ConfigureMac (uint16_t ulBandwidth, uint16_t dlBandwidth) override; + void AddUe (uint16_t rnti) override; + void RemoveUe (uint16_t rnti) override; + void AddLc (LcInfo lcinfo, LteMacSapUser* msu) override; + void ReconfigureLc (LcInfo lcinfo) override; + void ReleaseLc (uint16_t rnti, uint8_t lcid) override; + void UeUpdateConfigurationReq (UeConfig params) override; + RachConfig GetRachConfig () override; + AllocateNcRaPreambleReturnValue AllocateNcRaPreamble (uint16_t rnti) override; private: @@ -155,8 +155,8 @@ public: EnbMacMemberFfMacSchedSapUser (LteEnbMac* mac); - virtual void SchedDlConfigInd (const struct SchedDlConfigIndParameters& params); - virtual void SchedUlConfigInd (const struct SchedUlConfigIndParameters& params); + void SchedDlConfigInd (const struct SchedDlConfigIndParameters& params) override; + void SchedUlConfigInd (const struct SchedUlConfigIndParameters& params) override; private: LteEnbMac* m_mac; ///< the MAC }; @@ -194,13 +194,13 @@ public: */ EnbMacMemberFfMacCschedSapUser (LteEnbMac* mac); - virtual void CschedCellConfigCnf (const struct CschedCellConfigCnfParameters& params); - virtual void CschedUeConfigCnf (const struct CschedUeConfigCnfParameters& params); - virtual void CschedLcConfigCnf (const struct CschedLcConfigCnfParameters& params); - virtual void CschedLcReleaseCnf (const struct CschedLcReleaseCnfParameters& params); - virtual void CschedUeReleaseCnf (const struct CschedUeReleaseCnfParameters& params); - virtual void CschedUeConfigUpdateInd (const struct CschedUeConfigUpdateIndParameters& params); - virtual void CschedCellConfigUpdateInd (const struct CschedCellConfigUpdateIndParameters& params); + void CschedCellConfigCnf (const struct CschedCellConfigCnfParameters& params) override; + void CschedUeConfigCnf (const struct CschedUeConfigCnfParameters& params) override; + void CschedLcConfigCnf (const struct CschedLcConfigCnfParameters& params) override; + void CschedLcReleaseCnf (const struct CschedLcReleaseCnfParameters& params) override; + void CschedUeReleaseCnf (const struct CschedUeReleaseCnfParameters& params) override; + void CschedUeConfigUpdateInd (const struct CschedUeConfigUpdateIndParameters& params) override; + void CschedCellConfigUpdateInd (const struct CschedCellConfigUpdateIndParameters& params) override; private: LteEnbMac* m_mac; ///< the MAC @@ -268,13 +268,13 @@ public: EnbMacMemberLteEnbPhySapUser (LteEnbMac* mac); // inherited from LteEnbPhySapUser - virtual void ReceivePhyPdu (Ptr p); - virtual void SubframeIndication (uint32_t frameNo, uint32_t subframeNo); - virtual void ReceiveLteControlMessage (Ptr msg); - virtual void ReceiveRachPreamble (uint32_t prachId); - virtual void UlCqiReport (FfMacSchedSapProvider::SchedUlCqiInfoReqParameters ulcqi); - virtual void UlInfoListElementHarqFeeback (UlInfoListElement_s params); - virtual void DlInfoListElementHarqFeeback (DlInfoListElement_s params); + void ReceivePhyPdu (Ptr p) override; + void SubframeIndication (uint32_t frameNo, uint32_t subframeNo) override; + void ReceiveLteControlMessage (Ptr msg) override; + void ReceiveRachPreamble (uint32_t prachId) override; + void UlCqiReport (FfMacSchedSapProvider::SchedUlCqiInfoReqParameters ulcqi) override; + void UlInfoListElementHarqFeeback (UlInfoListElement_s params) override; + void DlInfoListElementHarqFeeback (DlInfoListElement_s params) override; private: LteEnbMac* m_mac; ///< the MAC diff --git a/src/lte/model/lte-enb-mac.h b/src/lte/model/lte-enb-mac.h index 9a9117b95..86b573ec1 100644 --- a/src/lte/model/lte-enb-mac.h +++ b/src/lte/model/lte-enb-mac.h @@ -75,8 +75,8 @@ public: static TypeId GetTypeId (); LteEnbMac (); - virtual ~LteEnbMac (); - virtual void DoDispose (); + ~LteEnbMac () override; + void DoDispose () override; /** * \brief Set the component carrier ID diff --git a/src/lte/model/lte-enb-net-device.h b/src/lte/model/lte-enb-net-device.h index 60524540d..1974f458b 100644 --- a/src/lte/model/lte-enb-net-device.h +++ b/src/lte/model/lte-enb-net-device.h @@ -64,11 +64,11 @@ public: LteEnbNetDevice (); - virtual ~LteEnbNetDevice (); - virtual void DoDispose (); + ~LteEnbNetDevice () override; + void DoDispose () override; // inherited from NetDevice - virtual bool Send (Ptr packet, const Address& dest, uint16_t protocolNumber); + bool Send (Ptr packet, const Address& dest, uint16_t protocolNumber) override; /** * \return a pointer to the MAC of the PCC. @@ -220,7 +220,7 @@ public: protected: // inherited from Object - virtual void DoInitialize (); + void DoInitialize () override; private: diff --git a/src/lte/model/lte-enb-phy.cc b/src/lte/model/lte-enb-phy.cc index af1fcbe71..8ea50849c 100644 --- a/src/lte/model/lte-enb-phy.cc +++ b/src/lte/model/lte-enb-phy.cc @@ -82,9 +82,9 @@ public: EnbMemberLteEnbPhySapProvider (LteEnbPhy* phy); // inherited from LteEnbPhySapProvider - virtual void SendMacPdu (Ptr p); - virtual void SendLteControlMessage (Ptr msg); - virtual uint8_t GetMacChTtiDelay (); + void SendMacPdu (Ptr p) override; + void SendLteControlMessage (Ptr msg) override; + uint8_t GetMacChTtiDelay () override; /** * Set bandwidth function * diff --git a/src/lte/model/lte-enb-phy.h b/src/lte/model/lte-enb-phy.h index 31702d413..a72c062b9 100644 --- a/src/lte/model/lte-enb-phy.h +++ b/src/lte/model/lte-enb-phy.h @@ -64,7 +64,7 @@ public: */ LteEnbPhy (Ptr dlPhy, Ptr ulPhy); - virtual ~LteEnbPhy (); + ~LteEnbPhy () override; /** * \brief Get the type ID. @@ -72,8 +72,8 @@ public: */ static TypeId GetTypeId (); // inherited from Object - virtual void DoInitialize (); - virtual void DoDispose (); + void DoInitialize () override; + void DoDispose () override; /** @@ -189,7 +189,7 @@ public: * \brief Create the PSD for TX * \returns the PSD */ - virtual Ptr CreateTxPowerSpectralDensity (); + Ptr CreateTxPowerSpectralDensity () override; /** * \brief Create the PSD for TX with power allocation for each RB @@ -279,10 +279,10 @@ public: virtual void ReceiveLteControlMessageList (std::list > msgList); // inherited from LtePhy - virtual void GenerateCtrlCqiReport (const SpectrumValue& sinr); - virtual void GenerateDataCqiReport (const SpectrumValue& sinr); - virtual void ReportInterference (const SpectrumValue& interf); - virtual void ReportRsReceivedPower (const SpectrumValue& power); + void GenerateCtrlCqiReport (const SpectrumValue& sinr) override; + void GenerateDataCqiReport (const SpectrumValue& sinr) override; + void ReportInterference (const SpectrumValue& interf) override; + void ReportRsReceivedPower (const SpectrumValue& power) override; @@ -385,7 +385,7 @@ private: void DoSetSystemInformationBlockType1 (LteRrcSap::SystemInformationBlockType1 sib1); // LteEnbPhySapProvider forwarded methods - void DoSendMacPdu (Ptr p); + void DoSendMacPdu (Ptr p) override; /** * Send LTE Control Message function * diff --git a/src/lte/model/lte-enb-rrc.cc b/src/lte/model/lte-enb-rrc.cc index 34102fe2a..5e181d3f9 100644 --- a/src/lte/model/lte-enb-rrc.cc +++ b/src/lte/model/lte-enb-rrc.cc @@ -70,10 +70,10 @@ public: */ EnbRrcMemberLteEnbCmacSapUser (LteEnbRrc* rrc, uint8_t componentCarrierId); - virtual uint16_t AllocateTemporaryCellRnti (); - virtual void NotifyLcConfigResult (uint16_t rnti, uint8_t lcid, bool success); - virtual void RrcConfigurationUpdateInd (UeConfig params); - virtual bool IsRandomAccessCompleted (uint16_t rnti); + uint16_t AllocateTemporaryCellRnti () override; + void NotifyLcConfigResult (uint16_t rnti, uint8_t lcid, bool success) override; + void RrcConfigurationUpdateInd (UeConfig params) override; + bool IsRandomAccessCompleted (uint16_t rnti) override; private: LteEnbRrc* m_rrc; ///< the RRC diff --git a/src/lte/model/lte-enb-rrc.h b/src/lte/model/lte-enb-rrc.h index 6ca2536b0..0d6b553c7 100644 --- a/src/lte/model/lte-enb-rrc.h +++ b/src/lte/model/lte-enb-rrc.h @@ -111,12 +111,12 @@ public: */ UeManager (Ptr rrc, uint16_t rnti, State s, uint8_t componentCarrierId); - virtual ~UeManager (); + ~UeManager () override; // inherited from Object protected: - virtual void DoInitialize (); - virtual void DoDispose (); + void DoInitialize () override; + void DoDispose () override; public: /** * \brief Get the type ID. @@ -685,12 +685,12 @@ public: /** * Destructor */ - virtual ~LteEnbRrc (); + ~LteEnbRrc () override; // inherited from Object protected: - virtual void DoDispose (); + void DoDispose () override; public: /** * \brief Get the type ID. diff --git a/src/lte/model/lte-ffr-algorithm.h b/src/lte/model/lte-ffr-algorithm.h index 7c3bbdd9e..024a334de 100644 --- a/src/lte/model/lte-ffr-algorithm.h +++ b/src/lte/model/lte-ffr-algorithm.h @@ -58,7 +58,7 @@ class LteFfrAlgorithm : public Object { public: LteFfrAlgorithm (); - virtual ~LteFfrAlgorithm (); + ~LteFfrAlgorithm () override; /** * \brief Get the type ID. @@ -129,7 +129,7 @@ public: protected: // inherited from Object - virtual void DoDispose (); + void DoDispose () override; /** * \brief Automatic FR reconfiguration diff --git a/src/lte/model/lte-ffr-distributed-algorithm.h b/src/lte/model/lte-ffr-distributed-algorithm.h index bd9c3e9a7..e12316c7a 100644 --- a/src/lte/model/lte-ffr-distributed-algorithm.h +++ b/src/lte/model/lte-ffr-distributed-algorithm.h @@ -36,7 +36,7 @@ class LteFfrDistributedAlgorithm : public LteFfrAlgorithm { public: LteFfrDistributedAlgorithm (); - virtual ~LteFfrDistributedAlgorithm (); + ~LteFfrDistributedAlgorithm () override; /** * \brief Get the type ID. @@ -45,11 +45,11 @@ public: static TypeId GetTypeId (); // inherited from LteFfrAlgorithm - virtual void SetLteFfrSapUser (LteFfrSapUser* s); - virtual LteFfrSapProvider* GetLteFfrSapProvider (); + void SetLteFfrSapUser (LteFfrSapUser* s) override; + LteFfrSapProvider* GetLteFfrSapProvider () override; - virtual void SetLteFfrRrcSapUser (LteFfrRrcSapUser* s); - virtual LteFfrRrcSapProvider* GetLteFfrRrcSapProvider (); + void SetLteFfrRrcSapUser (LteFfrRrcSapUser* s) override; + LteFfrRrcSapProvider* GetLteFfrRrcSapProvider () override; /// let the forwarder class access the protected and private members friend class MemberLteFfrSapProvider; @@ -58,25 +58,25 @@ public: protected: // inherited from Object - virtual void DoInitialize (); - virtual void DoDispose (); + void DoInitialize () override; + void DoDispose () override; - virtual void Reconfigure (); + void Reconfigure () override; // FFR SAP PROVIDER IMPLEMENTATION - virtual std::vector DoGetAvailableDlRbg (); - virtual bool DoIsDlRbgAvailableForUe (int i, uint16_t rnti); - virtual std::vector DoGetAvailableUlRbg (); - virtual bool DoIsUlRbgAvailableForUe (int i, uint16_t rnti); - virtual void DoReportDlCqiInfo (const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters& params); - virtual void DoReportUlCqiInfo (const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters& params); - virtual void DoReportUlCqiInfo ( std::map > ulCqiMap ); - virtual uint8_t DoGetTpc (uint16_t rnti); - virtual uint16_t DoGetMinContinuousUlBandwidth (); + std::vector DoGetAvailableDlRbg () override; + bool DoIsDlRbgAvailableForUe (int i, uint16_t rnti) override; + std::vector DoGetAvailableUlRbg () override; + bool DoIsUlRbgAvailableForUe (int i, uint16_t rnti) override; + void DoReportDlCqiInfo (const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters& params) override; + void DoReportUlCqiInfo (const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters& params) override; + void DoReportUlCqiInfo ( std::map > ulCqiMap ) override; + uint8_t DoGetTpc (uint16_t rnti) override; + uint16_t DoGetMinContinuousUlBandwidth () override; // FFR SAP RRC PROVIDER IMPLEMENTATION - virtual void DoReportUeMeas (uint16_t rnti, LteRrcSap::MeasResults measResults); - virtual void DoRecvLoadInformation (EpcX2Sap::LoadInformationParams params); + void DoReportUeMeas (uint16_t rnti, LteRrcSap::MeasResults measResults) override; + void DoRecvLoadInformation (EpcX2Sap::LoadInformationParams params) override; private: /** diff --git a/src/lte/model/lte-ffr-enhanced-algorithm.h b/src/lte/model/lte-ffr-enhanced-algorithm.h index 19e89ea95..d86c1fe14 100644 --- a/src/lte/model/lte-ffr-enhanced-algorithm.h +++ b/src/lte/model/lte-ffr-enhanced-algorithm.h @@ -44,7 +44,7 @@ public: * \brief Creates a trivial ffr algorithm instance. */ LteFfrEnhancedAlgorithm (); - virtual ~LteFfrEnhancedAlgorithm (); + ~LteFfrEnhancedAlgorithm () override; /** * \brief Get the type ID. @@ -53,11 +53,11 @@ public: static TypeId GetTypeId (); // inherited from LteFfrAlgorithm - virtual void SetLteFfrSapUser (LteFfrSapUser* s); - virtual LteFfrSapProvider* GetLteFfrSapProvider (); + void SetLteFfrSapUser (LteFfrSapUser* s) override; + LteFfrSapProvider* GetLteFfrSapProvider () override; - virtual void SetLteFfrRrcSapUser (LteFfrRrcSapUser* s); - virtual LteFfrRrcSapProvider* GetLteFfrRrcSapProvider (); + void SetLteFfrRrcSapUser (LteFfrRrcSapUser* s) override; + LteFfrRrcSapProvider* GetLteFfrRrcSapProvider () override; /// let the forwarder class access the protected and private members friend class MemberLteFfrSapProvider; @@ -66,25 +66,25 @@ public: protected: // inherited from Object - virtual void DoInitialize (); - virtual void DoDispose (); + void DoInitialize () override; + void DoDispose () override; - virtual void Reconfigure (); + void Reconfigure () override; // FFR SAP PROVIDER IMPLEMENTATION - virtual std::vector DoGetAvailableDlRbg (); - virtual bool DoIsDlRbgAvailableForUe (int i, uint16_t rnti); - virtual std::vector DoGetAvailableUlRbg (); - virtual bool DoIsUlRbgAvailableForUe (int i, uint16_t rnti); - virtual void DoReportDlCqiInfo (const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters& params); - virtual void DoReportUlCqiInfo (const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters& params); - virtual void DoReportUlCqiInfo ( std::map > ulCqiMap ); - virtual uint8_t DoGetTpc (uint16_t rnti); - virtual uint16_t DoGetMinContinuousUlBandwidth (); + std::vector DoGetAvailableDlRbg () override; + bool DoIsDlRbgAvailableForUe (int i, uint16_t rnti) override; + std::vector DoGetAvailableUlRbg () override; + bool DoIsUlRbgAvailableForUe (int i, uint16_t rnti) override; + void DoReportDlCqiInfo (const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters& params) override; + void DoReportUlCqiInfo (const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters& params) override; + void DoReportUlCqiInfo ( std::map > ulCqiMap ) override; + uint8_t DoGetTpc (uint16_t rnti) override; + uint16_t DoGetMinContinuousUlBandwidth () override; // FFR SAP RRC PROVIDER IMPLEMENTATION - virtual void DoReportUeMeas (uint16_t rnti, LteRrcSap::MeasResults measResults); - virtual void DoRecvLoadInformation (EpcX2Sap::LoadInformationParams params); + void DoReportUeMeas (uint16_t rnti, LteRrcSap::MeasResults measResults) override; + void DoRecvLoadInformation (EpcX2Sap::LoadInformationParams params) override; private: /** diff --git a/src/lte/model/lte-ffr-rrc-sap.h b/src/lte/model/lte-ffr-rrc-sap.h index e761ea64e..7b01d6b2c 100644 --- a/src/lte/model/lte-ffr-rrc-sap.h +++ b/src/lte/model/lte-ffr-rrc-sap.h @@ -153,10 +153,10 @@ public: MemberLteFfrRrcSapProvider () = delete; // inherited from LteHandoverManagementSapProvider - virtual void SetCellId (uint16_t cellId ); - virtual void SetBandwidth (uint8_t ulBandwidth, uint8_t dlBandwidth); - virtual void ReportUeMeas (uint16_t rnti, LteRrcSap::MeasResults measResults); - virtual void RecvLoadInformation (EpcX2Sap::LoadInformationParams params); + void SetCellId (uint16_t cellId ) override; + void SetBandwidth (uint8_t ulBandwidth, uint8_t dlBandwidth) override; + void ReportUeMeas (uint16_t rnti, LteRrcSap::MeasResults measResults) override; + void RecvLoadInformation (EpcX2Sap::LoadInformationParams params) override; private: C* m_owner; ///< the owner class @@ -218,11 +218,11 @@ public: MemberLteFfrRrcSapUser () = delete; // inherited from LteFfrRrcSapUser - virtual uint8_t AddUeMeasReportConfigForFfr (LteRrcSap::ReportConfigEutra reportConfig); + uint8_t AddUeMeasReportConfigForFfr (LteRrcSap::ReportConfigEutra reportConfig) override; - virtual void SetPdschConfigDedicated (uint16_t rnti, LteRrcSap::PdschConfigDedicated pdschConfigDedicated); + void SetPdschConfigDedicated (uint16_t rnti, LteRrcSap::PdschConfigDedicated pdschConfigDedicated) override; - virtual void SendLoadInformation (EpcX2Sap::LoadInformationParams params); + void SendLoadInformation (EpcX2Sap::LoadInformationParams params) override; private: C* m_owner; ///< the owner class diff --git a/src/lte/model/lte-ffr-sap.h b/src/lte/model/lte-ffr-sap.h index 69f414c76..fe14b05df 100644 --- a/src/lte/model/lte-ffr-sap.h +++ b/src/lte/model/lte-ffr-sap.h @@ -163,15 +163,15 @@ public: MemberLteFfrSapProvider () = delete; // inherited from LteFfrSapProvider - virtual std::vector GetAvailableDlRbg (); - virtual bool IsDlRbgAvailableForUe (int i, uint16_t rnti); - virtual std::vector GetAvailableUlRbg (); - virtual bool IsUlRbgAvailableForUe (int i, uint16_t rnti); - virtual void ReportDlCqiInfo (const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters& params); - virtual void ReportUlCqiInfo (const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters& params); - virtual void ReportUlCqiInfo ( std::map > ulCqiMap ); - virtual uint8_t GetTpc (uint16_t rnti); - virtual uint16_t GetMinContinuousUlBandwidth (); + std::vector GetAvailableDlRbg () override; + bool IsDlRbgAvailableForUe (int i, uint16_t rnti) override; + std::vector GetAvailableUlRbg () override; + bool IsUlRbgAvailableForUe (int i, uint16_t rnti) override; + void ReportDlCqiInfo (const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters& params) override; + void ReportUlCqiInfo (const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters& params) override; + void ReportUlCqiInfo ( std::map > ulCqiMap ) override; + uint8_t GetTpc (uint16_t rnti) override; + uint16_t GetMinContinuousUlBandwidth () override; private: C* m_owner; ///< the owner class diff --git a/src/lte/model/lte-ffr-soft-algorithm.h b/src/lte/model/lte-ffr-soft-algorithm.h index 68519a9e8..b57f138a2 100644 --- a/src/lte/model/lte-ffr-soft-algorithm.h +++ b/src/lte/model/lte-ffr-soft-algorithm.h @@ -42,7 +42,7 @@ public: */ LteFfrSoftAlgorithm (); - virtual ~LteFfrSoftAlgorithm (); + ~LteFfrSoftAlgorithm () override; /** * \brief Get the type ID. @@ -51,11 +51,11 @@ public: static TypeId GetTypeId (); // inherited from LteFfrAlgorithm - virtual void SetLteFfrSapUser (LteFfrSapUser* s); - virtual LteFfrSapProvider* GetLteFfrSapProvider (); + void SetLteFfrSapUser (LteFfrSapUser* s) override; + LteFfrSapProvider* GetLteFfrSapProvider () override; - virtual void SetLteFfrRrcSapUser (LteFfrRrcSapUser* s); - virtual LteFfrRrcSapProvider* GetLteFfrRrcSapProvider (); + void SetLteFfrRrcSapUser (LteFfrRrcSapUser* s) override; + LteFfrRrcSapProvider* GetLteFfrRrcSapProvider () override; /// let the forwarder class access the protected and private members friend class MemberLteFfrSapProvider; @@ -64,25 +64,25 @@ public: protected: // inherited from Object - virtual void DoInitialize (); - virtual void DoDispose (); + void DoInitialize () override; + void DoDispose () override; - virtual void Reconfigure (); + void Reconfigure () override; // FFR SAP PROVIDER IMPLEMENTATION - virtual std::vector DoGetAvailableDlRbg (); - virtual bool DoIsDlRbgAvailableForUe (int i, uint16_t rnti); - virtual std::vector DoGetAvailableUlRbg (); - virtual bool DoIsUlRbgAvailableForUe (int i, uint16_t rnti); - virtual void DoReportDlCqiInfo (const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters& params); - virtual void DoReportUlCqiInfo (const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters& params); - virtual void DoReportUlCqiInfo ( std::map > ulCqiMap ); - virtual uint8_t DoGetTpc (uint16_t rnti); - virtual uint16_t DoGetMinContinuousUlBandwidth (); + std::vector DoGetAvailableDlRbg () override; + bool DoIsDlRbgAvailableForUe (int i, uint16_t rnti) override; + std::vector DoGetAvailableUlRbg () override; + bool DoIsUlRbgAvailableForUe (int i, uint16_t rnti) override; + void DoReportDlCqiInfo (const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters& params) override; + void DoReportUlCqiInfo (const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters& params) override; + void DoReportUlCqiInfo ( std::map > ulCqiMap ) override; + uint8_t DoGetTpc (uint16_t rnti) override; + uint16_t DoGetMinContinuousUlBandwidth () override; // FFR SAP RRC PROVIDER IMPLEMENTATION - virtual void DoReportUeMeas (uint16_t rnti, LteRrcSap::MeasResults measResults); - virtual void DoRecvLoadInformation (EpcX2Sap::LoadInformationParams params); + void DoReportUeMeas (uint16_t rnti, LteRrcSap::MeasResults measResults) override; + void DoRecvLoadInformation (EpcX2Sap::LoadInformationParams params) override; private: /** diff --git a/src/lte/model/lte-fr-hard-algorithm.h b/src/lte/model/lte-fr-hard-algorithm.h index 6618b084d..a360b6117 100644 --- a/src/lte/model/lte-fr-hard-algorithm.h +++ b/src/lte/model/lte-fr-hard-algorithm.h @@ -41,7 +41,7 @@ public: */ LteFrHardAlgorithm (); - virtual ~LteFrHardAlgorithm (); + ~LteFrHardAlgorithm () override; /** * \brief Get the type ID. @@ -50,11 +50,11 @@ public: static TypeId GetTypeId (); // inherited from LteFfrAlgorithm - virtual void SetLteFfrSapUser (LteFfrSapUser* s); - virtual LteFfrSapProvider* GetLteFfrSapProvider (); + void SetLteFfrSapUser (LteFfrSapUser* s) override; + LteFfrSapProvider* GetLteFfrSapProvider () override; - virtual void SetLteFfrRrcSapUser (LteFfrRrcSapUser* s); - virtual LteFfrRrcSapProvider* GetLteFfrRrcSapProvider (); + void SetLteFfrRrcSapUser (LteFfrRrcSapUser* s) override; + LteFfrRrcSapProvider* GetLteFfrRrcSapProvider () override; /// let the forwarder class access the protected and private members friend class MemberLteFfrSapProvider; @@ -63,25 +63,25 @@ public: protected: // inherited from Object - virtual void DoInitialize (); - virtual void DoDispose (); + void DoInitialize () override; + void DoDispose () override; - virtual void Reconfigure (); + void Reconfigure () override; // FFR SAP PROVIDER IMPLEMENTATION - virtual std::vector DoGetAvailableDlRbg (); - virtual bool DoIsDlRbgAvailableForUe (int i, uint16_t rnti); - virtual std::vector DoGetAvailableUlRbg (); - virtual bool DoIsUlRbgAvailableForUe (int i, uint16_t rnti); - virtual void DoReportDlCqiInfo (const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters& params); - virtual void DoReportUlCqiInfo (const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters& params); - virtual void DoReportUlCqiInfo ( std::map > ulCqiMap ); - virtual uint8_t DoGetTpc (uint16_t rnti); - virtual uint16_t DoGetMinContinuousUlBandwidth (); + std::vector DoGetAvailableDlRbg () override; + bool DoIsDlRbgAvailableForUe (int i, uint16_t rnti) override; + std::vector DoGetAvailableUlRbg () override; + bool DoIsUlRbgAvailableForUe (int i, uint16_t rnti) override; + void DoReportDlCqiInfo (const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters& params) override; + void DoReportUlCqiInfo (const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters& params) override; + void DoReportUlCqiInfo ( std::map > ulCqiMap ) override; + uint8_t DoGetTpc (uint16_t rnti) override; + uint16_t DoGetMinContinuousUlBandwidth () override; // FFR SAP RRC PROVIDER IMPLEMENTATION - virtual void DoReportUeMeas (uint16_t rnti, LteRrcSap::MeasResults measResults); - virtual void DoRecvLoadInformation (EpcX2Sap::LoadInformationParams params); + void DoReportUeMeas (uint16_t rnti, LteRrcSap::MeasResults measResults) override; + void DoRecvLoadInformation (EpcX2Sap::LoadInformationParams params) override; private: /** diff --git a/src/lte/model/lte-fr-no-op-algorithm.h b/src/lte/model/lte-fr-no-op-algorithm.h index 4af30c592..930001f99 100644 --- a/src/lte/model/lte-fr-no-op-algorithm.h +++ b/src/lte/model/lte-fr-no-op-algorithm.h @@ -47,7 +47,7 @@ public: */ LteFrNoOpAlgorithm (); - virtual ~LteFrNoOpAlgorithm (); + ~LteFrNoOpAlgorithm () override; /** * \brief Get the type ID. @@ -56,11 +56,11 @@ public: static TypeId GetTypeId (); // inherited from LteFfrAlgorithm - virtual void SetLteFfrSapUser (LteFfrSapUser* s); - virtual LteFfrSapProvider* GetLteFfrSapProvider (); + void SetLteFfrSapUser (LteFfrSapUser* s) override; + LteFfrSapProvider* GetLteFfrSapProvider () override; - virtual void SetLteFfrRrcSapUser (LteFfrRrcSapUser* s); - virtual LteFfrRrcSapProvider* GetLteFfrRrcSapProvider (); + void SetLteFfrRrcSapUser (LteFfrRrcSapUser* s) override; + LteFfrRrcSapProvider* GetLteFfrRrcSapProvider () override; /// let the forwarder class access the protected and private members friend class MemberLteFfrSapProvider; @@ -69,25 +69,25 @@ public: protected: // inherited from Object - virtual void DoInitialize (); - virtual void DoDispose (); + void DoInitialize () override; + void DoDispose () override; - virtual void Reconfigure (); + void Reconfigure () override; // FFR SAP PROVIDER IMPLEMENTATION - virtual std::vector DoGetAvailableDlRbg (); - virtual bool DoIsDlRbgAvailableForUe (int i, uint16_t rnti); - virtual std::vector DoGetAvailableUlRbg (); - virtual bool DoIsUlRbgAvailableForUe (int i, uint16_t rnti); - virtual void DoReportDlCqiInfo (const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters& params); - virtual void DoReportUlCqiInfo (const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters& params); - virtual void DoReportUlCqiInfo ( std::map > ulCqiMap ); - virtual uint8_t DoGetTpc (uint16_t rnti); - virtual uint16_t DoGetMinContinuousUlBandwidth (); + std::vector DoGetAvailableDlRbg () override; + bool DoIsDlRbgAvailableForUe (int i, uint16_t rnti) override; + std::vector DoGetAvailableUlRbg () override; + bool DoIsUlRbgAvailableForUe (int i, uint16_t rnti) override; + void DoReportDlCqiInfo (const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters& params) override; + void DoReportUlCqiInfo (const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters& params) override; + void DoReportUlCqiInfo ( std::map > ulCqiMap ) override; + uint8_t DoGetTpc (uint16_t rnti) override; + uint16_t DoGetMinContinuousUlBandwidth () override; // FFR SAP RRC PROVIDER IMPLEMENTATION - virtual void DoReportUeMeas (uint16_t rnti, LteRrcSap::MeasResults measResults); - virtual void DoRecvLoadInformation (EpcX2Sap::LoadInformationParams params); + void DoReportUeMeas (uint16_t rnti, LteRrcSap::MeasResults measResults) override; + void DoRecvLoadInformation (EpcX2Sap::LoadInformationParams params) override; private: // FFR SAP diff --git a/src/lte/model/lte-fr-soft-algorithm.h b/src/lte/model/lte-fr-soft-algorithm.h index 38a4a04f9..5157c06c6 100644 --- a/src/lte/model/lte-fr-soft-algorithm.h +++ b/src/lte/model/lte-fr-soft-algorithm.h @@ -42,7 +42,7 @@ public: */ LteFrSoftAlgorithm (); - virtual ~LteFrSoftAlgorithm (); + ~LteFrSoftAlgorithm () override; /** * \brief Get the type ID. @@ -51,11 +51,11 @@ public: static TypeId GetTypeId (); // inherited from LteFfrAlgorithm - virtual void SetLteFfrSapUser (LteFfrSapUser* s); - virtual LteFfrSapProvider* GetLteFfrSapProvider (); + void SetLteFfrSapUser (LteFfrSapUser* s) override; + LteFfrSapProvider* GetLteFfrSapProvider () override; - virtual void SetLteFfrRrcSapUser (LteFfrRrcSapUser* s); - virtual LteFfrRrcSapProvider* GetLteFfrRrcSapProvider (); + void SetLteFfrRrcSapUser (LteFfrRrcSapUser* s) override; + LteFfrRrcSapProvider* GetLteFfrRrcSapProvider () override; /// let the forwarder class access the protected and private members friend class MemberLteFfrSapProvider; @@ -64,25 +64,25 @@ public: protected: // inherited from Object - virtual void DoInitialize (); - virtual void DoDispose (); + void DoInitialize () override; + void DoDispose () override; - virtual void Reconfigure (); + void Reconfigure () override; // FFR SAP PROVIDER IMPLEMENTATION - virtual std::vector DoGetAvailableDlRbg (); - virtual bool DoIsDlRbgAvailableForUe (int i, uint16_t rnti); - virtual std::vector DoGetAvailableUlRbg (); - virtual bool DoIsUlRbgAvailableForUe (int i, uint16_t rnti); - virtual void DoReportDlCqiInfo (const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters& params); - virtual void DoReportUlCqiInfo (const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters& params); - virtual void DoReportUlCqiInfo ( std::map > ulCqiMap ); - virtual uint8_t DoGetTpc (uint16_t rnti); - virtual uint16_t DoGetMinContinuousUlBandwidth (); + std::vector DoGetAvailableDlRbg () override; + bool DoIsDlRbgAvailableForUe (int i, uint16_t rnti) override; + std::vector DoGetAvailableUlRbg () override; + bool DoIsUlRbgAvailableForUe (int i, uint16_t rnti) override; + void DoReportDlCqiInfo (const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters& params) override; + void DoReportUlCqiInfo (const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters& params) override; + void DoReportUlCqiInfo ( std::map > ulCqiMap ) override; + uint8_t DoGetTpc (uint16_t rnti) override; + uint16_t DoGetMinContinuousUlBandwidth () override; // FFR SAP RRC PROVIDER IMPLEMENTATION - virtual void DoReportUeMeas (uint16_t rnti, LteRrcSap::MeasResults measResults); - virtual void DoRecvLoadInformation (EpcX2Sap::LoadInformationParams params); + void DoReportUeMeas (uint16_t rnti, LteRrcSap::MeasResults measResults) override; + void DoRecvLoadInformation (EpcX2Sap::LoadInformationParams params) override; private: /** diff --git a/src/lte/model/lte-fr-strict-algorithm.h b/src/lte/model/lte-fr-strict-algorithm.h index e09e723fe..145c7307e 100644 --- a/src/lte/model/lte-fr-strict-algorithm.h +++ b/src/lte/model/lte-fr-strict-algorithm.h @@ -42,7 +42,7 @@ public: */ LteFrStrictAlgorithm (); - virtual ~LteFrStrictAlgorithm (); + ~LteFrStrictAlgorithm () override; /** * \brief Get the type ID. @@ -51,11 +51,11 @@ public: static TypeId GetTypeId (); // inherited from LteFfrAlgorithm - virtual void SetLteFfrSapUser (LteFfrSapUser* s); - virtual LteFfrSapProvider* GetLteFfrSapProvider (); + void SetLteFfrSapUser (LteFfrSapUser* s) override; + LteFfrSapProvider* GetLteFfrSapProvider () override; - virtual void SetLteFfrRrcSapUser (LteFfrRrcSapUser* s); - virtual LteFfrRrcSapProvider* GetLteFfrRrcSapProvider (); + void SetLteFfrRrcSapUser (LteFfrRrcSapUser* s) override; + LteFfrRrcSapProvider* GetLteFfrRrcSapProvider () override; /// let the forwarder class access the protected and private members friend class MemberLteFfrSapProvider; @@ -64,25 +64,25 @@ public: protected: // inherited from Object - virtual void DoInitialize (); - virtual void DoDispose (); + void DoInitialize () override; + void DoDispose () override; - virtual void Reconfigure (); + void Reconfigure () override; // FFR SAP PROVIDER IMPLEMENTATION - virtual std::vector DoGetAvailableDlRbg (); - virtual bool DoIsDlRbgAvailableForUe (int i, uint16_t rnti); - virtual std::vector DoGetAvailableUlRbg (); - virtual bool DoIsUlRbgAvailableForUe (int i, uint16_t rnti); - virtual void DoReportDlCqiInfo (const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters& params); - virtual void DoReportUlCqiInfo (const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters& params); - virtual void DoReportUlCqiInfo ( std::map > ulCqiMap ); - virtual uint8_t DoGetTpc (uint16_t rnti); - virtual uint16_t DoGetMinContinuousUlBandwidth (); + std::vector DoGetAvailableDlRbg () override; + bool DoIsDlRbgAvailableForUe (int i, uint16_t rnti) override; + std::vector DoGetAvailableUlRbg () override; + bool DoIsUlRbgAvailableForUe (int i, uint16_t rnti) override; + void DoReportDlCqiInfo (const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters& params) override; + void DoReportUlCqiInfo (const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters& params) override; + void DoReportUlCqiInfo ( std::map > ulCqiMap ) override; + uint8_t DoGetTpc (uint16_t rnti) override; + uint16_t DoGetMinContinuousUlBandwidth () override; // FFR SAP RRC PROVIDER IMPLEMENTATION - virtual void DoReportUeMeas (uint16_t rnti, LteRrcSap::MeasResults measResults); - virtual void DoRecvLoadInformation (EpcX2Sap::LoadInformationParams params); + void DoReportUeMeas (uint16_t rnti, LteRrcSap::MeasResults measResults) override; + void DoRecvLoadInformation (EpcX2Sap::LoadInformationParams params) override; private: /** diff --git a/src/lte/model/lte-handover-algorithm.h b/src/lte/model/lte-handover-algorithm.h index 0cc85f2e2..6e63fc7c7 100644 --- a/src/lte/model/lte-handover-algorithm.h +++ b/src/lte/model/lte-handover-algorithm.h @@ -67,7 +67,7 @@ class LteHandoverAlgorithm : public Object { public: LteHandoverAlgorithm (); - virtual ~LteHandoverAlgorithm (); + ~LteHandoverAlgorithm () override; /** * \brief Get the type ID. @@ -93,7 +93,7 @@ public: protected: // inherited from Object - virtual void DoDispose (); + void DoDispose () override; // HANDOVER MANAGEMENT SAP PROVIDER IMPLEMENTATION diff --git a/src/lte/model/lte-handover-management-sap.h b/src/lte/model/lte-handover-management-sap.h index 33e46f8b6..13ef6a922 100644 --- a/src/lte/model/lte-handover-management-sap.h +++ b/src/lte/model/lte-handover-management-sap.h @@ -126,7 +126,7 @@ public: MemberLteHandoverManagementSapProvider () = delete; // inherited from LteHandoverManagementSapProvider - virtual void ReportUeMeas (uint16_t rnti, LteRrcSap::MeasResults measResults); + void ReportUeMeas (uint16_t rnti, LteRrcSap::MeasResults measResults) override; private: C* m_owner; ///< the owner class @@ -170,8 +170,8 @@ public: MemberLteHandoverManagementSapUser () = delete; // inherited from LteHandoverManagementSapUser - virtual std::vector AddUeMeasReportConfigForHandover (LteRrcSap::ReportConfigEutra reportConfig); - virtual void TriggerHandover (uint16_t rnti, uint16_t targetCellId); + std::vector AddUeMeasReportConfigForHandover (LteRrcSap::ReportConfigEutra reportConfig) override; + void TriggerHandover (uint16_t rnti, uint16_t targetCellId) override; private: C* m_owner; ///< the owner class diff --git a/src/lte/model/lte-interference.h b/src/lte/model/lte-interference.h index 90ef1c07a..9602cba22 100644 --- a/src/lte/model/lte-interference.h +++ b/src/lte/model/lte-interference.h @@ -43,14 +43,14 @@ class LteInterference : public Object { public: LteInterference (); - virtual ~LteInterference (); + ~LteInterference () override; /** * \brief Get the type ID. * \return the object TypeId */ static TypeId GetTypeId (); - virtual void DoDispose (); + void DoDispose () override; /** * \brief Add a LteChunkProcessor that will use the time-vs-frequency SINR diff --git a/src/lte/model/lte-mac-sap.h b/src/lte/model/lte-mac-sap.h index ed0bd1057..5a07da1ab 100644 --- a/src/lte/model/lte-mac-sap.h +++ b/src/lte/model/lte-mac-sap.h @@ -198,8 +198,8 @@ public: EnbMacMemberLteMacSapProvider (C* mac); // inherited from LteMacSapProvider - virtual void TransmitPdu (TransmitPduParameters params); - virtual void ReportBufferStatus (ReportBufferStatusParameters params); + void TransmitPdu (TransmitPduParameters params) override; + void ReportBufferStatus (ReportBufferStatusParameters params) override; private: C* m_mac; ///< the MAC class diff --git a/src/lte/model/lte-net-device.h b/src/lte/model/lte-net-device.h index 2372806c5..a138257da 100644 --- a/src/lte/model/lte-net-device.h +++ b/src/lte/model/lte-net-device.h @@ -55,38 +55,38 @@ public: static TypeId GetTypeId (); LteNetDevice (); - virtual ~LteNetDevice (); + ~LteNetDevice () override; // Delete copy constructor and assignment operator to avoid misuse LteNetDevice (const LteNetDevice &) = delete; LteNetDevice &operator= (const LteNetDevice &) = delete; - virtual void DoDispose (); + void DoDispose () override; // inherited from NetDevice - virtual void SetIfIndex (const uint32_t index); - virtual uint32_t GetIfIndex () const; - virtual Ptr GetChannel () const; - virtual bool SetMtu (const uint16_t mtu); - virtual uint16_t GetMtu () const; - virtual void SetAddress (Address address); - virtual Address GetAddress () const; - virtual bool IsLinkUp () const; - virtual void AddLinkChangeCallback (Callback callback); - virtual bool IsBroadcast () const; - virtual Address GetBroadcast () const; - virtual bool IsMulticast () const; - virtual bool IsPointToPoint () const; - virtual bool IsBridge () const; - virtual Ptr GetNode () const; - virtual void SetNode (Ptr node); - virtual bool NeedsArp () const; - virtual void SetReceiveCallback (NetDevice::ReceiveCallback cb); - virtual Address GetMulticast (Ipv4Address addr) const; - virtual Address GetMulticast (Ipv6Address addr) const; - virtual void SetPromiscReceiveCallback (PromiscReceiveCallback cb); - virtual bool SendFrom (Ptr packet, const Address& source, const Address& dest, uint16_t protocolNumber); - virtual bool SupportsSendFrom () const; + void SetIfIndex (const uint32_t index) override; + uint32_t GetIfIndex () const override; + Ptr GetChannel () const override; + bool SetMtu (const uint16_t mtu) override; + uint16_t GetMtu () const override; + void SetAddress (Address address) override; + Address GetAddress () const override; + bool IsLinkUp () const override; + void AddLinkChangeCallback (Callback callback) override; + bool IsBroadcast () const override; + Address GetBroadcast () const override; + bool IsMulticast () const override; + bool IsPointToPoint () const override; + bool IsBridge () const override; + Ptr GetNode () const override; + void SetNode (Ptr node) override; + bool NeedsArp () const override; + void SetReceiveCallback (NetDevice::ReceiveCallback cb) override; + Address GetMulticast (Ipv4Address addr) const override; + Address GetMulticast (Ipv6Address addr) const override; + void SetPromiscReceiveCallback (PromiscReceiveCallback cb) override; + bool SendFrom (Ptr packet, const Address& source, const Address& dest, uint16_t protocolNumber) override; + bool SupportsSendFrom () const override; /** * receive a packet from the lower layers in order to forward it to the upper layers diff --git a/src/lte/model/lte-pdcp-header.h b/src/lte/model/lte-pdcp-header.h index 8052b204b..6d44bfb96 100644 --- a/src/lte/model/lte-pdcp-header.h +++ b/src/lte/model/lte-pdcp-header.h @@ -45,7 +45,7 @@ public: * Creates a null header */ LtePdcpHeader (); - ~LtePdcpHeader (); + ~LtePdcpHeader () override; /** * \brief Set DC bit @@ -84,11 +84,11 @@ public: * \return the object TypeId */ static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId () const; - virtual void Print (std::ostream &os) const; - virtual uint32_t GetSerializedSize () const; - virtual void Serialize (Buffer::Iterator start) const; - virtual uint32_t Deserialize (Buffer::Iterator start); + TypeId GetInstanceTypeId () const override; + void Print (std::ostream &os) const override; + uint32_t GetSerializedSize () const override; + void Serialize (Buffer::Iterator start) const override; + uint32_t Deserialize (Buffer::Iterator start) override; private: uint8_t m_dcBit; ///< the DC bit diff --git a/src/lte/model/lte-pdcp-sap.h b/src/lte/model/lte-pdcp-sap.h index 85e35d5e4..7e5b6d2e0 100644 --- a/src/lte/model/lte-pdcp-sap.h +++ b/src/lte/model/lte-pdcp-sap.h @@ -103,7 +103,7 @@ public: LtePdcpSpecificLtePdcpSapProvider (C* pdcp); // Interface implemented from LtePdcpSapProvider - virtual void TransmitPdcpSdu (TransmitPdcpSduParameters params); + void TransmitPdcpSdu (TransmitPdcpSduParameters params) override; private: LtePdcpSpecificLtePdcpSapProvider (); @@ -141,7 +141,7 @@ public: LtePdcpSpecificLtePdcpSapUser (C* rrc); // Interface implemented from LtePdcpSapUser - virtual void ReceivePdcpSdu (ReceivePdcpSduParameters params); + void ReceivePdcpSdu (ReceivePdcpSduParameters params) override; private: LtePdcpSpecificLtePdcpSapUser (); diff --git a/src/lte/model/lte-pdcp-tag.h b/src/lte/model/lte-pdcp-tag.h index dfb57b16f..33aecf52a 100644 --- a/src/lte/model/lte-pdcp-tag.h +++ b/src/lte/model/lte-pdcp-tag.h @@ -42,7 +42,7 @@ public: * \return the object TypeId */ static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * Create an empty PDCP tag @@ -54,10 +54,10 @@ public: */ PdcpTag (Time senderTimestamp); - virtual void Serialize (TagBuffer i) const; - virtual void Deserialize (TagBuffer i); - virtual uint32_t GetSerializedSize () const; - virtual void Print (std::ostream &os) const; + void Serialize (TagBuffer i) const override; + void Deserialize (TagBuffer i) override; + uint32_t GetSerializedSize () const override; + void Print (std::ostream &os) const override; /** * Get the instant when the PDCP delivers the PDU to the MAC SAP provider diff --git a/src/lte/model/lte-pdcp.cc b/src/lte/model/lte-pdcp.cc index 3f7349e24..4e03e7cdd 100644 --- a/src/lte/model/lte-pdcp.cc +++ b/src/lte/model/lte-pdcp.cc @@ -42,7 +42,7 @@ public: LtePdcpSpecificLteRlcSapUser (LtePdcp* pdcp); // Interface provided to lower RLC entity (implemented from LteRlcSapUser) - virtual void ReceivePdcpPdu (Ptr p); + void ReceivePdcpPdu (Ptr p) override; private: LtePdcpSpecificLteRlcSapUser (); diff --git a/src/lte/model/lte-pdcp.h b/src/lte/model/lte-pdcp.h index efdb18df7..606de8249 100644 --- a/src/lte/model/lte-pdcp.h +++ b/src/lte/model/lte-pdcp.h @@ -42,13 +42,13 @@ class LtePdcp : public Object // SimpleRefCount friend class LtePdcpSpecificLtePdcpSapProvider; public: LtePdcp (); - virtual ~LtePdcp (); + ~LtePdcp () override; /** * \brief Get the type ID. * \return the object TypeId */ static TypeId GetTypeId (); - virtual void DoDispose (); + void DoDispose () override; /** * diff --git a/src/lte/model/lte-phy-tag.h b/src/lte/model/lte-phy-tag.h index 769f3c3ab..128d40537 100644 --- a/src/lte/model/lte-phy-tag.h +++ b/src/lte/model/lte-phy-tag.h @@ -36,7 +36,7 @@ public: * \return the object TypeId */ static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * Create an empty LtePhyTag @@ -50,12 +50,12 @@ public: LtePhyTag (uint16_t cellId); - virtual ~LtePhyTag (); + ~LtePhyTag () override; - virtual void Serialize (TagBuffer i) const; - virtual void Deserialize (TagBuffer i); - virtual uint32_t GetSerializedSize () const; - virtual void Print (std::ostream &os) const; + void Serialize (TagBuffer i) const override; + void Deserialize (TagBuffer i) override; + uint32_t GetSerializedSize () const override; + void Print (std::ostream &os) const override; /** * Get cell ID diff --git a/src/lte/model/lte-phy.h b/src/lte/model/lte-phy.h index 3c503a012..550b59657 100644 --- a/src/lte/model/lte-phy.h +++ b/src/lte/model/lte-phy.h @@ -65,7 +65,7 @@ public: */ LtePhy (Ptr dlPhy, Ptr ulPhy); - virtual ~LtePhy (); + ~LtePhy () override; /** * \brief Get the type ID. @@ -122,7 +122,7 @@ public: */ virtual Ptr CreateTxPowerSpectralDensity () = 0; - void DoDispose (); + void DoDispose () override; /** * \param tti transmission time interval diff --git a/src/lte/model/lte-radio-bearer-info.h b/src/lte/model/lte-radio-bearer-info.h index eaaa98b8b..6965adef3 100644 --- a/src/lte/model/lte-radio-bearer-info.h +++ b/src/lte/model/lte-radio-bearer-info.h @@ -41,7 +41,7 @@ class LteRadioBearerInfo : public Object public: LteRadioBearerInfo (); - virtual ~LteRadioBearerInfo (); + ~LteRadioBearerInfo () override; /** * \brief Get the type ID. * \return the object TypeId diff --git a/src/lte/model/lte-radio-bearer-tag.h b/src/lte/model/lte-radio-bearer-tag.h index 6800f75bd..4ea630ace 100644 --- a/src/lte/model/lte-radio-bearer-tag.h +++ b/src/lte/model/lte-radio-bearer-tag.h @@ -39,7 +39,7 @@ public: * \return the object TypeId */ static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * Create an empty LteRadioBearerTag @@ -83,10 +83,10 @@ public: void SetLayer (uint8_t layer); - virtual void Serialize (TagBuffer i) const; - virtual void Deserialize (TagBuffer i); - virtual uint32_t GetSerializedSize () const; - virtual void Print (std::ostream &os) const; + void Serialize (TagBuffer i) const override; + void Deserialize (TagBuffer i) override; + uint32_t GetSerializedSize () const override; + void Print (std::ostream &os) const override; /** * Get RNTI function diff --git a/src/lte/model/lte-rlc-am-header.h b/src/lte/model/lte-rlc-am-header.h index b90e47c0e..6848d1b74 100644 --- a/src/lte/model/lte-rlc-am-header.h +++ b/src/lte/model/lte-rlc-am-header.h @@ -46,7 +46,7 @@ public: * Creates a null header */ LteRlcAmHeader (); - ~LteRlcAmHeader (); + ~LteRlcAmHeader () override; /// Set data PDU function void SetDataPdu (); @@ -251,11 +251,11 @@ public: * \return the object TypeId */ static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId () const; - virtual void Print (std::ostream &os) const; - virtual uint32_t GetSerializedSize () const; - virtual void Serialize (Buffer::Iterator start) const; - virtual uint32_t Deserialize (Buffer::Iterator start); + TypeId GetInstanceTypeId () const override; + void Print (std::ostream &os) const override; + uint32_t GetSerializedSize () const override; + void Serialize (Buffer::Iterator start) const override; + uint32_t Deserialize (Buffer::Iterator start) override; /** * diff --git a/src/lte/model/lte-rlc-am.h b/src/lte/model/lte-rlc-am.h index 1d9733821..cceba83c4 100644 --- a/src/lte/model/lte-rlc-am.h +++ b/src/lte/model/lte-rlc-am.h @@ -37,32 +37,32 @@ class LteRlcAm : public LteRlc { public: LteRlcAm (); - virtual ~LteRlcAm (); + ~LteRlcAm () override; /** * \brief Get the type ID. * \return the object TypeId */ static TypeId GetTypeId (); - virtual void DoDispose (); + void DoDispose () override; /** * RLC SAP * * \param p packet */ - virtual void DoTransmitPdcpPdu (Ptr p); + void DoTransmitPdcpPdu (Ptr p) override; /** * MAC SAP * * \param txOpParams the LteMacSapUser::TxOpportunityParameters */ - virtual void DoNotifyTxOpportunity (LteMacSapUser::TxOpportunityParameters txOpParams); + void DoNotifyTxOpportunity (LteMacSapUser::TxOpportunityParameters txOpParams) override; /** * Notify HARQ delivery failure */ - virtual void DoNotifyHarqDeliveryFailure (); - virtual void DoReceivePdu (LteMacSapUser::ReceivePduParameters rxPduParams); + void DoNotifyHarqDeliveryFailure () override; + void DoReceivePdu (LteMacSapUser::ReceivePduParameters rxPduParams) override; private: /** diff --git a/src/lte/model/lte-rlc-header.h b/src/lte/model/lte-rlc-header.h index d5fa50105..b228c244f 100644 --- a/src/lte/model/lte-rlc-header.h +++ b/src/lte/model/lte-rlc-header.h @@ -46,7 +46,7 @@ public: * Creates a null header */ LteRlcHeader (); - ~LteRlcHeader (); + ~LteRlcHeader () override; /** * Set framing info @@ -124,11 +124,11 @@ public: * \return the object TypeId */ static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId () const; - virtual void Print (std::ostream &os) const; - virtual uint32_t GetSerializedSize () const; - virtual void Serialize (Buffer::Iterator start) const; - virtual uint32_t Deserialize (Buffer::Iterator start); + TypeId GetInstanceTypeId () const override; + void Print (std::ostream &os) const override; + uint32_t GetSerializedSize () const override; + void Serialize (Buffer::Iterator start) const override; + uint32_t Deserialize (Buffer::Iterator start) override; private: uint16_t m_headerLength; ///< header length diff --git a/src/lte/model/lte-rlc-sap.h b/src/lte/model/lte-rlc-sap.h index 8b42fcc22..c82d0b78a 100644 --- a/src/lte/model/lte-rlc-sap.h +++ b/src/lte/model/lte-rlc-sap.h @@ -94,7 +94,7 @@ public: * Interface implemented from LteRlcSapProvider * \param params the TransmitPdcpPduParameters */ - virtual void TransmitPdcpPdu (TransmitPdcpPduParameters params); + void TransmitPdcpPdu (TransmitPdcpPduParameters params) override; private: LteRlcSpecificLteRlcSapProvider (); @@ -132,7 +132,7 @@ public: LteRlcSpecificLteRlcSapUser (C* pdcp); // Interface implemented from LteRlcSapUser - virtual void ReceivePdcpPdu (Ptr p); + void ReceivePdcpPdu (Ptr p) override; private: LteRlcSpecificLteRlcSapUser (); diff --git a/src/lte/model/lte-rlc-sdu-status-tag.h b/src/lte/model/lte-rlc-sdu-status-tag.h index 86a0cdec4..5ae4dbb05 100644 --- a/src/lte/model/lte-rlc-sdu-status-tag.h +++ b/src/lte/model/lte-rlc-sdu-status-tag.h @@ -54,11 +54,11 @@ public: * \return the object TypeId */ static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId () const; - virtual uint32_t GetSerializedSize () const; - virtual void Serialize (TagBuffer i) const; - virtual void Deserialize (TagBuffer i); - virtual void Print (std::ostream &os) const; + TypeId GetInstanceTypeId () const override; + uint32_t GetSerializedSize () const override; + void Serialize (TagBuffer i) const override; + void Deserialize (TagBuffer i) override; + void Print (std::ostream &os) const override; /// SduStatus_t typedef typedef enum { FULL_SDU = 1, diff --git a/src/lte/model/lte-rlc-tag.h b/src/lte/model/lte-rlc-tag.h index ef4723a84..88d77c016 100644 --- a/src/lte/model/lte-rlc-tag.h +++ b/src/lte/model/lte-rlc-tag.h @@ -41,7 +41,7 @@ public: * \return the object TypeId */ static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId () const; + TypeId GetInstanceTypeId () const override; /** * Create an empty RLC tag @@ -53,10 +53,10 @@ public: */ RlcTag (Time senderTimestamp); - virtual void Serialize (TagBuffer i) const; - virtual void Deserialize (TagBuffer i); - virtual uint32_t GetSerializedSize () const; - virtual void Print (std::ostream &os) const; + void Serialize (TagBuffer i) const override; + void Deserialize (TagBuffer i) override; + uint32_t GetSerializedSize () const override; + void Print (std::ostream &os) const override; /** * Get the instant when the RLC delivers the PDU to the MAC SAP provider diff --git a/src/lte/model/lte-rlc-tm.h b/src/lte/model/lte-rlc-tm.h index ff6b95c6e..353dca45c 100644 --- a/src/lte/model/lte-rlc-tm.h +++ b/src/lte/model/lte-rlc-tm.h @@ -40,32 +40,32 @@ class LteRlcTm : public LteRlc { public: LteRlcTm (); - virtual ~LteRlcTm (); + ~LteRlcTm () override; /** * \brief Get the type ID. * \return the object TypeId */ static TypeId GetTypeId (); - virtual void DoDispose (); + void DoDispose () override; /** * RLC SAP * * \param p packet */ - virtual void DoTransmitPdcpPdu (Ptr p); + void DoTransmitPdcpPdu (Ptr p) override; /** * MAC SAP * * \param txOpParams the LteMacSapUser::TxOpportunityParameters */ - virtual void DoNotifyTxOpportunity (LteMacSapUser::TxOpportunityParameters txOpParams); + void DoNotifyTxOpportunity (LteMacSapUser::TxOpportunityParameters txOpParams) override; /** * Notify HARQ deliver failure */ - virtual void DoNotifyHarqDeliveryFailure (); - virtual void DoReceivePdu (LteMacSapUser::ReceivePduParameters rxPduParams); + void DoNotifyHarqDeliveryFailure () override; + void DoReceivePdu (LteMacSapUser::ReceivePduParameters rxPduParams) override; private: /// Expire RBS timer function diff --git a/src/lte/model/lte-rlc-um.h b/src/lte/model/lte-rlc-um.h index 6140c06d1..4eb015a2b 100644 --- a/src/lte/model/lte-rlc-um.h +++ b/src/lte/model/lte-rlc-um.h @@ -36,29 +36,29 @@ class LteRlcUm : public LteRlc { public: LteRlcUm (); - virtual ~LteRlcUm (); + ~LteRlcUm () override; /** * \brief Get the type ID. * \return the object TypeId */ static TypeId GetTypeId (); - virtual void DoDispose (); + void DoDispose () override; /** * RLC SAP * * \param p packet */ - virtual void DoTransmitPdcpPdu (Ptr p); + void DoTransmitPdcpPdu (Ptr p) override; /** * MAC SAP * * \param txOpParams the LteMacSapUser::TxOpportunityParameters */ - virtual void DoNotifyTxOpportunity (LteMacSapUser::TxOpportunityParameters txOpParams); - virtual void DoNotifyHarqDeliveryFailure (); - virtual void DoReceivePdu (LteMacSapUser::ReceivePduParameters rxPduParams); + void DoNotifyTxOpportunity (LteMacSapUser::TxOpportunityParameters txOpParams) override; + void DoNotifyHarqDeliveryFailure () override; + void DoReceivePdu (LteMacSapUser::ReceivePduParameters rxPduParams) override; private: /// Expire reordering timer diff --git a/src/lte/model/lte-rlc.cc b/src/lte/model/lte-rlc.cc index 1b96286b8..ad7bb314f 100644 --- a/src/lte/model/lte-rlc.cc +++ b/src/lte/model/lte-rlc.cc @@ -44,9 +44,9 @@ public: LteRlcSpecificLteMacSapUser (LteRlc* rlc); // Interface implemented from LteMacSapUser - virtual void NotifyTxOpportunity (LteMacSapUser::TxOpportunityParameters params); - virtual void NotifyHarqDeliveryFailure (); - virtual void ReceivePdu (LteMacSapUser::ReceivePduParameters params); + void NotifyTxOpportunity (LteMacSapUser::TxOpportunityParameters params) override; + void NotifyHarqDeliveryFailure () override; + void ReceivePdu (LteMacSapUser::ReceivePduParameters params) override; private: LteRlcSpecificLteMacSapUser (); diff --git a/src/lte/model/lte-rlc.h b/src/lte/model/lte-rlc.h index 1214eddaf..2edd6a363 100644 --- a/src/lte/model/lte-rlc.h +++ b/src/lte/model/lte-rlc.h @@ -55,13 +55,13 @@ class LteRlc : public Object // SimpleRefCount friend class LteRlcSpecificLteRlcSapProvider; public: LteRlc (); - virtual ~LteRlc (); + ~LteRlc () override; /** * \brief Get the type ID. * \return the object TypeId */ static TypeId GetTypeId (); - virtual void DoDispose (); + void DoDispose () override; /** * @@ -198,19 +198,19 @@ class LteRlcSm : public LteRlc { public: LteRlcSm (); - virtual ~LteRlcSm (); + ~LteRlcSm () override; /** * \brief Get the type ID. * \return the object TypeId */ static TypeId GetTypeId (); - virtual void DoInitialize (); - virtual void DoDispose (); + void DoInitialize () override; + void DoDispose () override; - virtual void DoTransmitPdcpPdu (Ptr p); - virtual void DoNotifyTxOpportunity (LteMacSapUser::TxOpportunityParameters txOpParams); - virtual void DoNotifyHarqDeliveryFailure (); - virtual void DoReceivePdu (LteMacSapUser::ReceivePduParameters rxPduParams); + void DoTransmitPdcpPdu (Ptr p) override; + void DoNotifyTxOpportunity (LteMacSapUser::TxOpportunityParameters txOpParams) override; + void DoNotifyHarqDeliveryFailure () override; + void DoReceivePdu (LteMacSapUser::ReceivePduParameters rxPduParams) override; diff --git a/src/lte/model/lte-rrc-header.h b/src/lte/model/lte-rrc-header.h index 5a8148e9a..496ee0f0e 100644 --- a/src/lte/model/lte-rrc-header.h +++ b/src/lte/model/lte-rrc-header.h @@ -60,9 +60,9 @@ protected: */ static TypeId GetTypeId (); // Inherited from Asn1Header - virtual TypeId GetInstanceTypeId () const; - uint32_t Deserialize (Buffer::Iterator bIterator) = 0; - virtual void PreSerialize () const = 0; + TypeId GetInstanceTypeId () const override; + uint32_t Deserialize (Buffer::Iterator bIterator) override = 0; + void PreSerialize () const override = 0; // Auxiliary functions @@ -364,7 +364,7 @@ protected: * This function prints the object, for debugging purposes. * @param os The output stream to use (i.e. std::cout) */ - void Print (std::ostream &os) const; + void Print (std::ostream &os) const override; /** * This function prints RadioResourceConfigDedicated IE, for debugging purposes. * @param os The output stream to use (i.e. std::cout) @@ -385,12 +385,12 @@ class RrcUlDcchMessage : public RrcAsn1Header { public: RrcUlDcchMessage (); - ~RrcUlDcchMessage (); + ~RrcUlDcchMessage () override; // Inherited from RrcAsn1Header - uint32_t Deserialize (Buffer::Iterator bIterator); - void Print (std::ostream &os) const; - void PreSerialize () const; + uint32_t Deserialize (Buffer::Iterator bIterator) override; + void Print (std::ostream &os) const override; + void PreSerialize () const override; protected: /** @@ -416,12 +416,12 @@ class RrcDlDcchMessage : public RrcAsn1Header { public: RrcDlDcchMessage (); - ~RrcDlDcchMessage (); + ~RrcDlDcchMessage () override; // Inherited from RrcAsn1Header - uint32_t Deserialize (Buffer::Iterator bIterator); - void Print (std::ostream &os) const; - void PreSerialize () const; + uint32_t Deserialize (Buffer::Iterator bIterator) override; + void Print (std::ostream &os) const override; + void PreSerialize () const override; protected: /** @@ -447,12 +447,12 @@ class RrcUlCcchMessage : public RrcAsn1Header { public: RrcUlCcchMessage (); - ~RrcUlCcchMessage (); + ~RrcUlCcchMessage () override; // Inherited from RrcAsn1Header - uint32_t Deserialize (Buffer::Iterator bIterator); - void Print (std::ostream &os) const; - void PreSerialize () const; + uint32_t Deserialize (Buffer::Iterator bIterator) override; + void Print (std::ostream &os) const override; + void PreSerialize () const override; protected: /** @@ -478,12 +478,12 @@ class RrcDlCcchMessage : public RrcAsn1Header { public: RrcDlCcchMessage (); - ~RrcDlCcchMessage (); + ~RrcDlCcchMessage () override; // Inherited from RrcAsn1Header - uint32_t Deserialize (Buffer::Iterator bIterator); - void Print (std::ostream &os) const; - void PreSerialize () const; + uint32_t Deserialize (Buffer::Iterator bIterator) override; + void Print (std::ostream &os) const override; + void PreSerialize () const override; protected: /** @@ -508,7 +508,7 @@ class RrcConnectionRequestHeader : public RrcUlCcchMessage { public: RrcConnectionRequestHeader (); - ~RrcConnectionRequestHeader (); + ~RrcConnectionRequestHeader () override; /** * \brief Get the type ID. @@ -516,9 +516,9 @@ public: */ static TypeId GetTypeId (); // Inherited from RrcAsn1Header - void PreSerialize () const; - uint32_t Deserialize (Buffer::Iterator bIterator); - void Print (std::ostream &os) const; + void PreSerialize () const override; + uint32_t Deserialize (Buffer::Iterator bIterator) override; + void Print (std::ostream &os) const override; /** * Receives a RrcConnectionRequest IE and stores the contents into the class attributes @@ -563,12 +563,12 @@ class RrcConnectionSetupHeader : public RrcDlCcchMessage { public: RrcConnectionSetupHeader (); - ~RrcConnectionSetupHeader (); + ~RrcConnectionSetupHeader () override; // Inherited from RrcAsn1Header - void PreSerialize () const; - uint32_t Deserialize (Buffer::Iterator bIterator); - void Print (std::ostream &os) const; + void PreSerialize () const override; + uint32_t Deserialize (Buffer::Iterator bIterator) override; + void Print (std::ostream &os) const override; /** * Receives a RrcConnectionSetup IE and stores the contents into the class attributes @@ -636,12 +636,12 @@ class RrcConnectionSetupCompleteHeader : public RrcUlDcchMessage { public: RrcConnectionSetupCompleteHeader (); - ~RrcConnectionSetupCompleteHeader (); + ~RrcConnectionSetupCompleteHeader () override; // Inherited from RrcAsn1Header - void PreSerialize () const; - uint32_t Deserialize (Buffer::Iterator bIterator); - void Print (std::ostream &os) const; + void PreSerialize () const override; + uint32_t Deserialize (Buffer::Iterator bIterator) override; + void Print (std::ostream &os) const override; /** * Receives a RrcConnectionSetupCompleted IE and stores the contents into the class attributes @@ -673,12 +673,12 @@ class RrcConnectionReconfigurationCompleteHeader : public RrcUlDcchMessage { public: RrcConnectionReconfigurationCompleteHeader (); - ~RrcConnectionReconfigurationCompleteHeader (); + ~RrcConnectionReconfigurationCompleteHeader () override; // Inherited from RrcAsn1Header - void PreSerialize () const; - uint32_t Deserialize (Buffer::Iterator bIterator); - void Print (std::ostream &os) const; + void PreSerialize () const override; + uint32_t Deserialize (Buffer::Iterator bIterator) override; + void Print (std::ostream &os) const override; /** * Receives a RrcConnectionReconfigurationCompleted IE and stores the contents into the class attributes @@ -710,12 +710,12 @@ class RrcConnectionReconfigurationHeader : public RrcDlDcchMessage { public: RrcConnectionReconfigurationHeader (); - ~RrcConnectionReconfigurationHeader (); + ~RrcConnectionReconfigurationHeader () override; // Inherited from RrcAsn1Header - void PreSerialize () const; - uint32_t Deserialize (Buffer::Iterator bIterator); - void Print (std::ostream &os) const; + void PreSerialize () const override; + uint32_t Deserialize (Buffer::Iterator bIterator) override; + void Print (std::ostream &os) const override; /** * Receives a RrcConnectionReconfiguration IE and stores the contents into the class attributes @@ -840,9 +840,9 @@ public: HandoverPreparationInfoHeader (); // Inherited from RrcAsn1Header - void PreSerialize () const; - uint32_t Deserialize (Buffer::Iterator bIterator); - void Print (std::ostream &os) const; + void PreSerialize () const override; + uint32_t Deserialize (Buffer::Iterator bIterator) override; + void Print (std::ostream &os) const override; /** * Receives a HandoverPreparationInfo IE and stores the contents into the class attributes @@ -873,12 +873,12 @@ class RrcConnectionReestablishmentRequestHeader : public RrcUlCcchMessage { public: RrcConnectionReestablishmentRequestHeader (); - ~RrcConnectionReestablishmentRequestHeader (); + ~RrcConnectionReestablishmentRequestHeader () override; // Inherited from RrcAsn1Header - void PreSerialize () const; - uint32_t Deserialize (Buffer::Iterator bIterator); - void Print (std::ostream &os) const; + void PreSerialize () const override; + uint32_t Deserialize (Buffer::Iterator bIterator) override; + void Print (std::ostream &os) const override; /** * Receives a RrcConnectionReestablishmentRequest IE and stores the contents into the class attributes @@ -916,12 +916,12 @@ class RrcConnectionReestablishmentHeader : public RrcDlCcchMessage { public: RrcConnectionReestablishmentHeader (); - ~RrcConnectionReestablishmentHeader (); + ~RrcConnectionReestablishmentHeader () override; // Inherited from RrcAsn1Header - void PreSerialize () const; - uint32_t Deserialize (Buffer::Iterator bIterator); - void Print (std::ostream &os) const; + void PreSerialize () const override; + uint32_t Deserialize (Buffer::Iterator bIterator) override; + void Print (std::ostream &os) const override; /** * Receives a RrcConnectionReestablishment IE and stores the contents into the class attributes @@ -961,9 +961,9 @@ public: RrcConnectionReestablishmentCompleteHeader (); // Inherited from RrcAsn1Header - void PreSerialize () const; - uint32_t Deserialize (Buffer::Iterator bIterator); - void Print (std::ostream &os) const; + void PreSerialize () const override; + uint32_t Deserialize (Buffer::Iterator bIterator) override; + void Print (std::ostream &os) const override; /** * Receives a RrcConnectionReestablishmentComplete IE and stores the contents into the class attributes @@ -994,12 +994,12 @@ class RrcConnectionReestablishmentRejectHeader : public RrcDlCcchMessage { public: RrcConnectionReestablishmentRejectHeader (); - ~RrcConnectionReestablishmentRejectHeader (); + ~RrcConnectionReestablishmentRejectHeader () override; // Inherited from RrcAsn1Header - void PreSerialize () const; - uint32_t Deserialize (Buffer::Iterator bIterator); - void Print (std::ostream &os) const; + void PreSerialize () const override; + uint32_t Deserialize (Buffer::Iterator bIterator) override; + void Print (std::ostream &os) const override; /** * Receives a RrcConnectionReestablishmentReject IE and stores the contents into the class attributes @@ -1024,12 +1024,12 @@ class RrcConnectionReleaseHeader : public RrcDlDcchMessage { public: RrcConnectionReleaseHeader (); - ~RrcConnectionReleaseHeader (); + ~RrcConnectionReleaseHeader () override; // Inherited from RrcAsn1Header - void PreSerialize () const; - uint32_t Deserialize (Buffer::Iterator bIterator); - void Print (std::ostream &os) const; + void PreSerialize () const override; + uint32_t Deserialize (Buffer::Iterator bIterator) override; + void Print (std::ostream &os) const override; /** * Receives a RrcConnectionRelease IE and stores the contents into the class attributes @@ -1054,12 +1054,12 @@ class RrcConnectionRejectHeader : public RrcDlCcchMessage { public: RrcConnectionRejectHeader (); - ~RrcConnectionRejectHeader (); + ~RrcConnectionRejectHeader () override; // Inherited from RrcAsn1Header - void PreSerialize () const; - uint32_t Deserialize (Buffer::Iterator bIterator); - void Print (std::ostream &os) const; + void PreSerialize () const override; + uint32_t Deserialize (Buffer::Iterator bIterator) override; + void Print (std::ostream &os) const override; /** * Receives a RrcConnectionReject IE and stores the contents into the class attributes @@ -1084,12 +1084,12 @@ class MeasurementReportHeader : public RrcUlDcchMessage { public: MeasurementReportHeader (); - ~MeasurementReportHeader (); + ~MeasurementReportHeader () override; // Inherited from RrcAsn1Header - void PreSerialize () const; - uint32_t Deserialize (Buffer::Iterator bIterator); - void Print (std::ostream &os) const; + void PreSerialize () const override; + uint32_t Deserialize (Buffer::Iterator bIterator) override; + void Print (std::ostream &os) const override; /** * Receives a MeasurementReport IE and stores the contents into the class attributes diff --git a/src/lte/model/lte-rrc-protocol-ideal.cc b/src/lte/model/lte-rrc-protocol-ideal.cc index afddcfbd1..e3747f389 100644 --- a/src/lte/model/lte-rrc-protocol-ideal.cc +++ b/src/lte/model/lte-rrc-protocol-ideal.cc @@ -480,11 +480,11 @@ public: * \return the object TypeId */ static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId () const; - virtual void Print (std::ostream &os) const; - virtual uint32_t GetSerializedSize () const; - virtual void Serialize (Buffer::Iterator start) const; - virtual uint32_t Deserialize (Buffer::Iterator start); + TypeId GetInstanceTypeId () const override; + void Print (std::ostream &os) const override; + uint32_t GetSerializedSize () const override; + void Serialize (Buffer::Iterator start) const override; + uint32_t Deserialize (Buffer::Iterator start) override; private: uint32_t m_msgId; ///< message ID @@ -601,11 +601,11 @@ public: * \return the object TypeId */ static TypeId GetTypeId (); - virtual TypeId GetInstanceTypeId () const; - virtual void Print (std::ostream &os) const; - virtual uint32_t GetSerializedSize () const; - virtual void Serialize (Buffer::Iterator start) const; - virtual uint32_t Deserialize (Buffer::Iterator start); + TypeId GetInstanceTypeId () const override; + void Print (std::ostream &os) const override; + uint32_t GetSerializedSize () const override; + void Serialize (Buffer::Iterator start) const override; + uint32_t Deserialize (Buffer::Iterator start) override; private: uint32_t m_msgId; ///< message ID diff --git a/src/lte/model/lte-rrc-protocol-ideal.h b/src/lte/model/lte-rrc-protocol-ideal.h index ee2f48c10..ac5d18b93 100644 --- a/src/lte/model/lte-rrc-protocol-ideal.h +++ b/src/lte/model/lte-rrc-protocol-ideal.h @@ -53,10 +53,10 @@ class LteUeRrcProtocolIdeal : public Object public: LteUeRrcProtocolIdeal (); - virtual ~LteUeRrcProtocolIdeal (); + ~LteUeRrcProtocolIdeal () override; // inherited from Object - virtual void DoDispose (); + void DoDispose () override; /** * \brief Get the type ID. * \return the object TypeId @@ -167,10 +167,10 @@ class LteEnbRrcProtocolIdeal : public Object public: LteEnbRrcProtocolIdeal (); - virtual ~LteEnbRrcProtocolIdeal (); + ~LteEnbRrcProtocolIdeal () override; // inherited from Object - virtual void DoDispose (); + void DoDispose () override; /** * \brief Get the type ID. * \return the object TypeId diff --git a/src/lte/model/lte-rrc-protocol-real.h b/src/lte/model/lte-rrc-protocol-real.h index 3614e0bdf..f6af69e8f 100644 --- a/src/lte/model/lte-rrc-protocol-real.h +++ b/src/lte/model/lte-rrc-protocol-real.h @@ -61,10 +61,10 @@ class LteUeRrcProtocolReal : public Object public: LteUeRrcProtocolReal (); - virtual ~LteUeRrcProtocolReal (); + ~LteUeRrcProtocolReal () override; // inherited from Object - virtual void DoDispose (); + void DoDispose () override; /** * \brief Get the type ID. * \return the object TypeId @@ -194,10 +194,10 @@ class LteEnbRrcProtocolReal : public Object public: LteEnbRrcProtocolReal (); - virtual ~LteEnbRrcProtocolReal (); + ~LteEnbRrcProtocolReal () override; // inherited from Object - virtual void DoDispose (); + void DoDispose () override; /** * \brief Get the type ID. * \return the object TypeId @@ -377,7 +377,7 @@ public: RealProtocolRlcSapUser (LteEnbRrcProtocolReal* pdcp, uint16_t rnti); // Interface implemented from LteRlcSapUser - virtual void ReceivePdcpPdu (Ptr p); + void ReceivePdcpPdu (Ptr p) override; private: RealProtocolRlcSapUser (); diff --git a/src/lte/model/lte-rrc-sap.h b/src/lte/model/lte-rrc-sap.h index bea195dc7..27eb759d2 100644 --- a/src/lte/model/lte-rrc-sap.h +++ b/src/lte/model/lte-rrc-sap.h @@ -1313,14 +1313,14 @@ public: MemberLteUeRrcSapUser (C* owner); // inherited from LteUeRrcSapUser - virtual void Setup (SetupParameters params); - virtual void SendRrcConnectionRequest (RrcConnectionRequest msg); - virtual void SendRrcConnectionSetupCompleted (RrcConnectionSetupCompleted msg); - virtual void SendRrcConnectionReconfigurationCompleted (RrcConnectionReconfigurationCompleted msg); - virtual void SendRrcConnectionReestablishmentRequest (RrcConnectionReestablishmentRequest msg); - virtual void SendRrcConnectionReestablishmentComplete (RrcConnectionReestablishmentComplete msg); - virtual void SendMeasurementReport (MeasurementReport msg); - virtual void SendIdealUeContextRemoveRequest (uint16_t rnti); + void Setup (SetupParameters params) override; + void SendRrcConnectionRequest (RrcConnectionRequest msg) override; + void SendRrcConnectionSetupCompleted (RrcConnectionSetupCompleted msg) override; + void SendRrcConnectionReconfigurationCompleted (RrcConnectionReconfigurationCompleted msg) override; + void SendRrcConnectionReestablishmentRequest (RrcConnectionReestablishmentRequest msg) override; + void SendRrcConnectionReestablishmentComplete (RrcConnectionReestablishmentComplete msg) override; + void SendMeasurementReport (MeasurementReport msg) override; + void SendIdealUeContextRemoveRequest (uint16_t rnti) override; private: MemberLteUeRrcSapUser (); @@ -1411,14 +1411,14 @@ public: MemberLteUeRrcSapProvider (C* owner); // methods inherited from LteUeRrcSapProvider go here - virtual void CompleteSetup (CompleteSetupParameters params); - virtual void RecvSystemInformation (SystemInformation msg); - virtual void RecvRrcConnectionSetup (RrcConnectionSetup msg); - virtual void RecvRrcConnectionReconfiguration (RrcConnectionReconfiguration msg); - virtual void RecvRrcConnectionReestablishment (RrcConnectionReestablishment msg); - virtual void RecvRrcConnectionReestablishmentReject (RrcConnectionReestablishmentReject msg); - virtual void RecvRrcConnectionRelease (RrcConnectionRelease msg); - virtual void RecvRrcConnectionReject (RrcConnectionReject msg); + void CompleteSetup (CompleteSetupParameters params) override; + void RecvSystemInformation (SystemInformation msg) override; + void RecvRrcConnectionSetup (RrcConnectionSetup msg) override; + void RecvRrcConnectionReconfiguration (RrcConnectionReconfiguration msg) override; + void RecvRrcConnectionReestablishment (RrcConnectionReestablishment msg) override; + void RecvRrcConnectionReestablishmentReject (RrcConnectionReestablishmentReject msg) override; + void RecvRrcConnectionRelease (RrcConnectionRelease msg) override; + void RecvRrcConnectionReject (RrcConnectionReject msg) override; private: MemberLteUeRrcSapProvider (); @@ -1511,19 +1511,19 @@ public: // inherited from LteEnbRrcSapUser - virtual void SetupUe (uint16_t rnti, SetupUeParameters params); - virtual void RemoveUe (uint16_t rnti); - virtual void SendSystemInformation (uint16_t cellId, SystemInformation msg); - virtual void SendRrcConnectionSetup (uint16_t rnti, RrcConnectionSetup msg); - virtual void SendRrcConnectionReconfiguration (uint16_t rnti, RrcConnectionReconfiguration msg); - virtual void SendRrcConnectionReestablishment (uint16_t rnti, RrcConnectionReestablishment msg); - virtual void SendRrcConnectionReestablishmentReject (uint16_t rnti, RrcConnectionReestablishmentReject msg); - virtual void SendRrcConnectionRelease (uint16_t rnti, RrcConnectionRelease msg); - virtual void SendRrcConnectionReject (uint16_t rnti, RrcConnectionReject msg); - virtual Ptr EncodeHandoverPreparationInformation (HandoverPreparationInfo msg); - virtual HandoverPreparationInfo DecodeHandoverPreparationInformation (Ptr p); - virtual Ptr EncodeHandoverCommand (RrcConnectionReconfiguration msg); - virtual RrcConnectionReconfiguration DecodeHandoverCommand (Ptr p); + void SetupUe (uint16_t rnti, SetupUeParameters params) override; + void RemoveUe (uint16_t rnti) override; + void SendSystemInformation (uint16_t cellId, SystemInformation msg) override; + void SendRrcConnectionSetup (uint16_t rnti, RrcConnectionSetup msg) override; + void SendRrcConnectionReconfiguration (uint16_t rnti, RrcConnectionReconfiguration msg) override; + void SendRrcConnectionReestablishment (uint16_t rnti, RrcConnectionReestablishment msg) override; + void SendRrcConnectionReestablishmentReject (uint16_t rnti, RrcConnectionReestablishmentReject msg) override; + void SendRrcConnectionRelease (uint16_t rnti, RrcConnectionRelease msg) override; + void SendRrcConnectionReject (uint16_t rnti, RrcConnectionReject msg) override; + Ptr EncodeHandoverPreparationInformation (HandoverPreparationInfo msg) override; + HandoverPreparationInfo DecodeHandoverPreparationInformation (Ptr p) override; + Ptr EncodeHandoverCommand (RrcConnectionReconfiguration msg) override; + RrcConnectionReconfiguration DecodeHandoverCommand (Ptr p) override; private: MemberLteEnbRrcSapUser (); @@ -1651,14 +1651,14 @@ public: // methods inherited from LteEnbRrcSapProvider go here - virtual void CompleteSetupUe (uint16_t rnti, CompleteSetupUeParameters params); - virtual void RecvRrcConnectionRequest (uint16_t rnti, RrcConnectionRequest msg); - virtual void RecvRrcConnectionSetupCompleted (uint16_t rnti, RrcConnectionSetupCompleted msg); - virtual void RecvRrcConnectionReconfigurationCompleted (uint16_t rnti, RrcConnectionReconfigurationCompleted msg); - virtual void RecvRrcConnectionReestablishmentRequest (uint16_t rnti, RrcConnectionReestablishmentRequest msg); - virtual void RecvRrcConnectionReestablishmentComplete (uint16_t rnti, RrcConnectionReestablishmentComplete msg); - virtual void RecvMeasurementReport (uint16_t rnti, MeasurementReport msg); - virtual void RecvIdealUeContextRemoveRequest (uint16_t rnti); + void CompleteSetupUe (uint16_t rnti, CompleteSetupUeParameters params) override; + void RecvRrcConnectionRequest (uint16_t rnti, RrcConnectionRequest msg) override; + void RecvRrcConnectionSetupCompleted (uint16_t rnti, RrcConnectionSetupCompleted msg) override; + void RecvRrcConnectionReconfigurationCompleted (uint16_t rnti, RrcConnectionReconfigurationCompleted msg) override; + void RecvRrcConnectionReestablishmentRequest (uint16_t rnti, RrcConnectionReestablishmentRequest msg) override; + void RecvRrcConnectionReestablishmentComplete (uint16_t rnti, RrcConnectionReestablishmentComplete msg) override; + void RecvMeasurementReport (uint16_t rnti, MeasurementReport msg) override; + void RecvIdealUeContextRemoveRequest (uint16_t rnti) override; private: MemberLteEnbRrcSapProvider (); diff --git a/src/lte/model/lte-spectrum-phy.h b/src/lte/model/lte-spectrum-phy.h index 7ee4b4b54..9a3616047 100644 --- a/src/lte/model/lte-spectrum-phy.h +++ b/src/lte/model/lte-spectrum-phy.h @@ -155,7 +155,7 @@ class LteSpectrumPhy : public SpectrumPhy public: LteSpectrumPhy (); - virtual ~LteSpectrumPhy (); + ~LteSpectrumPhy () override; /** * PHY states @@ -171,17 +171,17 @@ public: */ static TypeId GetTypeId (); // inherited from Object - virtual void DoDispose (); + void DoDispose () override; // inherited from SpectrumPhy - void SetChannel (Ptr c); - void SetMobility (Ptr m); - void SetDevice (Ptr d); - Ptr GetMobility () const; - Ptr GetDevice () const; - Ptr GetRxSpectrumModel () const; - Ptr GetAntenna () const; - void StartRx (Ptr params); + void SetChannel (Ptr c) override; + void SetMobility (Ptr m) override; + void SetDevice (Ptr d) override; + Ptr GetMobility () const override; + Ptr GetDevice () const override; + Ptr GetRxSpectrumModel () const override; + Ptr GetAntenna () const override; + void StartRx (Ptr params) override; /** * \brief Start receive data function * \param params Ptr diff --git a/src/lte/model/lte-ue-ccm-rrc-sap.h b/src/lte/model/lte-ue-ccm-rrc-sap.h index a268feae2..bd318a984 100644 --- a/src/lte/model/lte-ue-ccm-rrc-sap.h +++ b/src/lte/model/lte-ue-ccm-rrc-sap.h @@ -114,11 +114,11 @@ public: MemberLteUeCcmRrcSapProvider (C* owner); // inherited from LteUeCcmRrcSapProvider - virtual std::vector RemoveLc (uint8_t lcid); - virtual void Reset (); - virtual std::vector AddLc (uint8_t lcId, LteUeCmacSapProvider::LogicalChannelConfig lcConfig, LteMacSapUser* msu); - virtual void NotifyConnectionReconfigurationMsg (); - virtual LteMacSapUser* ConfigureSignalBearer (uint8_t lcid, LteUeCmacSapProvider::LogicalChannelConfig lcConfig, LteMacSapUser* msu); + std::vector RemoveLc (uint8_t lcid) override; + void Reset () override; + std::vector AddLc (uint8_t lcId, LteUeCmacSapProvider::LogicalChannelConfig lcConfig, LteMacSapUser* msu) override; + void NotifyConnectionReconfigurationMsg () override; + LteMacSapUser* ConfigureSignalBearer (uint8_t lcid, LteUeCmacSapProvider::LogicalChannelConfig lcConfig, LteMacSapUser* msu) override; private: C* m_owner; ///< the owner class @@ -204,8 +204,8 @@ public: */ MemberLteUeCcmRrcSapUser (C* owner); //inherited from LteUeCcmRrcSapUser - virtual void ComponentCarrierEnabling (std::vector componentCarrierList); - virtual void SetNumberOfComponentCarriers (uint16_t noOfComponentCarriers); + void ComponentCarrierEnabling (std::vector componentCarrierList) override; + void SetNumberOfComponentCarriers (uint16_t noOfComponentCarriers) override; private: C* m_owner; ///< the owner class diff --git a/src/lte/model/lte-ue-component-carrier-manager.h b/src/lte/model/lte-ue-component-carrier-manager.h index 0bc88f425..c726562ef 100644 --- a/src/lte/model/lte-ue-component-carrier-manager.h +++ b/src/lte/model/lte-ue-component-carrier-manager.h @@ -52,7 +52,7 @@ class LteUeComponentCarrierManager : public Object public: LteUeComponentCarrierManager (); - virtual ~LteUeComponentCarrierManager (); + ~LteUeComponentCarrierManager () override; /** * \brief Get the type ID. @@ -99,7 +99,7 @@ public: protected: // inherited from Object - virtual void DoDispose (); + void DoDispose () override; LteUeCcmRrcSapUser* m_ccmRrcSapUser;//!< Interface to the UE RRC instance. LteUeCcmRrcSapProvider* m_ccmRrcSapProvider; //!< Receive API calls from the UE RRC instance. diff --git a/src/lte/model/lte-ue-cphy-sap.h b/src/lte/model/lte-ue-cphy-sap.h index 80b65f322..9e967fade 100644 --- a/src/lte/model/lte-ue-cphy-sap.h +++ b/src/lte/model/lte-ue-cphy-sap.h @@ -324,24 +324,24 @@ public: MemberLteUeCphySapProvider (C* owner); // inherited from LteUeCphySapProvider - virtual void Reset (); - virtual void StartCellSearch (uint32_t dlEarfcn); - virtual void SynchronizeWithEnb (uint16_t cellId); - virtual void SynchronizeWithEnb (uint16_t cellId, uint32_t dlEarfcn); - virtual uint16_t GetCellId (); - virtual uint32_t GetDlEarfcn (); - virtual void SetDlBandwidth (uint16_t dlBandwidth); - virtual void ConfigureUplink (uint32_t ulEarfcn, uint16_t ulBandwidth); - virtual void ConfigureReferenceSignalPower (int8_t referenceSignalPower); - virtual void SetRnti (uint16_t rnti); - virtual void SetTransmissionMode (uint8_t txMode); - virtual void SetSrsConfigurationIndex (uint16_t srcCi); - virtual void SetPa (double pa); - virtual void SetRsrpFilterCoefficient (uint8_t rsrpFilterCoefficient); - virtual void ResetPhyAfterRlf (); - virtual void ResetRlfParams (); - virtual void StartInSnycDetection (); - virtual void SetImsi (uint64_t imsi); + void Reset () override; + void StartCellSearch (uint32_t dlEarfcn) override; + void SynchronizeWithEnb (uint16_t cellId) override; + void SynchronizeWithEnb (uint16_t cellId, uint32_t dlEarfcn) override; + uint16_t GetCellId () override; + uint32_t GetDlEarfcn () override; + void SetDlBandwidth (uint16_t dlBandwidth) override; + void ConfigureUplink (uint32_t ulEarfcn, uint16_t ulBandwidth) override; + void ConfigureReferenceSignalPower (int8_t referenceSignalPower) override; + void SetRnti (uint16_t rnti) override; + void SetTransmissionMode (uint8_t txMode) override; + void SetSrsConfigurationIndex (uint16_t srcCi) override; + void SetPa (double pa) override; + void SetRsrpFilterCoefficient (uint8_t rsrpFilterCoefficient) override; + void ResetPhyAfterRlf () override; + void ResetRlfParams () override; + void StartInSnycDetection () override; + void SetImsi (uint64_t imsi) override; private: MemberLteUeCphySapProvider (); @@ -501,14 +501,14 @@ public: MemberLteUeCphySapUser (C* owner); // methods inherited from LteUeCphySapUser go here - virtual void RecvMasterInformationBlock (uint16_t cellId, - LteRrcSap::MasterInformationBlock mib); - virtual void RecvSystemInformationBlockType1 (uint16_t cellId, - LteRrcSap::SystemInformationBlockType1 sib1); - virtual void ReportUeMeasurements (LteUeCphySapUser::UeMeasurementsParameters params); - virtual void NotifyOutOfSync (); - virtual void NotifyInSync (); - virtual void ResetSyncIndicationCounter (); + void RecvMasterInformationBlock (uint16_t cellId, + LteRrcSap::MasterInformationBlock mib) override; + void RecvSystemInformationBlockType1 (uint16_t cellId, + LteRrcSap::SystemInformationBlockType1 sib1) override; + void ReportUeMeasurements (LteUeCphySapUser::UeMeasurementsParameters params) override; + void NotifyOutOfSync () override; + void NotifyInSync () override; + void ResetSyncIndicationCounter () override; private: MemberLteUeCphySapUser (); diff --git a/src/lte/model/lte-ue-mac.cc b/src/lte/model/lte-ue-mac.cc index c2f0551af..67fd45c6a 100644 --- a/src/lte/model/lte-ue-mac.cc +++ b/src/lte/model/lte-ue-mac.cc @@ -60,15 +60,15 @@ public: UeMemberLteUeCmacSapProvider (LteUeMac* mac); // inherited from LteUeCmacSapProvider - virtual void ConfigureRach (RachConfig rc); - virtual void StartContentionBasedRandomAccessProcedure (); - virtual void StartNonContentionBasedRandomAccessProcedure (uint16_t rnti, uint8_t preambleId, uint8_t prachMask); - virtual void SetRnti (uint16_t rnti); - virtual void AddLc (uint8_t lcId, LteUeCmacSapProvider::LogicalChannelConfig lcConfig, LteMacSapUser* msu); - virtual void RemoveLc (uint8_t lcId); - virtual void Reset (); - virtual void NotifyConnectionSuccessful (); - virtual void SetImsi (uint64_t imsi); + void ConfigureRach (RachConfig rc) override; + void StartContentionBasedRandomAccessProcedure () override; + void StartNonContentionBasedRandomAccessProcedure (uint16_t rnti, uint8_t preambleId, uint8_t prachMask) override; + void SetRnti (uint16_t rnti) override; + void AddLc (uint8_t lcId, LteUeCmacSapProvider::LogicalChannelConfig lcConfig, LteMacSapUser* msu) override; + void RemoveLc (uint8_t lcId) override; + void Reset () override; + void NotifyConnectionSuccessful () override; + void SetImsi (uint64_t imsi) override; private: LteUeMac* m_mac; ///< the UE MAC @@ -147,8 +147,8 @@ public: UeMemberLteMacSapProvider (LteUeMac* mac); // inherited from LteMacSapProvider - virtual void TransmitPdu (TransmitPduParameters params); - virtual void ReportBufferStatus (ReportBufferStatusParameters params); + void TransmitPdu (TransmitPduParameters params) override; + void ReportBufferStatus (ReportBufferStatusParameters params) override; private: LteUeMac* m_mac; ///< the UE MAC @@ -189,9 +189,9 @@ public: UeMemberLteUePhySapUser (LteUeMac* mac); // inherited from LtePhySapUser - virtual void ReceivePhyPdu (Ptr p); - virtual void SubframeIndication (uint32_t frameNo, uint32_t subframeNo); - virtual void ReceiveLteControlMessage (Ptr msg); + void ReceivePhyPdu (Ptr p) override; + void SubframeIndication (uint32_t frameNo, uint32_t subframeNo) override; + void ReceiveLteControlMessage (Ptr msg) override; private: LteUeMac* m_mac; ///< the UE MAC diff --git a/src/lte/model/lte-ue-mac.h b/src/lte/model/lte-ue-mac.h index 6cc9bd49f..09e805722 100644 --- a/src/lte/model/lte-ue-mac.h +++ b/src/lte/model/lte-ue-mac.h @@ -58,8 +58,8 @@ public: static TypeId GetTypeId (); LteUeMac (); - virtual ~LteUeMac (); - virtual void DoDispose (); + ~LteUeMac () override; + void DoDispose () override; /** * \brief TracedCallback signature for RA response timeout events diff --git a/src/lte/model/lte-ue-net-device.h b/src/lte/model/lte-ue-net-device.h index cae2c58bf..5d67dd486 100644 --- a/src/lte/model/lte-ue-net-device.h +++ b/src/lte/model/lte-ue-net-device.h @@ -64,12 +64,12 @@ public: static TypeId GetTypeId (); LteUeNetDevice (); - virtual ~LteUeNetDevice (); - virtual void DoDispose (); + ~LteUeNetDevice () override; + void DoDispose () override; // inherited from NetDevice - virtual bool Send (Ptr packet, const Address& dest, uint16_t protocolNumber); + bool Send (Ptr packet, const Address& dest, uint16_t protocolNumber) override; /** * \brief Get the MAC. @@ -170,7 +170,7 @@ public: protected: // inherited from Object - virtual void DoInitialize (); + void DoInitialize () override; private: diff --git a/src/lte/model/lte-ue-phy.cc b/src/lte/model/lte-ue-phy.cc index e855ded28..f55a5b98a 100644 --- a/src/lte/model/lte-ue-phy.cc +++ b/src/lte/model/lte-ue-phy.cc @@ -85,10 +85,10 @@ public: UeMemberLteUePhySapProvider (LteUePhy* phy); // inherited from LtePhySapProvider - virtual void SendMacPdu (Ptr p); - virtual void SendLteControlMessage (Ptr msg); - virtual void SendRachPreamble (uint32_t prachId, uint32_t raRnti); - virtual void NotifyConnectionSuccessful (); + void SendMacPdu (Ptr p) override; + void SendLteControlMessage (Ptr msg) override; + void SendRachPreamble (uint32_t prachId, uint32_t raRnti) override; + void NotifyConnectionSuccessful () override; private: LteUePhy* m_phy; ///< the Phy diff --git a/src/lte/model/lte-ue-phy.h b/src/lte/model/lte-ue-phy.h index 233a51469..e953840b2 100644 --- a/src/lte/model/lte-ue-phy.h +++ b/src/lte/model/lte-ue-phy.h @@ -82,7 +82,7 @@ public: */ LteUePhy (Ptr dlPhy, Ptr ulPhy); - virtual ~LteUePhy (); + ~LteUePhy () override; /** * \brief Get the type ID. @@ -90,8 +90,8 @@ public: */ static TypeId GetTypeId (); // inherited from Object - virtual void DoInitialize (); - virtual void DoDispose (); + void DoInitialize () override; + void DoDispose () override; /** * \brief Get the PHY SAP provider @@ -183,7 +183,7 @@ public: * * \return the pointer to the PSD */ - virtual Ptr CreateTxPowerSpectralDensity (); + Ptr CreateTxPowerSpectralDensity () override; /** * \brief Set a list of sub channels to use in TX @@ -223,22 +223,22 @@ public: // inherited from LtePhy - virtual void GenerateCtrlCqiReport (const SpectrumValue& sinr); - virtual void GenerateDataCqiReport (const SpectrumValue& sinr); + void GenerateCtrlCqiReport (const SpectrumValue& sinr) override; + void GenerateDataCqiReport (const SpectrumValue& sinr) override; /** * \brief Create the mixed CQI report * * \param sinr SINR values vector */ virtual void GenerateMixedCqiReport (const SpectrumValue& sinr); - virtual void ReportInterference (const SpectrumValue& interf); + void ReportInterference (const SpectrumValue& interf) override; /** * \brief Create the mixed CQI report * * \param interf interference values vector */ virtual void ReportDataInterference (const SpectrumValue& interf); - virtual void ReportRsReceivedPower (const SpectrumValue& power); + void ReportRsReceivedPower (const SpectrumValue& power) override; // callbacks for LteSpectrumPhy /** @@ -641,7 +641,7 @@ private: double ComputeAvgSinr (const SpectrumValue& sinr); // UE PHY SAP methods - virtual void DoSendMacPdu (Ptr p); + void DoSendMacPdu (Ptr p) override; /** * \brief Send LTE control message function * diff --git a/src/lte/model/lte-ue-power-control.h b/src/lte/model/lte-ue-power-control.h index 7d6e8cb72..83739b2d9 100644 --- a/src/lte/model/lte-ue-power-control.h +++ b/src/lte/model/lte-ue-power-control.h @@ -56,7 +56,7 @@ class LteUePowerControl : public Object public: LteUePowerControl (); - virtual ~LteUePowerControl (); + ~LteUePowerControl () override; /** * \brief Get the type ID. @@ -64,8 +64,8 @@ public: */ static TypeId GetTypeId (); // inherited from Object - virtual void DoInitialize (); - virtual void DoDispose (); + void DoInitialize () override; + void DoDispose () override; /** * \brief Set PC maximum function diff --git a/src/lte/model/lte-ue-rrc.cc b/src/lte/model/lte-ue-rrc.cc index d6fc76308..714cd6c62 100644 --- a/src/lte/model/lte-ue-rrc.cc +++ b/src/lte/model/lte-ue-rrc.cc @@ -60,9 +60,9 @@ public: */ UeMemberLteUeCmacSapUser (LteUeRrc* rrc); - virtual void SetTemporaryCellRnti (uint16_t rnti); - virtual void NotifyRandomAccessSuccessful (); - virtual void NotifyRandomAccessFailed (); + void SetTemporaryCellRnti (uint16_t rnti) override; + void NotifyRandomAccessSuccessful () override; + void NotifyRandomAccessFailed () override; private: LteUeRrc* m_rrc; ///< the RRC class diff --git a/src/lte/model/lte-ue-rrc.h b/src/lte/model/lte-ue-rrc.h index 17df629e0..e9c0b8d25 100644 --- a/src/lte/model/lte-ue-rrc.h +++ b/src/lte/model/lte-ue-rrc.h @@ -131,13 +131,13 @@ public: /** * Destructor */ - virtual ~LteUeRrc (); + ~LteUeRrc () override; // inherited from Object private: - virtual void DoInitialize (); - virtual void DoDispose (); + void DoInitialize () override; + void DoDispose () override; public: /** * \brief Get the type ID. diff --git a/src/lte/model/lte-vendor-specific-parameters.h b/src/lte/model/lte-vendor-specific-parameters.h index dbb05d99f..0b3695747 100644 --- a/src/lte/model/lte-vendor-specific-parameters.h +++ b/src/lte/model/lte-vendor-specific-parameters.h @@ -41,7 +41,7 @@ class SrsCqiRntiVsp : public VendorSpecificValue * \param rnti the RNTI */ SrsCqiRntiVsp (uint16_t rnti); - virtual ~SrsCqiRntiVsp (); + ~SrsCqiRntiVsp () override; /** * \brief Get RNTI function diff --git a/src/lte/model/no-op-component-carrier-manager.h b/src/lte/model/no-op-component-carrier-manager.h index 56f5bea96..a3240591b 100644 --- a/src/lte/model/no-op-component-carrier-manager.h +++ b/src/lte/model/no-op-component-carrier-manager.h @@ -54,7 +54,7 @@ class NoOpComponentCarrierManager : public LteEnbComponentCarrierManager public: NoOpComponentCarrierManager (); - virtual ~NoOpComponentCarrierManager (); + ~NoOpComponentCarrierManager () override; /** * \brief Get the type ID. * \return the object TypeId @@ -63,9 +63,9 @@ public: protected: // Inherited methods - virtual void DoInitialize (); - virtual void DoDispose (); - virtual void DoReportUeMeas (uint16_t rnti, LteRrcSap::MeasResults measResults); + void DoInitialize () override; + void DoDispose () override; + void DoReportUeMeas (uint16_t rnti, LteRrcSap::MeasResults measResults) override; /** * \brief Add UE. * \param rnti the RNTI @@ -167,7 +167,7 @@ class RrComponentCarrierManager : public NoOpComponentCarrierManager public: RrComponentCarrierManager (); - virtual ~RrComponentCarrierManager () override; + ~RrComponentCarrierManager () override; /** * \brief Get the type ID. * \return the object TypeId @@ -177,9 +177,9 @@ public: protected: // Inherited methods - virtual void DoReportBufferStatus (LteMacSapProvider::ReportBufferStatusParameters params) override; - virtual void DoUlReceiveMacCe (MacCeListElement_s bsr, uint8_t componentCarrierId) override; - virtual void DoUlReceiveSr (uint16_t rnti, uint8_t componentCarrierId) override; + void DoReportBufferStatus (LteMacSapProvider::ReportBufferStatusParameters params) override; + void DoUlReceiveMacCe (MacCeListElement_s bsr, uint8_t componentCarrierId) override; + void DoUlReceiveSr (uint16_t rnti, uint8_t componentCarrierId) override; private: uint8_t m_lastCcIdForSr {0}; //!< Last CCID to which a SR was routed diff --git a/src/lte/model/no-op-handover-algorithm.h b/src/lte/model/no-op-handover-algorithm.h index 161db13f4..8fea15e3f 100644 --- a/src/lte/model/no-op-handover-algorithm.h +++ b/src/lte/model/no-op-handover-algorithm.h @@ -44,7 +44,7 @@ public: /// Creates a No-op handover algorithm instance. NoOpHandoverAlgorithm (); - virtual ~NoOpHandoverAlgorithm (); + ~NoOpHandoverAlgorithm () override; /** * \brief Get the type ID. @@ -53,19 +53,19 @@ public: static TypeId GetTypeId (); // inherited from LteHandoverAlgorithm - virtual void SetLteHandoverManagementSapUser (LteHandoverManagementSapUser* s); - virtual LteHandoverManagementSapProvider* GetLteHandoverManagementSapProvider (); + void SetLteHandoverManagementSapUser (LteHandoverManagementSapUser* s) override; + LteHandoverManagementSapProvider* GetLteHandoverManagementSapProvider () override; /// let the forwarder class access the protected and private members friend class MemberLteHandoverManagementSapProvider; protected: // inherited from Object - virtual void DoInitialize (); - virtual void DoDispose (); + void DoInitialize () override; + void DoDispose () override; // inherited from LteHandoverAlgorithm as a Handover Management SAP implementation - void DoReportUeMeas (uint16_t rnti, LteRrcSap::MeasResults measResults); + void DoReportUeMeas (uint16_t rnti, LteRrcSap::MeasResults measResults) override; private: /// Interface to the eNodeB RRC instance. diff --git a/src/lte/model/pf-ff-mac-scheduler.h b/src/lte/model/pf-ff-mac-scheduler.h index 389baa4b8..beaed9540 100644 --- a/src/lte/model/pf-ff-mac-scheduler.h +++ b/src/lte/model/pf-ff-mac-scheduler.h @@ -82,10 +82,10 @@ public: /** * Destructor */ - virtual ~PfFfMacScheduler (); + ~PfFfMacScheduler () override; // inherited from Object - virtual void DoDispose (); + void DoDispose () override; /** * \brief Get the type ID. * \return the object TypeId @@ -93,14 +93,14 @@ public: static TypeId GetTypeId (); // inherited from FfMacScheduler - virtual void SetFfMacCschedSapUser (FfMacCschedSapUser* s); - virtual void SetFfMacSchedSapUser (FfMacSchedSapUser* s); - virtual FfMacCschedSapProvider* GetFfMacCschedSapProvider (); - virtual FfMacSchedSapProvider* GetFfMacSchedSapProvider (); + void SetFfMacCschedSapUser (FfMacCschedSapUser* s) override; + void SetFfMacSchedSapUser (FfMacSchedSapUser* s) override; + FfMacCschedSapProvider* GetFfMacCschedSapProvider () override; + FfMacSchedSapProvider* GetFfMacSchedSapProvider () override; // FFR SAPs - virtual void SetLteFfrSapProvider (LteFfrSapProvider* s); - virtual LteFfrSapUser* GetLteFfrSapUser (); + void SetLteFfrSapProvider (LteFfrSapProvider* s) override; + LteFfrSapUser* GetLteFfrSapUser () override; /// allow MemberCschedSapProvider class friend access friend class MemberCschedSapProvider; diff --git a/src/lte/model/pss-ff-mac-scheduler.h b/src/lte/model/pss-ff-mac-scheduler.h index c3c1d49e5..b3c5192cd 100644 --- a/src/lte/model/pss-ff-mac-scheduler.h +++ b/src/lte/model/pss-ff-mac-scheduler.h @@ -90,10 +90,10 @@ public: /** * Destructor */ - virtual ~PssFfMacScheduler (); + ~PssFfMacScheduler () override; // inherited from Object - virtual void DoDispose (); + void DoDispose () override; /** * \brief Get the type ID. * \return the object TypeId @@ -101,14 +101,14 @@ public: static TypeId GetTypeId (); // inherited from FfMacScheduler - virtual void SetFfMacCschedSapUser (FfMacCschedSapUser* s); - virtual void SetFfMacSchedSapUser (FfMacSchedSapUser* s); - virtual FfMacCschedSapProvider* GetFfMacCschedSapProvider (); - virtual FfMacSchedSapProvider* GetFfMacSchedSapProvider (); + void SetFfMacCschedSapUser (FfMacCschedSapUser* s) override; + void SetFfMacSchedSapUser (FfMacSchedSapUser* s) override; + FfMacCschedSapProvider* GetFfMacCschedSapProvider () override; + FfMacSchedSapProvider* GetFfMacSchedSapProvider () override; // FFR SAPs - virtual void SetLteFfrSapProvider (LteFfrSapProvider* s); - virtual LteFfrSapUser* GetLteFfrSapUser (); + void SetLteFfrSapProvider (LteFfrSapProvider* s) override; + LteFfrSapUser* GetLteFfrSapUser () override; /// allow MemberCschedSapProvider class friend access friend class MemberCschedSapProvider; diff --git a/src/lte/model/rem-spectrum-phy.h b/src/lte/model/rem-spectrum-phy.h index 59c775968..713252048 100644 --- a/src/lte/model/rem-spectrum-phy.h +++ b/src/lte/model/rem-spectrum-phy.h @@ -53,10 +53,10 @@ class RemSpectrumPhy : public SpectrumPhy public: RemSpectrumPhy (); - virtual ~RemSpectrumPhy (); + ~RemSpectrumPhy () override; // inherited from Object - void DoDispose (); + void DoDispose () override; /** * \brief Get the type ID. * \return the object TypeId @@ -64,14 +64,14 @@ public: static TypeId GetTypeId (); // inherited from SpectrumPhy - void SetChannel (Ptr c); - void SetMobility (Ptr m); - void SetDevice (Ptr d); - Ptr GetMobility () const; - Ptr GetDevice () const; - Ptr GetRxSpectrumModel () const; - Ptr GetAntenna () const; - void StartRx (Ptr params); + void SetChannel (Ptr c) override; + void SetMobility (Ptr m) override; + void SetDevice (Ptr d) override; + Ptr GetMobility () const override; + Ptr GetDevice () const override; + Ptr GetRxSpectrumModel () const override; + Ptr GetAntenna () const override; + void StartRx (Ptr params) override; /** * set the RX spectrum model to be used diff --git a/src/lte/model/rr-ff-mac-scheduler.h b/src/lte/model/rr-ff-mac-scheduler.h index ebc8da42a..75f45a006 100644 --- a/src/lte/model/rr-ff-mac-scheduler.h +++ b/src/lte/model/rr-ff-mac-scheduler.h @@ -69,10 +69,10 @@ public: /** * Destructor */ - virtual ~RrFfMacScheduler (); + ~RrFfMacScheduler () override; // inherited from Object - virtual void DoDispose (); + void DoDispose () override; /** * \brief Get the type ID. * \return the object TypeId @@ -80,14 +80,14 @@ public: static TypeId GetTypeId (); // inherited from FfMacScheduler - virtual void SetFfMacCschedSapUser (FfMacCschedSapUser* s); - virtual void SetFfMacSchedSapUser (FfMacSchedSapUser* s); - virtual FfMacCschedSapProvider* GetFfMacCschedSapProvider (); - virtual FfMacSchedSapProvider* GetFfMacSchedSapProvider (); + void SetFfMacCschedSapUser (FfMacCschedSapUser* s) override; + void SetFfMacSchedSapUser (FfMacSchedSapUser* s) override; + FfMacCschedSapProvider* GetFfMacCschedSapProvider () override; + FfMacSchedSapProvider* GetFfMacSchedSapProvider () override; // FFR SAPs - virtual void SetLteFfrSapProvider (LteFfrSapProvider* s); - virtual LteFfrSapUser* GetLteFfrSapUser (); + void SetLteFfrSapProvider (LteFfrSapProvider* s) override; + LteFfrSapUser* GetLteFfrSapUser () override; /// allow MemberCschedSapProvider class friend access friend class MemberCschedSapProvider; diff --git a/src/lte/model/simple-ue-component-carrier-manager.cc b/src/lte/model/simple-ue-component-carrier-manager.cc index 619fa7035..538a4478b 100644 --- a/src/lte/model/simple-ue-component-carrier-manager.cc +++ b/src/lte/model/simple-ue-component-carrier-manager.cc @@ -49,8 +49,8 @@ public: SimpleUeCcmMacSapProvider (SimpleUeComponentCarrierManager* mac); // inherited from LteMacSapProvider - virtual void TransmitPdu (LteMacSapProvider::TransmitPduParameters params); - virtual void ReportBufferStatus (LteMacSapProvider::ReportBufferStatusParameters params); + void TransmitPdu (LteMacSapProvider::TransmitPduParameters params) override; + void ReportBufferStatus (LteMacSapProvider::ReportBufferStatusParameters params) override; private: SimpleUeComponentCarrierManager* m_mac; ///< the component carrier manager @@ -90,9 +90,9 @@ public: SimpleUeCcmMacSapUser (SimpleUeComponentCarrierManager* mac); // inherited from LteMacSapUser - virtual void NotifyTxOpportunity (LteMacSapUser::TxOpportunityParameters txOpParams); - virtual void ReceivePdu (LteMacSapUser::ReceivePduParameters rxPduParams); - virtual void NotifyHarqDeliveryFailure (); + void NotifyTxOpportunity (LteMacSapUser::TxOpportunityParameters txOpParams) override; + void ReceivePdu (LteMacSapUser::ReceivePduParameters rxPduParams) override; + void NotifyHarqDeliveryFailure () override; private: diff --git a/src/lte/model/simple-ue-component-carrier-manager.h b/src/lte/model/simple-ue-component-carrier-manager.h index 424af3707..5d0e74140 100644 --- a/src/lte/model/simple-ue-component-carrier-manager.h +++ b/src/lte/model/simple-ue-component-carrier-manager.h @@ -43,7 +43,7 @@ public: /// Creates a No-op CCS algorithm instance. SimpleUeComponentCarrierManager (); - virtual ~SimpleUeComponentCarrierManager (); + ~SimpleUeComponentCarrierManager () override; /** * \brief Get the type ID. @@ -52,7 +52,7 @@ public: static TypeId GetTypeId (); // inherited from LteComponentCarrierManager - virtual LteMacSapProvider* GetLteMacSapProvider (); + LteMacSapProvider* GetLteMacSapProvider () override; @@ -68,8 +68,8 @@ public: protected: // inherited from Object - virtual void DoInitialize (); - virtual void DoDispose (); + void DoInitialize () override; + void DoDispose () override; // inherited from LteCcsAlgorithm as a Component Carrier Management SAP implementation /** * \brief Report Ue Measure function diff --git a/src/lte/model/tdbet-ff-mac-scheduler.h b/src/lte/model/tdbet-ff-mac-scheduler.h index c6e3d7f84..356e42560 100644 --- a/src/lte/model/tdbet-ff-mac-scheduler.h +++ b/src/lte/model/tdbet-ff-mac-scheduler.h @@ -83,10 +83,10 @@ public: /** * Destructor */ - virtual ~TdBetFfMacScheduler (); + ~TdBetFfMacScheduler () override; // inherited from Object - virtual void DoDispose (); + void DoDispose () override; /** * \brief Get the type ID. * \return the object TypeId @@ -94,14 +94,14 @@ public: static TypeId GetTypeId (); // inherited from FfMacScheduler - virtual void SetFfMacCschedSapUser (FfMacCschedSapUser* s); - virtual void SetFfMacSchedSapUser (FfMacSchedSapUser* s); - virtual FfMacCschedSapProvider* GetFfMacCschedSapProvider (); - virtual FfMacSchedSapProvider* GetFfMacSchedSapProvider (); + void SetFfMacCschedSapUser (FfMacCschedSapUser* s) override; + void SetFfMacSchedSapUser (FfMacSchedSapUser* s) override; + FfMacCschedSapProvider* GetFfMacCschedSapProvider () override; + FfMacSchedSapProvider* GetFfMacSchedSapProvider () override; // FFR SAPs - virtual void SetLteFfrSapProvider (LteFfrSapProvider* s); - virtual LteFfrSapUser* GetLteFfrSapUser (); + void SetLteFfrSapProvider (LteFfrSapProvider* s) override; + LteFfrSapUser* GetLteFfrSapUser () override; /// allow MemberCschedSapProvider class friend access friend class MemberCschedSapProvider; diff --git a/src/lte/model/tdmt-ff-mac-scheduler.h b/src/lte/model/tdmt-ff-mac-scheduler.h index 3d95b9f16..4f107483e 100644 --- a/src/lte/model/tdmt-ff-mac-scheduler.h +++ b/src/lte/model/tdmt-ff-mac-scheduler.h @@ -74,10 +74,10 @@ public: /** * Destructor */ - virtual ~TdMtFfMacScheduler (); + ~TdMtFfMacScheduler () override; // inherited from Object - virtual void DoDispose (); + void DoDispose () override; /** * \brief Get the type ID. * \return the object TypeId @@ -85,14 +85,14 @@ public: static TypeId GetTypeId (); // inherited from FfMacScheduler - virtual void SetFfMacCschedSapUser (FfMacCschedSapUser* s); - virtual void SetFfMacSchedSapUser (FfMacSchedSapUser* s); - virtual FfMacCschedSapProvider* GetFfMacCschedSapProvider (); - virtual FfMacSchedSapProvider* GetFfMacSchedSapProvider (); + void SetFfMacCschedSapUser (FfMacCschedSapUser* s) override; + void SetFfMacSchedSapUser (FfMacSchedSapUser* s) override; + FfMacCschedSapProvider* GetFfMacCschedSapProvider () override; + FfMacSchedSapProvider* GetFfMacSchedSapProvider () override; // FFR SAPs - virtual void SetLteFfrSapProvider (LteFfrSapProvider* s); - virtual LteFfrSapUser* GetLteFfrSapUser (); + void SetLteFfrSapProvider (LteFfrSapProvider* s) override; + LteFfrSapUser* GetLteFfrSapUser () override; /// allow MemberCschedSapProvider class friend access friend class MemberCschedSapProvider; diff --git a/src/lte/model/tdtbfq-ff-mac-scheduler.h b/src/lte/model/tdtbfq-ff-mac-scheduler.h index b6d4ad6a3..007ae8602 100644 --- a/src/lte/model/tdtbfq-ff-mac-scheduler.h +++ b/src/lte/model/tdtbfq-ff-mac-scheduler.h @@ -89,10 +89,10 @@ public: /** * Destructor */ - virtual ~TdTbfqFfMacScheduler (); + ~TdTbfqFfMacScheduler () override; // inherited from Object - virtual void DoDispose (); + void DoDispose () override; /** * \brief Get the type ID. * \return the object TypeId @@ -100,14 +100,14 @@ public: static TypeId GetTypeId (); // inherited from FfMacScheduler - virtual void SetFfMacCschedSapUser (FfMacCschedSapUser* s); - virtual void SetFfMacSchedSapUser (FfMacSchedSapUser* s); - virtual FfMacCschedSapProvider* GetFfMacCschedSapProvider (); - virtual FfMacSchedSapProvider* GetFfMacSchedSapProvider (); + void SetFfMacCschedSapUser (FfMacCschedSapUser* s) override; + void SetFfMacSchedSapUser (FfMacSchedSapUser* s) override; + FfMacCschedSapProvider* GetFfMacCschedSapProvider () override; + FfMacSchedSapProvider* GetFfMacSchedSapProvider () override; // FFR SAPs - virtual void SetLteFfrSapProvider (LteFfrSapProvider* s); - virtual LteFfrSapUser* GetLteFfrSapUser (); + void SetLteFfrSapProvider (LteFfrSapProvider* s) override; + LteFfrSapUser* GetLteFfrSapUser () override; /// allow MemberCschedSapProvider class friend access friend class MemberCschedSapProvider; diff --git a/src/lte/model/tta-ff-mac-scheduler.h b/src/lte/model/tta-ff-mac-scheduler.h index e2a29ca69..02810b683 100644 --- a/src/lte/model/tta-ff-mac-scheduler.h +++ b/src/lte/model/tta-ff-mac-scheduler.h @@ -74,10 +74,10 @@ public: /** * Destructor */ - virtual ~TtaFfMacScheduler (); + ~TtaFfMacScheduler () override; // inherited from Object - virtual void DoDispose (); + void DoDispose () override; /** * \brief Get the type ID. * \return the object TypeId @@ -85,14 +85,14 @@ public: static TypeId GetTypeId (); // inherited from FfMacScheduler - virtual void SetFfMacCschedSapUser (FfMacCschedSapUser* s); - virtual void SetFfMacSchedSapUser (FfMacSchedSapUser* s); - virtual FfMacCschedSapProvider* GetFfMacCschedSapProvider (); - virtual FfMacSchedSapProvider* GetFfMacSchedSapProvider (); + void SetFfMacCschedSapUser (FfMacCschedSapUser* s) override; + void SetFfMacSchedSapUser (FfMacSchedSapUser* s) override; + FfMacCschedSapProvider* GetFfMacCschedSapProvider () override; + FfMacSchedSapProvider* GetFfMacSchedSapProvider () override; // FFR SAPs - virtual void SetLteFfrSapProvider (LteFfrSapProvider* s); - virtual LteFfrSapUser* GetLteFfrSapUser (); + void SetLteFfrSapProvider (LteFfrSapProvider* s) override; + LteFfrSapUser* GetLteFfrSapUser () override; /// allow MemberCschedSapProvider class friend access friend class MemberCschedSapProvider; diff --git a/src/lte/test/epc-test-gtpu.h b/src/lte/test/epc-test-gtpu.h index d1cd88230..7e6b95207 100644 --- a/src/lte/test/epc-test-gtpu.h +++ b/src/lte/test/epc-test-gtpu.h @@ -54,10 +54,10 @@ class EpsGtpuHeaderTestCase : public TestCase { public: EpsGtpuHeaderTestCase (); - virtual ~EpsGtpuHeaderTestCase (); + ~EpsGtpuHeaderTestCase () override; private: - virtual void DoRun (); + void DoRun () override; }; diff --git a/src/lte/test/epc-test-s1u-downlink.cc b/src/lte/test/epc-test-s1u-downlink.cc index 8ff4719d6..4ebc4c950 100644 --- a/src/lte/test/epc-test-s1u-downlink.cc +++ b/src/lte/test/epc-test-s1u-downlink.cc @@ -105,10 +105,10 @@ public: * \param v list of eNodeB downlink test data information */ EpcS1uDlTestCase (std::string name, std::vector v); - virtual ~EpcS1uDlTestCase (); + ~EpcS1uDlTestCase () override; private: - virtual void DoRun (); + void DoRun () override; std::vector m_enbDlTestData; ///< ENB DL test data }; diff --git a/src/lte/test/epc-test-s1u-uplink.cc b/src/lte/test/epc-test-s1u-uplink.cc index c24745609..23b65534c 100644 --- a/src/lte/test/epc-test-s1u-uplink.cc +++ b/src/lte/test/epc-test-s1u-uplink.cc @@ -83,7 +83,7 @@ public: */ EpsBearerTagUdpClient (uint16_t rnti, uint8_t bid); - virtual ~EpsBearerTagUdpClient (); + ~EpsBearerTagUdpClient () override; /** * \brief set the remote address and port @@ -93,11 +93,11 @@ public: void SetRemote (Ipv4Address ip, uint16_t port); protected: - virtual void DoDispose (); + void DoDispose () override; private: - virtual void StartApplication (); - virtual void StopApplication (); + void StartApplication () override; + void StopApplication () override; /** * \brief Schedule transmit function @@ -318,10 +318,10 @@ public: * \param v the list of UE lists */ EpcS1uUlTestCase (std::string name, std::vector v); - virtual ~EpcS1uUlTestCase (); + ~EpcS1uUlTestCase () override; private: - virtual void DoRun (); + void DoRun () override; std::vector m_enbUlTestData; ///< ENB UL test data }; diff --git a/src/lte/test/lte-ffr-simple.h b/src/lte/test/lte-ffr-simple.h index e0863267a..b9fbc84ca 100644 --- a/src/lte/test/lte-ffr-simple.h +++ b/src/lte/test/lte-ffr-simple.h @@ -50,7 +50,7 @@ public: */ LteFfrSimple (); - virtual ~LteFfrSimple (); + ~LteFfrSimple () override; /** * \brief Get the type ID. @@ -78,11 +78,11 @@ public: void SetTpc (uint32_t tpc, uint32_t num, bool acculumatedMode); // inherited from LteFfrAlgorithm - virtual void SetLteFfrSapUser (LteFfrSapUser* s); - virtual LteFfrSapProvider* GetLteFfrSapProvider (); + void SetLteFfrSapUser (LteFfrSapUser* s) override; + LteFfrSapProvider* GetLteFfrSapProvider () override; - virtual void SetLteFfrRrcSapUser (LteFfrRrcSapUser* s); - virtual LteFfrRrcSapProvider* GetLteFfrRrcSapProvider (); + void SetLteFfrRrcSapUser (LteFfrRrcSapUser* s) override; + LteFfrRrcSapProvider* GetLteFfrRrcSapProvider () override; /// let the forwarder class access the protected and private members friend class MemberLteFfrSapProvider; @@ -99,25 +99,25 @@ public: protected: // inherited from Object - virtual void DoInitialize (); - virtual void DoDispose (); + void DoInitialize () override; + void DoDispose () override; - virtual void Reconfigure (); + void Reconfigure () override; // FFR SAP PROVIDER IMPLEMENTATION - virtual std::vector DoGetAvailableDlRbg (); - virtual bool DoIsDlRbgAvailableForUe (int i, uint16_t rnti); - virtual std::vector DoGetAvailableUlRbg (); - virtual bool DoIsUlRbgAvailableForUe (int i, uint16_t rnti); - virtual void DoReportDlCqiInfo (const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters& params); - virtual void DoReportUlCqiInfo (const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters& params); - virtual void DoReportUlCqiInfo ( std::map > ulCqiMap ); - virtual uint8_t DoGetTpc (uint16_t rnti); - virtual uint16_t DoGetMinContinuousUlBandwidth (); + std::vector DoGetAvailableDlRbg () override; + bool DoIsDlRbgAvailableForUe (int i, uint16_t rnti) override; + std::vector DoGetAvailableUlRbg () override; + bool DoIsUlRbgAvailableForUe (int i, uint16_t rnti) override; + void DoReportDlCqiInfo (const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters& params) override; + void DoReportUlCqiInfo (const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters& params) override; + void DoReportUlCqiInfo ( std::map > ulCqiMap ) override; + uint8_t DoGetTpc (uint16_t rnti) override; + uint16_t DoGetMinContinuousUlBandwidth () override; // FFR SAP RRC PROVIDER IMPLEMENTATION - virtual void DoReportUeMeas (uint16_t rnti, LteRrcSap::MeasResults measResults); - virtual void DoRecvLoadInformation (EpcX2Sap::LoadInformationParams params); + void DoReportUeMeas (uint16_t rnti, LteRrcSap::MeasResults measResults) override; + void DoRecvLoadInformation (EpcX2Sap::LoadInformationParams params) override; private: diff --git a/src/lte/test/lte-simple-helper.h b/src/lte/test/lte-simple-helper.h index 73a9f0249..ba48c52d8 100644 --- a/src/lte/test/lte-simple-helper.h +++ b/src/lte/test/lte-simple-helper.h @@ -49,14 +49,14 @@ class LteSimpleHelper : public Object { public: LteSimpleHelper (); - virtual ~LteSimpleHelper (); + ~LteSimpleHelper () override; /** * \brief Get the type ID. * \return the object TypeId */ static TypeId GetTypeId (); - virtual void DoDispose (); + void DoDispose () override; /** @@ -123,7 +123,7 @@ public: protected: // inherited from Object - virtual void DoInitialize (); + void DoInitialize () override; private: /** diff --git a/src/lte/test/lte-simple-net-device.h b/src/lte/test/lte-simple-net-device.h index e6381ce37..41692f710 100644 --- a/src/lte/test/lte-simple-net-device.h +++ b/src/lte/test/lte-simple-net-device.h @@ -55,17 +55,17 @@ public: */ LteSimpleNetDevice (Ptr node); - virtual ~LteSimpleNetDevice (); - virtual void DoDispose (); + ~LteSimpleNetDevice () override; + void DoDispose () override; // inherited from NetDevice - virtual bool Send (Ptr packet, const Address& dest, uint16_t protocolNumber); + bool Send (Ptr packet, const Address& dest, uint16_t protocolNumber) override; protected: // inherited from Object - virtual void DoInitialize (); + void DoInitialize () override; }; diff --git a/src/lte/test/lte-simple-spectrum-phy.h b/src/lte/test/lte-simple-spectrum-phy.h index 1750941cb..af638cfb3 100644 --- a/src/lte/test/lte-simple-spectrum-phy.h +++ b/src/lte/test/lte-simple-spectrum-phy.h @@ -49,7 +49,7 @@ class LteSimpleSpectrumPhy : public SpectrumPhy public: LteSimpleSpectrumPhy (); - virtual ~LteSimpleSpectrumPhy (); + ~LteSimpleSpectrumPhy () override; /** * \brief Get the type ID. @@ -57,17 +57,17 @@ public: */ static TypeId GetTypeId (); // inherited from Object - virtual void DoDispose (); + void DoDispose () override; // inherited from SpectrumPhy - void SetChannel (Ptr c); - void SetMobility (Ptr m); - void SetDevice (Ptr d); - Ptr GetMobility () const; - Ptr GetDevice () const; - Ptr GetRxSpectrumModel () const; - Ptr GetAntenna () const; - void StartRx (Ptr params); + void SetChannel (Ptr c) override; + void SetMobility (Ptr m) override; + void SetDevice (Ptr d) override; + Ptr GetMobility () const override; + Ptr GetDevice () const override; + Ptr GetRxSpectrumModel () const override; + Ptr GetAntenna () const override; + void StartRx (Ptr params) override; /** * \brief Set receive spectrum model. diff --git a/src/lte/test/lte-test-aggregation-throughput-scale.h b/src/lte/test/lte-test-aggregation-throughput-scale.h index 207654c02..5f6bd320a 100644 --- a/src/lte/test/lte-test-aggregation-throughput-scale.h +++ b/src/lte/test/lte-test-aggregation-throughput-scale.h @@ -53,13 +53,13 @@ public: */ LteAggregationThroughputScaleTestCase (std::string name); - virtual ~LteAggregationThroughputScaleTestCase (); + ~LteAggregationThroughputScaleTestCase () override; private: /** * \brief Setup the simulation, run it, and verify the result. */ - virtual void DoRun (); + void DoRun () override; /** * \brief Get throughput function diff --git a/src/lte/test/lte-test-carrier-aggregation-configuration.cc b/src/lte/test/lte-test-carrier-aggregation-configuration.cc index 71ec3ba0d..c65c26c82 100644 --- a/src/lte/test/lte-test-carrier-aggregation-configuration.cc +++ b/src/lte/test/lte-test-carrier-aggregation-configuration.cc @@ -100,7 +100,7 @@ public: } private: - virtual void DoRun (); + void DoRun () override; /** * Build name string function diff --git a/src/lte/test/lte-test-carrier-aggregation.h b/src/lte/test/lte-test-carrier-aggregation.h index d3dd5c3ff..162eaad7e 100644 --- a/src/lte/test/lte-test-carrier-aggregation.h +++ b/src/lte/test/lte-test-carrier-aggregation.h @@ -59,7 +59,7 @@ public: * \param numberOfComponentCarriers number of component carriers to be used in test configuration */ CarrierAggregationTestCase (uint16_t nUser, uint16_t dist, uint32_t dlbandwidth, uint32_t ulBandwidth, uint32_t numberOfComponentCarriers); - virtual ~CarrierAggregationTestCase (); + ~CarrierAggregationTestCase () override; /** * DL Scheduling function that is used in this test as callback function of DL scheduling trace * \param dlInfo the DL scheduling callback info @@ -81,7 +81,7 @@ public: private: - virtual void DoRun (); + void DoRun () override; /** * Builds the test name string based on provided parameter values * \param nUser number of users diff --git a/src/lte/test/lte-test-cell-selection.h b/src/lte/test/lte-test-cell-selection.h index 8717da8fb..55ccb673d 100644 --- a/src/lte/test/lte-test-cell-selection.h +++ b/src/lte/test/lte-test-cell-selection.h @@ -100,14 +100,14 @@ public: double interSiteDistance, std::vector ueSetupList); - virtual ~LteCellSelectionTestCase (); + ~LteCellSelectionTestCase () override; private: /** * \brief Setup the simulation according to the configuration set by the * class constructor, run it, and verify the result. */ - virtual void DoRun (); + void DoRun () override; /** * \brief Verifies if the given UE is attached to either of the given two diff --git a/src/lte/test/lte-test-cqa-ff-mac-scheduler.h b/src/lte/test/lte-test-cqa-ff-mac-scheduler.h index aec87d690..bbd098d08 100644 --- a/src/lte/test/lte-test-cqa-ff-mac-scheduler.h +++ b/src/lte/test/lte-test-cqa-ff-mac-scheduler.h @@ -54,7 +54,7 @@ public: * \param errorModelEnabled error model enabled? */ LenaCqaFfMacSchedulerTestCase1 (uint16_t nUser, double dist, double thrRefDl, double thrRefUl, uint16_t packetSize, uint16_t interval, bool errorModelEnabled); - virtual ~LenaCqaFfMacSchedulerTestCase1 (); + ~LenaCqaFfMacSchedulerTestCase1 () override; private: /** @@ -65,7 +65,7 @@ private: * \returns name string */ static std::string BuildNameString (uint16_t nUser, double dist); - virtual void DoRun (); + void DoRun () override; uint16_t m_nUser; ///< number of UE nodes double m_dist; ///< distance between the nodes uint16_t m_packetSize; ///< packet size in bytes @@ -98,7 +98,7 @@ public: * \param errorModelEnabled whether the error model enabled is enabled in the test case */ LenaCqaFfMacSchedulerTestCase2 (std::vector dist, std::vector estThrCqaDl, std::vector packetSize, uint16_t interval, bool errorModelEnabled); - virtual ~LenaCqaFfMacSchedulerTestCase2 (); + ~LenaCqaFfMacSchedulerTestCase2 () override; private: /** @@ -109,7 +109,7 @@ private: * \returns name string */ static std::string BuildNameString (uint16_t nUser, std::vector dist); - virtual void DoRun (); + void DoRun () override; uint16_t m_nUser; ///< number of UE nodes std::vector m_dist; ///< distance between the nodes std::vector m_packetSize; ///< packet size in bytes diff --git a/src/lte/test/lte-test-cqi-generation.h b/src/lte/test/lte-test-cqi-generation.h index a37c69bde..283447d67 100644 --- a/src/lte/test/lte-test-cqi-generation.h +++ b/src/lte/test/lte-test-cqi-generation.h @@ -64,7 +64,7 @@ public: */ LteCqiGenerationTestCase (std::string name, bool usePdcchForCqiGeneration, uint16_t dlMcs, uint16_t ulMcs); - virtual ~LteCqiGenerationTestCase (); + ~LteCqiGenerationTestCase () override; /** * \brief DL Scheduling function @@ -84,7 +84,7 @@ public: uint8_t mcs, uint16_t sizeTb); private: - virtual void DoRun (); + void DoRun () override; bool m_usePdschForCqiGeneration; ///< use PDCCH for CQI generation uint16_t m_dlMcs; ///< the DL MCS @@ -114,7 +114,7 @@ public: */ LteCqiGenerationDlPowerControlTestCase (std::string name, uint8_t cell0Pa, uint8_t cell1Pa, uint16_t dlMcs, uint16_t ulMcs); - virtual ~LteCqiGenerationDlPowerControlTestCase (); + ~LteCqiGenerationDlPowerControlTestCase () override; /** * \brief DL Scheduling function @@ -134,7 +134,7 @@ public: uint8_t mcs, uint16_t sizeTb); private: - virtual void DoRun (); + void DoRun () override; uint8_t m_cell0Pa; ///< cell #0 PA uint8_t m_cell1Pa; ///< cell #1 PA diff --git a/src/lte/test/lte-test-deactivate-bearer.h b/src/lte/test/lte-test-deactivate-bearer.h index 403aef0e3..207439563 100644 --- a/src/lte/test/lte-test-deactivate-bearer.h +++ b/src/lte/test/lte-test-deactivate-bearer.h @@ -36,7 +36,7 @@ public: * \param useIdealRrc whether to use ideal RRC */ LenaDeactivateBearerTestCase (std::vector dist, std::vector estThrPssDl, std::vector packetSize, uint16_t interval, bool errorModelEnabled, bool useIdealRrc); - virtual ~LenaDeactivateBearerTestCase (); + ~LenaDeactivateBearerTestCase () override; private: /** @@ -47,7 +47,7 @@ private: * \returns name string */ static std::string BuildNameString (uint16_t nUser, std::vector dist); - virtual void DoRun (); + void DoRun () override; uint16_t m_nUser; ///< number of UE nodes std::vector m_dist; ///< distance between the nodes std::vector m_packetSize; ///< packet size in bytes diff --git a/src/lte/test/lte-test-downlink-power-control.h b/src/lte/test/lte-test-downlink-power-control.h index 67882c800..cae01194d 100644 --- a/src/lte/test/lte-test-downlink-power-control.h +++ b/src/lte/test/lte-test-downlink-power-control.h @@ -78,10 +78,10 @@ public: uint16_t earfcn, uint16_t bw, double powerTx, std::map powerTxMap, std::vector activeRbs, SpectrumValue& expected); - virtual ~LteDownlinkPowerControlSpectrumValueTestCase (); + ~LteDownlinkPowerControlSpectrumValueTestCase () override; private: - virtual void DoRun (); + void DoRun () override; Ptr m_actual; ///< actual Tx Power Spectral Density Ptr m_expected; ///< expected Tx Power Spectral Density @@ -106,10 +106,10 @@ public: * \param name the reference name */ LteDownlinkPowerControlTestCase (bool changePower, uint8_t pa, std::string name); - virtual ~LteDownlinkPowerControlTestCase (); + ~LteDownlinkPowerControlTestCase () override; private: - virtual void DoRun (); + void DoRun () override; bool m_changePdschConfigDedicated; ///< PDSCH config dedicated change LteRrcSap::PdschConfigDedicated m_pdschConfigDedicated; ///< PDSCH config dedicated @@ -135,7 +135,7 @@ public: * \param name the reference name */ LteDownlinkPowerControlRrcConnectionReconfigurationTestCase (bool useIdealRrc, std::string name); - virtual ~LteDownlinkPowerControlRrcConnectionReconfigurationTestCase (); + ~LteDownlinkPowerControlRrcConnectionReconfigurationTestCase () override; /** * \brief Connection Reconfiguration ENB @@ -165,7 +165,7 @@ public: */ void ChangePdschConfigDedicated (uint16_t rnti, uint8_t pa); private: - virtual void DoRun (); + void DoRun () override; bool m_useIdealRrc; ///< use ideal RRC? bool m_changePdschConfigDedicatedTriggered; ///< change PDSCH config dedicated triggered? diff --git a/src/lte/test/lte-test-downlink-sinr.h b/src/lte/test/lte-test-downlink-sinr.h index d635ebf6d..4ea1e3375 100644 --- a/src/lte/test/lte-test-downlink-sinr.h +++ b/src/lte/test/lte-test-downlink-sinr.h @@ -64,10 +64,10 @@ public: * \param name the name of the test */ LteDownlinkDataSinrTestCase (Ptr sv, Ptr sinr, std::string name); - virtual ~LteDownlinkDataSinrTestCase (); + ~LteDownlinkDataSinrTestCase () override; private: - virtual void DoRun (); + void DoRun () override; Ptr m_sv; ///< the spectrum value Ptr m_sm; ///< the spectrum model @@ -98,10 +98,10 @@ class LteDownlinkCtrlSinrTestCase : public TestCase * \param name the name of the test */ LteDownlinkCtrlSinrTestCase (Ptr sv, Ptr sinr, std::string name); - virtual ~LteDownlinkCtrlSinrTestCase (); + ~LteDownlinkCtrlSinrTestCase () override; private: - virtual void DoRun (); + void DoRun () override; Ptr m_sv; ///< the spectrum value Ptr m_sm; ///< the spectrum model diff --git a/src/lte/test/lte-test-earfcn.cc b/src/lte/test/lte-test-earfcn.cc index d5a1186f3..779d030b1 100644 --- a/src/lte/test/lte-test-earfcn.cc +++ b/src/lte/test/lte-test-earfcn.cc @@ -48,14 +48,14 @@ public: * \param f frequency */ LteEarfcnTestCase (const char* str, uint32_t earfcn, double f); - virtual ~LteEarfcnTestCase (); + ~LteEarfcnTestCase () override; protected: uint32_t m_earfcn; ///< the EARFCN double m_f; ///< the frequency private: - virtual void DoRun (); + void DoRun () override; }; LteEarfcnTestCase::LteEarfcnTestCase (const char* str, uint32_t earfcn, double f) @@ -99,7 +99,7 @@ public: LteEarfcnDlTestCase (const char* str, uint32_t earfcn, double f); private: - virtual void DoRun (); + void DoRun () override; }; LteEarfcnDlTestCase::LteEarfcnDlTestCase (const char* str, uint32_t earfcn, double f) @@ -140,7 +140,7 @@ public: LteEarfcnUlTestCase (const char* str, uint32_t earfcn, double f); private: - virtual void DoRun (); + void DoRun () override; }; LteEarfcnUlTestCase::LteEarfcnUlTestCase (const char* str, uint32_t earfcn, double f) diff --git a/src/lte/test/lte-test-entities.h b/src/lte/test/lte-test-entities.h index 0b6655a7e..5d533d1a8 100644 --- a/src/lte/test/lte-test-entities.h +++ b/src/lte/test/lte-test-entities.h @@ -57,8 +57,8 @@ class LteTestRrc : public Object static TypeId GetTypeId (); LteTestRrc (); - virtual ~LteTestRrc (); - virtual void DoDispose (); + ~LteTestRrc () override; + void DoDispose () override; /** @@ -186,8 +186,8 @@ class LteTestPdcp : public Object static TypeId GetTypeId (); LteTestPdcp (); - virtual ~LteTestPdcp (); - virtual void DoDispose (); + ~LteTestPdcp () override; + void DoDispose () override; /** @@ -254,8 +254,8 @@ class LteTestMac : public Object static TypeId GetTypeId (); LteTestMac (); - virtual ~LteTestMac (); - virtual void DoDispose (); + ~LteTestMac () override; + void DoDispose () override; /** * \brief Set the device function @@ -420,10 +420,10 @@ class EpcTestRrc : public Object public: EpcTestRrc (); - virtual ~EpcTestRrc (); + ~EpcTestRrc () override; // inherited from Object - virtual void DoDispose (); + void DoDispose () override; /** * \brief Get the type ID. * \return the object TypeId diff --git a/src/lte/test/lte-test-fdbet-ff-mac-scheduler.h b/src/lte/test/lte-test-fdbet-ff-mac-scheduler.h index 3f3267ff7..a852fc50f 100644 --- a/src/lte/test/lte-test-fdbet-ff-mac-scheduler.h +++ b/src/lte/test/lte-test-fdbet-ff-mac-scheduler.h @@ -55,7 +55,7 @@ public: * \param errorModelEnabled error model enabled? */ LenaFdBetFfMacSchedulerTestCase1 (uint16_t nUser, double dist, double thrRefDl, double thrRefUl,bool errorModelEnabled); - virtual ~LenaFdBetFfMacSchedulerTestCase1 (); + ~LenaFdBetFfMacSchedulerTestCase1 () override; private: /** @@ -66,7 +66,7 @@ private: * \returns name string */ static std::string BuildNameString (uint16_t nUser, double dist); - virtual void DoRun (); + void DoRun () override; uint16_t m_nUser; ///< number of UE nodes double m_dist; ///< distance between the nodes double m_thrRefDl; ///< DL throughput reference @@ -95,7 +95,7 @@ public: * \param errorModelEnabled error model enabled? */ LenaFdBetFfMacSchedulerTestCase2 (std::vector dist, std::vector achievableRateDl, std::vector estThrFdBetUl, bool errorModelEnabled); - virtual ~LenaFdBetFfMacSchedulerTestCase2 (); + ~LenaFdBetFfMacSchedulerTestCase2 () override; private: /** @@ -106,7 +106,7 @@ private: * \returns name string */ static std::string BuildNameString (uint16_t nUser, std::vector dist); - virtual void DoRun (); + void DoRun () override; uint16_t m_nUser; ///< number of UE nodes std::vector m_dist; ///< distance between the nodes std::vector m_achievableRateDl; ///< DL achievable rate diff --git a/src/lte/test/lte-test-fdmt-ff-mac-scheduler.h b/src/lte/test/lte-test-fdmt-ff-mac-scheduler.h index 2a5dee0e5..4f9c9986b 100644 --- a/src/lte/test/lte-test-fdmt-ff-mac-scheduler.h +++ b/src/lte/test/lte-test-fdmt-ff-mac-scheduler.h @@ -55,7 +55,7 @@ public: * \param errorModelEnabled error model enabled? */ LenaFdMtFfMacSchedulerTestCase (uint16_t nUser, double dist, double thrRefDl, double thrRefUl,bool errorModelEnabled); - virtual ~LenaFdMtFfMacSchedulerTestCase (); + ~LenaFdMtFfMacSchedulerTestCase () override; private: /** @@ -66,7 +66,7 @@ private: * \returns name string */ static std::string BuildNameString (uint16_t nUser, double dist); - virtual void DoRun (); + void DoRun () override; uint16_t m_nUser; ///< number of UE nodes double m_dist; ///< distance between the nodes double m_thrRefDl; ///< DL throughput reference diff --git a/src/lte/test/lte-test-fdtbfq-ff-mac-scheduler.h b/src/lte/test/lte-test-fdtbfq-ff-mac-scheduler.h index f7f5a1424..6daaa0b3b 100644 --- a/src/lte/test/lte-test-fdtbfq-ff-mac-scheduler.h +++ b/src/lte/test/lte-test-fdtbfq-ff-mac-scheduler.h @@ -57,7 +57,7 @@ public: * \param errorModelEnabled error model enabled? */ LenaFdTbfqFfMacSchedulerTestCase1 (uint16_t nUser, double dist, double thrRefDl, double thrRefUl, uint16_t packetSize, uint16_t interval, bool errorModelEnabled); - virtual ~LenaFdTbfqFfMacSchedulerTestCase1 (); + ~LenaFdTbfqFfMacSchedulerTestCase1 () override; private: /** @@ -68,7 +68,7 @@ private: * \returns name string */ static std::string BuildNameString (uint16_t nUser, double dist); - virtual void DoRun (); + void DoRun () override; uint16_t m_nUser; ///< number of UE nodes double m_dist; ///< distance between the nodes uint16_t m_packetSize; ///< packet size in bytes @@ -100,7 +100,7 @@ public: * \param errorModelEnabled indicates whether the error model is enabled */ LenaFdTbfqFfMacSchedulerTestCase2 (std::vector dist, std::vector estThrFdTbfqDl, std::vector packetSize, uint16_t interval, bool errorModelEnabled); - virtual ~LenaFdTbfqFfMacSchedulerTestCase2 (); + ~LenaFdTbfqFfMacSchedulerTestCase2 () override; private: /** @@ -111,7 +111,7 @@ private: * \returns name string */ static std::string BuildNameString (uint16_t nUser, std::vector dist); - virtual void DoRun (); + void DoRun () override; uint16_t m_nUser; ///< number of UE nodes std::vector m_dist; ///< distance between the nodes std::vector m_packetSize; ///< packet size in bytes diff --git a/src/lte/test/lte-test-frequency-reuse.h b/src/lte/test/lte-test-frequency-reuse.h index ad389aec7..2bdfa9c64 100644 --- a/src/lte/test/lte-test-frequency-reuse.h +++ b/src/lte/test/lte-test-frequency-reuse.h @@ -72,7 +72,7 @@ public: LteFrTestCase (std::string name, uint32_t userNum,uint16_t dlBandwidth,uint16_t ulBandwidth, std::vector availableDlRb, std::vector availableUlRb); - virtual ~LteFrTestCase (); + ~LteFrTestCase () override; /** * DL data receive start function @@ -86,7 +86,7 @@ public: void UlDataRxStart (Ptr spectrumValue); protected: - virtual void DoRun (); + void DoRun () override; uint32_t m_userNum; ///< the number of UE nodes uint16_t m_dlBandwidth; ///< the DL bandwidth @@ -131,10 +131,10 @@ public: uint8_t dlSubBandOffset, uint16_t dlSubBandwidth, uint8_t ulSubBandOffset, uint16_t ulSubBandwidth, std::vector availableDlRb, std::vector availableUlRb); - virtual ~LteHardFrTestCase (); + ~LteHardFrTestCase () override; private: - virtual void DoRun (); + void DoRun () override; std::string m_schedulerType; ///< the scheduler type @@ -178,10 +178,10 @@ public: uint16_t dlCommonSubBandwidth, uint8_t dlEdgeSubBandOffset, uint16_t dlEdgeSubBandwidth, uint16_t ulCommonSubBandwidth, uint8_t ulEdgeSubBandOffset, uint16_t ulEdgeSubBandwidth, std::vector availableDlRb, std::vector availableUlRb); - virtual ~LteStrictFrTestCase (); + ~LteStrictFrTestCase () override; private: - virtual void DoRun (); + void DoRun () override; std::string m_schedulerType; ///< scheduler type @@ -213,7 +213,7 @@ public: * \param schedulerType the scheduler type */ LteFrAreaTestCase (std::string name, std::string schedulerType); - virtual ~LteFrAreaTestCase (); + ~LteFrAreaTestCase () override; /** * DL data receive start function @@ -265,7 +265,7 @@ public: void SetUlExpectedValues (double expectedPower, std::vector expectedDlRb); protected: - virtual void DoRun (); + void DoRun () override; std::string m_schedulerType; ///< the scheduler type @@ -303,10 +303,10 @@ public: * \param schedulerType the scheduler type */ LteStrictFrAreaTestCase (std::string name, std::string schedulerType); - virtual ~LteStrictFrAreaTestCase (); + ~LteStrictFrAreaTestCase () override; private: - virtual void DoRun (); + void DoRun () override; }; /** @@ -325,10 +325,10 @@ public: * \param schedulerType the scheduler type */ LteSoftFrAreaTestCase (std::string name, std::string schedulerType); - virtual ~LteSoftFrAreaTestCase (); + ~LteSoftFrAreaTestCase () override; private: - virtual void DoRun (); + void DoRun () override; }; @@ -348,10 +348,10 @@ public: * \param schedulerType the scheduler type */ LteSoftFfrAreaTestCase (std::string name, std::string schedulerType); - virtual ~LteSoftFfrAreaTestCase (); + ~LteSoftFfrAreaTestCase () override; private: - virtual void DoRun (); + void DoRun () override; }; @@ -371,10 +371,10 @@ public: * \param schedulerType the scheduler type */ LteEnhancedFfrAreaTestCase (std::string name, std::string schedulerType); - virtual ~LteEnhancedFfrAreaTestCase (); + ~LteEnhancedFfrAreaTestCase () override; private: - virtual void DoRun (); + void DoRun () override; }; @@ -394,10 +394,10 @@ public: * \param schedulerType the scheduler type */ LteDistributedFfrAreaTestCase (std::string name, std::string schedulerType); - virtual ~LteDistributedFfrAreaTestCase (); + ~LteDistributedFfrAreaTestCase () override; private: - virtual void DoRun (); + void DoRun () override; }; diff --git a/src/lte/test/lte-test-harq.h b/src/lte/test/lte-test-harq.h index 9ee3a1024..a5fdd1368 100644 --- a/src/lte/test/lte-test-harq.h +++ b/src/lte/test/lte-test-harq.h @@ -51,10 +51,10 @@ public: * \param thrRef the throughput reference */ LenaHarqTestCase (uint16_t nUser, uint16_t dist, uint16_t tbSize, double amcBer, double thrRef); - virtual ~LenaHarqTestCase (); + ~LenaHarqTestCase () override; private: - virtual void DoRun (); + void DoRun () override; /** * Build name string function * diff --git a/src/lte/test/lte-test-interference-fr.h b/src/lte/test/lte-test-interference-fr.h index f7a7bd17e..04358c220 100644 --- a/src/lte/test/lte-test-interference-fr.h +++ b/src/lte/test/lte-test-interference-fr.h @@ -64,10 +64,10 @@ public: * \param ulSinr the UL SINR */ LteInterferenceHardFrTestCase (std::string name, double d1, double d2, double dlSinr, double ulSinr); - virtual ~LteInterferenceHardFrTestCase (); + ~LteInterferenceHardFrTestCase () override; private: - virtual void DoRun (); + void DoRun () override; double m_d1; ///< distance between UE and ENB double m_d2; ///< distance between UE and other ENB @@ -98,10 +98,10 @@ public: LteInterferenceStrictFrTestCase (std::string name, double d1, double d2, double commonDlSinr, double commonUlSinr, double edgeDlSinr, double edgeUlSinr, uint32_t rspqThreshold); - virtual ~LteInterferenceStrictFrTestCase (); + ~LteInterferenceStrictFrTestCase () override; private: - virtual void DoRun (); + void DoRun () override; double m_d1; ///< distance between UE and ENB double m_d2; ///< distance between UE and other ENB diff --git a/src/lte/test/lte-test-interference.h b/src/lte/test/lte-test-interference.h index f5a4a89cd..08db10ea9 100644 --- a/src/lte/test/lte-test-interference.h +++ b/src/lte/test/lte-test-interference.h @@ -66,7 +66,7 @@ public: * \param ulMcs the UL MCS */ LteInterferenceTestCase (std::string name, double d1, double d2, double dlSinr, double ulSinr, double dlSe, double ulSe, uint16_t dlMcs, uint16_t ulMcs); - virtual ~LteInterferenceTestCase (); + ~LteInterferenceTestCase () override; /** * DL scheduling function @@ -86,7 +86,7 @@ public: uint8_t mcs, uint16_t sizeTb); private: - virtual void DoRun (); + void DoRun () override; double m_d1; ///< distance between UE and ENB diff --git a/src/lte/test/lte-test-ipv6-routing.cc b/src/lte/test/lte-test-ipv6-routing.cc index 381c62979..e47126a06 100644 --- a/src/lte/test/lte-test-ipv6-routing.cc +++ b/src/lte/test/lte-test-ipv6-routing.cc @@ -61,7 +61,7 @@ class LteIpv6RoutingTestCase : public TestCase { public: LteIpv6RoutingTestCase (); - virtual ~LteIpv6RoutingTestCase (); + ~LteIpv6RoutingTestCase () override; /** * \brief Initialize testing parameters. @@ -97,7 +97,7 @@ public: void TunToPgw (Ptr p); private: - virtual void DoRun (); + void DoRun () override; Ipv6InterfaceContainer m_ueIpIface; //!< IPv6 interface container for ue Ipv6Address m_remoteHostAddr; //!< remote host address std::list m_pgwUidRxFrmEnb; //!< list of uids of packets received at pgw from enb diff --git a/src/lte/test/lte-test-link-adaptation.h b/src/lte/test/lte-test-link-adaptation.h index 67026af0b..836a89459 100644 --- a/src/lte/test/lte-test-link-adaptation.h +++ b/src/lte/test/lte-test-link-adaptation.h @@ -60,7 +60,7 @@ public: */ LteLinkAdaptationTestCase (std::string name, double snrDb, double loss, uint16_t mcsIndex); LteLinkAdaptationTestCase (); - virtual ~LteLinkAdaptationTestCase (); + ~LteLinkAdaptationTestCase () override; /** * \brief DL scheduling function @@ -69,7 +69,7 @@ public: void DlScheduling (DlSchedulingCallbackInfo dlInfo); private: - virtual void DoRun (); + void DoRun () override; double m_snrDb; ///< the SNR in dB double m_loss; ///< the loss diff --git a/src/lte/test/lte-test-mimo.h b/src/lte/test/lte-test-mimo.h index f05084d99..6c8df4618 100644 --- a/src/lte/test/lte-test-mimo.h +++ b/src/lte/test/lte-test-mimo.h @@ -53,10 +53,10 @@ public: * \param useIdealRrc true if use ideal RRC */ LenaMimoTestCase (uint16_t dist, std::vector estThrDl, std::string schedulerType, bool useIdealRrc); - virtual ~LenaMimoTestCase (); + ~LenaMimoTestCase () override; private: - virtual void DoRun (); + void DoRun () override; /** * Get RLC buffer sample diff --git a/src/lte/test/lte-test-pathloss-model.h b/src/lte/test/lte-test-pathloss-model.h index 5dd23f3a9..767463d27 100644 --- a/src/lte/test/lte-test-pathloss-model.h +++ b/src/lte/test/lte-test-pathloss-model.h @@ -66,7 +66,7 @@ class LtePathlossModelSystemTestCase : public TestCase */ LtePathlossModelSystemTestCase (std::string name, double snrDb, double dist, uint16_t mcsIndex); LtePathlossModelSystemTestCase (); - virtual ~LtePathlossModelSystemTestCase (); + ~LtePathlossModelSystemTestCase () override; /** * \brief DL scheduling function @@ -75,7 +75,7 @@ class LtePathlossModelSystemTestCase : public TestCase void DlScheduling (DlSchedulingCallbackInfo dlInfo); private: - virtual void DoRun (); + void DoRun () override; double m_snrDb; ///< the SNR in dB double m_distance; ///< the distance diff --git a/src/lte/test/lte-test-pf-ff-mac-scheduler.h b/src/lte/test/lte-test-pf-ff-mac-scheduler.h index 0ee281257..4811cb08d 100644 --- a/src/lte/test/lte-test-pf-ff-mac-scheduler.h +++ b/src/lte/test/lte-test-pf-ff-mac-scheduler.h @@ -54,7 +54,7 @@ public: * \param errorModelEnabled if true the error model is enabled */ LenaPfFfMacSchedulerTestCase1 (uint16_t nUser, double dist, double thrRefDl, double thrRefUl, bool errorModelEnabled); - virtual ~LenaPfFfMacSchedulerTestCase1 (); + ~LenaPfFfMacSchedulerTestCase1 () override; private: /** @@ -64,7 +64,7 @@ private: * \returns the name string */ static std::string BuildNameString (uint16_t nUser, double dist); - virtual void DoRun (); + void DoRun () override; uint16_t m_nUser; ///< number of UE nodes double m_dist; ///< the distance between nodes double m_thrRefDl; ///< the DL throughput reference @@ -91,7 +91,7 @@ public: * \param errorModelEnabled if true the error model is enabled */ LenaPfFfMacSchedulerTestCase2 (std::vector dist, std::vector estThrPfDl, std::vector estThrPfUl, bool errorModelEnabled); - virtual ~LenaPfFfMacSchedulerTestCase2 (); + ~LenaPfFfMacSchedulerTestCase2 () override; private: /** @@ -101,7 +101,7 @@ private: * \returns the name string */ static std::string BuildNameString (uint16_t nUser, std::vector dist); - virtual void DoRun (); + void DoRun () override; uint16_t m_nUser; ///< number of UE nodes std::vector m_dist; ///< the distance between nodes std::vector m_estThrPfDl; ///< the estimated DL throughput diff --git a/src/lte/test/lte-test-phy-error-model.h b/src/lte/test/lte-test-phy-error-model.h index ee7788860..a932bbcf3 100644 --- a/src/lte/test/lte-test-phy-error-model.h +++ b/src/lte/test/lte-test-phy-error-model.h @@ -55,10 +55,10 @@ public: LenaDataPhyErrorModelTestCase (uint16_t nUser, uint16_t dist, double blerRef, uint16_t toleranceRxPackets, Time statsStartTime, uint32_t rngRun); - virtual ~LenaDataPhyErrorModelTestCase (); + ~LenaDataPhyErrorModelTestCase () override; private: - virtual void DoRun (); + void DoRun () override; /** * Builds the test name string based on provided parameter values * \param nUser the number of UE nodes @@ -100,10 +100,10 @@ public: LenaDlCtrlPhyErrorModelTestCase (uint16_t nEnb, uint16_t dist, double blerRef, uint16_t toleranceRxPackets, Time statsStartTime, uint32_t rngRun); - virtual ~LenaDlCtrlPhyErrorModelTestCase (); + ~LenaDlCtrlPhyErrorModelTestCase () override; private: - virtual void DoRun (); + void DoRun () override; /** * Build name string * \param nUser the number of UE nodes diff --git a/src/lte/test/lte-test-primary-cell-change.h b/src/lte/test/lte-test-primary-cell-change.h index 9fc8f3fc0..9ce4b83d3 100644 --- a/src/lte/test/lte-test-primary-cell-change.h +++ b/src/lte/test/lte-test-primary-cell-change.h @@ -71,14 +71,14 @@ public: uint8_t sourceComponentCarrier, uint8_t targetComponentCarrier); - virtual ~LtePrimaryCellChangeTestCase (); + ~LtePrimaryCellChangeTestCase () override; private: /** * \brief Setup the simulation according to the configuration set by the * class constructor, run it, and verify the result. */ - virtual void DoRun (); + void DoRun () override; /** * \brief State transition callback function diff --git a/src/lte/test/lte-test-pss-ff-mac-scheduler.h b/src/lte/test/lte-test-pss-ff-mac-scheduler.h index 079d66d56..9809c8518 100644 --- a/src/lte/test/lte-test-pss-ff-mac-scheduler.h +++ b/src/lte/test/lte-test-pss-ff-mac-scheduler.h @@ -57,7 +57,7 @@ public: * \param errorModelEnabled if true the error model is enabled */ LenaPssFfMacSchedulerTestCase1 (uint16_t nUser, double dist, double thrRefDl, double thrRefUl, uint16_t packetSize, uint16_t interval, bool errorModelEnabled); - virtual ~LenaPssFfMacSchedulerTestCase1 (); + ~LenaPssFfMacSchedulerTestCase1 () override; private: /** @@ -67,7 +67,7 @@ private: * \returns the name string */ static std::string BuildNameString (uint16_t nUser, double dist); - virtual void DoRun (); + void DoRun () override; uint16_t m_nUser; ///< number of UE nodes double m_dist; ///< the distance between nodes uint16_t m_packetSize; ///< the packet size in bytes @@ -99,7 +99,7 @@ public: * \param errorModelEnabled if true the error model is enabled */ LenaPssFfMacSchedulerTestCase2 (std::vector dist, std::vector estThrPssDl, std::vector packetSize, uint16_t interval, bool errorModelEnabled); - virtual ~LenaPssFfMacSchedulerTestCase2 (); + ~LenaPssFfMacSchedulerTestCase2 () override; private: /** @@ -109,7 +109,7 @@ private: * \returns the name string */ static std::string BuildNameString (uint16_t nUser, std::vector dist); - virtual void DoRun (); + void DoRun () override; uint16_t m_nUser; ///< number of UE nodes std::vector m_dist; ///< the distance between nodes std::vector m_packetSize; ///< the packet size in bytes diff --git a/src/lte/test/lte-test-radio-link-failure.h b/src/lte/test/lte-test-radio-link-failure.h index 25b72454c..1b1dc027c 100644 --- a/src/lte/test/lte-test-radio-link-failure.h +++ b/src/lte/test/lte-test-radio-link-failure.h @@ -76,7 +76,7 @@ public: std::vector uePositionList, std::vector enbPositionList, Vector ueJumpAwayPosition, std::vector