Visualization Library 2.0.0

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
Public Member Functions | Protected Member Functions | List of all members
vl::QtDirectory Class Reference

A VirtualDirectory that uses Qt's QDir. More...

#include <QtDirectory.hpp>

+ Inheritance diagram for vl::QtDirectory:

Public Member Functions

 QtDirectory ()
 
 QtDirectory (const String &path)
 
void listFilesRecursive (std::vector< String > &file_list) const
 Use carefully this function, since this search the whole given file system tree. More...
 
void listFiles (std::vector< String > &file_list, bool append=false) const
 
void listFiles (std::vector< ref< QtFile > > &file_list, bool append=false) const
 
void listSubDirs (std::vector< String > &dirs, bool append=false) const
 
ref< QtDirectoryqtSubDir (const String &subdir_name) const
 
ref< VirtualDirectorysubDir (const String &subdir_name) const
 
virtual ref< VirtualFilefile (const String &name) const
 Returns the VirtualFile with the given name if any, NULL otherwise. More...
 
virtual ref< QtFileqtFile (const String &name) const
 
bool exists () const
 
 QtDirectory ()
 
 QtDirectory (const String &path)
 
void listFilesRecursive (std::vector< String > &file_list) const
 Use carefully this function, since this search the whole given file system tree. More...
 
void listFiles (std::vector< String > &file_list, bool append=false) const
 
void listFiles (std::vector< ref< QtFile > > &file_list, bool append=false) const
 
void listSubDirs (std::vector< String > &dirs, bool append=false) const
 
ref< QtDirectoryqtSubDir (const String &subdir_name) const
 
ref< VirtualDirectorysubDir (const String &subdir_name) const
 
virtual ref< VirtualFilefile (const String &name) const
 Returns the VirtualFile with the given name if any, NULL otherwise. More...
 
virtual ref< QtFileqtFile (const String &name) const
 
bool exists () const
 
- Public Member Functions inherited from vl::VirtualDirectory
 VirtualDirectory ()
 Constructor. More...
 
 VirtualDirectory (const String &path)
 Constructor. More...
 
virtual bool setPath (const String &path)
 Changes the path name of a VirtualDirectory. Must not be an empty string. More...
 
virtual const Stringpath () const
 
bool fileExists (const String &name) const
 Checks the existence of a file in the directory. More...
 
virtual void listFilesRecursive (std::vector< String > &file_list, const String &match) const
 Returns the list of files contained in the VirtualDirectory that match the expression 'match'. More...
 
- Public Member Functions inherited from vl::Object
 Object ()
 Constructor. More...
 
 Object (const Object &other)
 Copy constructor: copies the name, ref count mutex and user data. More...
 
Objectoperator= (const Object &other)
 Copy operator: copies the object's name, ref count mutex and user data. More...
 
const std::string & objectName () const
 The name of the object, by default set to the object's class name. More...
 
void setObjectName (const char *name)
 The name of the object, by default set to the object's class name in debug builds. More...
 
void setObjectName (const std::string &name)
 The name of the object, by default set to the object's class name in debug builds. More...
 
void setRefCountMutex (IMutex *mutex)
 The mutex used to protect the reference counting of an Object across multiple threads. More...
 
IMutexrefCountMutex ()
 The mutex used to protect the reference counting of an Object across multiple threads. More...
 
const IMutexrefCountMutex () const
 The mutex used to protect the reference counting of an Object across multiple threads. More...
 
int referenceCount () const
 Returns the number of references of an object. More...
 
void incReference () const
 Increments the reference count of an object. More...
 
void decReference ()
 Decrements the reference count of an object and deletes it if both automaticDelete() is true the count reaches 0. More...
 
void setAutomaticDelete (bool autodel_on)
 If set to true the Object is deleted when its reference count reaches 0. More...
 
bool automaticDelete () const
 If set to true the Object is deleted when its reference count reaches 0. More...
 
template<class T >
T * as ()
 Casts an Object to the specified class. More...
 
template<class T >
const T * as () const
 Casts an Object to the specified class. More...
 

Protected Member Functions

void listFilesRecursive_internal (std::vector< String > &file_list) const
 
void listFilesRecursive_internal (std::vector< String > &file_list) const
 
- Protected Member Functions inherited from vl::VirtualDirectory
String translatePath (const String &p) const
 
- Protected Member Functions inherited from vl::Object
virtual ~Object ()
 

Additional Inherited Members

- Protected Attributes inherited from vl::VirtualDirectory
String mPath
 
- Protected Attributes inherited from vl::Object
std::string mObjectName
 
IMutexmRefCountMutex
 
int mReferenceCount
 
bool mAutomaticDelete
 

Detailed Description

A VirtualDirectory that uses Qt's QDir.

See also

Definition at line 58 of file QtDirectory.hpp.

Constructor & Destructor Documentation

◆ QtDirectory() [1/4]

QtDirectory::QtDirectory ( )

Definition at line 47 of file QtDirectory.cpp.

Referenced by qtSubDir().

◆ QtDirectory() [2/4]

QtDirectory::QtDirectory ( const String path)

Definition at line 42 of file QtDirectory.cpp.

References vl::VirtualDirectory::setPath().

◆ QtDirectory() [3/4]

vl::QtDirectory::QtDirectory ( )

◆ QtDirectory() [4/4]

vl::QtDirectory::QtDirectory ( const String path)

Member Function Documentation

◆ exists() [1/2]

bool QtDirectory::exists ( ) const

Definition at line 88 of file QtDirectory.cpp.

References vl::Log::error(), and vl::VirtualDirectory::path().

◆ exists() [2/2]

bool vl::QtDirectory::exists ( ) const

◆ file() [1/2]

ref< VirtualFile > QtDirectory::file ( const String name) const
virtual

Returns the VirtualFile with the given name if any, NULL otherwise.

Implements vl::VirtualDirectory.

Definition at line 155 of file QtDirectory.cpp.

References qtFile().

Referenced by listFiles(), and qtFile().

◆ file() [2/2]

virtual ref<VirtualFile> vl::QtDirectory::file ( const String name) const
virtual

Returns the VirtualFile with the given name if any, NULL otherwise.

Implements vl::VirtualDirectory.

◆ listFiles() [1/4]

void QtDirectory::listFiles ( std::vector< String > &  file_list,
bool  append = false 
) const
virtual

◆ listFiles() [2/4]

void vl::QtDirectory::listFiles ( std::vector< String > &  file_list,
bool  append = false 
) const
virtual

Implements vl::VirtualDirectory.

◆ listFiles() [3/4]

void vl::QtDirectory::listFiles ( std::vector< ref< QtFile > > &  file_list,
bool  append = false 
) const

◆ listFiles() [4/4]

void QtDirectory::listFiles ( std::vector< ref< QtFile > > &  file_list,
bool  append = false 
) const

Definition at line 119 of file QtDirectory.cpp.

References file(), listFiles(), and vl::VirtualFile::setPath().

◆ listFilesRecursive() [1/2]

void QtDirectory::listFilesRecursive ( std::vector< String > &  file_list) const
virtual

Use carefully this function, since this search the whole given file system tree.

Implements vl::VirtualDirectory.

Definition at line 51 of file QtDirectory.cpp.

References listFilesRecursive_internal().

◆ listFilesRecursive() [2/2]

void vl::QtDirectory::listFilesRecursive ( std::vector< String > &  file_list) const
virtual

Use carefully this function, since this search the whole given file system tree.

Implements vl::VirtualDirectory.

◆ listFilesRecursive_internal() [1/2]

void vl::QtDirectory::listFilesRecursive_internal ( std::vector< String > &  file_list) const
protected

◆ listFilesRecursive_internal() [2/2]

void QtDirectory::listFilesRecursive_internal ( std::vector< String > &  file_list) const
protected

◆ listSubDirs() [1/2]

void QtDirectory::listSubDirs ( std::vector< String > &  dirs,
bool  append = false 
) const
virtual

◆ listSubDirs() [2/2]

void vl::QtDirectory::listSubDirs ( std::vector< String > &  dirs,
bool  append = false 
) const
virtual

Implements vl::VirtualDirectory.

◆ qtFile() [1/2]

virtual ref<QtFile> vl::QtDirectory::qtFile ( const String name) const
virtual

◆ qtFile() [2/2]

ref< QtFile > QtDirectory::qtFile ( const String name) const
virtual

Definition at line 160 of file QtDirectory.cpp.

References vl::QtFile::exists(), file(), NULL, and vl::VirtualDirectory::translatePath().

Referenced by file().

◆ qtSubDir() [1/2]

ref<QtDirectory> vl::QtDirectory::qtSubDir ( const String subdir_name) const

◆ qtSubDir() [2/2]

ref< QtDirectory > QtDirectory::qtSubDir ( const String subdir_name) const

◆ subDir() [1/2]

ref<VirtualDirectory> vl::QtDirectory::subDir ( const String subdir_name) const
inlinevirtual

Implements vl::VirtualDirectory.

Definition at line 78 of file QtDirectory.hpp.

◆ subDir() [2/2]

ref<VirtualDirectory> vl::QtDirectory::subDir ( const String subdir_name) const
inlinevirtual

Implements vl::VirtualDirectory.

Definition at line 78 of file QtDirectory.hpp.


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