Nameless Engine
Loading...
Searching...
No Matches
ne::Globals Class Reference

#include <Globals.h>

Classes

struct  WorldDirection
 

Static Public Member Functions

static constexpr size_t getDefaultWorldSize ()
 
static std::string getApplicationName ()
 
static std::string getResourcesDirectoryName ()
 
static std::string getEngineDirectoryName ()
 
static std::string wstringToString (const std::wstring &sText)
 
static std::wstring stringToWstring (const std::string &sText)
 
static std::string getDebugOnlyLoggingPrefix ()
 

Static Private Attributes

static constexpr auto sBaseEngineDirectoryName = "nameless-engine"
 
static constexpr auto sDebugOnlyLoggingPrefix = "Debug mode only"
 
static constexpr auto sResDirectoryName = "res"
 
static constexpr size_t iDefaultWorldSize = 128
 

Detailed Description

Provides static helper functions.

Member Function Documentation

◆ getApplicationName()

std::string ne::Globals::getApplicationName ( )
static

Returns the name of this application.

Returns
Name of this application.

◆ getDebugOnlyLoggingPrefix()

std::string ne::Globals::getDebugOnlyLoggingPrefix ( )
static

Returns a text that is typically added in the format "[{}]: ..." for logs that exist only in debug builds.

Returns
Text.

◆ getDefaultWorldSize()

static constexpr size_t ne::Globals::getDefaultWorldSize ( )
inlinestaticconstexpr

Returns default size for created/loaded worlds.

Returns
World size.

◆ getEngineDirectoryName()

std::string ne::Globals::getEngineDirectoryName ( )
static

Returns name of the root (base) engine directory for storing configs, logs and etc.

Returns
Name of the directory.

◆ getResourcesDirectoryName()

std::string ne::Globals::getResourcesDirectoryName ( )
static

Returns name of the directory used to store resources.

Returns
Name of the directory.

◆ stringToWstring()

std::wstring ne::Globals::stringToWstring ( const std::string &  sText)
static

Converts string to wstring.

Parameters
sTextString to convert.
Returns
Converted string.

◆ wstringToString()

std::string ne::Globals::wstringToString ( const std::wstring &  sText)
static

Converts wstring to its narrow multibyte representation.

Parameters
sTextString to convert.
Returns
Converted string.

Member Data Documentation

◆ iDefaultWorldSize

constexpr size_t ne::Globals::iDefaultWorldSize = 128
staticconstexprprivate

Default size of a world.

◆ sBaseEngineDirectoryName

constexpr auto ne::Globals::sBaseEngineDirectoryName = "nameless-engine"
staticconstexprprivate

Name of the root (base) engine directory for storing configs, logs and etc.

◆ sDebugOnlyLoggingPrefix

constexpr auto ne::Globals::sDebugOnlyLoggingPrefix = "Debug mode only"
staticconstexprprivate

Prefix for logs that exist only in debug builds.

◆ sResDirectoryName

constexpr auto ne::Globals::sResDirectoryName = "res"
staticconstexprprivate

Name of the directory used to store resources.


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