docs: Fix core module documentation discrepancies
Fixed the following issues in XCEngine Core module documentation: - Added 'using namespace XCEngine::Core;' to all code examples that use Core types (Event, FileWriter, etc.) without full namespace qualification - Added missing '#include <XCEngine/Containers/String.h>' to FileWriter examples that use Containers::String - Added '#include <string>' to Flush.md example using std::to_string Affected files: - core/core.md: Added using directive and Containers include - event/*.md: Added using namespace to all 8 event doc files - filewriter/*.md: Added using namespace and proper includes to all 6 files
This commit is contained in:
@@ -71,10 +71,13 @@ UniqueRef<T> MakeUnique(Args&&... args);
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Core/Core.h>
|
||||
#include <XCEngine/Containers/String.h>
|
||||
|
||||
using namespace XCEngine::Core;
|
||||
|
||||
// 使用类型别名
|
||||
Core::uint32 value = 100;
|
||||
Core::byte data[4];
|
||||
uint32 value = 100;
|
||||
byte data[4];
|
||||
|
||||
// 使用智能指针
|
||||
auto ref = MakeRef<MyClass>();
|
||||
|
||||
Reference in New Issue
Block a user