Gamedev Framework (gf)  0.6.0
A C++11 framework for 2D games
Public Member Functions | Static Public Member Functions | List of all members
gf::SystemInfo Class Reference

A class for system info. More...

#include <gf/SystemInfo.h>

Public Member Functions

 SystemInfo ()=delete
 Deleted default constructor. More...

Static Public Member Functions

static std::string getPlatformName ()
 Get the plaform name. More...
static int getCpuCacheLineSize ()
 Get the CPU L1 cache line size. More...
static int getCpuCount ()
 Get the number of CPU cores. More...
static int getSystemRamSize ()
 Get the amount of memory. More...

Detailed Description

A class for system info.

This class only contains static methods. You can get:

Constructor & Destructor Documentation

◆ SystemInfo()

gf::SystemInfo::SystemInfo ( )

Deleted default constructor.

Member Function Documentation

◆ getCpuCacheLineSize()

static int gf::SystemInfo::getCpuCacheLineSize ( )

Get the CPU L1 cache line size.

The L1 cache line size of the CPU, in kilobytes

◆ getCpuCount()

static int gf::SystemInfo::getCpuCount ( )

Get the number of CPU cores.

This function returns the number of logical CPU cores.

The number of CPU cores

◆ getPlatformName()

static std::string gf::SystemInfo::getPlatformName ( )

Get the plaform name.

The plaform can be:

  • Windows
  • Mac OS X
  • Linux
  • iOS
  • Android
  • Unknown
The plaform name (e.g. "Linux")

◆ getSystemRamSize()

static int gf::SystemInfo::getSystemRamSize ( )

Get the amount of memory.

The amount of memory (RAM), in megabytes