Public Member Functions | Private Attributes | List of all members
mf::SingleConsumerQ::OperateBuffer< T > Class Template Reference

#include <SingleConsumerQ.h>

Public Member Functions

 OperateBuffer (SingleConsumerQ &b)
 
 ~OperateBuffer ()
 
void * buffer () const
 
int size () const
 
void commit (int const theSize=0)
 

Private Attributes

SingleConsumerQb_
 
SingleConsumerQ::Buffer v_
 
bool committed_
 

Detailed Description

template<class T>
class mf::SingleConsumerQ::OperateBuffer< T >

Definition at line 88 of file SingleConsumerQ.h.

Constructor & Destructor Documentation

template<class T >
mf::SingleConsumerQ::OperateBuffer< T >::OperateBuffer ( SingleConsumerQ b)
inlineexplicit

Definition at line 90 of file SingleConsumerQ.h.

template<class T >
mf::SingleConsumerQ::OperateBuffer< T >::~OperateBuffer ( )
inline

Definition at line 93 of file SingleConsumerQ.h.

94  {
95  if (!committed_)
96  T::release(b_, v_.ptr_);
97  }

Member Function Documentation

template<class T >
void* mf::SingleConsumerQ::OperateBuffer< T >::buffer ( ) const
inline

Definition at line 100 of file SingleConsumerQ.h.

101  {
102  return v_.ptr_;
103  }
template<class T >
void mf::SingleConsumerQ::OperateBuffer< T >::commit ( int const  theSize = 0)
inline

Definition at line 110 of file SingleConsumerQ.h.

111  {
112  T::commit(b_, v_.ptr_, theSize);
113  committed_ = true;
114  }
template<class T >
int mf::SingleConsumerQ::OperateBuffer< T >::size ( void  ) const
inline

Definition at line 105 of file SingleConsumerQ.h.

106  {
107  return v_.len_;
108  }

Member Data Documentation

template<class T >
SingleConsumerQ& mf::SingleConsumerQ::OperateBuffer< T >::b_
private

Definition at line 117 of file SingleConsumerQ.h.

template<class T >
bool mf::SingleConsumerQ::OperateBuffer< T >::committed_
private

Definition at line 119 of file SingleConsumerQ.h.

template<class T >
SingleConsumerQ::Buffer mf::SingleConsumerQ::OperateBuffer< T >::v_
private

Definition at line 118 of file SingleConsumerQ.h.


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