Go to the documentation of this file.
5 #ifndef CNOID_BASE_LAZY_CALLER_H
6 #define CNOID_BASE_LAZY_CALLER_H
9 #include "exportdecl.h"
22 friend class LazyCallerImpl;
36 PRIORITY_HIGH = HighPriority,
37 PRIORITY_NORMAL = NormalPriority,
38 PRIORITY_LOW = LowPriority
42 LazyCaller(
const std::function<
void(
void)>&
function,
int priority = HighPriority);
46 void setFunction(
const std::function<
void(
void)>&
function);
47 void setPriority(
int priority);
55 void setConservative(
bool on);
80 class QueuedCallerImpl;
84 QueuedCallerImpl* impl;
void result_type
Definition: LazyCaller.h:61
@ PRIORITY_HIGH
Definition: LazyCaller.h:36
@ NormalPriority
Definition: LazyCaller.h:31
CNOID_EXPORT void callLater(const std::function< void()> &function, int priority=LazyCaller::NormalPriority)
@ PRIORITY_NORMAL
Definition: LazyCaller.h:37
@ IDLE_PRIORITY_HIGH
Definition: LazyCaller.h:102
CNOID_EXPORT void callFromMainThread(const std::function< void()> &function, int priority=LazyCaller::NormalPriority)
@ PRIORITY_LOW
Definition: LazyCaller.h:38
@ IDLE_PRIORITY_LOW
Definition: LazyCaller.h:104
Definition: LazyCaller.h:20
@ LowPriority
Definition: LazyCaller.h:32
@ MinimumPriority
Definition: LazyCaller.h:33
Definition: AbstractSceneLoader.h:11
Priority
Definition: LazyCaller.h:29
CNOID_EXPORT bool isRunningInMainThread()
Definition: LazyCaller.cpp:115
Definition: LazyCaller.h:82
void operator()()
Definition: LazyCaller.h:66
@ IDLE_PRIORITY_NORMAL
Definition: LazyCaller.h:103
bool isPending() const
Definition: LazyCaller.h:57
CNOID_EXPORT bool callSynchronously(const std::function< void()> &function, int priority=LazyCaller::NormalPriority)