OpenBarnyard
 
Loading...
Searching...
No Matches
TFifo< T, MaxItems > Class Template Reference

#include <TFifo.h>

Inheritance diagram for TFifo< T, MaxItems >:
TGenericFifo

Public Member Functions

 TFifo ()
 
 ~TFifo ()
 
TBOOL Push (T *element, Flags flags=TGenericFifo::Flags_None)
 
TBOOL Pop (T &out, Flags flags=TGenericFifo::Flags_None)
 

Additional Inherited Members

- Protected Types inherited from TGenericFifo
enum  Flags_ : Flags { Flags_None = 0 , Flags_PollSemaphore = BITFLAG( 0 ) , Flags_NoSemaphore = BITFLAG( 1 ) }
 
typedef uint8_t Flags
 
- Protected Member Functions inherited from TGenericFifo
 TGenericFifo ()=default
 
TBOOL Create (TCHAR *a_pBuffer, TINT a_iMaxItems, TINT a_iItemSize)
 
TBOOL Destroy ()
 
TBOOL Push (void *a_pItem, Flags a_iFlags)
 
TBOOL Pop (void *a_pOut, Flags a_iFlags)
 

Detailed Description

template<class T, TINT MaxItems>
class TFifo< T, MaxItems >

Definition at line 44 of file TFifo.h.

Constructor & Destructor Documentation

◆ TFifo()

template<class T, TINT MaxItems>
TFifo< T, MaxItems >::TFifo ( )
inline

Definition at line 47 of file TFifo.h.

48 {
49 TGenericFifo::Create( m_Buffer, MaxItems, sizeof( T ) );
50 }
TBOOL Create(TCHAR *a_pBuffer, TINT a_iMaxItems, TINT a_iItemSize)
Definition TFifo.cpp:12
Definition TFifo.h:45

◆ ~TFifo()

template<class T, TINT MaxItems>
TFifo< T, MaxItems >::~TFifo ( )
inline

Definition at line 52 of file TFifo.h.

53 {
55 }
TBOOL Destroy()
Definition TFifo.cpp:34

Member Function Documentation

◆ Pop()

template<class T, TINT MaxItems>
TBOOL TFifo< T, MaxItems >::Pop ( T & out,
Flags flags = TGenericFifo::Flags_None )
inline

Definition at line 62 of file TFifo.h.

63 {
64 return TGenericFifo::Pop( &out, flags );
65 }
TBOOL Pop(void *a_pOut, Flags a_iFlags)
Definition TFifo.cpp:67

◆ Push()

template<class T, TINT MaxItems>
TBOOL TFifo< T, MaxItems >::Push ( T * element,
Flags flags = TGenericFifo::Flags_None )
inline

Definition at line 57 of file TFifo.h.

58 {
60 }
TBOOL Push(void *a_pItem, Flags a_iFlags)
Definition TFifo.cpp:42

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