Files
XCSDD/docs/api/core/event/end.md
ssdfasd 58a83f445a fix: improve doc link navigation and tree display
- Fix link resolution with proper relative/absolute path handling
- Improve link styling with underline decoration
- Hide leaf nodes from tree, only show directories
- Fix log file path for packaged app
2026-03-19 12:44:08 +08:00

656 B
Raw Permalink Blame History

Event::end

Iterator end();

获取结束迭代器。

描述

返回订阅列表的结束迭代器用于范围for循环遍历所有订阅的回调。

返回: Iterator - 指向末尾的迭代器(等价于 std::vector<Listener>::iterator

复杂度: O(1)

示例:

#include <XCEngine/Core/Event.h>

using namespace XCEngine::Core;

Event<int> event;
event.Subscribe([](int v) { printf("Callback: %d\n", v); });

// 遍历所有订阅
for (auto& [id, callback] : event) {
    callback(42);
}

相关文档