rpa::pipebase< Container, CondVar >::shutter_thread< ThreadBase > Class Template Reference

This class behaves like a thread proxy. Its use is optional. More...

#include <pipeline.h>

List of all members.

Public Member Functions

 shutter_thread (ThreadBase *ptrThr, pipebase *ptrPipe)
 shutter_thread (const shutter_thread &aST)
 ~shutter_thread ()
int create (thread_func_t aFunc, void *aData)
 Before the thread starts, it stores two pointers used at thread's end.
void join (void)
 Does the same as the original thread.

Private Member Functions

 shutter_thread ()
shutter_threadoperator= (const shutter_thread &)

Static Private Member Functions

static void * shut_func (void *thisPtr)
 After the functor returns, shuts the pipeline so readers can stop waiting.

Private Attributes

ThreadBase * _thr
pipebase_pipe
thread_func_t _subFunc
void * _subData


Detailed Description

template<class Container, class CondVar>
template<class ThreadBase>
class rpa::pipebase< Container, CondVar >::shutter_thread< ThreadBase >

This class behaves like a thread proxy. Its use is optional.

If several threads write in this buffer, only their main thread should be of this type, i.e. only one thread will set the flag '_shut'. If the main thread which writes in the inserter, is of this type, when it will be joined, this will terminates the pipe.


Constructor & Destructor Documentation

template<class Container, class CondVar>
template<class ThreadBase>
rpa::pipebase< Container, CondVar >::shutter_thread< ThreadBase >::shutter_thread (  )  [private]

template<class Container, class CondVar>
template<class ThreadBase>
rpa::pipebase< Container, CondVar >::shutter_thread< ThreadBase >::shutter_thread ( ThreadBase *  ptrThr,
pipebase ptrPipe 
) [inline]

template<class Container, class CondVar>
template<class ThreadBase>
rpa::pipebase< Container, CondVar >::shutter_thread< ThreadBase >::shutter_thread ( const shutter_thread< ThreadBase > &  aST  )  [inline]

template<class Container, class CondVar>
template<class ThreadBase>
rpa::pipebase< Container, CondVar >::shutter_thread< ThreadBase >::~shutter_thread (  )  [inline]


Member Function Documentation

template<class Container, class CondVar>
template<class ThreadBase>
int rpa::pipebase< Container, CondVar >::shutter_thread< ThreadBase >::create ( thread_func_t  aFunc,
void *  aData 
) [inline]

Before the thread starts, it stores two pointers used at thread's end.

Then, it behaves just like the thread.

template<class Container, class CondVar>
template<class ThreadBase>
void rpa::pipebase< Container, CondVar >::shutter_thread< ThreadBase >::join ( void   )  [inline]

Does the same as the original thread.

template<class Container, class CondVar>
template<class ThreadBase>
shutter_thread& rpa::pipebase< Container, CondVar >::shutter_thread< ThreadBase >::operator= ( const shutter_thread< ThreadBase > &   )  [private]

template<class Container, class CondVar>
template<class ThreadBase>
static void* rpa::pipebase< Container, CondVar >::shutter_thread< ThreadBase >::shut_func ( void *  thisPtr  )  [inline, static, private]

After the functor returns, shuts the pipeline so readers can stop waiting.


Member Data Documentation

template<class Container, class CondVar>
template<class ThreadBase>
pipebase* rpa::pipebase< Container, CondVar >::shutter_thread< ThreadBase >::_pipe [private]

template<class Container, class CondVar>
template<class ThreadBase>
void* rpa::pipebase< Container, CondVar >::shutter_thread< ThreadBase >::_subData [private]

template<class Container, class CondVar>
template<class ThreadBase>
thread_func_t rpa::pipebase< Container, CondVar >::shutter_thread< ThreadBase >::_subFunc [private]

template<class Container, class CondVar>
template<class ThreadBase>
ThreadBase* rpa::pipebase< Container, CondVar >::shutter_thread< ThreadBase >::_thr [private]


The documentation for this class was generated from the following file:
Generated on Tue Sep 25 10:20:37 2007 for rpa by  doxygen 1.4.7