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
This commit is contained in:
37
docs/api/core/event/begin.md
Normal file
37
docs/api/core/event/begin.md
Normal file
@@ -0,0 +1,37 @@
|
||||
# Event::begin
|
||||
|
||||
```cpp
|
||||
Iterator begin();
|
||||
```
|
||||
|
||||
获取开始迭代器。
|
||||
|
||||
**描述**
|
||||
|
||||
返回订阅列表的开始迭代器,用于范围for循环遍历所有订阅的回调。
|
||||
|
||||
**返回:** `Iterator` - 指向第一个监听器的迭代器(等价于 `std::vector<Listener>::iterator`)
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Core/Event.h>
|
||||
|
||||
using namespace XCEngine::Core;
|
||||
|
||||
Event<int> event;
|
||||
event.Subscribe([](int v) { printf("Callback 1: %d\n", v); });
|
||||
event.Subscribe([](int v) { printf("Callback 2: %d\n", v); });
|
||||
|
||||
// 遍历所有订阅
|
||||
for (auto& [id, callback] : event) {
|
||||
callback(100);
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [Event 总览](event.md) - 返回类总览
|
||||
- [end](end.md) - 获取结束迭代器
|
||||
Reference in New Issue
Block a user