INET Framework for OMNeT++/OMNEST
inet::queueing::IPacketComparatorFunction Class Referenceabstract

This class defines the interface for packet comparator functions. More...

#include <IPacketComparatorFunction.h>

Inheritance diagram for inet::queueing::IPacketComparatorFunction:
inet::queueing::CPacketComparatorFunction

Public Member Functions

virtual ~IPacketComparatorFunction ()
 
virtual int comparePackets (Packet *packet1, Packet *packet2) const =0
 Returns the order of the given packets. More...
 
virtual bool less (cObject *a, cObject *b) override
 

Detailed Description

This class defines the interface for packet comparator functions.

Constructor & Destructor Documentation

◆ ~IPacketComparatorFunction()

virtual inet::queueing::IPacketComparatorFunction::~IPacketComparatorFunction ( )
inlinevirtual
22 {}

Member Function Documentation

◆ comparePackets()

virtual int inet::queueing::IPacketComparatorFunction::comparePackets ( Packet packet1,
Packet packet2 
) const
pure virtual

Returns the order of the given packets.

Implemented in inet::queueing::CPacketComparatorFunction.

Referenced by inet::queueing::InProgressQueue::canPushPacket().

◆ less()

virtual bool inet::queueing::IPacketComparatorFunction::less ( cObject *  a,
cObject *  b 
)
inlineoverridevirtual
30 { return comparePackets(check_and_cast<Packet *>(a), check_and_cast<Packet *>(b)) < 0; }

The documentation for this class was generated from the following file:
inet::units::values::b
value< int64_t, units::b > b
Definition: Units.h:1241
inet::queueing::IPacketComparatorFunction::comparePackets
virtual int comparePackets(Packet *packet1, Packet *packet2) const =0
Returns the order of the given packets.