This namespace is for all the classes belonging to the non-network I/O Subsystem. More...
Classes | |
class | Archive |
class | Asset |
A convenience base class for objects that may need common IO operations exposed for them. More... | |
class | AssetGroup |
This is a class that stores a specific grouping of Assets, usually based on thier location. More... | |
class | AssetHandler |
class | AssetID |
This is a simple class storing the name and group identification of an Asset/Stream. More... | |
class | DefaultResourceManagerFactory |
A factory responsible for the creation and destruction of the default resourcemanager. More... | |
class | FileStream |
This represents a stream to a file on disk using the C++ file stream API. More... | |
class | iInStream |
Interface class for input (read) streams. More... | |
class | IOStream |
Base class for streams that support both read and write operations. More... | |
class | iOutStream |
Interface class for output (write) streams. More... | |
class | IStream |
Base class for input (read) streams with minimal implementation. More... | |
class | iStreamBase |
Base class interface for resource streams. More... | |
class | MemoryStream |
An I/O stream to a buffer of memory. More... | |
class | MemoryStreamBuffer |
A stream buffer object to a chunk of memory. More... | |
class | OStream |
Base class for output (write) streams with minimal implementation. More... | |
class | ResourceManager |
This is the manager responsible for the loading and unloading of files. More... | |
Typedefs | |
typedef IOStream | DataStream |
Convenience type for compatibility. | |
typedef CountedPtr< DataStream > | DataStreamPtr |
This is a convenience type for a data stream in a counted pointer. | |
typedef CountedPtr< IStream > | IStreamPtr |
Convenience type for a standard input stream in a CountedPtr. | |
typedef CountedPtr< OStream > | OStreamPtr |
Convenience type for a standard output stream in a CountedPtr. | |
typedef std::istream | StdInputStream |
Convenience type for a standard input stream. | |
typedef CountedPtr< StdInputStream > | StdInputStreamPtr |
Convenience type for a standard input stream in a CountedPtr. | |
typedef std::ostream | StdOutputStream |
Convenience type for a standard output stream. | |
typedef CountedPtr< StdOutputStream > | StdOutputStreamPtr |
Convenience type for a standard output stream in a CountedPtr. | |
typedef std::iostream | StdStream |
Convenience type for a standard input/output stream. | |
typedef CountedPtr< StdStream > | StdStreamPtr |
Convenience type for a standard input/output stream in a CountedPtr. | |
typedef std::streamoff | StreamOff |
Convenience define for the stream offset datatype. | |
typedef std::streampos | StreamPos |
Convenience define for the stream position datatype. | |
typedef std::streamsize | StreamSize |
Convenience define for the stream size datatype. | |
Enumerations | |
enum | ArchiveType { AT_FileSystem = 0, AT_Zip = 1, AT_Invalid = 32768 } |
Used to indicate what kind of resources the Entrosol should look for. More... | |
enum | LoadingState { LS_Uninitialized = 0, LS_Initializing = 1, LS_Initialized = 2, LS_Loading = 3, LS_Loaded = 4 } |
This enum describes the current state of loading for an asset. | |
enum | SeekOrigin { SO_Beginning = std::ios_base::beg, SO_Current = std::ios_base::cur, SO_End = std::ios_base::end } |
An enum describing which position should be considered the origin for changing the current position in a stream. More... | |
enum | StreamFlags { SF_None = 0, SF_Read = std::ios_base::in, SF_Write = std::ios_base::out, SF_Append = std::ios_base::app, SF_AtEnd = std::ios_base::ate, SF_Binary = std::ios_base::binary, SF_Truncate = std::ios_base::trunc } |
This enum describes the flags that control certain behaviors of a stream. More... | |
Functions | |||
String | BaseName (const String &FileName) | ||
Get the filename portion of a string. More... | |||
void | CacheMainArgs (int ArgCount, char **ArgVars) | ||
Store the Main arguments for later use. More... | |||
void | ChangeWorkingDirectory (const String &ChangeTo) | ||
Change directory, to the directory indicated. More... | |||
String | CombinePathAndFileName (const String &FilePath, const String &FileName) | ||
Convenience method to verify the necessary system separator is present when concatenating. More... | |||
Boole | CreateDirectory (const String &DirectoryPath) | ||
Creates a single new directory. More... | |||
Boole | CreateDirectoryPath (const String &DirectoryPath) | ||
Creates all directories that do not exist in the provided path. More... | |||
String | DirName (const String &FileName) | ||
Get the directory portion of a string. More... | |||
Boole | DoesDirectoryExist (const String &DirectoryPath) | ||
Checks to see if the given path exists and if it is a folder.
| |||
String | GetCommonUserDataDir () | ||
Gets the path to the directory intended for game saves and user profile data for all users. More... | |||
String | GetCurrentUserDataDir () | ||
Gets the path to the directory intended for game saves and user profile data for the current user. More... | |||
StringVector | GetDirContents (const String &Dir=".") | ||
Get a Listing of the files and subdirectories in a directory. More... | |||
Char8 | GetDirectorySeparator () | ||
Get the character used to separate directories. More... | |||
String | GetExecutableDir () | ||
Get the Path to the current executable, in a fast way if possible. More... | |||
String | GetExecutableDir (int ArgCount, char **ArgVars) | ||
Get the Path to the current executable, fast from Args if Possible or from a system call otherwise. More... | |||
String | GetExecutableDirFromArg () | ||
Uses the main parameters stored using "CacheMainArgs" to attempt determine executable directory. More... | |||
String | GetExecutableDirFromArg (int ArgCount, char **ArgVars) | ||
Attempt to get the executable directory from the a set of variables like those passed into Main. More... | |||
String | GetExecutableDirFromSystem () | ||
Used a system call to get the curent Directory the executable is in. This make an external system call and is likely slower than GetExecutableDirFromArg. More... | |||
String | GetLocalAppDataDir () | ||
Gets the path to the directory intended for game and engine config data that is not meant to be shared. More... | |||
Char8 | GetPathSeparator () | ||
Get the character used to separate entries in the system PATH. More... | |||
String | GetShareableAppDataDir () | ||
Gets the path to the directory intended for game and engine config data that is allowed to be shared. More... | |||
StringVector | GetSystemPATH (const String &PATH=String(getenv("PATH"))) | ||
Get the $PATH or PATH% split and order for easy checking of how the OS does it. More... | |||
String | GetWorkingDirectory () | ||
Get the working directory as a Mezzanine::String. More... | |||
void | RemoveDirectory (const String &DirectoryPath) | ||
Remove an empty directory.
| |||
String | ResolveDataPathFromString (const String &PathVar) | ||
Resolves a string describing one of the platform data paths to the actual path it is. More... | |||
String | Which (const String &ExecutableName) | ||
Search the system path the same way most systems do to find an executable. More... | |||
This namespace is for all the classes belonging to the non-network I/O Subsystem.
The resource system is primarily responsible for the loading, reading, and writing of files as well as filesystem management.
Used to indicate what kind of resources the Entrosol should look for.
Enumerator | |
---|---|
AT_FileSystem |
Look for raw files. |
AT_Zip |
Look for stuff in zip files even if the extension is not '.zip'. |
AT_Invalid |
Indicates this valid was messed up unrecoverably, most likely by a bug. |
Definition at line 51 of file resourceenumerations.h.
An enum describing which position should be considered the origin for changing the current position in a stream.
Enumerator | |
---|---|
SO_Beginning |
The beginning of the stream. |
SO_Current |
The current position for read/write operations in the stream. |
SO_End |
The end of the stream. |
Definition at line 77 of file datastream.h.
This enum describes the flags that control certain behaviors of a stream.
It is important to note that not all of these flags are used by all streams.
Definition at line 65 of file datastream.h.
Get the filename portion of a string.
FileName | A complete path and filename. |
Definition at line 236 of file resourceutilities.cpp.
void MEZZ_LIB Mezzanine::Resource::CacheMainArgs | ( | int | ArgCount, |
char ** | ArgVars | ||
) |
Store the Main arguments for later use.
ArgCount | How many arguments will be passed in ArgVars. |
ArgVars | A pointer to an array, with ArgCount elements, of char* which point to null terminated c strings. |
Definition at line 104 of file resourceutilities.cpp.
Change directory, to the directory indicated.
ChangeTo | The new directory to work from. |
Definition at line 393 of file resourceutilities.cpp.
String MEZZ_LIB Mezzanine::Resource::CombinePathAndFileName | ( | const String & | FilePath, |
const String & | FileName | ||
) |
Convenience method to verify the necessary system separator is present when concatenating.
FilePath | The directory path to the file. |
FileName | The name of the file. |
Definition at line 268 of file resourceutilities.cpp.
Creates a single new directory.
DirectoryPath | The path for the newly created directory. |
Definition at line 121 of file resourceutilities.cpp.
Creates all directories that do not exist in the provided path.
DirectoryPath | The path for the newly created directory or directories. |
Definition at line 152 of file resourceutilities.cpp.
Get the directory portion of a string.
FileName | A complete path and filename. |
Definition at line 222 of file resourceutilities.cpp.
Checks to see if the given path exists and if it is a folder.
On | Error this might throw a Mezzanine::IOException with detail about why it failed. |
DirectoryPath | A String containing the path to test. |
Definition at line 179 of file resourceutilities.cpp.
Gets the path to the directory intended for game saves and user profile data for all users.
Definition at line 495 of file resourceutilities.cpp.
Gets the path to the directory intended for game saves and user profile data for the current user.
Definition at line 477 of file resourceutilities.cpp.
StringVector MEZZ_LIB Mezzanine::Resource::GetDirContents | ( | const String & | Dir = "." | ) |
Get a Listing of the files and subdirectories in a directory.
This follows normal command line conventions, "." is the current directory, ".." is the parent directory. To access the file system root you will need to use a leading "c:/", "c:\\", or "/" as appropriate for the operating system the software will run on.
Dir | The directory to check. |
Definition at line 200 of file resourceutilities.cpp.
Get the character used to separate directories.
Definition at line 250 of file resourceutilities.cpp.
Get the Path to the current executable, in a fast way if possible.
Definition at line 317 of file resourceutilities.cpp.
Get the Path to the current executable, fast from Args if Possible or from a system call otherwise.
ArgCount | How many arguments will be passed in ArgVars. |
ArgVars | A pointer to an array, with ArgCount elements, of char* which point to null terminated c strings. |
Definition at line 322 of file resourceutilities.cpp.
Uses the main parameters stored using "CacheMainArgs" to attempt determine executable directory.
Definition at line 358 of file resourceutilities.cpp.
Attempt to get the executable directory from the a set of variables like those passed into Main.
ArgCount | How many arguments will be passed in ArgVars. |
ArgVars | A pointer to an array, with ArgCount elements, of char* which point to null terminated c strings. |
Definition at line 363 of file resourceutilities.cpp.
Used a system call to get the curent Directory the executable is in. This make an external system call and is likely slower than GetExecutableDirFromArg.
Definition at line 332 of file resourceutilities.cpp.
Gets the path to the directory intended for game and engine config data that is not meant to be shared.
Definition at line 432 of file resourceutilities.cpp.
Get the character used to separate entries in the system PATH.
Definition at line 259 of file resourceutilities.cpp.
Gets the path to the directory intended for game and engine config data that is allowed to be shared.
Definition at line 459 of file resourceutilities.cpp.
StringVector MEZZ_LIB Mezzanine::Resource::GetSystemPATH | ( | const String & | PATH = String(getenv("PATH")) | ) |
Get the $PATH or PATH% split and order for easy checking of how the OS does it.
PATH | Defaults to the PATH environment variable. But any value like a system path will be split the return of GetPathSeparator(). |
Definition at line 282 of file resourceutilities.cpp.
Get the working directory as a Mezzanine::String.
Definition at line 403 of file resourceutilities.cpp.
Remove an empty directory.
On | Error this might throw a Mezzanine::IOException with details about why it failed. |
DirectoryPath | The Path to the directory to remove. |
Definition at line 191 of file resourceutilities.cpp.
Resolves a string describing one of the platform data paths to the actual path it is.
PathVar | String containing the name of the path variable. |
Definition at line 418 of file resourceutilities.cpp.
Search the system path the same way most systems do to find an executable.
ExecutableName | The executable to look for. |
Definition at line 300 of file resourceutilities.cpp.