System module — OS / hardware / wall-clock / clipboard / optional GPU info. Frame timing stays on Timer; this is host/environment queries. 更多...
#include <System.h>
Public 成员函数 | |
| Module_REG (System) | |
| System () | |
| ~System () override=default | |
| std::string | getEngineVersion () const |
| Engine version string (e.g. "v0.1.0"). | |
| std::string | getPlatform () const |
| Raw SDL platform string (e.g. "Mac OS X", "Windows"). | |
| std::string | getOS () const |
| Normalized OS id for games: "Windows" | "OS X" | "Linux" | "Android" | "iOS" | "Unknown" | |
| int | getProcessorCount () const |
| int | getCPUCacheLineSize () const |
| CPU L1 cache line size in bytes (0 if unknown). | |
| int | getSystemRAM () const |
| System RAM in megabytes (0 if unknown). | |
| int | getProcessMemoryMB () const |
| Current process resident memory in megabytes (0 if unknown). | |
| float | getWallTime () const |
| UTC wall-clock seconds since Unix epoch (float for script). | |
| void | sleepMilliseconds (int ms) |
| std::string | getPowerState () const |
| Power state string: "unknown" | "on_battery" | "no_battery" | "charging" | "charged" | |
| int | getPowerSecondsLeft () const |
| Estimated seconds of battery left (-1 if unknown). | |
| int | getPowerPercent () const |
| Battery percent 0–100, or -1 if unknown. | |
| std::string | getClipboardText () const |
| void | setClipboardText (const std::string &text) |
| std::string | getGpuName () const |
| GPU queries — empty/0 if Graphics not initialized yet. | |
| std::string | getGpuVendor () const |
| std::string | getGpuDeviceType () const |
| "discrete" | "integrated" | "virtual" | "cpu" | "other" | "" | |
| int | getGpuMemoryTotalMB () const |
| Sum of DEVICE_LOCAL heap sizes in MB (0 if unknown / not ready). | |
Public 成员函数 继承自 eve::Module | |
| virtual | ~Module () |
| virtual std::string | getName () const =0 |
详细描述
System module — OS / hardware / wall-clock / clipboard / optional GPU info. Frame timing stays on Timer; this is host/environment queries.
Script: sys <- eve.System();
构造及析构函数说明
◆ System()
| eve::system::System::System | ( | ) |
在文件 System.cpp 第 45 行定义.
◆ ~System()
|
overridedefault |
成员函数说明
◆ getClipboardText()
| std::string eve::system::System::getClipboardText | ( | ) | const |
在文件 System.cpp 第 155 行定义.
◆ getCPUCacheLineSize()
| int eve::system::System::getCPUCacheLineSize | ( | ) | const |
◆ getEngineVersion()
| std::string eve::system::System::getEngineVersion | ( | ) | const |
Engine version string (e.g. "v0.1.0").
在文件 System.cpp 第 47 行定义.
◆ getGpuDeviceType()
| std::string eve::system::System::getGpuDeviceType | ( | ) | const |
"discrete" | "integrated" | "virtual" | "cpu" | "other" | ""
在文件 System.cpp 第 179 行定义.
◆ getGpuMemoryTotalMB()
| int eve::system::System::getGpuMemoryTotalMB | ( | ) | const |
Sum of DEVICE_LOCAL heap sizes in MB (0 if unknown / not ready).
在文件 System.cpp 第 184 行定义.
◆ getGpuName()
| std::string eve::system::System::getGpuName | ( | ) | const |
GPU queries — empty/0 if Graphics not initialized yet.
在文件 System.cpp 第 169 行定义.
◆ getGpuVendor()
| std::string eve::system::System::getGpuVendor | ( | ) | const |
在文件 System.cpp 第 174 行定义.
◆ getOS()
| std::string eve::system::System::getOS | ( | ) | const |
Normalized OS id for games: "Windows" | "OS X" | "Linux" | "Android" | "iOS" | "Unknown"
在文件 System.cpp 第 54 行定义.
引用了 getPlatform().
◆ getPlatform()
| std::string eve::system::System::getPlatform | ( | ) | const |
Raw SDL platform string (e.g. "Mac OS X", "Windows").
在文件 System.cpp 第 49 行定义.
引用了 p.
被这些函数引用 getOS().
◆ getPowerPercent()
| int eve::system::System::getPowerPercent | ( | ) | const |
Battery percent 0–100, or -1 if unknown.
在文件 System.cpp 第 149 行定义.
◆ getPowerSecondsLeft()
| int eve::system::System::getPowerSecondsLeft | ( | ) | const |
Estimated seconds of battery left (-1 if unknown).
在文件 System.cpp 第 143 行定义.
◆ getPowerState()
| std::string eve::system::System::getPowerState | ( | ) | const |
Power state string: "unknown" | "on_battery" | "no_battery" | "charging" | "charged"
在文件 System.cpp 第 131 行定义.
◆ getProcessMemoryMB()
| int eve::system::System::getProcessMemoryMB | ( | ) | const |
Current process resident memory in megabytes (0 if unknown).
在文件 System.cpp 第 85 行定义.
◆ getProcessorCount()
| int eve::system::System::getProcessorCount | ( | ) | const |
在文件 System.cpp 第 70 行定义.
引用了 n.
◆ getSystemRAM()
| int eve::system::System::getSystemRAM | ( | ) | const |
System RAM in megabytes (0 if unknown).
在文件 System.cpp 第 80 行定义.
◆ getWallTime()
| float eve::system::System::getWallTime | ( | ) | const |
UTC wall-clock seconds since Unix epoch (float for script).
在文件 System.cpp 第 118 行定义.
◆ Module_REG()
| eve::system::System::Module_REG | ( | System | ) |
◆ setClipboardText()
| void eve::system::System::setClipboardText | ( | const std::string & | text | ) |
在文件 System.cpp 第 164 行定义.
◆ sleepMilliseconds()
| void eve::system::System::sleepMilliseconds | ( | int | ms | ) |
在文件 System.cpp 第 125 行定义.
该类的文档由以下文件生成:
- src/modules/system/System.h
- src/modules/system/System.cpp
Public 成员函数 继承自