VLink 2.0.0
A high-performance communication middleware
载入中...
搜索中...
未找到
vlink::Schedule::RetStatus类 参考final

RAII handle returned by exec_task() for a bool-returning callback task. 更多...

#include <schedule.h>

类 vlink::Schedule::RetStatus 继承关系图:
vlink::Schedule::RetStatus 的协作图:

Public 成员函数

Statuson_else (Callback &&callback)
 Registers a callback fired when the task returns false.
RetStatuson_then (RetCallback &&callback)
 Registers a callback chain element fired when the task returns true.
 Status ()
 Constructs an invalid Status (not yet associated with a task).
 Status (const Status &)=delete
 Status (Status &&status) noexcept
 Move constructor.

额外继承的成员函数

详细描述

RAII handle returned by exec_task() for a bool-returning callback task.

Extends Status with on_then (fired if callback returns true) and on_else (fired if callback returns false).

成员函数说明

◆ on_else()

Status & vlink::Schedule::RetStatus::on_else ( Callback && callback)

Registers a callback fired when the task returns false.

参数
callbackInvoked from the loop thread when the return value is false.
返回
Reference to the base Status for further chaining.
函数调用图:

◆ on_then()

RetStatus & vlink::Schedule::RetStatus::on_then ( RetCallback && callback)

Registers a callback chain element fired when the task returns true.

Multiple on_then callbacks may be chained; each receives a bool return value from the previous callback in the chain.

参数
callbackCallback taking no arguments and returning bool.
返回
Reference to *this for further on_then chaining.

◆ Status() [1/3]

Constructs an invalid Status (not yet associated with a task).

这是这个函数的调用关系图:

◆ Status() [2/3]

vlink::Schedule::Status::Status ( const Status & )
delete

◆ Status() [3/3]

vlink::Schedule::Status::Status ( Status && status)
noexcept

Move constructor.

参数
statusSource status to move from.

该类的文档由以下文件生成: