docs: fix Resources module API docs naming conventions and broken links
- Rename constructor/destructor files to follow template spec: - ctor.md → constructor.md, dtor.md → destructor.md (audioclip) - texture_constructor.md → constructor.md, texture_destructor.md → destructor.md (texture) - material-loader-constructor.md → constructor.md, material-loader-destructor.md → destructor.md - Create missing constructor/destructor docs: - audio-loader: constructor.md, destructor.md - texture-loader: constructor.md, destructor.md - Fix broken links to ResourceManager: - shader-loader/index.md - material-loader/index.md - Remove duplicate folders (keep hyphenated versions): - Delete shaderloader/ (keep shader-loader/) - Delete resourcepackage/ (keep resource-package/) - Merge textureimportsettings/ into texture-import-settings/ - Rename audio-loader method files: - canload.md → can-load.md - getdefaultsettings.md → get-default-settings.md - getsupportedextensions.md → get-supported-extensions.md - Update overview pages with proper method links and constructor/destructor entries
This commit is contained in:
27
docs/api/resources/texture-loader/constructor.md
Normal file
27
docs/api/resources/texture-loader/constructor.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# TextureLoader::TextureLoader
|
||||
|
||||
```cpp
|
||||
TextureLoader();
|
||||
```
|
||||
|
||||
默认构造函数,创建一个 `TextureLoader` 实例。该加载器负责管理纹理资源的加载流程。
|
||||
|
||||
**参数:** 无
|
||||
|
||||
**返回:** 无
|
||||
|
||||
**线程安全:** ✅
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
#include "Resources/TextureLoader.h"
|
||||
|
||||
using namespace XCEngine::Resources;
|
||||
|
||||
TextureLoader loader;
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [TextureLoader 总览](index.md) - 返回类总览
|
||||
29
docs/api/resources/texture-loader/destructor.md
Normal file
29
docs/api/resources/texture-loader/destructor.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# TextureLoader::~TextureLoader
|
||||
|
||||
```cpp
|
||||
virtual ~TextureLoader() override;
|
||||
```
|
||||
|
||||
析构函数,用于销毁 `TextureLoader` 对象。该析构函数不执行任何特殊清理操作。
|
||||
|
||||
**参数:** 无
|
||||
|
||||
**返回:** 无
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
#include "Resources/TextureLoader.h"
|
||||
|
||||
using namespace XCEngine::Resources;
|
||||
|
||||
{
|
||||
TextureLoader loader;
|
||||
// 使用 loader...
|
||||
}
|
||||
// loader 在此自动销毁
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [TextureLoader 总览](index.md) - 返回类总览
|
||||
@@ -34,11 +34,13 @@
|
||||
|
||||
| 方法 | 描述 |
|
||||
|------|------|
|
||||
| `ResourceType GetResourceType() const` | 返回 `ResourceType::Texture` |
|
||||
| `Containers::Array<Containers::String> GetSupportedExtensions() const` | 获取支持的扩展名列表 |
|
||||
| `bool CanLoad(const Containers::String& path) const` | 检查是否支持加载指定路径的纹理 |
|
||||
| `LoadResult Load(const Containers::String& path, const ImportSettings* settings = nullptr)` | 加载纹理资源 |
|
||||
| `ImportSettings* GetDefaultSettings() const` | 获取默认导入设置 |
|
||||
| [TextureLoader](constructor.md) | 构造函数 |
|
||||
| [~TextureLoader](destructor.md) | 析构函数 |
|
||||
| [GetResourceType](get-resource-type.md) | 返回 `ResourceType::Texture` |
|
||||
| [GetSupportedExtensions](get-supported-extensions.md) | 获取支持的扩展名列表 |
|
||||
| [CanLoad](can-load.md) | 检查是否支持加载指定路径的纹理 |
|
||||
| [Load](load.md) | 加载纹理资源 |
|
||||
| [GetDefaultSettings](get-default-settings.md) | 获取默认导入设置 |
|
||||
|
||||
### GetResourceType
|
||||
|
||||
|
||||
Reference in New Issue
Block a user