docs: update resources API docs
This commit is contained in:
30
docs/api/resources/resource-dependency-graph/clear.md
Normal file
30
docs/api/resources/resource-dependency-graph/clear.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# Clear
|
||||
|
||||
清空整个依赖图。
|
||||
|
||||
## 方法签名
|
||||
|
||||
```cpp
|
||||
void Clear();
|
||||
```
|
||||
|
||||
## 详细描述
|
||||
|
||||
移除所有节点并清空内部数据结构。调用此方法后,依赖图将处于空状态,所有之前添加的节点和依赖关系都将被销毁。
|
||||
|
||||
## 参数
|
||||
|
||||
无
|
||||
|
||||
## 返回值
|
||||
|
||||
无
|
||||
|
||||
## 示例
|
||||
|
||||
```cpp
|
||||
graph.AddNode("A"_guid, ResourceType::Texture);
|
||||
graph.AddNode("B"_guid, ResourceType::Material);
|
||||
graph.Clear();
|
||||
// 现在依赖图为空
|
||||
```
|
||||
Reference in New Issue
Block a user