LibreOffice Module vcl (master)
1
|
#include <task.hxx>
Public Member Functions | |
Task (const char *pDebugName) | |
Task (const Task &rTask) | |
virtual | ~Task () COVERITY_NOEXCEPT_FALSE |
Task & | operator= (const Task &rTask) |
void | SetPriority (TaskPriority ePriority) |
TaskPriority | GetPriority () const |
void | SetDebugName (const char *pDebugName) |
const char * | GetDebugName () const |
virtual void | Invoke ()=0 |
virtual void | Start () |
void | Stop () |
bool | IsActive () const |
void | SetStatic () |
This function must be called for static tasks, so the Task destructor ignores the scheduler mutex, as it may not be available anymore. More... | |
bool | IsStatic () const |
Protected Member Functions | |
const ImplSchedulerData * | GetSchedulerData () const |
virtual void | SetDeletionFlags () |
virtual sal_uInt64 | UpdateMinPeriod (sal_uInt64 nTimeNow) const =0 |
How long (in MS) until the Task is ready to be dispatched? More... | |
Static Protected Member Functions | |
static void | StartTimer (sal_uInt64 nMS) |
Private Attributes | |
ImplSchedulerData * | mpSchedulerData |
Pointer to the element in scheduler list. More... | |
const char * | mpDebugName |
Useful for debugging. More... | |
TaskPriority | mePriority |
Task priority. More... | |
bool | mbActive |
Currently in the scheduler. More... | |
bool | mbStatic |
Is a static object. More... | |
Friends | |
class | Scheduler |
struct | ImplSchedulerData |
Task::Task | ( | const char * | pDebugName | ) |
Definition at line 627 of file scheduler.cxx.
Task::Task | ( | const Task & | rTask | ) |
Definition at line 636 of file scheduler.cxx.
References IsActive(), mbActive, and Start().
|
virtual |
Definition at line 647 of file scheduler.cxx.
References assert(), utl::ConfigManager::IsFuzzing(), IsStatic(), mpSchedulerData, and ImplSchedulerData::mpTask.
|
inline |
Definition at line 83 of file task.hxx.
Referenced by Scheduler::ImplDeInitScheduler(), Scheduler::ProcessEventsToIdle(), and Scheduler::ProcessTaskScheduling().
|
inline |
Definition at line 80 of file task.hxx.
References ImplSchedulerData::mePriority.
Referenced by AppendSchedulerData(), and Idle::Start().
|
inlineprotected |
Definition at line 56 of file task.hxx.
Referenced by Timer::UpdateMinPeriod().
|
pure virtual |
Implemented in JSDialogNotifyIdle, Timer, and DebugEventInjector.
Referenced by Scheduler::ProcessTaskScheduling().
|
inline |
Definition at line 91 of file task.hxx.
Referenced by SelectionEngine::Command(), IdleFormatter::DoIdleFormat(), IdleFormatter::ForceTimeout(), SystemWindow::hasPendingLayout(), operator=(), Scheduler::ProcessEventsToIdle(), Scheduler::ProcessTaskScheduling(), vcl::RoadmapWizard::queue_resize(), DockingWindow::queue_resize(), SelectionEngine::SelMouseMove(), Timer::SetTimeout(), SelectionEngine::SetUpdateInterval(), InterimItemWindow::StartIdleLayout(), and Task().
|
inline |
Definition at line 610 of file scheduler.cxx.
References IsActive(), mbActive, mePriority, Start(), and Stop().
Referenced by Timer::operator=().
|
inline |
Definition at line 82 of file task.hxx.
Referenced by UIObjectUnoObj::executeAction(), HelpTextWindow::HelpTextWindow(), ImplFrameData::ImplFrameData(), DockingWindow::ImplInitDockingWindowData(), WorkWindow::ImplInitWorkWindowData(), InterimItemWindow::InterimItemWindow(), SvInplaceEdit2::LoseFocus(), vcl::graphic::Manager::Manager(), MenuFloatingWindow::MenuFloatingWindow(), vcl::QuickSelectionEngine_Data::QuickSelectionEngine_Data(), SelectionEngine::SelectionEngine(), SystemWindow::SetIdleDebugName(), DockingWindow::SetIdleDebugName(), vcl::Window::StartTracking(), SvxIconChoiceCtrl_Impl::SvxIconChoiceCtrl_Impl(), and SystemWindow::SystemWindow().
|
protectedvirtual |
Reimplemented in Timer.
Definition at line 546 of file scheduler.cxx.
References mbActive.
Referenced by Scheduler::ProcessTaskScheduling(), and Timer::SetDeletionFlags().
void Task::SetPriority | ( | TaskPriority | ePriority | ) |
Definition at line 600 of file scheduler.cxx.
References mbActive, mePriority, mpSchedulerData, and SAL_WARN_IF.
Referenced by Application::Execute(), UIObjectUnoObj::executeAction(), Idle::Idle(), IdleFormatter::IdleFormatter(), ImplFrameData::ImplFrameData(), DockingWindow::ImplInitDockingWindowData(), InterimItemWindow::InterimItemWindow(), SvInplaceEdit2::LoseFocus(), vcl::PrintDialog::PrintDialog(), vcl::RoadmapWizard::RoadmapWizard(), SvImpLBox::SvImpLBox(), SvxIconChoiceCtrl_Impl::SvxIconChoiceCtrl_Impl(), SystemWindow::SystemWindow(), and Timer::Timer().
|
inline |
This function must be called for static tasks, so the Task destructor ignores the scheduler mutex, as it may not be available anymore.
The cleanup is still correct, as it has already happened in DeInitScheduler call well before the static destructor calls.
Definition at line 99 of file task.hxx.
Referenced by Scheduler::ImplDeInitScheduler().
|
virtual |
Reimplemented in Timer, and Idle.
Definition at line 551 of file scheduler.cxx.
References AppendSchedulerData(), tools::Time::GetSystemTicks(), ImplGetSVData(), ImplSchedulerData, ImplSVData::maSchedCtx, mbActive, ImplSchedulerContext::mbActive, ImplSchedulerData::mbInScheduler, ImplSchedulerData::mePriority, mePriority, ImplSchedulerData::mnUpdateTime, mpSchedulerData, ImplSchedulerData::mpTask, and SAL_INFO.
Referenced by operator=(), Idle::Start(), Timer::Start(), and Task().
|
staticprotected |
Definition at line 541 of file scheduler.cxx.
References tools::Time::GetSystemTicks(), and Scheduler::ImplStartTimer().
Referenced by Timer::SetTimeout(), Idle::Start(), and Timer::Start().
void Task::Stop | ( | ) |
Definition at line 593 of file scheduler.cxx.
References tools::Time::GetSystemTicks(), mbActive, mpSchedulerData, and SAL_INFO_IF.
Referenced by SvInplaceEdit2::CallCallBackHdl_Impl(), MenuFloatingWindow::ChangeHighlightItem(), Animation::Clear(), SelectionEngine::Command(), SvImpLBox::Command(), InterimItemWindow::dispose(), HelpTextWindow::dispose(), vcl::RoadmapWizard::dispose(), SystemWindow::dispose(), MenuFloatingWindow::doShutdown(), IdleFormatter::ForceTimeout(), SvxIconChoiceCtrl_Impl::ImpArrange(), weld::IMPL_LINK_NOARG(), MenuFloatingWindow::ImplScroll(), SvImpLBox::KeyInput(), InterimItemWindow::Layout(), SvImpLBox::LoseFocus(), SvImpLBox::MouseButtonDown(), SpinField::MouseButtonUp(), SpinField::MouseMove(), MenuFloatingWindow::MouseMove(), operator=(), SelectionEngine::Reset(), SelectionEngine::SelMouseButtonUp(), SystemWindow::setOptimalLayoutSize(), DockingWindow::setOptimalLayoutSize(), SelectionEngine::SetUpdateInterval(), Animation::Start(), Animation::Stop(), weld::ButtonPressRepeater::Stop(), MenuFloatingWindow::StopExecute(), vcl::QuickSelectionEngine_Data::~QuickSelectionEngine_Data(), SelectionEngine::~SelectionEngine(), and SvImpLBox::~SvImpLBox().
|
protectedpure virtual |
How long (in MS) until the Task is ready to be dispatched?
Simply return Scheduler::ImmediateTimeoutMs if you're ready, like an Idle. If you have to return Scheduler::InfiniteTimeoutMs, you probably need another mechanism to wake up the Scheduler or rely on other Tasks to be scheduled, or simply use a polling Timer.
nTimeNow | the current time |
Implemented in Idle, and Timer.
Referenced by Scheduler::ProcessTaskScheduling().
|
friend |
|
private |
Currently in the scheduler.
Definition at line 50 of file task.hxx.
Referenced by Scheduler::ImplDeInitScheduler(), operator=(), SetDeletionFlags(), SetPriority(), Start(), and Stop().
|
private |
Task priority.
Definition at line 49 of file task.hxx.
Referenced by operator=(), SetPriority(), and Start().
|
private |
Pointer to the element in scheduler list.
Definition at line 47 of file task.hxx.
Referenced by Scheduler::ImplDeInitScheduler(), Scheduler::ProcessTaskScheduling(), SetPriority(), Start(), Stop(), and ~Task().