Fix clang-tidy modernize-use-override warnings

This commit is contained in:
Eduardo Almeida
2022-10-06 21:39:37 +00:00
parent 6bb6383562
commit be07b6487a
1008 changed files with 6398 additions and 6398 deletions

View File

@@ -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<TimeMinMaxAvgTotalCalculator> 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.

View File

@@ -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> 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 ();

View File

@@ -58,7 +58,7 @@ public:
AntennaModel ();
virtual ~AntennaModel ();
~AntennaModel () override;
/**
* \brief Get the type ID.

View File

@@ -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.

View File

@@ -47,7 +47,7 @@ public:
static TypeId GetTypeId ();
// inherited from AntennaModel
virtual double GetGainDb (Angles a);
double GetGainDb (Angles a) override;
protected:

View File

@@ -54,7 +54,7 @@ public:
static TypeId GetTypeId ();
// inherited from AntennaModel
virtual double GetGainDb (Angles a);
double GetGainDb (Angles a) override;
// attribute getters/setters

View File

@@ -44,7 +44,7 @@ public:
/**
* Destructor
*/
virtual ~PhasedArrayModel ();
~PhasedArrayModel () override;
/**

View File

@@ -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.

View File

@@ -47,7 +47,7 @@ public:
/**
* Destructor
*/
virtual ~UniformPlanarArray ();
~UniformPlanarArray () override;
/**
* \brief Get the type ID.

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -51,7 +51,7 @@ public:
private:
virtual void DoRun ();
void DoRun () override;
Angles m_a; //!< Antenna angle
double m_expectedGain; //!< Expected gain

View File

@@ -73,7 +73,7 @@ public:
private:
virtual void DoRun ();
void DoRun () override;
Angles m_a; //!< Antenna angle
double m_b; //!< Beamwidth

View File

@@ -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

View File

@@ -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<Ipv4RoutingProtocol> Create (Ptr<Node> node) const;
Ptr<Ipv4RoutingProtocol> Create (Ptr<Node> node) const override;
/**
* \param name the name of the attribute to set
* \param value the value of the attribute to set.

View File

@@ -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
/**

View File

@@ -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;
}

View File

@@ -64,20 +64,20 @@ public:
/// constructor
RoutingProtocol ();
virtual ~RoutingProtocol ();
virtual void DoDispose ();
~RoutingProtocol () override;
void DoDispose () override;
// Inherited from Ipv4RoutingProtocol
Ptr<Ipv4Route> RouteOutput (Ptr<Packet> p, const Ipv4Header &header, Ptr<NetDevice> oif, Socket::SocketErrno &sockerr);
Ptr<Ipv4Route> RouteOutput (Ptr<Packet> p, const Ipv4Header &header, Ptr<NetDevice> oif, Socket::SocketErrno &sockerr) override;
bool RouteInput (Ptr<const Packet> p, const Ipv4Header &header, Ptr<const NetDevice> 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> ipv4);
virtual void PrintRoutingTable (Ptr<OutputStreamWrapper> 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> ipv4) override;
void PrintRoutingTable (Ptr<OutputStreamWrapper> 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.

View File

@@ -50,7 +50,7 @@ public:
cache (Seconds (10))
{
}
virtual void DoRun ();
void DoRun () override;
private:
/// Timeout test function #1

View File

@@ -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 ();
};

View File

@@ -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<Packet> p = Create<Packet> ();
@@ -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<const Packet> p, const Ipv4Header & h, Socket::SocketErrno e)
{
}
virtual void DoRun ()
void DoRun () override
{
Ptr<const Packet> packet = Create<Packet> ();
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<NetDevice> 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");

View File

@@ -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

View File

@@ -76,7 +76,7 @@ class LoopbackTestCase : public TestCase
public:
LoopbackTestCase ();
void DoRun ();
void DoRun () override;
};
LoopbackTestCase::LoopbackTestCase ()

View File

@@ -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<Object> obj);
bool ConnectByObject (std::string traceSource, Ptr<Object> 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:
/**

View File

@@ -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<Socket> 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.

View File

@@ -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
/**

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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.

View File

@@ -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

View File

@@ -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).

View File

@@ -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

View File

@@ -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

View File

@@ -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.

View File

@@ -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.

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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;
};

View File

@@ -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<Channel> bridgedChannel);
// virtual methods implementation, from Channel
virtual std::size_t GetNDevices () const;
virtual Ptr<NetDevice> GetDevice (std::size_t i) const;
std::size_t GetNDevices () const override;
Ptr<NetDevice> GetDevice (std::size_t i) const override;
private:
std::vector< Ptr<Channel> > m_bridgedChannels; //!< pool of bridged channels

View File

@@ -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<NetDevice> GetBridgePort (uint32_t n) const;
// inherited from NetDevice base class.
virtual void SetIfIndex (const uint32_t index);
virtual uint32_t GetIfIndex () const;
virtual Ptr<Channel> 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<void> 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> packet, const Address& dest, uint16_t protocolNumber);
virtual bool SendFrom (Ptr<Packet> packet, const Address& source, const Address& dest, uint16_t protocolNumber);
virtual Ptr<Node> GetNode () const;
virtual void SetNode (Ptr<Node> 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<Channel> 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<void> 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> packet, const Address& dest, uint16_t protocolNumber) override;
bool SendFrom (Ptr<Packet> packet, const Address& source, const Address& dest, uint16_t protocolNumber) override;
Ptr<Node> GetNode () const override;
void SetNode (Ptr<Node> 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.

View File

@@ -45,7 +45,7 @@ class GridBuildingAllocator : public Object
{
public:
GridBuildingAllocator ();
virtual ~GridBuildingAllocator ();
~GridBuildingAllocator () override;
/**
* \brief Get the type ID.

View File

@@ -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<RandomVariableStream> 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:

View File

@@ -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<BuildingListPriv> Get ();
private:
virtual void DoDispose ();
void DoDispose () override;
/**
* Get the Singleton instance of BuildingListPriv (or create one)
* \return the BuildingListPriv instance

View File

@@ -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

View File

@@ -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<ChannelCondition> GetChannelCondition (Ptr<const MobilityModel> a, Ptr<const MobilityModel> b) const override;
Ptr<ChannelCondition> GetChannelCondition (Ptr<const MobilityModel> a, Ptr<const MobilityModel> 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:
/**

View File

@@ -73,7 +73,7 @@ public:
virtual double GetLoss (Ptr<MobilityModel> a, Ptr<MobilityModel> b) const = 0;
// inherited from PropagationLossModel
virtual double DoCalcRxPower (double txPowerDbm, Ptr<MobilityModel> a, Ptr<MobilityModel> b) const;
double DoCalcRxPower (double txPowerDbm, Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
protected:
/**
@@ -152,7 +152,7 @@ protected:
double m_shadowingSigmaIndoor;
Ptr<NormalRandomVariable> m_randVariable; //!< Random variable
virtual int64_t DoAssignStreams (int64_t stream);
int64_t DoAssignStreams (int64_t stream) override;
};
}

View File

@@ -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<MobilityModel> a, Ptr<MobilityModel> b) const;
double GetLoss (Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
private:

View File

@@ -57,10 +57,10 @@ public:
private:
// inherited from PropagationLossModel
virtual double DoCalcRxPower (double txPowerDbm,
double DoCalcRxPower (double txPowerDbm,
Ptr<MobilityModel> a,
Ptr<MobilityModel> b) const;
virtual int64_t DoAssignStreams (int64_t stream);
Ptr<MobilityModel> b) const override;
int64_t DoAssignStreams (int64_t stream) override;
double m_frequency; ///< frequency in MHz

View File

@@ -133,7 +133,7 @@ public:
protected:
// inherited from Object
virtual void DoInitialize ();
void DoInitialize () override;

View File

@@ -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<MobilityModel> a, Ptr<MobilityModel> b) const;
double GetLoss (Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
private:

View File

@@ -110,12 +110,12 @@ private:
*/
Vector CalculateIntersectionFromOutside (const Vector &current, 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

View File

@@ -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<const MobilityModel> a, Ptr<const MobilityModel> b) const override;
double ComputePlos (Ptr<const MobilityModel> a, Ptr<const MobilityModel> 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<const MobilityModel> a, Ptr<const MobilityModel> b) const override;
double ComputePnlos (Ptr<const MobilityModel> a, Ptr<const MobilityModel> b) const override;
Ptr<BuildingsChannelConditionModel> 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<const MobilityModel> a, Ptr<const MobilityModel> b) const override;
double ComputePlos (Ptr<const MobilityModel> a, Ptr<const MobilityModel> 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<const MobilityModel> a, Ptr<const MobilityModel> b) const override;
double ComputePnlos (Ptr<const MobilityModel> a, Ptr<const MobilityModel> b) const override;
/**
* \brief The callback which is hooked to a method to compute channel condition.

View File

@@ -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;
};

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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> object, std::string name) {
void DoVisitAttribute (Ptr<Object> object, std::string name) override {
StringValue str;
ns3::TypeId::SupportLevel supportLevel = TypeId::SupportLevel::SUPPORTED;

View File

@@ -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.

View File

@@ -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> object, std::string name) {
void DoVisitAttribute (Ptr<Object> 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++)

View File

@@ -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
};

View File

@@ -40,7 +40,7 @@ public:
/** Constructor. */
PtrExample ();
/** Destructor. */
~PtrExample ();
~PtrExample () override;
/** Example class method. */
void Method ();
};

View File

@@ -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<const U *> (&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<U *> (&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<U>::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<U>::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<U>::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<U>::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;
}

View File

@@ -96,12 +96,12 @@ public:
AttributeContainerValue (const ITER begin, const ITER end);
/** Destructor. */
~AttributeContainerValue ();
~AttributeContainerValue () override;
// Inherited
Ptr<AttributeValue> Copy () const;
bool DeserializeFromString (std::string value, Ptr<const AttributeChecker> checker);
std::string SerializeToString (Ptr<const AttributeChecker> checker) const;
Ptr<AttributeValue> Copy () const override;
bool DeserializeFromString (std::string value, Ptr<const AttributeChecker> checker) override;
std::string SerializeToString (Ptr<const AttributeChecker> 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<const AttributeChecker> itemchecker);
void SetItemChecker (Ptr<const AttributeChecker> itemchecker);
Ptr<const AttributeChecker> GetItemChecker () const;
void SetItemChecker (Ptr<const AttributeChecker> itemchecker) override;
Ptr<const AttributeChecker> GetItemChecker () const override;
private:
Ptr<const AttributeChecker> m_itemchecker; //!< The AttributeChecker

View File

@@ -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<const T *> (&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<AttributeValue> Create () const
Ptr<AttributeValue> Create () const override
{
return ns3::Create<T> ();
}
virtual bool Copy (const AttributeValue &source, AttributeValue &destination) const
bool Copy (const AttributeValue &source, AttributeValue &destination) const override
{
const T *src = dynamic_cast<const T *> (&source);
T *dst = dynamic_cast<T *> (&destination);

View File

@@ -239,14 +239,14 @@ private:
/**
* \returns a deep copy of this class, wrapped into an Attribute object.
*/
virtual Ptr<AttributeValue> Copy () const;
Ptr<AttributeValue> 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<const AttributeChecker> checker) const;
std::string SerializeToString (Ptr<const AttributeChecker> 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<const AttributeChecker> checker);
bool DeserializeFromString (std::string value, Ptr<const AttributeChecker> 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<AttributeValue> 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<AttributeValue> Create () const override;
bool Copy (const AttributeValue &source, AttributeValue &destination) const override;
};
/**

View File

@@ -54,9 +54,9 @@ public:
*/
operator bool () const;
virtual Ptr<AttributeValue> Copy () const;
virtual std::string SerializeToString (Ptr<const AttributeChecker> checker) const;
virtual bool DeserializeFromString (std::string value, Ptr<const AttributeChecker> checker);
Ptr<AttributeValue> Copy () const override;
std::string SerializeToString (Ptr<const AttributeChecker> checker) const override;
bool DeserializeFromString (std::string value, Ptr<const AttributeChecker> checker) override;
private:
bool m_value;

View File

@@ -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. */

View File

@@ -172,7 +172,7 @@ public:
* \param [in] other CallbackComponentBase Ptr
* \return \c true if we are equal
*/
bool IsEqual (std::shared_ptr<const CallbackComponentBase> other) const
bool IsEqual (std::shared_ptr<const CallbackComponentBase> other) const override
{
auto p = std::dynamic_pointer_cast<const CallbackComponent<T>> (other);
@@ -218,7 +218,7 @@ public:
* \param [in] other CallbackParam Ptr
* \return \c true if we are equal
*/
bool IsEqual (std::shared_ptr<const CallbackComponentBase> other) const
bool IsEqual (std::shared_ptr<const CallbackComponentBase> other) const override
{
return false;
}
@@ -273,7 +273,7 @@ public:
return m_func (uargs...);
}
virtual bool IsEqual (Ptr<const CallbackImplBase> other) const
bool IsEqual (Ptr<const CallbackImplBase> other) const override
{
CallbackImpl<R,UArgs...> const *otherDerived =
dynamic_cast<CallbackImpl<R,UArgs...> 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 <typename T>
bool GetAccessor (T &value) const;
/** \return A copy of this CallBack */
virtual Ptr<AttributeValue> Copy () const;
Ptr<AttributeValue> 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<const AttributeChecker> checker) const;
std::string SerializeToString (Ptr<const AttributeChecker> 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<const AttributeChecker> checker);
bool DeserializeFromString (std::string value, Ptr<const AttributeChecker> checker) override;
private:
/* Documented by print-introspected-doxygen.cc */

View File

@@ -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<bool, std::string> m_callback; /**< The Callback */
std::string m_default; /**< The default value, as a string, if it exists. */
}; // class CallbackItem

View File

@@ -758,7 +758,7 @@ public:
: Resolver (path)
{
}
virtual void DoOne (Ptr<Object> object, std::string path)
void DoOne (Ptr<Object> object, std::string path) override
{
m_objects.push_back (object);
m_contexts.push_back (path);

View File

@@ -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 ();

View File

@@ -140,7 +140,7 @@ public:
/**
* Destructor, closes the trace file.
*/
~DesMetrics ();
~DesMetrics () override;
private:

View File

@@ -57,7 +57,7 @@ Ptr<const AttributeChecker> 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<const DoubleValue *> (&value);
@@ -67,29 +67,29 @@ Ptr<const AttributeChecker> 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<AttributeValue> Create () const
Ptr<AttributeValue> Create () const override
{
NS_LOG_FUNCTION_NOARGS ();
return ns3::Create<DoubleValue> ();
}
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<const DoubleValue *> (&source);

View File

@@ -66,9 +66,9 @@ public:
template <typename T>
bool GetAccessor (T & value) const;
virtual Ptr<AttributeValue> Copy () const;
virtual std::string SerializeToString (Ptr<const AttributeChecker> checker) const;
virtual bool DeserializeFromString (std::string value, Ptr<const AttributeChecker> checker);
Ptr<AttributeValue> Copy () const override;
std::string SerializeToString (Ptr<const AttributeChecker> checker) const override;
bool DeserializeFromString (std::string value, Ptr<const AttributeChecker> 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<AttributeValue> 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<AttributeValue> Create () const override;
bool Copy (const AttributeValue &src, AttributeValue &dst) const override;
private:
/** Type for the pair value, name */

View File

@@ -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. */

View File

@@ -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:
/**

View File

@@ -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:

View File

@@ -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:
/**

View File

@@ -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. */

View File

@@ -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<const IntegerValue *> (&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<AttributeValue> Create () const
Ptr<AttributeValue> Create () const override
{
NS_LOG_FUNCTION_NOARGS ();
return ns3::Create<IntegerValue> ();
}
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<const IntegerValue *> (&src);

View File

@@ -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. */

View File

@@ -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)();
}

View File

@@ -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<OBJ>::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<OBJ>::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<OBJ>::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<OBJ>::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<OBJ>::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<OBJ>::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<OBJ>::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();
}

View File

@@ -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. */

View File

@@ -122,7 +122,7 @@ public:
/** Constructor. */
NamesPriv ();
/** Destructor. */
~NamesPriv ();
~NamesPriv () override;
// Doxygen \copydoc bug: won't copy these docs, so we repeat them.

View File

@@ -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<const T *> (object);
if (obj == 0)
@@ -91,7 +91,7 @@ MakeObjectMapAccessor (U T::*memberVector)
*n = (obj->*m_memberVector).size ();
return true;
}
virtual Ptr<Object> DoGet (const ObjectBase *object, std::size_t i, std::size_t *index) const
Ptr<Object> DoGet (const ObjectBase *object, std::size_t i, std::size_t *index) const override
{
const T *obj = static_cast<const T *> (object);
typename U::const_iterator begin = (obj->*m_memberVector).begin ();

View File

@@ -82,7 +82,7 @@ public:
*
* \returns A copy of this container.
*/
virtual Ptr<AttributeValue> Copy () const;
Ptr<AttributeValue> 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<const AttributeChecker> checker) const;
std::string SerializeToString (Ptr<const AttributeChecker> 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<const AttributeChecker> checker);
bool DeserializeFromString (std::string value, Ptr<const AttributeChecker> checker) override;
private:
/** ObjectPtrContainerAccessor::Get() needs access. */
@@ -177,31 +177,31 @@ template <typename T>
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<const ObjectPtrContainerValue *> (&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<AttributeValue> Create () const
Ptr<AttributeValue> Create () const override
{
return ns3::Create<ObjectPtrContainerValue> ();
}
virtual bool Copy (const AttributeValue &source, AttributeValue &destination) const
bool Copy (const AttributeValue &source, AttributeValue &destination) const override
{
const ObjectPtrContainerValue *src = dynamic_cast<const ObjectPtrContainerValue *> (&source);
ObjectPtrContainerValue *dst = dynamic_cast<ObjectPtrContainerValue *> (&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<U> (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<const T *> (object);
if (obj == 0)
@@ -266,7 +266,7 @@ MakeObjectPtrContainerAccessor (Ptr<U> (T::*get)(INDEX) const,
*n = (obj->*m_getN)();
return true;
}
virtual Ptr<Object> DoGet (const ObjectBase *object, std::size_t i, std::size_t *index) const
Ptr<Object> DoGet (const ObjectBase *object, std::size_t i, std::size_t *index) const override
{
const T *obj = static_cast<const T *> (object);
*index = i;

View File

@@ -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<const T *> (object);
if (obj == 0)
@@ -92,7 +92,7 @@ MakeObjectVectorAccessor (U T::*memberVector)
*n = (obj->*m_memberVector).size ();
return true;
}
virtual Ptr<Object> DoGet (const ObjectBase *object, std::size_t i, std::size_t *index) const
Ptr<Object> DoGet (const ObjectBase *object, std::size_t i, std::size_t *index) const override
{
const T *obj = static_cast<const T *> (object);
typename U::const_iterator begin = (obj->*m_memberVector).begin ();

View File

@@ -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

View File

@@ -74,9 +74,9 @@ public:
PairValue (const result_type &value); // "import" constructor
// Inherited
Ptr<AttributeValue> Copy () const;
bool DeserializeFromString (std::string value, Ptr<const AttributeChecker> checker);
std::string SerializeToString (Ptr<const AttributeChecker> checker) const;
Ptr<AttributeValue> Copy () const override;
bool DeserializeFromString (std::string value, Ptr<const AttributeChecker> checker) override;
std::string SerializeToString (Ptr<const AttributeChecker> checker) const override;
/**
* Get the stored value as a std::pair.
@@ -184,8 +184,8 @@ public:
* \param secondchecker The AttributeChecker for second.
*/
PairChecker (Ptr<const AttributeChecker> firstchecker, Ptr<const AttributeChecker> secondchecker);
void SetCheckers (Ptr<const AttributeChecker> firstchecker, Ptr<const AttributeChecker> secondchecker);
typename ns3::PairChecker::checker_pair_type GetCheckers () const;
void SetCheckers (Ptr<const AttributeChecker> firstchecker, Ptr<const AttributeChecker> secondchecker) override;
typename ns3::PairChecker::checker_pair_type GetCheckers () const override;
private:
/** The first checker. */

Some files were not shown because too many files have changed in this diff Show More