Pyrogenesis  13997
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Private Attributes | List of all members
VfsDirectory Class Reference

#include <vfs_tree.h>

Public Types

typedef std::map< VfsPath,
VfsFile
VfsFiles
 
typedef std::map< VfsPath,
VfsDirectory
VfsSubdirectories
 

Public Member Functions

 VfsDirectory ()
 
VfsFileAddFile (const VfsFile &file)
 
VfsDirectoryAddSubdirectory (const VfsPath &name)
 
void RemoveFile (const VfsPath &name)
 remove the given file from the virtual directory (no effect on the physical file). More...
 
VfsFileGetFile (const VfsPath &name)
 
VfsDirectoryGetSubdirectory (const VfsPath &name)
 
const VfsFilesFiles () const
 
const VfsSubdirectoriesSubdirectories () const
 
void SetAssociatedDirectory (const PRealDirectory &realDirectory)
 side effect: the next ShouldPopulate() will return true. More...
 
const PRealDirectoryAssociatedDirectory () const
 
bool ShouldPopulate ()
 
void RequestRepopulate ()
 ensure the next ShouldPopulate returns true. More...
 
void Clear ()
 empty file and subdirectory lists (e.g. More...
 

Private Attributes

VfsFiles m_files
 
VfsSubdirectories m_subdirectories
 
PRealDirectory m_realDirectory
 
volatile intptr_t m_shouldPopulate
 

Detailed Description

Definition at line 78 of file vfs_tree.h.

Member Typedef Documentation

Definition at line 81 of file vfs_tree.h.

Definition at line 82 of file vfs_tree.h.

Constructor & Destructor Documentation

VfsDirectory::VfsDirectory ( )

Definition at line 47 of file vfs_tree.cpp.

Member Function Documentation

VfsFile * VfsDirectory::AddFile ( const VfsFile file)
Returns
address of existing or newly inserted file.

Definition at line 81 of file vfs_tree.cpp.

VfsDirectory * VfsDirectory::AddSubdirectory ( const VfsPath name)
Returns
address of existing or newly inserted subdirectory.

Definition at line 103 of file vfs_tree.cpp.

const PRealDirectory& VfsDirectory::AssociatedDirectory ( ) const
inline

Definition at line 131 of file vfs_tree.h.

void VfsDirectory::Clear ( )

empty file and subdirectory lists (e.g.

when rebuilding VFS). CAUTION: this invalidates all previously returned pointers.

Definition at line 155 of file vfs_tree.cpp.

const VfsFiles& VfsDirectory::Files ( ) const
inline

Definition at line 116 of file vfs_tree.h.

VfsFile * VfsDirectory::GetFile ( const VfsPath name)
Returns
file with the given name. (note: non-const to allow changes to the file)

Definition at line 117 of file vfs_tree.cpp.

VfsDirectory * VfsDirectory::GetSubdirectory ( const VfsPath name)
Returns
subdirectory with the given name. (note: non-const to allow changes to the subdirectory)

Definition at line 126 of file vfs_tree.cpp.

void VfsDirectory::RemoveFile ( const VfsPath name)

remove the given file from the virtual directory (no effect on the physical file).

no effect if the file does not exist.

Definition at line 111 of file vfs_tree.cpp.

void VfsDirectory::RequestRepopulate ( )

ensure the next ShouldPopulate returns true.

Definition at line 149 of file vfs_tree.cpp.

void VfsDirectory::SetAssociatedDirectory ( const PRealDirectory realDirectory)

side effect: the next ShouldPopulate() will return true.

Definition at line 135 of file vfs_tree.cpp.

bool VfsDirectory::ShouldPopulate ( )
Returns
whether this directory should be populated from its AssociatedDirectory(). note that calling this is a promise to do so if true is returned – the flag is reset immediately.

Definition at line 143 of file vfs_tree.cpp.

const VfsSubdirectories& VfsDirectory::Subdirectories ( ) const
inline

Definition at line 121 of file vfs_tree.h.

Member Data Documentation

VfsFiles VfsDirectory::m_files
private

Definition at line 155 of file vfs_tree.h.

PRealDirectory VfsDirectory::m_realDirectory
private

Definition at line 158 of file vfs_tree.h.

volatile intptr_t VfsDirectory::m_shouldPopulate
private

Definition at line 159 of file vfs_tree.h.

VfsSubdirectories VfsDirectory::m_subdirectories
private

Definition at line 156 of file vfs_tree.h.


The documentation for this class was generated from the following files: