Mark deleted ctors and operator= with delete keyword

This commit is contained in:
Eduardo Almeida
2021-11-30 17:40:09 +00:00
committed by Tom Henderson
parent a4626d178a
commit 4ebdc0c6c6
45 changed files with 243 additions and 779 deletions

View File

@@ -50,6 +50,10 @@ public:
BridgeChannel ();
virtual ~BridgeChannel ();
// Delete copy constructor and assignment operator to avoid misuse
BridgeChannel (const BridgeChannel &) = delete;
BridgeChannel & operator = (const BridgeChannel &) = delete;
/**
* Adds a channel to the bridged pool
* \param bridgedChannel the channel to add to the pool
@@ -61,24 +65,7 @@ public:
virtual Ptr<NetDevice> GetDevice (std::size_t i) const;
private:
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse
*/
BridgeChannel (const BridgeChannel &);
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse
* \returns
*/
BridgeChannel &operator = (const BridgeChannel &);
std::vector< Ptr<Channel> > m_bridgedChannels; //!< pool of bridged channels
};
} // namespace ns3

View File

@@ -79,6 +79,10 @@ public:
BridgeNetDevice ();
virtual ~BridgeNetDevice ();
// Delete copy constructor and assignment operator to avoid misuse
BridgeNetDevice (const BridgeNetDevice &) = delete;
BridgeNetDevice & operator = (const BridgeNetDevice &) = delete;
/**
* \brief Add a 'port' to a bridge device
* \param bridgePort the NetDevice to add
@@ -186,21 +190,6 @@ protected:
Ptr<NetDevice> GetLearnedState (Mac48Address source);
private:
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse
*/
BridgeNetDevice (const BridgeNetDevice &);
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse
* \returns
*/
BridgeNetDevice &operator = (const BridgeNetDevice &);
NetDevice::ReceiveCallback m_rxCallback; //!< receive callback
NetDevice::PromiscReceiveCallback m_promiscRxCallback; //!< promiscuous receive callback

View File

@@ -389,6 +389,9 @@ public:
DsrRouteCache ();
virtual ~DsrRouteCache ();
// Delete assignment operator to avoid misuse
DsrRouteCache & operator = (DsrRouteCache const &) = delete;
/**
* \brief Remove the aged route cache entries when the route cache is full
* \param rtVector the route cache to scan.
@@ -742,11 +745,6 @@ public:
}
private:
/**
* \brief assignment operator - defined but not implemented to avoid misuse.
* \return
*/
DsrRouteCache & operator= (DsrRouteCache const &);
DsrRouteCacheEntry::IP_VECTOR m_vector; ///< The route vector to save the ip addresses for intermediate nodes.
uint32_t m_maxCacheLen; ///< The maximum number of packets that we allow a routing protocol to buffer.
Time RouteCacheTimeout; ///< The maximum period of time that dsr is allowed to for an unused route.

View File

@@ -116,6 +116,9 @@ public:
*/
virtual ~FdNetDevice ();
// Delete assignment operator to avoid misuse
FdNetDevice (FdNetDevice const &) = delete;
/**
* Set the link layer encapsulation mode of this device.
*
@@ -241,14 +244,6 @@ protected:
std::queue< std::pair<uint8_t *, ssize_t> > m_pendingQueue;
private:
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse as suggested in
* http://www.nsnam.org/wiki/NS-3_Python_Bindings#.22invalid_use_of_incomplete_type.22
*/
FdNetDevice (FdNetDevice const &);
/**
* Spin up the device
*/

View File

@@ -43,6 +43,10 @@ public:
FlowMonitorHelper ();
~FlowMonitorHelper ();
// Delete copy constructor and assignment operator to avoid misuse
FlowMonitorHelper (const FlowMonitorHelper &) = delete;
FlowMonitorHelper& operator= (const FlowMonitorHelper &) = delete;
/**
* \brief Set an attribute for the to-be-created FlowMonitor object
* \param n1 attribute name
@@ -113,20 +117,6 @@ public:
void SerializeToXmlFile (std::string fileName, bool enableHistograms, bool enableProbes);
private:
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse
*/
FlowMonitorHelper (const FlowMonitorHelper&);
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse
* \returns
*/
FlowMonitorHelper& operator= (const FlowMonitorHelper&);
ObjectFactory m_monitorFactory; //!< Object factory
Ptr<FlowMonitor> m_flowMonitor; //!< the FlowMonitor object
Ptr<FlowClassifier> m_flowClassifier4; //!< the FlowClassifier object for IPv4

View File

@@ -55,17 +55,15 @@ class FlowClassifier : public SimpleRefCount<FlowClassifier>
private:
FlowId m_lastNewFlowId; //!< Last known Flow ID
/// Defined and not implemented to avoid misuse
FlowClassifier (FlowClassifier const &);
/// Defined and not implemented to avoid misuse
/// \returns
FlowClassifier& operator= (FlowClassifier const &);
public:
FlowClassifier ();
virtual ~FlowClassifier ();
// Delete copy constructor and assignment operator to avoid misuse
FlowClassifier (FlowClassifier const &) = delete;
FlowClassifier& operator= (FlowClassifier const &) = delete;
/// Serializes the results to an std::ostream in XML format
/// \param os the output stream
/// \param indent number of spaces to use as base indentation level

View File

@@ -38,13 +38,6 @@ class FlowMonitor;
/// regarding only the packets that pass through that probe.
class FlowProbe : public Object
{
private:
/// Defined and not implemented to avoid misuse
FlowProbe (FlowProbe const &);
/// Defined and not implemented to avoid misuse
/// \returns
FlowProbe& operator= (FlowProbe const &);
protected:
/// Constructor
/// \param flowMonitor the FlowMonitor this probe is associated with
@@ -53,6 +46,10 @@ protected:
public:
virtual ~FlowProbe ();
// Delete copy constructor and assignment operator to avoid misuse
FlowProbe (FlowProbe const &) = delete;
FlowProbe& operator= (FlowProbe const &) = delete;
/// Register this type.
/// \return The TypeId.

View File

@@ -50,21 +50,6 @@ class Ipv4Header;
*/
class ArpCache : public Object
{
private:
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse
*/
ArpCache (ArpCache const &);
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse
* \returns
*/
ArpCache& operator= (ArpCache const &);
public:
/**
* \brief Get the type ID.
@@ -72,9 +57,14 @@ public:
*/
static TypeId GetTypeId (void);
class Entry;
ArpCache ();
~ArpCache ();
// Delete copy constructor and assignment operator to avoid misuse
ArpCache (ArpCache const &) = delete;
ArpCache & operator = (ArpCache const &) = delete;
/**
* \brief Set the NetDevice and Ipv4Interface associated with the ArpCache
*

View File

@@ -63,6 +63,10 @@ public:
ArpL3Protocol ();
virtual ~ArpL3Protocol ();
// Delete copy constructor and assignment operator to avoid misuse
ArpL3Protocol (const ArpL3Protocol &) = delete;
ArpL3Protocol & operator = (const ArpL3Protocol &) = delete;
/**
* \brief Set the node the ARP L3 protocol is associated with
* \param node the node
@@ -128,21 +132,6 @@ protected:
virtual void NotifyNewAggregate ();
private:
typedef std::list<Ptr<ArpCache> > CacheList; //!< container of the ARP caches
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse
* \param o
*/
ArpL3Protocol (const ArpL3Protocol &o);
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse
* \param o
* \returns
*/
ArpL3Protocol &operator = (const ArpL3Protocol &o);
/**
* \brief Finds the cache associated with a NetDevice

View File

@@ -44,8 +44,14 @@ public:
*/
ArpQueueDiscItem (Ptr<Packet> p, const Address & addr, uint16_t protocol, const ArpHeader & header);
/** Destructor. */
virtual ~ArpQueueDiscItem ();
// Delete default constructor, copy constructor and assignment operator to avoid misuse
ArpQueueDiscItem () = delete;
ArpQueueDiscItem (const ArpQueueDiscItem &) = delete;
ArpQueueDiscItem & operator = (const ArpQueueDiscItem &) = delete;
/**
* \return the correct packet size (header plus payload).
*/
@@ -82,28 +88,8 @@ public:
virtual uint32_t Hash (uint32_t perturbation) const;
private:
/**
* \brief Default constructor
*
* Defined and unimplemented to avoid misuse
*/
ArpQueueDiscItem ();
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse
*/
ArpQueueDiscItem (const ArpQueueDiscItem &);
/**
* \brief Assignment operator
*
* Defined and unimplemented to avoid misuse
* \returns
*/
ArpQueueDiscItem &operator = (const ArpQueueDiscItem &);
ArpHeader m_header; //!< The ARP header.
bool m_headerAdded; //!< True if the header has already been added to the packet.
bool m_headerAdded; //!< True if the header has already been added to the packet.
};
} // namespace ns3

View File

@@ -62,6 +62,10 @@ public:
Ipv4Interface ();
virtual ~Ipv4Interface();
// Delete copy constructor and assignment operator to avoid misuse
Ipv4Interface (const Ipv4Interface &) = delete;
Ipv4Interface & operator = (const Ipv4Interface &) = delete;
/**
* \brief Set node associated with interface.
* \param node node
@@ -190,24 +194,8 @@ public:
protected:
virtual void DoDispose (void);
private:
/**
* \brief Copy constructor
* \param o object to copy
*
* Defined and unimplemented to avoid misuse
*/
Ipv4Interface (const Ipv4Interface &o);
/**
* \brief Assignment operator
* \param o object to copy
* \returns the copied object
*
* Defined and unimplemented to avoid misuse
*/
Ipv4Interface &operator = (const Ipv4Interface &o);
/**
* \brief Initialize interface.
*/

View File

@@ -90,6 +90,10 @@ public:
Ipv4L3Protocol();
virtual ~Ipv4L3Protocol ();
// Delete copy constructor and assignment operator to avoid misuse
Ipv4L3Protocol (const Ipv4L3Protocol &) = delete;
Ipv4L3Protocol & operator = (const Ipv4L3Protocol &) = delete;
/**
* \enum DropReason
* \brief Reason why a packet has been dropped.
@@ -275,21 +279,6 @@ private:
*/
friend class ::Ipv4L3ProtocolTestCase;
/**
* \brief Copy constructor.
*
* Defined but not implemented to avoid misuse
*/
Ipv4L3Protocol(const Ipv4L3Protocol &);
/**
* \brief Copy constructor.
*
* Defined but not implemented to avoid misuse
* \returns the copied object
*/
Ipv4L3Protocol &operator = (const Ipv4L3Protocol &);
// class Ipv4 attributes
virtual void SetIpForward (bool forward);
virtual bool GetIpForward (void) const;

View File

@@ -46,6 +46,11 @@ public:
virtual ~Ipv4QueueDiscItem ();
// Delete default constructor, copy constructor and assignment operator to avoid misuse
Ipv4QueueDiscItem () = delete;
Ipv4QueueDiscItem (const Ipv4QueueDiscItem &) = delete;
Ipv4QueueDiscItem & operator = (const Ipv4QueueDiscItem &) = delete;
/**
* \return the correct packet size (header plus payload).
*/
@@ -96,26 +101,6 @@ public:
virtual uint32_t Hash (uint32_t perturbation) const;
private:
/**
* \brief Default constructor
*
* Defined and unimplemented to avoid misuse
*/
Ipv4QueueDiscItem ();
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse
*/
Ipv4QueueDiscItem (const Ipv4QueueDiscItem &);
/**
* \brief Assignment operator
*
* Defined and unimplemented to avoid misuse
* \returns
*/
Ipv4QueueDiscItem &operator = (const Ipv4QueueDiscItem &);
Ipv4Header m_header; //!< The IPv4 header.
bool m_headerAdded; //!< True if the header has already been added to the packet.
};

View File

@@ -67,6 +67,10 @@ public:
*/
virtual ~Ipv6Interface ();
// Delete copy constructor and assignment operator to avoid misuse
Ipv6Interface (const Ipv6Interface &) = delete;
Ipv6Interface & operator = (const Ipv6Interface &) = delete;
/**
* \brief Set node associated with interface.
* \param node node
@@ -279,23 +283,6 @@ protected:
virtual void DoDispose ();
private:
/**
* \brief Copy constructor
* \param o object to copy
*
* Defined and unimplemented to avoid misuse
*/
Ipv6Interface (const Ipv6Interface &o);
/**
* \brief Assignment operator
* \param o object to copy
* \returns the copied object
*
* Defined and unimplemented to avoid misuse
*/
Ipv6Interface &operator = (const Ipv6Interface &o);
/**
* \brief Container for the Ipv6InterfaceAddresses.
*/

View File

@@ -99,6 +99,10 @@ public:
*/
virtual ~Ipv6L3Protocol ();
// Delete copy constructor and assignment operator to avoid misuse
Ipv6L3Protocol (const Ipv6L3Protocol &) = delete;
Ipv6L3Protocol & operator = (const Ipv6L3Protocol &) = delete;
/**
* \brief Set node associated with this stack.
* \param node node to set
@@ -567,21 +571,6 @@ private:
/// Trace of locally delivered packets
TracedCallback<const Ipv6Header &, Ptr<const Packet>, uint32_t> m_localDeliverTrace;
/**
* \brief Copy constructor.
*
* Defined but not implemented to avoid misuse
*/
Ipv6L3Protocol (const Ipv6L3Protocol&);
/**
* \brief Copy constructor.
*
* Defined but not implemented to avoid misuse
* \returns the copied object
*/
Ipv6L3Protocol &operator = (const Ipv6L3Protocol&);
/**
* \brief Construct an IPv6 header.
* \param src source IPv6 address

View File

@@ -46,6 +46,11 @@ public:
virtual ~Ipv6QueueDiscItem ();
// Delete default constructor, copy constructor and assignment operator to avoid misuse
Ipv6QueueDiscItem () = delete;
Ipv6QueueDiscItem (const Ipv6QueueDiscItem &) = delete;
Ipv6QueueDiscItem & operator = (const Ipv6QueueDiscItem &) = delete;
/**
* \return the correct packet size (header plus payload).
*/
@@ -96,26 +101,6 @@ public:
virtual uint32_t Hash (uint32_t perturbation) const;
private:
/**
* \brief Default constructor
*
* Defined and unimplemented to avoid misuse
*/
Ipv6QueueDiscItem ();
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse
*/
Ipv6QueueDiscItem (const Ipv6QueueDiscItem &);
/**
* \brief Assignment operator
*
* Defined and unimplemented to avoid misuse
* \returns
*/
Ipv6QueueDiscItem &operator = (const Ipv6QueueDiscItem &);
Ipv6Header m_header; //!< The IPv6 header.
bool m_headerAdded; //!< True if the header has already been added to the packet.
};

View File

@@ -72,6 +72,10 @@ public:
*/
~NdiscCache ();
// Delete default and copy constructor, and assignment operator to avoid misuse
NdiscCache (NdiscCache const &) = delete;
NdiscCache & operator = (NdiscCache const &) = delete;
/**
* \brief Get the NetDevice associated with this cache.
* \return NetDevice
@@ -438,24 +442,7 @@ protected:
*/
Cache m_ndCache;
private:
/**
* \brief Copy constructor.
*
* Not implemented to avoid misuse
*/
NdiscCache (NdiscCache const &);
/**
* \brief Copy constructor.
*
* Not implemented to avoid misuse
* \returns
*/
NdiscCache& operator= (NdiscCache const &);
/**
* \brief The NetDevice.
*/

View File

@@ -89,6 +89,10 @@ public:
TcpL4Protocol ();
virtual ~TcpL4Protocol ();
// Delete copy constructor and assignment operator to avoid misuse
TcpL4Protocol (const TcpL4Protocol &) = delete;
TcpL4Protocol & operator = (const TcpL4Protocol &) = delete;
/**
* Set node associated with this stack
* \param node the node
@@ -324,20 +328,6 @@ private:
IpL4Protocol::DownTargetCallback m_downTarget; //!< Callback to send packets over IPv4
IpL4Protocol::DownTargetCallback6 m_downTarget6; //!< Callback to send packets over IPv6
/**
* \brief Copy constructor
*
* Defined and not implemented to avoid misuse
*/
TcpL4Protocol (const TcpL4Protocol &);
/**
* \brief Copy constructor
*
* Defined and not implemented to avoid misuse
* \returns
*/
TcpL4Protocol &operator = (const TcpL4Protocol &);
/**
* \brief Send a packet via TCP (IPv4)
*

View File

@@ -70,6 +70,10 @@ public:
UdpL4Protocol ();
virtual ~UdpL4Protocol ();
// Delete copy constructor and assignment operator to avoid misuse
UdpL4Protocol (const UdpL4Protocol &) = delete;
UdpL4Protocol &operator = (const UdpL4Protocol &) = delete;
/**
* Set node associated with this stack
* \param node the node
@@ -257,20 +261,6 @@ private:
Ipv4EndPointDemux *m_endPoints; //!< A list of IPv4 end points.
Ipv6EndPointDemux *m_endPoints6; //!< A list of IPv6 end points.
/**
* \brief Copy constructor
*
* Defined and not implemented to avoid misuse
*/
UdpL4Protocol (const UdpL4Protocol &);
/**
* \brief Copy constructor
*
* Defined and not implemented to avoid misuse
* \returns
*/
UdpL4Protocol &operator = (const UdpL4Protocol &);
std::vector<Ptr<UdpSocketImpl> > m_sockets; //!< list of sockets
IpL4Protocol::DownTargetCallback m_downTarget; //!< Callback to send packets over IPv4
IpL4Protocol::DownTargetCallback6 m_downTarget6; //!< Callback to send packets over IPv6

View File

@@ -54,6 +54,11 @@ public:
virtual ~QueueItem ();
// Delete default constructor, copy constructor and assignment operator to avoid misuse
QueueItem () = delete;
QueueItem (const QueueItem &) = delete;
QueueItem & operator = (const QueueItem &) = delete;
/**
* \return the packet included in this item.
*/
@@ -101,26 +106,6 @@ public:
typedef void (* TracedCallback) (Ptr<const QueueItem> item);
private:
/**
* \brief Default constructor
*
* Defined and unimplemented to avoid misuse
*/
QueueItem ();
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse
*/
QueueItem (const QueueItem &);
/**
* \brief Assignment operator
*
* Defined and unimplemented to avoid misuse
* \returns
*/
QueueItem &operator = (const QueueItem &);
/**
* The packet contained in the queue item.
*/
@@ -157,6 +142,11 @@ public:
virtual ~QueueDiscItem ();
// Delete default constructor, copy constructor and assignment operator to avoid misuse
QueueDiscItem () = delete;
QueueDiscItem (const QueueDiscItem &) = delete;
QueueDiscItem & operator = (const QueueDiscItem &) = delete;
/**
* \brief Get the MAC address included in this item
* \return the MAC address included in this item.
@@ -227,26 +217,6 @@ public:
virtual uint32_t Hash (uint32_t perturbation = 0) const;
private:
/**
* \brief Default constructor
*
* Defined and unimplemented to avoid misuse
*/
QueueDiscItem ();
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse
*/
QueueDiscItem (const QueueDiscItem &);
/**
* \brief Assignment operator
*
* Defined and unimplemented to avoid misuse
* \returns
*/
QueueDiscItem &operator = (const QueueDiscItem &);
Address m_address; //!< MAC destination address
uint16_t m_protocol; //!< L3 Protocol number
uint8_t m_txq; //!< Transmission queue index

View File

@@ -58,6 +58,10 @@ public:
static TypeId GetTypeId (void);
Cost231PropagationLossModel ();
// Delete copy constructor and assignment operator to avoid misuse
Cost231PropagationLossModel (const Cost231PropagationLossModel &) = delete;
Cost231PropagationLossModel & operator = (const Cost231PropagationLossModel &) = delete;
/**
* Get the propagation loss
* \param a the mobility model of the source
@@ -123,21 +127,8 @@ public:
* \param shadowing the shadowing value
*/
void SetShadowing (double shadowing);
private:
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse
*/
Cost231PropagationLossModel (const Cost231PropagationLossModel &);
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse
* \returns
*/
Cost231PropagationLossModel & operator = (const Cost231PropagationLossModel &);
private:
double DoCalcRxPower (double txPowerDbm, Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
int64_t DoAssignStreams (int64_t stream) override;

View File

@@ -53,6 +53,10 @@ public:
ItuR1411LosPropagationLossModel ();
virtual ~ItuR1411LosPropagationLossModel ();
// Delete copy constructor and assignment operator to avoid misuse
ItuR1411LosPropagationLossModel (const ItuR1411LosPropagationLossModel &) = delete;
ItuR1411LosPropagationLossModel & operator = (const ItuR1411LosPropagationLossModel &) = delete;
/**
* Set the operating frequency
*
@@ -72,20 +76,6 @@ public:
double GetLoss (Ptr<MobilityModel> a, Ptr<MobilityModel> b) const;
private:
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse
*/
ItuR1411LosPropagationLossModel (const ItuR1411LosPropagationLossModel &);
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse
* \returns
*/
ItuR1411LosPropagationLossModel & operator = (const ItuR1411LosPropagationLossModel &);
double DoCalcRxPower (double txPowerDbm,
Ptr<MobilityModel> a,
Ptr<MobilityModel> b) const override;

View File

@@ -53,6 +53,10 @@ public:
ItuR1411NlosOverRooftopPropagationLossModel ();
virtual ~ItuR1411NlosOverRooftopPropagationLossModel ();
// Delete copy constructor and assignment operator to avoid misuse
ItuR1411NlosOverRooftopPropagationLossModel (const ItuR1411NlosOverRooftopPropagationLossModel &) = delete;
ItuR1411NlosOverRooftopPropagationLossModel & operator = (const ItuR1411NlosOverRooftopPropagationLossModel &) = delete;
/**
* Set the operating frequency
*
@@ -72,20 +76,6 @@ public:
double GetLoss (Ptr<MobilityModel> a, Ptr<MobilityModel> b) const;
private:
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse
*/
ItuR1411NlosOverRooftopPropagationLossModel (const ItuR1411NlosOverRooftopPropagationLossModel &);
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse
* \returns
*/
ItuR1411NlosOverRooftopPropagationLossModel & operator = (const ItuR1411NlosOverRooftopPropagationLossModel &);
double DoCalcRxPower (double txPowerDbm,
Ptr<MobilityModel> a,
Ptr<MobilityModel> b) const override;

View File

@@ -43,23 +43,14 @@ public:
static TypeId GetTypeId ();
JakesPropagationLossModel ();
virtual ~JakesPropagationLossModel ();
// Delete copy constructor and assignment operator to avoid misuse
JakesPropagationLossModel (const JakesPropagationLossModel &) = delete;
JakesPropagationLossModel & operator = (const JakesPropagationLossModel &) = delete;
private:
friend class JakesProcess;
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse
*/
JakesPropagationLossModel (const JakesPropagationLossModel &);
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse
* \returns
*/
JakesPropagationLossModel & operator = (const JakesPropagationLossModel &);
double DoCalcRxPower (double txPowerDbm,
Ptr<MobilityModel> a,
Ptr<MobilityModel> b) const override;

View File

@@ -51,6 +51,10 @@ public:
Kun2600MhzPropagationLossModel ();
virtual ~Kun2600MhzPropagationLossModel ();
// Delete copy constructor and assignment operator to avoid misuse
Kun2600MhzPropagationLossModel (const Kun2600MhzPropagationLossModel &) = delete;
Kun2600MhzPropagationLossModel & operator = (const Kun2600MhzPropagationLossModel &) = delete;
/**
* \param a the first mobility model
* \param b the second mobility model
@@ -61,20 +65,6 @@ public:
double GetLoss (Ptr<MobilityModel> a, Ptr<MobilityModel> b) const;
private:
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse
*/
Kun2600MhzPropagationLossModel (const Kun2600MhzPropagationLossModel &);
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse
* \returns
*/
Kun2600MhzPropagationLossModel & operator = (const Kun2600MhzPropagationLossModel &);
// inherited from PropagationLossModel
double DoCalcRxPower (double txPowerDbm,
Ptr<MobilityModel> a,

View File

@@ -54,6 +54,10 @@ public:
OkumuraHataPropagationLossModel ();
virtual ~OkumuraHataPropagationLossModel ();
// Delete copy constructor and assignment operator to avoid misuse
OkumuraHataPropagationLossModel (const OkumuraHataPropagationLossModel &) = delete;
OkumuraHataPropagationLossModel & operator = (const OkumuraHataPropagationLossModel &) = delete;
/**
* \param a the first mobility model
* \param b the second mobility model
@@ -64,20 +68,6 @@ public:
double GetLoss (Ptr<MobilityModel> a, Ptr<MobilityModel> b) const;
private:
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse
*/
OkumuraHataPropagationLossModel (const OkumuraHataPropagationLossModel &);
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse
* \returns
*/
OkumuraHataPropagationLossModel & operator = (const OkumuraHataPropagationLossModel &);
double DoCalcRxPower (double txPowerDbm,
Ptr<MobilityModel> a,
Ptr<MobilityModel> b) const override;

View File

@@ -59,6 +59,10 @@ public:
PropagationLossModel ();
virtual ~PropagationLossModel ();
// Delete copy constructor and assignment operator to avoid misuse
PropagationLossModel (const PropagationLossModel &) = delete;
PropagationLossModel & operator = (const PropagationLossModel &) = delete;
/**
* \brief Enables a chain of loss models to act on the signal
* \param next The next PropagationLossModel to add to the chain
@@ -129,21 +133,6 @@ protected:
virtual int64_t DoAssignStreams (int64_t stream) = 0;
private:
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse
*/
PropagationLossModel (const PropagationLossModel &);
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse
* \returns
*/
PropagationLossModel &operator = (const PropagationLossModel &);
Ptr<PropagationLossModel> m_next; //!< Next propagation loss model in the list
};
@@ -164,21 +153,11 @@ public:
RandomPropagationLossModel ();
virtual ~RandomPropagationLossModel ();
private:
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse
*/
RandomPropagationLossModel (const RandomPropagationLossModel &);
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse
* \returns
*/
RandomPropagationLossModel & operator = (const RandomPropagationLossModel &);
// Delete copy constructor and assignment operator to avoid misuse
RandomPropagationLossModel (const RandomPropagationLossModel &) = delete;
RandomPropagationLossModel & operator = (const RandomPropagationLossModel &) = delete;
private:
double DoCalcRxPower (double txPowerDbm,
Ptr<MobilityModel> a,
Ptr<MobilityModel> b) const override;
@@ -273,6 +252,11 @@ public:
*/
static TypeId GetTypeId (void);
FriisPropagationLossModel ();
// Delete copy constructor and assignment operator to avoid misuse
FriisPropagationLossModel (const FriisPropagationLossModel &) = delete;
FriisPropagationLossModel & operator = (const FriisPropagationLossModel &) = delete;
/**
* \param frequency (Hz)
*
@@ -310,20 +294,6 @@ public:
double GetSystemLoss (void) const;
private:
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse
*/
FriisPropagationLossModel (const FriisPropagationLossModel &);
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse
* \returns
*/
FriisPropagationLossModel & operator = (const FriisPropagationLossModel &);
double DoCalcRxPower (double txPowerDbm,
Ptr<MobilityModel> a,
Ptr<MobilityModel> b) const override;
@@ -387,6 +357,10 @@ public:
static TypeId GetTypeId (void);
TwoRayGroundPropagationLossModel ();
// Delete copy constructor and assignment operator to avoid misuse
TwoRayGroundPropagationLossModel (const TwoRayGroundPropagationLossModel &) = delete;
TwoRayGroundPropagationLossModel & operator = (const TwoRayGroundPropagationLossModel &) = delete;
/**
* \param frequency (Hz)
*
@@ -430,20 +404,6 @@ public:
void SetHeightAboveZ (double heightAboveZ);
private:
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse
*/
TwoRayGroundPropagationLossModel (const TwoRayGroundPropagationLossModel &);
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse
* \returns
*/
TwoRayGroundPropagationLossModel & operator = (const TwoRayGroundPropagationLossModel &);
double DoCalcRxPower (double txPowerDbm,
Ptr<MobilityModel> a,
Ptr<MobilityModel> b) const override;
@@ -500,6 +460,10 @@ public:
static TypeId GetTypeId (void);
LogDistancePropagationLossModel ();
// Delete copy constructor and assignment operator to avoid misuse
LogDistancePropagationLossModel (const LogDistancePropagationLossModel &) = delete;
LogDistancePropagationLossModel & operator = (const LogDistancePropagationLossModel &) = delete;
/**
* \param n the path loss exponent.
* Set the path loss exponent.
@@ -518,20 +482,6 @@ public:
void SetReference (double referenceDistance, double referenceLoss);
private:
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse
*/
LogDistancePropagationLossModel (const LogDistancePropagationLossModel &);
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse
* \returns
*/
LogDistancePropagationLossModel & operator = (const LogDistancePropagationLossModel &);
double DoCalcRxPower (double txPowerDbm,
Ptr<MobilityModel> a,
Ptr<MobilityModel> b) const override;
@@ -599,23 +549,13 @@ public:
static TypeId GetTypeId (void);
ThreeLogDistancePropagationLossModel ();
// Delete copy constructor and assignment operator to avoid misuse
ThreeLogDistancePropagationLossModel (const ThreeLogDistancePropagationLossModel &) = delete;
ThreeLogDistancePropagationLossModel & operator = (const ThreeLogDistancePropagationLossModel &) = delete;
// Parameters are all accessible via attributes.
private:
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse
*/
ThreeLogDistancePropagationLossModel (const ThreeLogDistancePropagationLossModel&);
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse
* \returns
*/
ThreeLogDistancePropagationLossModel& operator= (const ThreeLogDistancePropagationLossModel&);
double DoCalcRxPower (double txPowerDbm,
Ptr<MobilityModel> a,
Ptr<MobilityModel> b) const override;
@@ -671,23 +611,13 @@ public:
NakagamiPropagationLossModel ();
// Delete copy constructor and assignment operator to avoid misuse
NakagamiPropagationLossModel (const NakagamiPropagationLossModel &) = delete;
NakagamiPropagationLossModel & operator = (const NakagamiPropagationLossModel &) = delete;
// Parameters are all accessible via attributes.
private:
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse
*/
NakagamiPropagationLossModel (const NakagamiPropagationLossModel&);
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse
* \returns
*/
NakagamiPropagationLossModel& operator= (const NakagamiPropagationLossModel&);
double DoCalcRxPower (double txPowerDbm,
Ptr<MobilityModel> a,
Ptr<MobilityModel> b) const override;
@@ -729,6 +659,11 @@ public:
FixedRssLossModel ();
virtual ~FixedRssLossModel ();
// Delete copy constructor and assignment operator to avoid misuse
FixedRssLossModel (const FixedRssLossModel &) = delete;
FixedRssLossModel & operator = (const FixedRssLossModel &) = delete;
/**
* \param rss (dBm) the received signal strength
*
@@ -737,20 +672,6 @@ public:
void SetRss (double rss);
private:
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse
*/
FixedRssLossModel (const FixedRssLossModel &);
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse
* \returns
*/
FixedRssLossModel & operator = (const FixedRssLossModel &);
double DoCalcRxPower (double txPowerDbm,
Ptr<MobilityModel> a,
Ptr<MobilityModel> b) const override;
@@ -779,6 +700,10 @@ public:
MatrixPropagationLossModel ();
virtual ~MatrixPropagationLossModel ();
// Delete copy constructor and assignment operator to avoid misuse
MatrixPropagationLossModel (const MatrixPropagationLossModel &) = delete;
MatrixPropagationLossModel & operator = (const MatrixPropagationLossModel &) = delete;
/**
* \brief Set loss (in dB, positive) between pair of ns-3 objects
* (typically, nodes).
@@ -797,20 +722,6 @@ public:
void SetDefaultLoss (double defaultLoss);
private:
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse
*/
MatrixPropagationLossModel (const MatrixPropagationLossModel &);
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse
* \returns
*/
MatrixPropagationLossModel &operator = (const MatrixPropagationLossModel &);
double DoCalcRxPower (double txPowerDbm,
Ptr<MobilityModel> a,
Ptr<MobilityModel> b) const override;
@@ -844,21 +755,12 @@ public:
*/
static TypeId GetTypeId (void);
RangePropagationLossModel ();
private:
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse
*/
RangePropagationLossModel (const RangePropagationLossModel&);
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse
* \returns
*/
RangePropagationLossModel& operator= (const RangePropagationLossModel&);
// Delete copy constructor and assignment operator to avoid misuse
RangePropagationLossModel (const RangePropagationLossModel &) = delete;
RangePropagationLossModel & operator = (const RangePropagationLossModel &) = delete;
private:
double DoCalcRxPower (double txPowerDbm,
Ptr<MobilityModel> a,
Ptr<MobilityModel> b) const override;

View File

@@ -88,6 +88,10 @@ public:
*/
SixLowPanNetDevice ();
// Delete copy constructor and assignment operator to avoid misuse
SixLowPanNetDevice (SixLowPanNetDevice const &) = delete;
SixLowPanNetDevice & operator = (SixLowPanNetDevice const &) = delete;
// inherited from NetDevice base class
virtual void SetIfIndex (const uint32_t index);
virtual uint32_t GetIfIndex (void) const;
@@ -234,19 +238,6 @@ protected:
virtual void DoDispose (void);
private:
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse.
*/
SixLowPanNetDevice (SixLowPanNetDevice const &);
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse.
* \returns
*/
SixLowPanNetDevice& operator= (SixLowPanNetDevice const &);
/**
* \brief Receives all the packets from a NetDevice for further processing.
* \param [in] device The NetDevice the packet ws received from.

View File

@@ -49,6 +49,10 @@ public:
SpectrumPhy ();
virtual ~SpectrumPhy ();
// Delete copy constructor and assignment operator to avoid misuse
SpectrumPhy (SpectrumPhy const &) = delete;
SpectrumPhy &operator= (SpectrumPhy const &) = delete;
/**
* \brief Get the type ID.
* \return the object TypeId
@@ -111,35 +115,8 @@ public:
* @param params the parameters of the signals being received
*/
virtual void StartRx (Ptr<SpectrumSignalParameters> params) = 0;
private:
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse
*/
SpectrumPhy (SpectrumPhy const &);
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse
* \returns
*/
SpectrumPhy& operator= (SpectrumPhy const &);
};
} // namespace ns3
#endif /* SPECTRUM_PHY_H */

View File

@@ -61,6 +61,10 @@ public:
InetTopologyReader ();
virtual ~InetTopologyReader ();
// Delete copy constructor and assignment operator to avoid misuse
InetTopologyReader (const InetTopologyReader &) = delete;
InetTopologyReader & operator = (const InetTopologyReader &) = delete;
/**
* \brief Main topology reading function.
*
@@ -75,21 +79,6 @@ public:
*/
virtual NodeContainer Read (void);
private:
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse.
*/
InetTopologyReader (const InetTopologyReader&);
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse.
* \returns
*/
InetTopologyReader& operator= (const InetTopologyReader&);
// end class InetTopologyReader
};

View File

@@ -58,6 +58,10 @@ public:
OrbisTopologyReader ();
virtual ~OrbisTopologyReader ();
// Delete copy constructor and assignment operator to avoid misuse
OrbisTopologyReader (const OrbisTopologyReader &) = delete;
OrbisTopologyReader & operator = (const OrbisTopologyReader &) = delete;
/**
* \brief Main topology reading function.
*
@@ -70,22 +74,6 @@ public:
*/
virtual NodeContainer Read (void);
private:
private:
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse.
*/
OrbisTopologyReader (const OrbisTopologyReader&);
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse.
* \returns
*/
OrbisTopologyReader& operator= (const OrbisTopologyReader&);
// end class OrbisTopologyReader
};

View File

@@ -57,6 +57,10 @@ public:
RocketfuelTopologyReader ();
virtual ~RocketfuelTopologyReader ();
// Delete copy constructor and assignment operator to avoid misuse
RocketfuelTopologyReader (const RocketfuelTopologyReader &) = delete;
RocketfuelTopologyReader & operator = (const RocketfuelTopologyReader &) = delete;
/**
* \brief Main topology reading function.
*
@@ -117,22 +121,6 @@ private:
int m_nodesNumber; //!< Number of nodes.
std::map<std::string, Ptr<Node> > m_nodeMap; //!< Map of the nodes (name, node).
private:
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse.
*/
RocketfuelTopologyReader (const RocketfuelTopologyReader&);
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse.
* \returns
*/
RocketfuelTopologyReader& operator= (const RocketfuelTopologyReader&);
// end class RocketfuelTopologyReader
};

View File

@@ -149,6 +149,10 @@ private:
TopologyReader ();
virtual ~TopologyReader ();
// Delete copy constructor and assignment operator to avoid misuse
TopologyReader (const TopologyReader &) = delete;
TopologyReader & operator = (const TopologyReader &) = delete;
/**
* \brief Main topology reading function.
*
@@ -205,21 +209,6 @@ private:
void AddLink (Link link);
private:
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse.
*/
TopologyReader (const TopologyReader&);
/**
* \brief Copy constructor
*
* Defined and unimplemented to avoid misuse.
* \returns
*/
TopologyReader& operator= (const TopologyReader&);
/**
* The name of the input file.
*/

View File

@@ -48,6 +48,9 @@ public:
virtual ~QueueDiscFactory () {}
// Delete default constructor to avoid misuse
QueueDiscFactory () = delete;
/**
* \brief Add a factory to create an internal queue
*
@@ -87,13 +90,6 @@ public:
Ptr<QueueDisc> CreateQueueDisc (const std::vector<Ptr<QueueDisc> > & queueDiscs);
private:
/**
* \brief Default constructor
*
* Defined and unimplemented to avoid misuse
*/
QueueDiscFactory ();
/// Factory to create this queue disc
ObjectFactory m_queueDiscFactory;
/// Vector of factories to create internal queues

View File

@@ -288,6 +288,10 @@ public:
virtual ~QueueDisc ();
// Delete copy constructor and assignment operator to avoid misuse
QueueDisc (const QueueDisc &) = delete;
QueueDisc & operator = (const QueueDisc &) = delete;
/**
* \brief Get the number of packets stored by the queue disc
* \return the number of packets stored by the queue disc.
@@ -564,23 +568,6 @@ protected:
bool Mark (Ptr<QueueDiscItem> item, const char* reason);
private:
/**
* \brief Copy constructor
* \param o object to copy
*
* Defined and unimplemented to avoid misuse
*/
QueueDisc (const QueueDisc &o);
/**
* \brief Assignment operator
* \param o object to copy
* \returns the copied object
*
* Defined and unimplemented to avoid misuse
*/
QueueDisc &operator = (const QueueDisc &o);
/**
* This function actually enqueues a packet into the queue disc.
* \param item item to enqueue

View File

@@ -109,6 +109,10 @@ public:
virtual ~TrafficControlLayer ();
// Delete copy constructor and assignment operator to avoid misuse
TrafficControlLayer (TrafficControlLayer const &) = delete;
TrafficControlLayer & operator = (TrafficControlLayer const &) = delete;
/**
* \brief Register an IN handler
*
@@ -203,17 +207,6 @@ protected:
virtual void NotifyNewAggregate (void);
private:
/**
* \brief Copy constructor
* Disable default implementation to avoid misuse
*/
TrafficControlLayer (TrafficControlLayer const &);
/**
* \brief Assignment operator
* \return this object
* Disable default implementation to avoid misuse
*/
TrafficControlLayer& operator= (TrafficControlLayer const &);
/**
* \brief Protocol handler entry.
* This structure is used to demultiplex all the protocols.

View File

@@ -52,22 +52,16 @@ public:
*/
AredQueueDiscTestItem (Ptr<Packet> p, const Address & addr);
virtual ~AredQueueDiscTestItem ();
// Delete copy constructor and assignment operator to avoid misuse
AredQueueDiscTestItem (const AredQueueDiscTestItem &) = delete;
AredQueueDiscTestItem & operator = (const AredQueueDiscTestItem &) = delete;
virtual void AddHeader (void);
virtual bool Mark(void);
private:
AredQueueDiscTestItem ();
/**
* \brief Copy constructor
* Disable default implementation to avoid misuse
*/
AredQueueDiscTestItem (const AredQueueDiscTestItem &);
/**
* \brief Assignment operator
* \return this object
* Disable default implementation to avoid misuse
*/
AredQueueDiscTestItem &operator = (const AredQueueDiscTestItem &);
};
AredQueueDiscTestItem::AredQueueDiscTestItem (Ptr<Packet> p, const Address & addr)

View File

@@ -51,22 +51,17 @@ public:
*/
CobaltQueueDiscTestItem (Ptr<Packet> p, const Address & addr,uint16_t protocol, bool ecnCapable);
virtual ~CobaltQueueDiscTestItem ();
// Delete copy constructor and assignment operator to avoid misuse
CobaltQueueDiscTestItem (const CobaltQueueDiscTestItem &) = delete;
CobaltQueueDiscTestItem & operator = (const CobaltQueueDiscTestItem &) = delete;
virtual void AddHeader (void);
virtual bool Mark (void);
private:
CobaltQueueDiscTestItem ();
/**
* \brief Copy constructor
* Disable default implementation to avoid misuse
*/
CobaltQueueDiscTestItem (const CobaltQueueDiscTestItem &);
/**
* \brief Assignment operator
* \return this object
* Disable default implementation to avoid misuse
*/
CobaltQueueDiscTestItem &operator = (const CobaltQueueDiscTestItem &);
bool m_ecnCapablePacket; ///< ECN capable packet?
};

View File

@@ -71,22 +71,17 @@ public:
*/
CodelQueueDiscTestItem (Ptr<Packet> p, const Address & addr, bool ecnCapable);
virtual ~CodelQueueDiscTestItem ();
// Delete copy constructor and assignment operator to avoid misuse
CodelQueueDiscTestItem (const CodelQueueDiscTestItem &) = delete;
CodelQueueDiscTestItem & operator = (const CodelQueueDiscTestItem &) = delete;
virtual void AddHeader (void);
virtual bool Mark(void);
private:
CodelQueueDiscTestItem ();
/**
* \brief Copy constructor
* Disable default implementation to avoid misuse
*/
CodelQueueDiscTestItem (const CodelQueueDiscTestItem &);
/**
* \brief Assignment operator
* \return this object
* Disable default implementation to avoid misuse
*/
CodelQueueDiscTestItem &operator = (const CodelQueueDiscTestItem &);
bool m_ecnCapablePacket; ///< ECN capable packet?
};

View File

@@ -50,22 +50,16 @@ public:
*/
FifoQueueDiscTestItem (Ptr<Packet> p, const Address & addr);
virtual ~FifoQueueDiscTestItem ();
// Delete copy constructor and assignment operator to avoid misuse
FifoQueueDiscTestItem (const FifoQueueDiscTestItem &) = delete;
FifoQueueDiscTestItem & operator = (const FifoQueueDiscTestItem &) = delete;
virtual void AddHeader (void);
virtual bool Mark (void);
private:
FifoQueueDiscTestItem ();
/**
* \brief Copy constructor
* Disable default implementation to avoid misuse
*/
FifoQueueDiscTestItem (const FifoQueueDiscTestItem &);
/**
* \brief Assignment operator
* \return this object
* Disable default implementation to avoid misuse
*/
FifoQueueDiscTestItem &operator = (const FifoQueueDiscTestItem &);
};
FifoQueueDiscTestItem::FifoQueueDiscTestItem (Ptr<Packet> p, const Address & addr)

View File

@@ -50,6 +50,11 @@ public:
*/
PieQueueDiscTestItem (Ptr<Packet> p, const Address & addr, bool ecnCapable);
virtual ~PieQueueDiscTestItem ();
// Delete copy constructor and assignment operator to avoid misuse
PieQueueDiscTestItem (const PieQueueDiscTestItem &) = delete;
PieQueueDiscTestItem & operator = (const PieQueueDiscTestItem &) = delete;
virtual void AddHeader (void);
virtual bool Mark (void);
@@ -73,17 +78,7 @@ public:
private:
PieQueueDiscTestItem ();
/**
* \brief Copy constructor
* Disable default implementation to avoid misuse
*/
PieQueueDiscTestItem (const PieQueueDiscTestItem &);
/**
* \brief Assignment operator
* \return this object
* Disable default implementation to avoid misuse
*/
PieQueueDiscTestItem &operator = (const PieQueueDiscTestItem &);
bool m_ecnCapablePacket; //!< ECN capable packet?
};

View File

@@ -48,22 +48,17 @@ public:
*/
RedQueueDiscTestItem (Ptr<Packet> p, const Address & addr, bool ecnCapable);
virtual ~RedQueueDiscTestItem ();
// Delete copy constructor and assignment operator to avoid misuse
RedQueueDiscTestItem (const RedQueueDiscTestItem &) = delete;
RedQueueDiscTestItem & operator = (const RedQueueDiscTestItem &) = delete;
virtual void AddHeader (void);
virtual bool Mark(void);
private:
RedQueueDiscTestItem ();
/**
* \brief Copy constructor
* Disable default implementation to avoid misuse
*/
RedQueueDiscTestItem (const RedQueueDiscTestItem &);
/**
* \brief Assignment operator
* \return this object
* Disable default implementation to avoid misuse
*/
RedQueueDiscTestItem &operator = (const RedQueueDiscTestItem &);
bool m_ecnCapablePacket; ///< ECN capable packet?
};

View File

@@ -52,22 +52,16 @@ public:
*/
TbfQueueDiscTestItem (Ptr<Packet> p, const Address & addr);
virtual ~TbfQueueDiscTestItem ();
// Delete copy constructor and assignment operator to avoid misuse
TbfQueueDiscTestItem (const TbfQueueDiscTestItem &) = delete;
TbfQueueDiscTestItem & operator = (const TbfQueueDiscTestItem &) = delete;
virtual void AddHeader (void);
virtual bool Mark (void);
private:
TbfQueueDiscTestItem ();
/**
* \brief Copy constructor
* Disable default implementation to avoid misuse
*/
TbfQueueDiscTestItem (const TbfQueueDiscTestItem &);
/**
* \brief Assignment operator
* \return this object
* Disable default implementation to avoid misuse
*/
TbfQueueDiscTestItem &operator = (const TbfQueueDiscTestItem &);
};
TbfQueueDiscTestItem::TbfQueueDiscTestItem (Ptr<Packet> p, const Address & addr)

View File

@@ -55,22 +55,16 @@ public:
*/
QueueDiscTestItem (Ptr<Packet> p);
virtual ~QueueDiscTestItem ();
// Delete copy constructor and assignment operator to avoid misuse
QueueDiscTestItem (const QueueDiscTestItem &) = delete;
QueueDiscTestItem & operator = (const QueueDiscTestItem &) = delete;
virtual void AddHeader (void);
virtual bool Mark(void);
private:
QueueDiscTestItem ();
/**
* \brief Copy constructor
* Disable default implementation to avoid misuse
*/
QueueDiscTestItem (const QueueDiscTestItem &);
/**
* \brief Assignment operator
* \return this object
* Disable default implementation to avoid misuse
*/
QueueDiscTestItem &operator = (const QueueDiscTestItem &);
};
QueueDiscTestItem::QueueDiscTestItem (Ptr<Packet> p)

View File

@@ -62,6 +62,10 @@ public:
WifiNetDevice ();
virtual ~WifiNetDevice ();
// Delete copy constructor and assignment operator to avoid misuse
WifiNetDevice (const WifiNetDevice &o) = delete;
WifiNetDevice &operator = (const WifiNetDevice &) = delete;
/**
* \param mac the MAC layer to use.
*/
@@ -153,23 +157,6 @@ protected:
private:
/**
* \brief Copy constructor
* \param o object to copy
*
* Defined and unimplemented to avoid misuse
*/
WifiNetDevice (const WifiNetDevice &o);
/**
* \brief Assignment operator
* \param o object to copy
* \returns the copied object
*
* Defined and unimplemented to avoid misuse
*/
WifiNetDevice &operator = (const WifiNetDevice &o);
/**
* Set that the link is up. A link is always up in ad-hoc mode.
* For a STA, a link is up when the STA is associated with an AP.