Gamedev Framework (gf)  0.3.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

gf::SystemInfo::SystemInfo ( )
delete

Deleted default constructor.

Member Function Documentation

static int gf::SystemInfo::getCpuCacheLineSize ( )
static

Get the CPU L1 cache line size.

Returns
The L1 cache line size of the CPU, in kilobytes
static int gf::SystemInfo::getCpuCount ( )
static

Get the number of CPU cores.

This function returns the number of logical CPU cores.

Returns
The number of CPU cores
static std::string gf::SystemInfo::getPlatformName ( )
static

Get the plaform name.

The plaform can be:

  • Windows
  • Mac OS X
  • Linux
  • iOS
  • Android
  • Unknown
Returns
The plaform name (e.g. "Linux")
static int gf::SystemInfo::getSystemRamSize ( )
static

Get the amount of memory.

Returns
The amount of memory (RAM), in megabytes