Blender V5.0
GHOST_ISystemPaths.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2009 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#pragma once
10
11#include <optional>
12#include <string>
13
14#include "GHOST_Types.h"
15
17 public:
22 static GHOST_TSuccess create();
23
28 static GHOST_TSuccess dispose();
29
34 static GHOST_ISystemPaths *get();
35
36 protected:
42
47 virtual ~GHOST_ISystemPaths() = default;
48
49 public:
55 virtual const char *getSystemDir(int version, const char *versionstr) const = 0;
56
62 virtual const char *getUserDir(int version, const char *versionstr) const = 0;
63
68 virtual std::optional<std::string> getUserSpecialDir(GHOST_TUserSpecialDirTypes type) const = 0;
69
74 virtual const char *getBinaryDir() const = 0;
75
79 virtual void addToSystemRecentFiles(const char *filepath) const = 0;
80
81 private:
83 static GHOST_ISystemPaths *system_paths_;
84
85 MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_ISystemPaths")
86};
GHOST_TSuccess
Definition GHOST_Types.h:57
GHOST_TUserSpecialDirTypes
virtual const char * getSystemDir(int version, const char *versionstr) const =0
virtual const char * getUserDir(int version, const char *versionstr) const =0
static GHOST_TSuccess create()
static GHOST_TSuccess dispose()
static GHOST_ISystemPaths * get()
virtual ~GHOST_ISystemPaths()=default
virtual void addToSystemRecentFiles(const char *filepath) const =0
virtual const char * getBinaryDir() const =0
virtual std::optional< std::string > getUserSpecialDir(GHOST_TUserSpecialDirTypes type) const =0