OGRE
1.9.0
|
Provides methods to find out where the Ogre config files are stored and where logs and settings files should be written to. More...
#include <OgreFileSystemLayer.h>
Public Member Functions | |
FileSystemLayer (const Ogre::String &subdir) | |
Creates a concrete platform-dependent implementation of FileSystemLayer. | |
bool | createDirectory (const Ogre::String &name) |
Create a directory. | |
const Ogre::String | getConfigFilePath (Ogre::String filename) const |
Search for the given config file in the user's home path. | |
const Ogre::String | getWritablePath (const Ogre::String &filename) const |
Find a path where the given filename can be written to. | |
void | operator delete (void *ptr) |
void | operator delete (void *ptr) |
void | operator delete (void *ptr, const char *, int, const char *) |
void | operator delete (void *ptr, const char *, int, const char *) |
void | operator delete (void *ptr, void *) |
void | operator delete (void *ptr, void *) |
void | operator delete[] (void *ptr) |
void | operator delete[] (void *ptr) |
void | operator delete[] (void *ptr, const char *, int, const char *) |
void | operator delete[] (void *ptr, const char *, int, const char *) |
void * | operator new (size_t sz) |
void * | operator new (size_t sz) |
void * | operator new (size_t sz, const char *file, int line, const char *func) |
operator new, with debug line info | |
void * | operator new (size_t sz, const char *file, int line, const char *func) |
operator new, with debug line info | |
void * | operator new (size_t sz, void *ptr) |
placement operator new | |
void * | operator new (size_t sz, void *ptr) |
placement operator new | |
void * | operator new[] (size_t sz) |
void * | operator new[] (size_t sz) |
void * | operator new[] (size_t sz, const char *file, int line, const char *func) |
array operator new, with debug line info | |
void * | operator new[] (size_t sz, const char *file, int line, const char *func) |
array operator new, with debug line info | |
void | setConfigPaths (const Ogre::StringVector &paths) |
void | setHomePath (const Ogre::String &path) |
Private Member Functions | |
bool | fileExists (const Ogre::String &path) const |
Test if the given file exists. | |
void | getConfigPaths () |
Determine config search paths. | |
void | prepareUserHome (const Ogre::String &subdir) |
Create an Ogre directory and the given subdir in the user's home. | |
Private Attributes | |
Ogre::StringVector | mConfigPaths |
Ogre::String | mHomePath |
Provides methods to find out where the Ogre config files are stored and where logs and settings files should be written to.
Definition at line 49 of file OgreFileSystemLayer.h.
Ogre::FileSystemLayer::FileSystemLayer | ( | const Ogre::String & | subdir | ) |
Creates a concrete platform-dependent implementation of FileSystemLayer.
subdir | A subdirectory inside the user's path to distinguish between different Ogre releases. |
Definition at line 57 of file OgreFileSystemLayer.h.
References getConfigPaths(), and prepareUserHome().
bool Ogre::FileSystemLayer::createDirectory | ( | const Ogre::String & | name | ) |
Create a directory.
|
private |
Test if the given file exists.
Referenced by getConfigFilePath().
const Ogre::String Ogre::FileSystemLayer::getConfigFilePath | ( | Ogre::String | filename | ) | const |
Search for the given config file in the user's home path.
If it can't be found there, the function falls back to the system-wide install path for Ogre config files. (Usually the same place where the SampleBrowser resides, or a special config path above that path.)
filename | The config file name (without path) |
Definition at line 74 of file OgreFileSystemLayer.h.
References fileExists(), getWritablePath(), mConfigPaths, and OGRE_BUILD_SUFFIX.
|
private |
Determine config search paths.
Referenced by FileSystemLayer().
const Ogre::String Ogre::FileSystemLayer::getWritablePath | ( | const Ogre::String & | filename | ) | const |
Find a path where the given filename can be written to.
This path will usually be in the user's home directory. This function should be used for any output like logs and graphics settings.
filename | Name of the file. |
Definition at line 110 of file OgreFileSystemLayer.h.
References mHomePath.
Referenced by getConfigFilePath().
|
inherited |
Definition at line 96 of file OgreMemoryAllocatedObject.h.
|
inherited |
Definition at line 96 of file OgreMemoryAllocatedObject.h.
|
inherited |
Definition at line 108 of file OgreMemoryAllocatedObject.h.
|
inherited |
Definition at line 108 of file OgreMemoryAllocatedObject.h.
|
inherited |
Definition at line 102 of file OgreMemoryAllocatedObject.h.
|
inherited |
Definition at line 102 of file OgreMemoryAllocatedObject.h.
|
inherited |
Definition at line 113 of file OgreMemoryAllocatedObject.h.
|
inherited |
Definition at line 113 of file OgreMemoryAllocatedObject.h.
|
inherited |
Definition at line 119 of file OgreMemoryAllocatedObject.h.
|
inherited |
Definition at line 119 of file OgreMemoryAllocatedObject.h.
|
inherited |
Definition at line 73 of file OgreMemoryAllocatedObject.h.
|
inherited |
Definition at line 73 of file OgreMemoryAllocatedObject.h.
|
inherited |
operator new, with debug line info
Definition at line 68 of file OgreMemoryAllocatedObject.h.
|
inherited |
operator new, with debug line info
Definition at line 68 of file OgreMemoryAllocatedObject.h.
|
inherited |
placement operator new
Definition at line 79 of file OgreMemoryAllocatedObject.h.
|
inherited |
placement operator new
Definition at line 79 of file OgreMemoryAllocatedObject.h.
|
inherited |
Definition at line 91 of file OgreMemoryAllocatedObject.h.
|
inherited |
Definition at line 91 of file OgreMemoryAllocatedObject.h.
|
inherited |
array operator new, with debug line info
Definition at line 86 of file OgreMemoryAllocatedObject.h.
|
inherited |
array operator new, with debug line info
Definition at line 86 of file OgreMemoryAllocatedObject.h.
|
private |
Create an Ogre directory and the given subdir in the user's home.
Referenced by FileSystemLayer().
void Ogre::FileSystemLayer::setConfigPaths | ( | const Ogre::StringVector & | paths | ) |
Definition at line 115 of file OgreFileSystemLayer.h.
References mConfigPaths.
void Ogre::FileSystemLayer::setHomePath | ( | const Ogre::String & | path | ) |
Definition at line 119 of file OgreFileSystemLayer.h.
References mHomePath.
|
private |
Definition at line 127 of file OgreFileSystemLayer.h.
Referenced by getConfigFilePath(), and setConfigPaths().
|
private |
Definition at line 128 of file OgreFileSystemLayer.h.
Referenced by getWritablePath(), and setHomePath().