OS module — host OS / hardware / wall-clock / clipboard / optional GPU info. Frame timing stays on Timer; this is host/environment queries. 更多...
#include <OS.h>
Public 成员函数 | |
| Module_REG (OS) | |
| OS () | |
| Os. | |
| ~OS () override | |
| Os. | |
| Result< void > | setVerticalSyncCount (int count) override |
| Sets the vertical sync count. | |
| int | getVerticalSyncCount () const noexcept override |
| Returns the vertical sync count. | |
| Result< void > | setTargetFramesPerSecond (int target) override |
| Sets the target frames per second. | |
| int | getTargetFramesPerSecond () const noexcept override |
| Returns the target frames per second. | |
| void | limitFrame () override |
| Limit frame. | |
| 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 |
| Returns the processor count. | |
| 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) |
| Sleep milliseconds. | |
| 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 |
| Returns the clipboard text. | |
| void | setClipboardText (const std::string &text) |
| Sets the clipboard text. | |
| std::string | getGpuName () const |
| GPU queries — empty/0 if Graphics not initialized yet. | |
| std::string | getGpuVendor () const |
| Returns the gpu vendor. | |
| 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 () |
| Module. | |
| virtual std::string | getName () const =0 |
| Returns the name. | |
Public 成员函数 继承自 eve::IFramePacing | |
| virtual | ~IFramePacing ()=default |
| Releases IFramePacing resources. | |
额外继承的成员函数 | |
静态 Public 属性 继承自 eve::IFramePacing | |
| static constexpr const char * | capabilityName = "eve.frame-pacing" |
详细描述
OS module — host OS / hardware / wall-clock / clipboard / optional GPU info. Frame timing stays on Timer; this is host/environment queries.
Script: os <- eve.OS();.
构造及析构函数说明
◆ OS()
◆ ~OS()
成员函数说明
◆ getClipboardText()
| std::string eve::os::OS::getClipboardText | ( | ) | const |
◆ getCPUCacheLineSize()
| int eve::os::OS::getCPUCacheLineSize | ( | ) | const |
◆ getEngineVersion()
| std::string eve::os::OS::getEngineVersion | ( | ) | const |
◆ getGpuDeviceType()
| std::string eve::os::OS::getGpuDeviceType | ( | ) | const |
◆ getGpuMemoryTotalMB()
| int eve::os::OS::getGpuMemoryTotalMB | ( | ) | const |
◆ getGpuName()
| std::string eve::os::OS::getGpuName | ( | ) | const |
◆ getGpuVendor()
| std::string eve::os::OS::getGpuVendor | ( | ) | const |
◆ getOS()
| std::string eve::os::OS::getOS | ( | ) | const |
Normalized OS id for games: "Windows" | "OS X" | "Linux" | "Android" | "iOS" | "Unknown"
引用了 getPlatform().
◆ getPlatform()
| std::string eve::os::OS::getPlatform | ( | ) | const |
◆ getPowerPercent()
| int eve::os::OS::getPowerPercent | ( | ) | const |
◆ getPowerSecondsLeft()
| int eve::os::OS::getPowerSecondsLeft | ( | ) | const |
◆ getPowerState()
| std::string eve::os::OS::getPowerState | ( | ) | const |
◆ getProcessMemoryMB()
| int eve::os::OS::getProcessMemoryMB | ( | ) | const |
◆ getProcessorCount()
| int eve::os::OS::getProcessorCount | ( | ) | const |
◆ getSystemRAM()
| int eve::os::OS::getSystemRAM | ( | ) | const |
◆ getTargetFramesPerSecond()
|
inlineoverridevirtualnoexcept |
◆ getVerticalSyncCount()
|
inlineoverridevirtualnoexcept |
◆ getWallTime()
| float eve::os::OS::getWallTime | ( | ) | const |
◆ limitFrame()
|
overridevirtual |
◆ Module_REG()
| eve::os::OS::Module_REG | ( | OS | ) |
◆ setClipboardText()
| void eve::os::OS::setClipboardText | ( | const std::string & | text | ) |
◆ setTargetFramesPerSecond()
|
overridevirtual |
Sets the target frames per second.
实现了 eve::IFramePacing.
引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, eve::Result< T >::success() , 以及 target.
◆ setVerticalSyncCount()
|
overridevirtual |
Sets the vertical sync count.
实现了 eve::IFramePacing.
引用了 count, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument , 以及 eve::Result< T >::success().
◆ sleepMilliseconds()
该类的文档由以下文件生成:
Public 成员函数 继承自