Visualization LibraryA lightweight C++ OpenGL middleware for 2D/3D graphics |
[Home] [Tutorials] [All Classes] [Grouped Classes] |
A VirtualDirectory to manipulate directories stored in memory. More...
#include <MemoryDirectory.hpp>
Public Member Functions | |
| MemoryDirectory (const String &path=".") | |
| virtual const char * | className () |
| Returns the name of the class. | |
| virtual bool | setPath (const String &name) |
Changes the path name of a VirtualDirectory. Must not be an empty string. | |
| bool | addFile (MemoryFile *file) |
| The string file->path() must contain the full path including the MemoryDirectory's path() | |
| bool | removeFile (MemoryFile *file) |
| The string file->path() must contain the full path including the MemoryDirectory's path() | |
| bool | removeFile (const String &name) |
| void | eraseAllFiles () |
| virtual ref< VirtualFile > | file (const String &name) const |
| Returns the VirtualFile with the given name if any, NULL otherwise. | |
| ref< MemoryFile > | memoryFile (const String &name) const |
| void | listFilesRecursive (std::vector< String > &file_list) const |
| Returns the list of files contained in the VirtualDirectory. | |
| void | listSubDirs (std::vector< String > &dirs, bool append=false) const |
| ref< MemoryDirectory > | memorySubDir (const String &subdir_name) const |
| ref< VirtualDirectory > | subDir (const String &subdir_name) const |
| void | listFiles (std::vector< String > &file_list, bool append=false) const |
| void | clone (VirtualDirectory *directory, const String &match="*") |
| Clones the content of another directory (empty directories are never cloned). | |
Protected Attributes | |
| std::map< String, ref < MemoryFile > > | mFiles |
A VirtualDirectory to manipulate directories stored in memory.
| vl::MemoryDirectory::MemoryDirectory | ( | const String & | path = "." ) |
[inline] |
| virtual const char* vl::MemoryDirectory::className | ( | ) | [inline, virtual] |
Returns the name of the class.
Reimplemented from vl::VirtualDirectory.
| bool MemoryDirectory::setPath | ( | const String & | path ) | [virtual] |
Changes the path name of a VirtualDirectory. Must not be an empty string.
Reimplemented from vl::VirtualDirectory.
| bool MemoryDirectory::addFile | ( | MemoryFile * | file ) |
| bool MemoryDirectory::removeFile | ( | MemoryFile * | file ) |
| bool MemoryDirectory::removeFile | ( | const String & | name ) |
| void vl::MemoryDirectory::eraseAllFiles | ( | ) | [inline] |
| virtual ref<VirtualFile> vl::MemoryDirectory::file | ( | const String & | name ) | const [inline, virtual] |
Returns the VirtualFile with the given name if any, NULL otherwise.
Implements vl::VirtualDirectory.
| ref< MemoryFile > MemoryDirectory::memoryFile | ( | const String & | name ) | const |
| void MemoryDirectory::listFilesRecursive | ( | std::vector< String > & | file_list ) | const [virtual] |
Returns the list of files contained in the VirtualDirectory.
If there are subdirectories the files will be searched recursively.
Implements vl::VirtualDirectory.
| void MemoryDirectory::listSubDirs | ( | std::vector< String > & | dirs, |
| bool | append = false |
||
| ) | const [virtual] |
Implements vl::VirtualDirectory.
| ref< MemoryDirectory > MemoryDirectory::memorySubDir | ( | const String & | subdir_name ) | const |
| ref<VirtualDirectory> vl::MemoryDirectory::subDir | ( | const String & | subdir_name ) | const [inline, virtual] |
Implements vl::VirtualDirectory.
| void MemoryDirectory::listFiles | ( | std::vector< String > & | file_list, |
| bool | append = false |
||
| ) | const [virtual] |
Implements vl::VirtualDirectory.
| void MemoryDirectory::clone | ( | VirtualDirectory * | directory, |
| const String & | match = "*" |
||
| ) |
Clones the content of another directory (empty directories are never cloned).
std::map< String, ref<MemoryFile> > vl::MemoryDirectory::mFiles [protected] |