TDME2  1.9.200
FileSystem.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <memory>
4 
5 using std::unique_ptr;
6 
7 #include <tdme/tdme.h>
9 
11 
12 /**
13  * File system singleton class
14  * @author Andreas Drewke
15  */
17 {
18 private:
19  STATIC_DLL_IMPEXT static unique_ptr<FileSystemInterface> standardFileSystem;
20  STATIC_DLL_IMPEXT static unique_ptr<FileSystemInterface> fileSystem;
21 
22 public:
23 
24  /**
25  * Singleton instance to retrieve file system
26  * will use standard file system by default if not set up different explicitly
27  * @return file system
28  */
30 
31  /**
32  * Retrieve standard file system
33  * @return standard file system
34  */
36 
37  /**
38  * Set up file system
39  * @param fileSystem file system
40  */
42 
43  /**
44  * Unset file system, which means disposing the old one and unset internal file system to use
45  */
46  static void unsetFileSystem();
47 
48 };
File system singleton class.
Definition: FileSystem.h:17
static FileSystemInterface * getInstance()
Singleton instance to retrieve file system will use standard file system by default if not set up dif...
Definition: FileSystem.cpp:19
static STATIC_DLL_IMPEXT unique_ptr< FileSystemInterface > fileSystem
Definition: FileSystem.h:20
static void setupFileSystem(FileSystemInterface *fileSystem)
Set up file system.
Definition: FileSystem.cpp:31
static FileSystemInterface * getStandardFileSystem()
Retrieve standard file system.
Definition: FileSystem.cpp:25
static void unsetFileSystem()
Unset file system, which means disposing the old one and unset internal file system to use.
Definition: FileSystem.cpp:36
static STATIC_DLL_IMPEXT unique_ptr< FileSystemInterface > standardFileSystem
Definition: FileSystem.h:19
#define STATIC_DLL_IMPEXT
Definition: tdme.h:15