AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
TaskScheduler::Task Class Reference

Public Member Functions

 Task (timepoint_t const &end, duration_t const &duration, std::optional< group_t > const &group, repeated_t const repeated, task_handler_t const &task)
 
 Task (timepoint_t const &end, duration_t const &duration, task_handler_t const &task)
 
 Task (Task const &)=delete
 
 Task (Task &&)=delete
 
Taskoperator= (Task const &)=default
 
Taskoperator= (Task &&right)=delete
 
bool operator< (Task const &other) const
 
bool operator> (Task const &other) const
 
bool operator== (Task const &other)
 
bool IsInGroup (group_t const group) const
 

Private Attributes

timepoint_t _end
 
duration_t _duration
 
std::optional< group_t_group
 
repeated_t _repeated
 
task_handler_t _task
 

Friends

class TaskContext
 
class TaskScheduler
 

Detailed Description

Constructor & Destructor Documentation

◆ Task() [1/4]

TaskScheduler::Task::Task ( timepoint_t const &  end,
duration_t const &  duration,
std::optional< group_t > const &  group,
repeated_t const  repeated,
task_handler_t const &  task 
)
inline
79 : _end(end), _duration(duration), _group(group), _repeated(repeated), _task(task) { }
timepoint_t _end
Definition: TaskScheduler.h:69
task_handler_t _task
Definition: TaskScheduler.h:73
repeated_t _repeated
Definition: TaskScheduler.h:72
std::optional< group_t > _group
Definition: TaskScheduler.h:71
duration_t _duration
Definition: TaskScheduler.h:70

◆ Task() [2/4]

TaskScheduler::Task::Task ( timepoint_t const &  end,
duration_t const &  duration,
task_handler_t const &  task 
)
inline
83 : _end(end), _duration(duration), _group(std::nullopt), _repeated(0), _task(task) { }

◆ Task() [3/4]

TaskScheduler::Task::Task ( Task const &  )
delete

◆ Task() [4/4]

TaskScheduler::Task::Task ( Task &&  )
delete

Member Function Documentation

◆ IsInGroup()

bool TaskScheduler::Task::IsInGroup ( group_t const  group) const
inline
113 {
114 return _group == group;
115 }

References _group.

◆ operator<()

bool TaskScheduler::Task::operator< ( Task const &  other) const
inline
96 {
97 return _end < other._end;
98 }

References _end.

◆ operator=() [1/2]

Task & TaskScheduler::Task::operator= ( Task &&  right)
delete

◆ operator=() [2/2]

Task & TaskScheduler::Task::operator= ( Task const &  )
default

◆ operator==()

bool TaskScheduler::Task::operator== ( Task const &  other)
inline
107 {
108 return _end == other._end;
109 }

References _end.

◆ operator>()

bool TaskScheduler::Task::operator> ( Task const &  other) const
inline
101 {
102 return _end > other._end;
103 }

References _end.

Friends And Related Function Documentation

◆ TaskContext

friend class TaskContext
friend

◆ TaskScheduler

friend class TaskScheduler
friend

Member Data Documentation

◆ _duration

duration_t TaskScheduler::Task::_duration
private

◆ _end

timepoint_t TaskScheduler::Task::_end
private

Referenced by operator<(), operator==(), and operator>().

◆ _group

std::optional<group_t> TaskScheduler::Task::_group
private

Referenced by IsInGroup().

◆ _repeated

repeated_t TaskScheduler::Task::_repeated
private

◆ _task

task_handler_t TaskScheduler::Task::_task
private