Visualization Library v1.0.3

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 | Protected Attributes

vl::VirtualDirectory Class Reference

Abstact class representing a directory of files. More...

#include <VirtualDirectory.hpp>

Inheritance diagram for vl::VirtualDirectory:
vl::Object vl::DiskDirectory vl::MemoryDirectory vl::ZippedDirectory

List of all members.

Public Member Functions

 VirtualDirectory ()
 Constructor.
 VirtualDirectory (const String &path)
 Constructor.
virtual bool setPath (const String &path)
 Changes the path name of a VirtualDirectory. Must not be an empty string.
virtual const Stringpath () const
bool fileExists (const String &name) const
 Checks the existence of a file in the directory.
virtual ref< VirtualFilefile (const String &name) const =0
 Returns the VirtualFile with the given name if any, NULL otherwise.
virtual void listFilesRecursive (std::vector< String > &file_list) const =0
 Returns the list of files contained in the VirtualDirectory.
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'.
virtual void listFiles (std::vector< String > &file_list, bool append=false) const =0
virtual void listSubDirs (std::vector< String > &dirs, bool append=false) const =0
virtual ref< VirtualDirectorysubDir (const String &subdir_name) const =0

Protected Member Functions

String translatePath (const String &p) const

Protected Attributes

String mPath

Detailed Description

Abstact class representing a directory of files.

See also:

Definition at line 57 of file VirtualDirectory.hpp.


Constructor & Destructor Documentation

vl::VirtualDirectory::VirtualDirectory (  ) [inline]

Constructor.

Definition at line 63 of file VirtualDirectory.hpp.

vl::VirtualDirectory::VirtualDirectory ( const String path ) [inline]

Constructor.

Parameters:
pathDefines the path name of the virtual dirctory, must be a non empty string.

Definition at line 67 of file VirtualDirectory.hpp.


Member Function Documentation

bool VirtualDirectory::setPath ( const String path ) [virtual]

Changes the path name of a VirtualDirectory. Must not be an empty string.

Reimplemented in vl::MemoryDirectory, and vl::ZippedDirectory.

Definition at line 37 of file VirtualDirectory.cpp.

References vl::String::empty(), vl::String::endsWith(), vl::Log::error(), mPath, vl::String::normalizeSlashes(), and vl::String::trim().

Referenced by vl::DiskDirectory::DiskDirectory().

virtual const String& vl::VirtualDirectory::path (  ) const [inline, virtual]
bool vl::VirtualDirectory::fileExists ( const String name ) const [inline]

Checks the existence of a file in the directory.

Definition at line 75 of file VirtualDirectory.hpp.

References NULL.

virtual ref<VirtualFile> vl::VirtualDirectory::file ( const String name ) const [pure virtual]

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

Implemented in vl::DiskDirectory, vl::MemoryDirectory, and vl::ZippedDirectory.

Referenced by vl::MemoryDirectory::clone().

virtual void vl::VirtualDirectory::listFilesRecursive ( std::vector< String > &  file_list ) const [pure virtual]

Returns the list of files contained in the VirtualDirectory.

If there are subdirectories the files will be searched recursively.

Implemented in vl::DiskDirectory, vl::MemoryDirectory, and vl::ZippedDirectory.

Referenced by vl::MemoryDirectory::clone().

virtual void vl::VirtualDirectory::listFilesRecursive ( std::vector< String > &  file_list,
const String match 
) const [inline, virtual]

Returns the list of files contained in the VirtualDirectory that match the expression 'match'.

The match parameter must be of the type "*abc" or "*abc*" or "abc*" or "*".

Definition at line 86 of file VirtualDirectory.hpp.

References vl::String::filterStrings().

virtual void vl::VirtualDirectory::listFiles ( std::vector< String > &  file_list,
bool  append = false 
) const [pure virtual]
virtual void vl::VirtualDirectory::listSubDirs ( std::vector< String > &  dirs,
bool  append = false 
) const [pure virtual]
virtual ref<VirtualDirectory> vl::VirtualDirectory::subDir ( const String subdir_name ) const [pure virtual]
String VirtualDirectory::translatePath ( const String p ) const [protected]

Member Data Documentation


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

Visualization Library v1.0.3 Reference Documentation
Copyright Michele Bosi. All rights reserved.
Updated on Tue Feb 7 2017 00:55:08.
Permission is granted to use this page to write and publish articles regarding Visualization Library.