Files
ViewDesignEngine/include/vde_platform/platform.h
T
hm 85f2df2ca7 refactor(batch2): extract pdm/license/platform/ui modules
Moved 4 module groups out of geometry kernel:

- vde_pdm: bom_table + quality_feedback + material_library (from brep/core)

- vde_license: license_manager (from core, vde_version.h updated)

- vde_platform: platform (from core, io_dwg_plugin.cpp updated)

- vde_ui: gizmo_api + selection_manager + viewport_api (from brep)

All modules compile. Pre-existing test failures unchanged (case-sensitive tier parsing, orientation cube)
2026-08-06 16:27:36 +08:00

44 lines
1.0 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#pragma once
/// 平台抽象层
/// 跨平台兼容宏 + M_PI 补丁 (MSVC 未定义)
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
#include <string>
namespace vde::platform {
/// 动态库句柄
using LibHandle = void*;
/// 加载动态库 (.so / .dll / .dylib / .so.hmos)
/// @return 非空 → 成功,nullptr → 失败
LibHandle load_library(const std::string& path);
/// 卸载
void unload_library(LibHandle h);
/// 查找符号
void* find_symbol(LibHandle h, const std::string& name);
/// 获取最后一次加载错误信息
std::string last_error();
/// 创建临时文件(跨平台安全)
/// @param prefix 文件名前缀
/// @param suffix 文件扩展名(如 ".dxf")
/// @param[out] path 返回临时文件完整路径
/// @return true 成功
bool make_temp_file(const std::string& prefix, const std::string& suffix, std::string& path);
/// 删除文件
bool delete_file(const std::string& path);
/// 执行系统命令
/// @return 0 成功
int run_command(const std::string& cmd);
} // namespace vde::platform