GSI Object Oriented Online Offline (Go4)  GO4-6.3.0
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
TGo4Queue Class Reference

#include <TGo4Queue.h>

+ Inheritance diagram for TGo4Queue:

Public Member Functions

 TGo4Queue (const char *name=nullptr)
 
virtual ~TGo4Queue ()
 
void Clear (Option_t *opt="") override
 
virtual void Wake ()
 
Bool_t IsEmpty () const
 
Int_t GetEntries () const
 
void SetMaxEntries (Int_t max)
 

Protected Member Functions

TObject * Next ()
 
TObject * Wait ()
 
void Add (TObject *ob)
 

Private Attributes

TMutex * fxMutex {nullptr}
 
TCondition * fxCondition {nullptr}
 
TList * fxList {nullptr}
 
Int_t fiEntries {0}
 
Int_t fiMaxEntries {0}
 
Bool_t fbWakeUpCall {kFALSE}
 

Detailed Description

Base class for all threadsafe pointer queues. TObject pointers are transported in queue without streaming. Subclasses may specialize the behaviour on adding and waiting.

Author
J. Adamczewski
Since
13-Jul-2001

Definition at line 31 of file TGo4Queue.h.

Constructor & Destructor Documentation

◆ TGo4Queue()

TGo4Queue::TGo4Queue ( const char *  name = nullptr)

Definition at line 23 of file TGo4Queue.cxx.

References fxCondition, fxList, and fxMutex.

◆ ~TGo4Queue()

TGo4Queue::~TGo4Queue ( )
virtual

Definition at line 34 of file TGo4Queue.cxx.

References fxCondition, fxList, and fxMutex.

Member Function Documentation

◆ Add()

void TGo4Queue::Add ( TObject *  ob)
protected

◆ Clear()

void TGo4Queue::Clear ( Option_t *  opt = "")
override

Definition at line 43 of file TGo4Queue.cxx.

References fxList, and fxMutex.

Referenced by TGo4TaskHandler::ClearQueues(), and TGo4ClientTask::DisconnectServer().

◆ GetEntries()

Int_t TGo4Queue::GetEntries ( ) const
inline

Definition at line 43 of file TGo4Queue.h.

References fiEntries.

◆ IsEmpty()

Bool_t TGo4Queue::IsEmpty ( ) const

◆ Next()

TObject * TGo4Queue::Next ( )
protected

Definition at line 61 of file TGo4Queue.cxx.

References fxList, and fxMutex.

Referenced by TGo4BufferQueue::Clear(), SetMaxEntries(), and Wait().

◆ SetMaxEntries()

void TGo4Queue::SetMaxEntries ( Int_t  max)
inline

Definition at line 45 of file TGo4Queue.h.

References Add(), fiMaxEntries, Next(), and Wait().

Referenced by TGo4TaskHandler::TGo4TaskHandler().

◆ Wait()

TObject * TGo4Queue::Wait ( )
protected

◆ Wake()

void TGo4Queue::Wake ( )
virtual

Definition at line 86 of file TGo4Queue.cxx.

References fbWakeUpCall, and fxCondition.

Referenced by TGo4TaskHandler::StopTransportThreads().

Member Data Documentation

◆ fbWakeUpCall

Bool_t TGo4Queue::fbWakeUpCall {kFALSE}
private

Definition at line 58 of file TGo4Queue.h.

Referenced by Wait(), and Wake().

◆ fiEntries

Int_t TGo4Queue::fiEntries {0}
private

Definition at line 56 of file TGo4Queue.h.

Referenced by GetEntries().

◆ fiMaxEntries

Int_t TGo4Queue::fiMaxEntries {0}
private

Definition at line 57 of file TGo4Queue.h.

Referenced by Add(), and SetMaxEntries().

◆ fxCondition

TCondition* TGo4Queue::fxCondition {nullptr}
private

Definition at line 54 of file TGo4Queue.h.

Referenced by Add(), TGo4Queue(), Wait(), Wake(), and ~TGo4Queue().

◆ fxList

TList* TGo4Queue::fxList {nullptr}
private

Definition at line 55 of file TGo4Queue.h.

Referenced by Add(), Clear(), IsEmpty(), Next(), TGo4Queue(), and ~TGo4Queue().

◆ fxMutex

TMutex* TGo4Queue::fxMutex {nullptr}
private

Definition at line 53 of file TGo4Queue.h.

Referenced by Add(), Clear(), IsEmpty(), Next(), TGo4Queue(), and ~TGo4Queue().


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