Visualization Library

A lightweight C++ OpenGL middleware for 2D/3D graphics
[Home] [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

virtual const char * className ()
 Returns the name of the class.
 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:

Constructor & Destructor Documentation

vl::VirtualDirectory::VirtualDirectory ( const String path = "/" ) [inline]

Constructor.

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

Member Function Documentation

virtual const char* vl::VirtualDirectory::className (  ) [inline, virtual]

Returns the name of the class.

Reimplemented from vl::Object.

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

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.

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.

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.

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.

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 "*".

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 v2010.11.1125 Reference Documentation
Copyright 2005-2009 Michele Bosi. All rights reserved.
Updated on Fri Nov 26 2010 10:33:54.
Permission is granted to use this page to write and publish articles regarding Visualization Library.