Follow this link to skip to the main content

claraty::auto_bg< void > Class Template Reference

#include <background_thread.h>

Inheritance diagram for claraty::auto_bg< void >:

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

Collaboration graph
[legend]
List of all members.

Public Types

typedef bool result_type

Public Member Functions

template<class Op>
 auto_bg (Op op, 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 claraty::auto_bg< void >

Definition at line 200 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 Op>
claraty::auto_bg< void >::auto_bg ( Op  op,
bool  detach = false 
) [inline]

Definition at line 215 of file background_thread.h.

00216     : bg<void>(quittable_functor<Op>(op, *this), detach), time_to_quit(false)
00217   { }

virtual claraty::auto_bg< void >::~auto_bg (  )  [inline, virtual]

Definition at line 219 of file background_thread.h.

References claraty::bg< ret_type >::detached, and claraty::auto_bg< ret_type >::wait().

00219                      {
00220     if (!detached)
00221       wait();
00222   }

Here is the call graph for this function:


Member Function Documentation

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

Reimplemented from claraty::bg< void >.

Definition at line 224 of file background_thread.h.

References claraty::auto_bg< ret_type >::time_to_quit.

00224                       {
00225     time_to_quit = true;
00226     bg<void>::wait();
00227   }

virtual bool claraty::auto_bg< void >::operator() (  )  const [inline, virtual]

Reimplemented from claraty::VFunctor0_const< bool >.

Definition at line 229 of file background_thread.h.

References claraty::auto_bg< ret_type >::time_to_quit.

00229 { return time_to_quit; }


Member Data Documentation

bool claraty::auto_bg< void >::time_to_quit [private]

Definition at line 201 of file background_thread.h.

bool claraty::bg< void >::detached [protected, inherited]

Definition at line 140 of file background_thread.h.


The documentation for this class was generated from the following file: