libutil++  1.9.3
 All Classes Functions Variables
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
sella::util::Task Class Reference

Classes

struct  shared_hash
 

Public Types

typedef std::shared_ptr< Taskshared
 
typedef Taskptr
 
typedef std::function< void(void)> callback
 

Public Member Functions

 Task (Task::callback &callback, void *object=NULL, int priority=0)
 
 Task (const Task &other)
 
 Task (const Task &&other)
 
Taskoperator= (const Task &other)
 
Taskoperator= (const Task &&other)
 
void clear (void)
 
TasksetTimer (const std::chrono::system_clock::time_point &time)
 
TasksetTimer (timeval &timer)
 
TasksetTimer (time_t &timer)
 
TasksetDelay (const std::chrono::system_clock::duration &duration)
 
TasksetDelay (time_t sec=0, suseconds_t usec=0)
 
TasksetNoDelay (void)
 
TasksetPriority (int priority)
 
TasksetCallback (Task::callback &callback, void *object=NULL)
 
TasksetObject (void *object)
 
TasksetData (std::vector< void * > &data)
 
TaskaddData (void *data)
 
const timeval & getTimer (void) const
 
const timeval getDelay (void) const
 
uint64_t getDelayMsec (void) const
 
uint64_t getDelayUsec (void) const
 
int getPriority (void) const
 
const Task::callback & getCallback (void) const
 
void * getObject (void) const
 
std::vector< void * > getData (void) const
 
void * getData (size_t pos) const throw (std::out_of_range)
 
bool isReady (void) const
 
void execute (void)
 

Static Public Member Functions

static const Task::shared shared_ptr (void) throw ()
 
static const Task::shared shared_ptr (Task::callback &callback, void *object=NULL, int priority=0)
 
static const timeval getDelay (const shared task, const timeval def=delay_def)
 
static bool compareTimer (const shared task, const timeval now=notset)
 

Protected Attributes

timeval timer
 
int priority
 
callback function
 
void * object
 
std::vector< void * > data
 

Detailed Description

Definition at line 34 of file Task.h.


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