rpa::thread_array< SubThr > Class Template Reference

This makes simpler the allocation of a pool of threads. More...

#include <synchro.h>

List of all members.

Public Types

typedef thread_array iterator

Public Member Functions

 thread_array (size_t nbThrs)
SubThr & operator * (void)
const SubThr & operator * (void) const
thread_arrayoperator++ (void)
template<class ThrMain>
thread_tree< thread_array,
ThrMain * > 
tree (ThrMain *ptrThrMain)
 This creates a thread tree with any kind of main thread pointer.
template<class ThrMain>
thread_tree< thread_array,
ThrMain > 
tree (const ThrMain &refThrMain)
 This creates a thread tree with any kind of main thread reference.
thread_tree< thread_array,
void > 
tree (void)
 This creates a thread_tree where the main thread is void.

Private Member Functions

void check (void) const

Private Attributes

counted_ptr< thr_arr_thr_arr
size_t _idx
 This index represents which thread the iterator is pointing to.

Classes

class  thr_arr
 This structure stores the threads. It is accessed with a counted_ptr. More...


Detailed Description

template<class SubThr>
class rpa::thread_array< SubThr >

This makes simpler the allocation of a pool of threads.

This is a container and an iterator at the same time. When such an iterator is created, it allocates, internally, an array of threads. It is not possible to use any kind of container for the threads, because they are not copiable nor assignable.


Member Typedef Documentation

template<class SubThr>
typedef thread_array rpa::thread_array< SubThr >::iterator


Constructor & Destructor Documentation

template<class SubThr>
rpa::thread_array< SubThr >::thread_array ( size_t  nbThrs  )  [inline]


Member Function Documentation

template<class SubThr>
void rpa::thread_array< SubThr >::check ( void   )  const [inline, private]

template<class SubThr>
const SubThr& rpa::thread_array< SubThr >::operator * ( void   )  const [inline]

template<class SubThr>
SubThr& rpa::thread_array< SubThr >::operator * ( void   )  [inline]

template<class SubThr>
thread_array& rpa::thread_array< SubThr >::operator++ ( void   )  [inline]

template<class SubThr>
thread_tree< thread_array, void > rpa::thread_array< SubThr >::tree ( void   )  [inline]

This creates a thread_tree where the main thread is void.

template<class SubThr>
template<class ThrMain>
thread_tree< thread_array, ThrMain > rpa::thread_array< SubThr >::tree ( const ThrMain &  refThrMain  )  [inline]

This creates a thread tree with any kind of main thread reference.

The subthreads are already allocated in a simple way.

template<class SubThr>
template<class ThrMain>
thread_tree< thread_array, ThrMain * > rpa::thread_array< SubThr >::tree ( ThrMain *  ptrThrMain  )  [inline]

This creates a thread tree with any kind of main thread pointer.

The subthreads are already allocated in a simple way.


Member Data Documentation

template<class SubThr>
size_t rpa::thread_array< SubThr >::_idx [private]

This index represents which thread the iterator is pointing to.

template<class SubThr>
counted_ptr< thr_arr > rpa::thread_array< SubThr >::_thr_arr [private]


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