Public Member Functions | Private Member Functions | Private Attributes | Related Functions | List of all members
xsens::ThreadPoolObjectDeleter< T > Class Template Reference

Task that will delete its object parameter. More...

#include <xsens_threadpool.h>

Inheritance diagram for xsens::ThreadPoolObjectDeleter< T >:
Inheritance graph
[legend]

Public Member Functions

bool exec () override
 deletes the managed object More...
 
 ThreadPoolObjectDeleter (T *obj)
 Constructor, creates the task to delete object a obj, but doesn't schedule it. More...
 
- Public Member Functions inherited from xsens::ThreadPoolTask
bool isCanceling () const
 Returns true if the task has been told to cancel itself. More...
 
virtual unsigned int needToWaitFor ()
 This function gets called by PooledThread when the exec() function returns false to determine if we should wait for a specific task. More...
 
unsigned int taskId () const
 Returns the task ID of the task or 0 if it doesn't have a proper ID (yet) More...
 
 ThreadPoolTask ()
 
virtual ~ThreadPoolTask ()
 

Private Member Functions

ThreadPoolObjectDeleter const & operator= (ThreadPoolObjectDeleter const &)=delete
 
 ThreadPoolObjectDeleter (ThreadPoolObjectDeleter const &)=delete
 

Private Attributes

T * m_object
 

Related Functions

(Note that these are not member functions.)

template<typename T >
static ThreadPool::TaskId deleteThreaded (T *obj)
 Delete obj in the ThreadPool. More...
 

Detailed Description

template<typename T>
class xsens::ThreadPoolObjectDeleter< T >

Task that will delete its object parameter.

This class can be used to schedule a delete of a single object in the ThreadPool. Normally you don't need to use this class directly, but can use the deleteThreaded function.

Template Parameters
TThe type of the object to delete

Definition at line 168 of file xsens_threadpool.h.

Constructor & Destructor Documentation

◆ ThreadPoolObjectDeleter() [1/2]

template<typename T >
xsens::ThreadPoolObjectDeleter< T >::ThreadPoolObjectDeleter ( ThreadPoolObjectDeleter< T > const &  )
privatedelete

◆ ThreadPoolObjectDeleter() [2/2]

template<typename T >
xsens::ThreadPoolObjectDeleter< T >::ThreadPoolObjectDeleter ( T *  obj)
inline

Constructor, creates the task to delete object a obj, but doesn't schedule it.

Definition at line 176 of file xsens_threadpool.h.

Member Function Documentation

◆ exec()

template<typename T >
bool xsens::ThreadPoolObjectDeleter< T >::exec ( )
inlineoverridevirtual

deletes the managed object

Implements xsens::ThreadPoolTask.

Definition at line 178 of file xsens_threadpool.h.

◆ operator=()

template<typename T >
ThreadPoolObjectDeleter const& xsens::ThreadPoolObjectDeleter< T >::operator= ( ThreadPoolObjectDeleter< T > const &  )
privatedelete

Friends And Related Function Documentation

◆ deleteThreaded()

template<typename T >
static ThreadPool::TaskId deleteThreaded ( T *  obj)
related

Delete obj in the ThreadPool.

This function will schedule a task to be executed by the ThreadPool which will delete obj

Parameters
objThe object to be deleted
Template Parameters
TThe type of the object to delete. Typically not required as the compiler should detect it automatically.
Returns
The task ID of the deletion task

Definition at line 193 of file xsens_threadpool.h.

Member Data Documentation

◆ m_object

template<typename T >
T* xsens::ThreadPoolObjectDeleter< T >::m_object
private

Definition at line 170 of file xsens_threadpool.h.


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


xsens_mti_driver
Author(s):
autogenerated on Sun Sep 3 2023 02:43:23