Public Member Functions | Private Attributes | List of all members
coil::Async_t< Object, Func > Class Template Reference

Async_t template class. More...

#include <Async.h>

Inheritance diagram for coil::Async_t< Object, Func >:
Inheritance graph
[legend]

Public Member Functions

 Async_t (Object *obj, Func func, bool auto_delete=false)
 Constructor. More...
 
virtual void finalize ()
 Finalize the asynchronous function. More...
 
virtual bool finished ()
 Check on completion state. More...
 
virtual void invoke ()
 Asynchronous function Activation. More...
 
virtual int svc ()
 Thread execution function for asynchronous invoke. More...
 
virtual ~Async_t ()
 Destructor. More...
 
- Public Member Functions inherited from coil::Async
 Async ()
 Constructor. More...
 
virtual ~Async ()
 Destructor. More...
 
- Public Member Functions inherited from coil::Task
virtual void activate ()
 Create a thread. More...
 
virtual void activate ()
 Create a thread. More...
 
virtual int close (unsigned long flags=0)
 Task close. More...
 
virtual int close (unsigned long flags=0)
 Task close. More...
 
virtual int open (void *args=0)
 Task open. More...
 
virtual int open (void *args=0)
 Task open. More...
 
virtual void reset ()
 Reset of task count. More...
 
virtual void reset ()
 Reset of task count. More...
 
virtual int resume (void)
 Resuming the suspended task. More...
 
virtual int resume (void)
 Resuming the suspended task. More...
 
virtual int suspend (void)
 Suspending the task. More...
 
virtual int suspend (void)
 Suspending the task. More...
 
 Task ()
 Constructor. More...
 
 Task ()
 Constructor. More...
 
virtual int wait (void)
 Waiting for the thread terminate. More...
 
virtual int wait (void)
 Waiting for the thread terminate. More...
 
virtual ~Task ()
 Destructor. More...
 
virtual ~Task ()
 Destructor. More...
 

Private Attributes

const bool m_autodelete
 
bool m_finished
 
Func m_func
 
Mutex m_mutex
 
Object * m_obj
 

Additional Inherited Members

- Static Public Member Functions inherited from coil::Task
static void * svc_run (void *args=0)
 Start thread Execution. More...
 
static unsigned int WINAPI svc_run (void *args=0)
 Start thread Execution. More...
 

Detailed Description

template<typename Object, typename Func>
class coil::Async_t< Object, Func >

Async_t template class.

Definition at line 132 of file Async.h.

Constructor & Destructor Documentation

template<typename Object, typename Func>
coil::Async_t< Object, Func >::Async_t ( Object *  obj,
Func  func,
bool  auto_delete = false 
)
inline

Constructor.

Constructor

Parameters
objThe target object for the asynchronous function.
funcAsynchronous function.
auto_deleteflag for automatic instance destruction.

Definition at line 160 of file Async.h.

template<typename Object, typename Func>
virtual coil::Async_t< Object, Func >::~Async_t ( )
inlinevirtual

Destructor.

Destructor

Definition at line 180 of file Async.h.

Member Function Documentation

template<typename Object, typename Func>
virtual void coil::Async_t< Object, Func >::finalize ( )
inlinevirtual

Finalize the asynchronous function.

Finalize the asynchronous function for preparing it for destruction.

Reimplemented from coil::Task.

Definition at line 229 of file Async.h.

template<typename Object, typename Func>
virtual bool coil::Async_t< Object, Func >::finished ( )
inlinevirtual

Check on completion state.

Return a completion state.

Returns
true: finished, false: unfinished

Implements coil::Async.

Definition at line 274 of file Async.h.

template<typename Object, typename Func>
virtual void coil::Async_t< Object, Func >::invoke ( )
inlinevirtual

Asynchronous function Activation.

Activate of Asynchronous function.

Implements coil::Async.

Definition at line 250 of file Async.h.

template<typename Object, typename Func>
virtual int coil::Async_t< Object, Func >::svc ( void  )
inlinevirtual

Thread execution function for asynchronous invoke.

Invoke the registered objects operation.

Returns
The execution result.

Reimplemented from coil::Task.

Definition at line 203 of file Async.h.

Member Data Documentation

template<typename Object, typename Func>
const bool coil::Async_t< Object, Func >::m_autodelete
private

Definition at line 283 of file Async.h.

template<typename Object, typename Func>
bool coil::Async_t< Object, Func >::m_finished
private

Definition at line 282 of file Async.h.

template<typename Object, typename Func>
Func coil::Async_t< Object, Func >::m_func
private

Definition at line 281 of file Async.h.

template<typename Object, typename Func>
Mutex coil::Async_t< Object, Func >::m_mutex
private

Definition at line 284 of file Async.h.

template<typename Object, typename Func>
Object* coil::Async_t< Object, Func >::m_obj
private

Definition at line 280 of file Async.h.


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


openrtm_aist
Author(s): Noriaki Ando
autogenerated on Thu Jun 6 2019 19:26:02