docs: fix naming conventions across threading, math, memory, core, and debug modules

threading/:
- Rename 19 camelCase method files to hyphenated names
- task-system: createtaskgroup→create-task-group, etc.
- tasksystemconfig: enabletaskprofiling→enable-task-profiling, etc.
- thread: getcurrentid→get-current-id, etc.
- task: addref→add-ref, getid→get-id, etc.

math/:
- Rename underscore operator files to hyphenated
- vector3: operator_add→operator-add, etc.
- matrix4: gettranslation→get-translation, etc.
- vector4: tovector3→to-vector3, constructor_vector3→constructor-vector3
- sphere: sphere_constructor→sphere-constructor, etc.

memory/:
- Remove duplicate memorymanager/ folder (kept manager/ which was correct)

core/:
- filewriter: Consolidate ctor-default.md and ctor-file.md into constructor.md
- Rename dtor.md→destructor.md

debug/:
- filelogsink: Rename construct.md→constructor.md, ~filelogsink.md→destructor.md

All overview pages updated with new file references.
This commit is contained in:
2026-03-22 23:09:29 +08:00
parent a4e7785751
commit 0f0ab8922a
65 changed files with 88 additions and 511 deletions

View File

@@ -1,4 +1,43 @@
# FileWriter::FileWriter (文件路径构造)
# FileWriter::FileWriter
## 重载 1: 默认构造
```cpp
FileWriter();
```
默认构造 FileWriter 对象,不打开任何文件。
**描述**
创建 FileWriter 实例m_file 初始化为 nullptr。可后续通过 Open 方法打开文件。
**参数:** 无
**返回:** 无
**线程安全:** ❌
**复杂度:** O(1)
**示例:**
```cpp
#include <XCEngine/Core/FileWriter.h>
using namespace XCEngine::Core;
FileWriter writer;
if (!writer.IsOpen()) {
writer.Open("output.txt");
writer.Write("Hello\n");
writer.Close();
}
```
---
## 重载 2: 文件路径构造
```cpp
FileWriter(const char* filePath, bool append = false);
@@ -6,14 +45,12 @@ FileWriter(const char* filePath, bool append = false);
构造 FileWriter 对象并打开文件。
**描述**
创建 FileWriter 实例并尝试打开指定路径的文件。如果 append 为 true则以追加模式打开否则以覆盖模式打开。
**参数:**
- `filePath` - 要打开的文件路径
- `append` - 是否以追加模式打开,默认 false覆盖模式
**返回:** 无
**线程安全:** ❌
**复杂度:** O(1)
@@ -42,4 +79,3 @@ if (writer2.IsOpen()) {
- [FileWriter 总览](filewriter.md) - 返回类总览
- [Open](Open.md) - 打开文件
- [FileWriter()](ctor-default.md) - 默认构造

View File

@@ -1,36 +0,0 @@
# FileWriter::FileWriter (默认构造)
```cpp
FileWriter();
```
默认构造 FileWriter 对象,不打开任何文件。
**描述**
创建 FileWriter 实例m_file 初始化为 nullptr。可后续通过 Open 方法打开文件。
**线程安全:**
**复杂度:** O(1)
**示例:**
```cpp
#include <XCEngine/Core/FileWriter.h>
using namespace XCEngine::Core;
FileWriter writer;
if (!writer.IsOpen()) {
writer.Open("output.txt");
writer.Write("Hello\n");
writer.Close();
}
```
## 相关文档
- [FileWriter 总览](filewriter.md) - 返回类总览
- [Open](Open.md) - 打开文件
- [FileWriter(filePath, append)](ctor-file.md) - 构造并打开文件

View File

@@ -10,6 +10,10 @@
销毁 FileWriter 实例,如果文件处于打开状态则自动调用 Close 关闭文件,释放 FILE* 资源。
**参数:** 无
**返回:** 无
**线程安全:** ❌
**复杂度:** O(1)

View File

@@ -16,9 +16,9 @@
| 方法 | 描述 |
|------|------|
| [`FileWriter()`](ctor-default.md) | 默认构造(不打开文件) |
| [`FileWriter(filePath, append)`](ctor-file.md) | 构造并打开文件 |
| [`~FileWriter()`](dtor.md) | 析构函数,自动关闭文件 |
| [`FileWriter()`](constructor.md) | 默认构造(不打开文件) |
| [`FileWriter(filePath, append)`](constructor.md) | 构造并打开文件 |
| [`~FileWriter()`](destructor.md) | 析构函数,自动关闭文件 |
| [`Open`](Open.md) | 打开文件append=true 时为追加模式 |
| [`Close`](Close.md) | 关闭文件 |
| [`IsOpen`](IsOpen.md) | 检查文件是否已打开 |