C++ STL queue container
-
Packet Queue Example CodeC++ 2014. 2. 20. 06:36
################## PacketBuffer.h template class PacketBuffer { private: std::queue mPackets; int mMaxSize; public: PacketBuffer(size_t maxSize=0); virtual ~PacketBuffer(void); bool bufferPacket(const T& packet); T& getNextPacket(); }; template PacketBuffer::PacketBuffer(size_t maxSize) : mMaxSize(maxSize) { } template PacketBuffer::~PacketBuffer(void) { } template bool PacketBuffer::bufferPacke..