Ember
A C++ 20 'game engine' built with SDL3 with wide platform support.
Public Member Functions | Static Public Member Functions | List of all members
SystemInfo Class Reference

SystemInfo class. More...

#include <system_info.h>

Public Member Functions

void operator= (const SystemInfo &)=delete
 

Static Public Member Functions

static std::string platform_name ()
 Get the current platform. More...
 
static bool is_mobile ()
 Check if the app is running on a mobile device. More...
 
static std::string get_device_type ()
 
static std::string get_device_name ()
 get device name (cross-platform) More...
 
static std::string get_device_model ()
 get device model (cross-platform) More...
 
static std::string get_device_unique_identifier ()
 get device UUID (cross-platform) More...
 
static int get_battery_percentage ()
 Get the battery percentage. More...
 

Detailed Description

SystemInfo class.

Get information about the system the app is running on

Version
0.0.7

Member Function Documentation

◆ get_battery_percentage()

int SystemInfo::get_battery_percentage ( )
static

Get the battery percentage.

This function checks the battery status of the device. If the device does not have a battery, it returns -1. Otherwise, it returns the battery percentage between (0-100).

Returns
int percentage
Version
0.0.7

◆ get_device_model()

std::string SystemInfo::get_device_model ( )
static

get device model (cross-platform)

Returns
"iPhone 8s"

◆ get_device_name()

std::string SystemInfo::get_device_name ( )
static

get device name (cross-platform)

Returns
"iPhone 8s"

◆ get_device_type()

static std::string SystemInfo::get_device_type ( )
static

◆ get_device_unique_identifier()

std::string SystemInfo::get_device_unique_identifier ( )
static

get device UUID (cross-platform)

this function return platform UUID, each platform handles different the size.

Returns
UUID characters
Version
0.0.7

◆ is_mobile()

bool SystemInfo::is_mobile ( )
static

Check if the app is running on a mobile device.

Returns
bool
Version
0.0.7

◆ operator=()

void SystemInfo::operator= ( const SystemInfo )
delete

◆ platform_name()

std::string SystemInfo::platform_name ( )
static

Get the current platform.

  • Windows, Linux, Mac OS X, iOS, Android, Emscripten.
Returns
std::string platform
Version
0.0.7

The documentation for this class was generated from the following files: