40
40
* Creates the one and only system.
41
* @return An indication of success.
41
* \return An indication of success.
43
43
static GHOST_TSuccess create();
46
46
* Disposes the one and only system.
47
* @return An indication of success.
47
* \return An indication of success.
49
49
static GHOST_TSuccess dispose();
52
52
* Returns a pointer to the one and only system (nil if it hasn't been created).
53
* @return A pointer to the system.
53
* \return A pointer to the system.
55
static GHOST_ISystemPaths* get();
55
static GHOST_ISystemPaths *get();
60
60
* Protected default constructor to force use of static createSystem member.
62
GHOST_ISystemPaths() {}
62
GHOST_ISystemPaths() {
66
67
* Protected default constructor to force use of static dispose member.
68
virtual ~GHOST_ISystemPaths() {}
69
virtual ~GHOST_ISystemPaths() {
72
74
* Determine the base dir in which shared resources are located. It will first try to use
73
* "unpack and run" path, then look for properly installed path, not including versioning.
74
* @return Unsigned char string pointing to system dir (eg /usr/share/blender/).
75
* "unpack and run" path, then look for properly installed path, including versioning.
76
* \return Unsigned char string pointing to system dir (eg /usr/share/blender/).
76
virtual const GHOST_TUns8* getSystemDir() const = 0;
78
virtual const GHOST_TUns8 *getSystemDir(int version, const char *versionstr) const = 0;
79
* Determine the base dir in which user configuration is stored, not including versioning.
81
* Determine the base dir in which user configuration is stored, including versioning.
80
82
* If needed, it will create the base directory.
81
* @return Unsigned char string pointing to user dir (eg ~/.blender/).
83
* \return Unsigned char string pointing to user dir (eg ~/.blender/).
83
virtual const GHOST_TUns8* getUserDir() const = 0;
85
virtual const GHOST_TUns8 *getUserDir(int version, const char *versionstr) const = 0;
86
* Determine the directory of the current binary
87
* @return Unsigned char string pointing to the binary dir
89
virtual const GHOST_TUns8* getBinaryDir() const = 0;
88
* Determine the directory of the current binary
89
* \return Unsigned char string pointing to the binary dir
91
virtual const GHOST_TUns8 *getBinaryDir() const = 0;
92
94
* Add the file to the operating system most recently used files
94
virtual void addToSystemRecentFiles(const char* filename) const = 0;
96
virtual void addToSystemRecentFiles(const char *filename) const = 0;
97
99
/** The one and only system paths*/
98
static GHOST_ISystemPaths* m_systemPaths;
100
static GHOST_ISystemPaths *m_systemPaths;
103
#ifdef WITH_CXX_GUARDEDALLOC
104
MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_ISystemPaths")