claraty::auto_bg< ret_type > Class Template Reference
#include <background_thread.h>
Inheritance diagram for claraty::auto_bg< ret_type >:


Public Types | |
| typedef bool | result_type |
Public Member Functions | |
| template<class Op> | |
| auto_bg (Op op, ret_type &return_var, bool detach=false) | |
| virtual | ~auto_bg () |
| virtual void | wait () |
| virtual bool | operator() () const |
Protected Attributes | |
| bool | detached |
Private Attributes | |
| bool | time_to_quit |
Classes | |
| struct | quittable_functor |
Detailed Description
template<class ret_type>
class claraty::auto_bg< ret_type >
Definition at line 167 of file background_thread.h.
Member Typedef Documentation
typedef bool claraty::VFunctor0_const< bool >::result_type [inherited] |
Constructor & Destructor Documentation
| claraty::auto_bg< ret_type >::auto_bg | ( | Op | op, | |
| ret_type & | return_var, | |||
| bool | detach = false | |||
| ) | [inline] |
Definition at line 182 of file background_thread.h.
00183 : bg<ret_type>(quittable_functor<Op>(op, *this), return_var, detach), 00184 time_to_quit(false) 00185 { }
| virtual claraty::auto_bg< ret_type >::~auto_bg | ( | ) | [inline, virtual] |
Definition at line 187 of file background_thread.h.
References claraty::auto_bg< ret_type >::wait().
00187 { 00188 if (!this->detached) 00189 wait(); 00190 }
Here is the call graph for this function:

Member Function Documentation
| virtual void claraty::auto_bg< ret_type >::wait | ( | ) | [inline, virtual] |
Reimplemented from claraty::bg< ret_type >.
Definition at line 192 of file background_thread.h.
References claraty::auto_bg< ret_type >::time_to_quit.
Referenced by claraty::auto_bg< void >::~auto_bg(), and claraty::auto_bg< ret_type >::~auto_bg().
00192 { 00193 time_to_quit = true; 00194 bg<ret_type>::wait(); 00195 }
| virtual bool claraty::auto_bg< ret_type >::operator() | ( | ) | const [inline, virtual] |
Reimplemented from claraty::VFunctor0_const< bool >.
Definition at line 197 of file background_thread.h.
References claraty::auto_bg< ret_type >::time_to_quit.
00197 { return time_to_quit; }
Member Data Documentation
bool claraty::auto_bg< ret_type >::time_to_quit [private] |
Definition at line 168 of file background_thread.h.
Referenced by claraty::auto_bg< void >::operator()(), claraty::auto_bg< ret_type >::operator()(), claraty::auto_bg< void >::wait(), and claraty::auto_bg< ret_type >::wait().
bool claraty::bg< ret_type >::detached [protected, inherited] |
Definition at line 108 of file background_thread.h.
Referenced by claraty::auto_bg< void >::~auto_bg().
The documentation for this class was generated from the following file: