rpa::thread_tree< ThrIter, ThrMain > Class Template Reference

Models the sub-threads set given to functors, themselves called by sub-threads. More...

#include <synchro.h>

Inheritance diagram for rpa::thread_tree< ThrIter, ThrMain >:

rpa::thread_tree_base< ThrIter > rpa::thread_tree_core List of all members.

Public Types

typedef thread_copy< ThrMain > head_thread_type
typedef thread_tree_base<
ThrIter > 
ttb_t

Public Member Functions

 thread_tree (const ThrMain &refThrMain, thr_nb_t thrNb, const ThrIter &thrIter)
 The iterator is passed a const reference for extra performance.
thread_tree< ThrIter, void > sub_tree (void) const
 This returns the same tree without the top-level thread.
head_thread_typehead (void) const
 Same interface whether the head-thread is a pointer or a copy.

Private Attributes

head_thread_type_ptrThr
 This object will destroy itself after a join, in future::sync_end.

Detailed Description

template<class ThrIter, class ThrMain = void>
class rpa::thread_tree< ThrIter, ThrMain >

Models the sub-threads set given to functors, themselves called by sub-threads.

In other words, it implements recursive multi-threading, each multithreading level being represented by a level in the threads tree. Each level of the threads-tree has the same interface, but the types of these levels can be totally different, and are determined at compile time. The main thread can be copied: It may be a proxy.


Member Typedef Documentation

template<class ThrIter, class ThrMain = void>
typedef thread_copy<ThrMain> rpa::thread_tree< ThrIter, ThrMain >::head_thread_type

template<class ThrIter, class ThrMain = void>
typedef thread_tree_base< ThrIter > rpa::thread_tree< ThrIter, ThrMain >::ttb_t


Constructor & Destructor Documentation

template<class ThrIter, class ThrMain = void>
rpa::thread_tree< ThrIter, ThrMain >::thread_tree ( const ThrMain &  refThrMain,
thr_nb_t  thrNb,
const ThrIter &  thrIter 
) [inline]

The iterator is passed a const reference for extra performance.


Member Function Documentation

template<class ThrIter, class ThrMain = void>
head_thread_type* rpa::thread_tree< ThrIter, ThrMain >::head ( void   )  const [inline]

Same interface whether the head-thread is a pointer or a copy.

template<class ThrIter, class ThrMain = void>
thread_tree<ThrIter,void> rpa::thread_tree< ThrIter, ThrMain >::sub_tree ( void   )  const [inline]

This returns the same tree without the top-level thread.


Member Data Documentation

template<class ThrIter, class ThrMain = void>
head_thread_type* rpa::thread_tree< ThrIter, ThrMain >::_ptrThr [private]

This object will destroy itself after a join, in future::sync_end.


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