Pyrogenesis  13997
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Private Member Functions | Private Attributes | List of all members
Paths Class Reference

Wrapper class for OS paths used by the game. More...

#include <Paths.h>

Public Member Functions

 Paths (const CmdLineArgs &args)
 
const OsPathRoot () const
 Returns the game's root directory. More...
 
const OsPathRData () const
 Returns directory for read-only data installed with the game. More...
 
const OsPathGameData () const
 Returns directory for game-managed data and mods. More...
 
const OsPathUserData () const
 Returns directory for user-created data Only things created in response to an explicit user action should go here. More...
 
const OsPathConfig () const
 Returns config file directory. More...
 
const OsPathCache () const
 Returns cache directory. More...
 
const OsPathLogs () const
 Returns logs directory. More...
 

Static Private Member Functions

static OsPath Root (const OsPath &argv0)
 
static OsPath RootData (const OsPath &argv0)
 
static OsPath XDG_Path (const char *envname, const OsPath &home, const OsPath &defaultPath)
 

Private Attributes

OsPath m_root
 
OsPath m_rdata
 
OsPath m_gameData
 
OsPath m_userData
 
OsPath m_config
 
OsPath m_cache
 
OsPath m_logs
 

Detailed Description

Wrapper class for OS paths used by the game.

Definition at line 27 of file Paths.h.

Constructor & Destructor Documentation

Paths::Paths ( const CmdLineArgs args)

Definition at line 33 of file Paths.cpp.

Member Function Documentation

const OsPath& Paths::Cache ( ) const
inline

Returns cache directory.

Definition at line 77 of file Paths.h.

const OsPath& Paths::Config ( ) const
inline

Returns config file directory.

Definition at line 69 of file Paths.h.

const OsPath& Paths::GameData ( ) const
inline

Returns directory for game-managed data and mods.

Definition at line 51 of file Paths.h.

const OsPath& Paths::Logs ( ) const
inline

Returns logs directory.

Definition at line 85 of file Paths.h.

const OsPath& Paths::RData ( ) const
inline

Returns directory for read-only data installed with the game.

Definition at line 43 of file Paths.h.

const OsPath& Paths::Root ( ) const
inline

Returns the game's root directory.

Definition at line 35 of file Paths.h.

OsPath Paths::Root ( const OsPath argv0)
staticprivate

Definition at line 156 of file Paths.cpp.

OsPath Paths::RootData ( const OsPath argv0)
staticprivate

Definition at line 186 of file Paths.cpp.

const OsPath& Paths::UserData ( ) const
inline

Returns directory for user-created data Only things created in response to an explicit user action should go here.

(note: only Windows currently treats this differently than GameData)

Definition at line 61 of file Paths.h.

OsPath Paths::XDG_Path ( const char *  envname,
const OsPath home,
const OsPath defaultPath 
)
staticprivate

Definition at line 212 of file Paths.cpp.

Member Data Documentation

OsPath Paths::m_cache
private

Definition at line 103 of file Paths.h.

OsPath Paths::m_config
private

Definition at line 102 of file Paths.h.

OsPath Paths::m_gameData
private

Definition at line 100 of file Paths.h.

OsPath Paths::m_logs
private

Definition at line 104 of file Paths.h.

OsPath Paths::m_rdata
private

Definition at line 97 of file Paths.h.

OsPath Paths::m_root
private

Definition at line 96 of file Paths.h.

OsPath Paths::m_userData
private

Definition at line 101 of file Paths.h.


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