Blender  V2.93
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
GHOST_ISystemPaths Class Referenceabstract

#include <GHOST_ISystemPaths.h>

Inherited by GHOST_SystemPaths.

Public Member Functions

virtual const GHOST_TUns8getSystemDir (int version, const char *versionstr) const =0
 
virtual const GHOST_TUns8getUserDir (int version, const char *versionstr) const =0
 
virtual const GHOST_TUns8getUserSpecialDir (GHOST_TUserSpecialDirTypes type) const =0
 
virtual const GHOST_TUns8getBinaryDir () const =0
 
virtual void addToSystemRecentFiles (const char *filename) const =0
 

Static Public Member Functions

static GHOST_TSuccess create ()
 
static GHOST_TSuccess dispose ()
 
static GHOST_ISystemPathsget ()
 

Protected Member Functions

 GHOST_ISystemPaths ()
 
virtual ~GHOST_ISystemPaths ()
 

Detailed Description

Definition at line 28 of file GHOST_ISystemPaths.h.

Constructor & Destructor Documentation

◆ GHOST_ISystemPaths()

GHOST_ISystemPaths::GHOST_ISystemPaths ( )
inlineprotected

Constructor. Protected default constructor to force use of static createSystem member.

Definition at line 53 of file GHOST_ISystemPaths.h.

◆ ~GHOST_ISystemPaths()

virtual GHOST_ISystemPaths::~GHOST_ISystemPaths ( )
inlineprotectedvirtual

Destructor. Protected default constructor to force use of static dispose member.

Definition at line 61 of file GHOST_ISystemPaths.h.

Member Function Documentation

◆ addToSystemRecentFiles()

virtual void GHOST_ISystemPaths::addToSystemRecentFiles ( const char *  filename) const
pure virtual

Add the file to the operating system most recently used files

Implemented in GHOST_SystemPaths, GHOST_SystemPathsWin32, GHOST_SystemPathsUnix, and GHOST_SystemPathsCocoa.

Referenced by GHOST_addToSystemRecentFiles().

◆ create()

GHOST_TSuccess GHOST_ISystemPaths::create ( )
static

Creates the one and only system.

Returns
An indication of success.

Definition at line 44 of file GHOST_ISystemPaths.cpp.

References GHOST_kFailure, GHOST_kSuccess, and NULL.

Referenced by get(), and GHOST_CreateSystemPaths().

◆ dispose()

GHOST_TSuccess GHOST_ISystemPaths::dispose ( )
static

Disposes the one and only system.

Returns
An indication of success.

Definition at line 65 of file GHOST_ISystemPaths.cpp.

References GHOST_kFailure, GHOST_kSuccess, and NULL.

Referenced by GHOST_DisposeSystemPaths().

◆ get()

GHOST_ISystemPaths * GHOST_ISystemPaths::get ( void  )
static

Returns a pointer to the one and only system (nil if it hasn't been created).

Returns
A pointer to the system.

Definition at line 78 of file GHOST_ISystemPaths.cpp.

References create().

Referenced by GHOST_addToSystemRecentFiles(), GHOST_getBinaryDir(), GHOST_getSystemDir(), GHOST_getUserDir(), and GHOST_getUserSpecialDir().

◆ getBinaryDir()

virtual const GHOST_TUns8* GHOST_ISystemPaths::getBinaryDir ( ) const
pure virtual

Determine the directory of the current binary

Returns
Unsigned char string pointing to the binary dir

Implemented in GHOST_SystemPaths, GHOST_SystemPathsWin32, GHOST_SystemPathsUnix, and GHOST_SystemPathsCocoa.

Referenced by GHOST_getBinaryDir().

◆ getSystemDir()

virtual const GHOST_TUns8* GHOST_ISystemPaths::getSystemDir ( int  version,
const char *  versionstr 
) const
pure virtual

Determine the base dir in which shared resources are located. It will first try to use "unpack and run" path, then look for properly installed path, including versioning.

Returns
Unsigned char string pointing to system dir (eg /usr/share/blender/).

Implemented in GHOST_SystemPaths, GHOST_SystemPathsWin32, GHOST_SystemPathsUnix, and GHOST_SystemPathsCocoa.

Referenced by GHOST_getSystemDir().

◆ getUserDir()

virtual const GHOST_TUns8* GHOST_ISystemPaths::getUserDir ( int  version,
const char *  versionstr 
) const
pure virtual

Determine the base dir in which user configuration is stored, including versioning. If needed, it will create the base directory.

Returns
Unsigned char string pointing to user dir (eg ~/.blender/).

Implemented in GHOST_SystemPaths, GHOST_SystemPathsWin32, GHOST_SystemPathsUnix, and GHOST_SystemPathsCocoa.

Referenced by GHOST_getUserDir().

◆ getUserSpecialDir()

virtual const GHOST_TUns8* GHOST_ISystemPaths::getUserSpecialDir ( GHOST_TUserSpecialDirTypes  type) const
pure virtual

Determine a special ("well known") and easy to reach user directory.

Returns
Unsigned char string pointing to user dir (eg ~/Documents/).

Implemented in GHOST_SystemPathsWin32, GHOST_SystemPathsUnix, and GHOST_SystemPathsCocoa.

Referenced by GHOST_getUserSpecialDir().


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