载入中...
搜索中...
未找到
eve::os::OS类 参考

OS module — host OS / hardware / wall-clock / clipboard / optional GPU info. Frame timing stays on Timer; this is host/environment queries. 更多...

#include <OS.h>

类 eve::os::OS 继承关系图:
eve::Module eve::IFramePacing

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.h 第 19 行定义.

构造及析构函数说明

◆ OS()

eve::os::OS::OS ( )

Os.

在文件 OS.cpp 第 45 行定义.

◆ ~OS()

eve::os::OS::~OS ( )
override

Os.

在文件 OS.cpp 第 50 行定义.

成员函数说明

◆ getClipboardText()

std::string eve::os::OS::getClipboardText ( ) const

Returns the clipboard text.

在文件 OS.cpp 第 199 行定义.

引用了 t.

◆ getCPUCacheLineSize()

int eve::os::OS::getCPUCacheLineSize ( ) const

CPU L1 cache line size in bytes (0 if unknown).

在文件 OS.cpp 第 119 行定义.

引用了 n.

◆ getEngineVersion()

std::string eve::os::OS::getEngineVersion ( ) const

Engine version string (e.g. "v0.1.0").

在文件 OS.cpp 第 91 行定义.

◆ getGpuDeviceType()

std::string eve::os::OS::getGpuDeviceType ( ) const

"discrete" | "integrated" | "virtual" | "cpu" | "other" | ""

在文件 OS.cpp 第 223 行定义.

引用了 info.

◆ getGpuMemoryTotalMB()

int eve::os::OS::getGpuMemoryTotalMB ( ) const

Sum of DEVICE_LOCAL heap sizes in MB (0 if unknown / not ready).

在文件 OS.cpp 第 228 行定义.

引用了 info.

◆ getGpuName()

std::string eve::os::OS::getGpuName ( ) const

GPU queries — empty/0 if Graphics not initialized yet.

在文件 OS.cpp 第 213 行定义.

引用了 info.

◆ getGpuVendor()

std::string eve::os::OS::getGpuVendor ( ) const

Returns the gpu vendor.

在文件 OS.cpp 第 218 行定义.

引用了 info.

◆ getOS()

std::string eve::os::OS::getOS ( ) const

Normalized OS id for games: "Windows" | "OS X" | "Linux" | "Android" | "iOS" | "Unknown"

在文件 OS.cpp 第 98 行定义.

引用了 getPlatform().

◆ getPlatform()

std::string eve::os::OS::getPlatform ( ) const

Raw SDL platform string (e.g. "Mac OS X", "Windows").

在文件 OS.cpp 第 93 行定义.

引用了 p.

被这些函数引用 getOS().

◆ getPowerPercent()

int eve::os::OS::getPowerPercent ( ) const

Battery percent 0–100, or -1 if unknown.

在文件 OS.cpp 第 193 行定义.

◆ getPowerSecondsLeft()

int eve::os::OS::getPowerSecondsLeft ( ) const

Estimated seconds of battery left (-1 if unknown).

在文件 OS.cpp 第 187 行定义.

◆ getPowerState()

std::string eve::os::OS::getPowerState ( ) const

Power state string: "unknown" | "on_battery" | "no_battery" | "charging" | "charged"

在文件 OS.cpp 第 175 行定义.

◆ getProcessMemoryMB()

int eve::os::OS::getProcessMemoryMB ( ) const

Current process resident memory in megabytes (0 if unknown).

在文件 OS.cpp 第 129 行定义.

引用了 count, info , 以及 key.

◆ getProcessorCount()

int eve::os::OS::getProcessorCount ( ) const

Returns the processor count.

在文件 OS.cpp 第 114 行定义.

引用了 n.

◆ getSystemRAM()

int eve::os::OS::getSystemRAM ( ) const

System RAM in megabytes (0 if unknown).

在文件 OS.cpp 第 124 行定义.

◆ getTargetFramesPerSecond()

int eve::os::OS::getTargetFramesPerSecond ( ) const
inlineoverridevirtualnoexcept

Returns the target frames per second.

实现了 eve::IFramePacing.

在文件 OS.h 第 33 行定义.

◆ getVerticalSyncCount()

int eve::os::OS::getVerticalSyncCount ( ) const
inlineoverridevirtualnoexcept

Returns the vertical sync count.

实现了 eve::IFramePacing.

在文件 OS.h 第 29 行定义.

◆ getWallTime()

float eve::os::OS::getWallTime ( ) const

UTC wall-clock seconds since Unix epoch (float for script).

在文件 OS.cpp 第 162 行定义.

◆ limitFrame()

void eve::os::OS::limitFrame ( )
overridevirtual

Limit frame.

实现了 eve::IFramePacing.

在文件 OS.cpp 第 72 行定义.

引用了 milliseconds , 以及 target.

◆ Module_REG()

eve::os::OS::Module_REG ( OS  )

◆ setClipboardText()

void eve::os::OS::setClipboardText ( const std::string &  text)

Sets the clipboard text.

在文件 OS.cpp 第 208 行定义.

引用了 text.

◆ setTargetFramesPerSecond()

Result< void > eve::os::OS::setTargetFramesPerSecond ( int  target)
overridevirtual

Sets the target frames per second.

实现了 eve::IFramePacing.

在文件 OS.cpp 第 62 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, eve::Result< T >::success() , 以及 target.

◆ setVerticalSyncCount()

Result< void > eve::os::OS::setVerticalSyncCount ( int  count)
overridevirtual

Sets the vertical sync count.

实现了 eve::IFramePacing.

在文件 OS.cpp 第 52 行定义.

引用了 count, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument , 以及 eve::Result< T >::success().

◆ sleepMilliseconds()

void eve::os::OS::sleepMilliseconds ( int  ms)

Sleep milliseconds.

在文件 OS.cpp 第 169 行定义.


该类的文档由以下文件生成: