MFMv2.0.10
Movable Feast Machine Simulator 2.0.10
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions
MFM::PacketBuffer< T > Class Template Reference

#include <PacketBuffer.h>

Public Member Functions

 PacketBuffer ()
 
void PushPacket (Packet< T > &packet)
 
Packet< T > * PopPacket ()
 
u32 PacketsHeld ()
 

Detailed Description

template<class T>
class MFM::PacketBuffer< T >

A LIFO buffer designed to hold a Packet array . This is not a thread safe structure.

Constructor & Destructor Documentation

template<class T >
MFM::PacketBuffer< T >::PacketBuffer ( )

Constructs a new PacketBuffer with an empty Packet array.

Member Function Documentation

template<class T >
u32 MFM::PacketBuffer< T >::PacketsHeld ( )
inline

Gets the number of Packets currently held by this PacketBuffer .

Returns
The number of Packets currently held by this PacketBuffer .
template<class T >
Packet< T > * MFM::PacketBuffer< T >::PopPacket ( )

Gets a pointer to the next Packet on the stack. FAILs with ARRAY_INDEX_OUT_OF_BOUNDS if there is not a Packet left.

Returns
A pointer to the next Packet on the stack.
template<class T >
void MFM::PacketBuffer< T >::PushPacket ( Packet< T > &  packet)

Pushes a Packet to the top of the internal Packet array . FAiLs with OUT_OF_ROOM if there is not room for another Packet on the stack.

Parameters
packetThe Packet to put on top of the internal buffer.

The documentation for this class was generated from the following files: