mFrame
載入中...
搜尋中...
無符合項目
ufm::util::Updater 結構 參考文件abstract

更新器介面,定義通用的更新操作行為。 更多...

#include <Updater.h>

類別ufm::util::Updater的繼承圖:
mcxa153::core::CoreAnalogPort

公開方法(Public Methods)

virtual bool update (void) override
 更新資源
 
virtual bool isUpdating (void) override
 是否正在更新
 

詳細描述

更新器介面,定義通用的更新操作行為。

Updater 介面定義了資源更新的基本操作, 提供更新和狀態查詢功能。

使用範例:
class SimpleUpdater : public ufm::util::Updater {
bool updating;
public:
SimpleUpdater() : updating(false) {}
bool update(void) override {
if (updating) return false;
updating = true;
// 執行更新操作
std::this_thread::sleep_for(std::chrono::milliseconds(100));
updating = false;
return true;
}
bool isUpdating(void) override {
return updating;
}
};
更新器介面,定義通用的更新操作行為。
Definition Updater.h:65
參閱
ufm::lang::Interface
1.0.0

函式成員說明文件

◆ isUpdating()

virtual bool ufm::util::Updater::isUpdating ( void )
pure virtual

是否正在更新

傳回值
true 正在更新中
false 等待更新

實作於 mcxa153::core::CoreAnalogPort.

◆ update()

virtual bool ufm::util::Updater::update ( void )
pure virtual

更新資源

傳回值
true 開始嘗試更新成功
false 開始嘗試更新失敗

實作於 mcxa153::core::CoreAnalogPort.


此結構(structure) 文件是由下列檔案中產生: