Visualization Library 2.0.0
A lightweight C++ OpenGL middleware for 2D/3D graphics
|
[Download] [Tutorials] [All Classes] [Grouped Classes] |
A VirtualDirectory that uses Qt's QDir. More...
#include <QtDirectory.hpp>
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< QtDirectory > | qtSubDir (const String &subdir_name) const |
ref< VirtualDirectory > | subDir (const String &subdir_name) const |
virtual ref< VirtualFile > | file (const String &name) const |
Returns the VirtualFile with the given name if any, NULL otherwise. More... | |
virtual ref< QtFile > | qtFile (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< QtDirectory > | qtSubDir (const String &subdir_name) const |
ref< VirtualDirectory > | subDir (const String &subdir_name) const |
virtual ref< VirtualFile > | file (const String &name) const |
Returns the VirtualFile with the given name if any, NULL otherwise. More... | |
virtual ref< QtFile > | qtFile (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 String & | path () 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... | |
Object & | operator= (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... | |
IMutex * | refCountMutex () |
The mutex used to protect the reference counting of an Object across multiple threads. More... | |
const IMutex * | refCountMutex () 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 |
IMutex * | mRefCountMutex |
int | mReferenceCount |
bool | mAutomaticDelete |
QtDirectory::QtDirectory | ( | ) |
Definition at line 47 of file QtDirectory.cpp.
Referenced by qtSubDir().
QtDirectory::QtDirectory | ( | const String & | path | ) |
Definition at line 42 of file QtDirectory.cpp.
References vl::VirtualDirectory::setPath().
vl::QtDirectory::QtDirectory | ( | ) |
vl::QtDirectory::QtDirectory | ( | const String & | path | ) |
bool QtDirectory::exists | ( | ) | const |
Definition at line 88 of file QtDirectory.cpp.
References vl::Log::error(), and vl::VirtualDirectory::path().
bool vl::QtDirectory::exists | ( | ) | 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().
|
virtual |
Returns the VirtualFile with the given name if any, NULL otherwise.
Implements vl::VirtualDirectory.
|
virtual |
Implements vl::VirtualDirectory.
Definition at line 134 of file QtDirectory.cpp.
References vl::Log::error(), vl::String::fromStdString(), vl::VirtualDirectory::path(), and vl::String::toStdString().
Referenced by listFiles(), and listFilesRecursive_internal().
|
virtual |
Implements vl::VirtualDirectory.
void vl::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().
|
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().
|
virtual |
Use carefully this function, since this search the whole given file system tree.
Implements vl::VirtualDirectory.
|
protected |
|
protected |
Definition at line 170 of file QtDirectory.cpp.
References listFiles(), listFilesRecursive_internal(), listSubDirs(), and VL_CHECK.
Referenced by listFilesRecursive(), and listFilesRecursive_internal().
|
virtual |
Implements vl::VirtualDirectory.
Definition at line 98 of file QtDirectory.cpp.
References vl::Log::error(), vl::String::fromStdString(), vl::VirtualDirectory::path(), and vl::String::toStdString().
Referenced by listFilesRecursive_internal(), and qtSubDir().
|
virtual |
Implements vl::VirtualDirectory.
Definition at line 160 of file QtDirectory.cpp.
References vl::QtFile::exists(), file(), NULL, and vl::VirtualDirectory::translatePath().
Referenced by file().
ref<QtDirectory> vl::QtDirectory::qtSubDir | ( | const String & | subdir_name | ) | const |
ref< QtDirectory > QtDirectory::qtSubDir | ( | const String & | subdir_name | ) | const |
Definition at line 57 of file QtDirectory.cpp.
References vl::String::empty(), vl::Log::error(), vl::String::length(), vl::length(), listSubDirs(), NULL, vl::VirtualDirectory::path(), QtDirectory(), vl::String::right(), vl::String::startsWith(), and vl::VirtualDirectory::translatePath().
|
inlinevirtual |
Implements vl::VirtualDirectory.
Definition at line 78 of file QtDirectory.hpp.
|
inlinevirtual |
Implements vl::VirtualDirectory.
Definition at line 78 of file QtDirectory.hpp.
Visualization Library 2.0.0 Reference Documentation
Updated on Wed Dec 23 2020 12:44:10.
© Copyright Michele Bosi. All rights reserved.