SoDaRadio-5.0.3-master:8901fb5
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
SoDa::MultiMBox< T > Class Template Reference

#include <MultiMBox.hxx>

Classes

class  Subscriber
 

Public Member Functions

 MultiMBox (bool _keep_freelist=true)
 
int subscribe ()
 
int getSubscriberCount ()
 
void put (T *m)
 
T * get (unsigned int subscriber_id)
 
T * getWait (unsigned int subscriber_id)
 
void free (T *m)
 
T * alloc ()
 
void addToPool (T *v)
 
unsigned int inFlightCount ()
 
bool flush (unsigned int subscriber_id)
 flush all items from this mailbox for this subscriber More...
 

Private Member Functions

T * getCommon (unsigned int subscriber_id, bool wait)
 

Private Attributes

unsigned int subscriber_count
 
bool keep_freelist
 
std::map< int, Subscriber * > subscribers
 
std::queue< MBoxMessage * > free_list
 
boost::mutex free_lock
 

Detailed Description

template<typename T>
class SoDa::MultiMBox< T >

Definition at line 81 of file MultiMBox.hxx.

Constructor & Destructor Documentation

◆ MultiMBox()

template<typename T>
SoDa::MultiMBox< T >::MultiMBox ( bool  _keep_freelist = true)
inline

Definition at line 83 of file MultiMBox.hxx.

Member Function Documentation

◆ addToPool()

template<typename T>
void SoDa::MultiMBox< T >::addToPool ( T *  v)
inline

Definition at line 146 of file MultiMBox.hxx.

◆ alloc()

template<typename T>
T* SoDa::MultiMBox< T >::alloc ( )
inline

◆ flush()

template<typename T>
bool SoDa::MultiMBox< T >::flush ( unsigned int  subscriber_id)
inline

flush all items from this mailbox for this subscriber

Parameters
subscriber_idoddly named, this is the identity of the requesting subscriber.

Definition at line 182 of file MultiMBox.hxx.

Referenced by SoDa::USRPTX::transmitSwitch().

◆ free()

template<typename T>
void SoDa::MultiMBox< T >::free ( T *  m)
inline

◆ get()

template<typename T>
T* SoDa::MultiMBox< T >::get ( unsigned int  subscriber_id)
inline

◆ getCommon()

template<typename T>
T* SoDa::MultiMBox< T >::getCommon ( unsigned int  subscriber_id,
bool  wait 
)
inlineprivate

Definition at line 192 of file MultiMBox.hxx.

◆ getSubscriberCount()

template<typename T>
int SoDa::MultiMBox< T >::getSubscriberCount ( )
inline

Definition at line 95 of file MultiMBox.hxx.

Referenced by SoDa::USRPRX::run().

◆ getWait()

template<typename T>
T* SoDa::MultiMBox< T >::getWait ( unsigned int  subscriber_id)
inline

Definition at line 114 of file MultiMBox.hxx.

◆ inFlightCount()

template<typename T>
unsigned int SoDa::MultiMBox< T >::inFlightCount ( )
inline

Definition at line 153 of file MultiMBox.hxx.

Referenced by SoDa::CWGenerator::readyForMore().

◆ put()

template<typename T>
void SoDa::MultiMBox< T >::put ( T *  m)
inline

◆ subscribe()

template<typename T>
int SoDa::MultiMBox< T >::subscribe ( )
inline

Member Data Documentation

◆ free_list

template<typename T>
std::queue<MBoxMessage *> SoDa::MultiMBox< T >::free_list
private

Definition at line 236 of file MultiMBox.hxx.

◆ free_lock

template<typename T>
boost::mutex SoDa::MultiMBox< T >::free_lock
private

Definition at line 237 of file MultiMBox.hxx.

◆ keep_freelist

template<typename T>
bool SoDa::MultiMBox< T >::keep_freelist
private

Definition at line 224 of file MultiMBox.hxx.

◆ subscriber_count

template<typename T>
unsigned int SoDa::MultiMBox< T >::subscriber_count
private

Definition at line 223 of file MultiMBox.hxx.

◆ subscribers

template<typename T>
std::map<int, Subscriber *> SoDa::MultiMBox< T >::subscribers
private

Definition at line 234 of file MultiMBox.hxx.


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