scheduler_ptr 結構

代表排程器的指標。 這個類別存在,允許使用shared_ptr或只使用原始指標的純參考,來允許共用存留期的規格。

語法

struct scheduler_ptr;

成員

公用建構函式

名稱 描述
scheduler_ptr::scheduler_ptr 已多載。 從排程器 shared_ptr 建立排程器指標

公用方法

名稱 描述
scheduler_ptr::get 傳回排程器的原始指標

公用運算子

名稱 描述
scheduler_ptr::operator bool 測試排程器指標是否為非 null
scheduler_ptr::operator-> 作用如同指標

繼承階層架構

scheduler_ptr

需求

標頭: pplinterface.h

命名空間: concurrency

scheduler_ptr::get 方法

傳回排程器的原始指標。

scheduler_interface* get() const;

傳回值

scheduler_ptr::operator bool

測試排程器指標是否為非 Null。

operator bool() const;

scheduler_ptr::operator->

行為就像指標。

scheduler_interface* operator->() const;

傳回值

scheduler_ptr::scheduler_ptr 建構函式

從shared_ptr建立排程器指標到排程器。

explicit scheduler_ptr(std::shared_ptr<scheduler_interface> scheduler);
explicit scheduler_ptr(_In_opt_ scheduler_interface* pScheduler);

參數

調度
要轉換的排程器。

pScheduler
要轉換的排程器指標。

另請參閱

concurrency 命名空間