Follow this link to skip to the main content

claraty::auto_bg< ret_type > Class Template Reference

#include <background_thread.h>

Inheritance diagram for claraty::auto_bg< ret_type >:

Inheritance graph
[legend]
Collaboration diagram for claraty::auto_bg< ret_type >:

Collaboration graph
[legend]
List of all members.

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]

Definition at line 286 of file functor.h.


Constructor & Destructor Documentation

template<class ret_type>
template<class Op>
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   { }

template<class ret_type>
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

template<class ret_type>
virtual void claraty::auto_bg< ret_type >::wait (  )  [inline, virtual]

template<class ret_type>
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::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: