NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
DirTraverser Class Reference

#include <DirTraverser.hpp>

Inheritance diagram for DirTraverser:
Collaboration diagram for DirTraverser:

Public Member Functions

 DirTraverser (wxTreeCtrl *therootNode, IconManager *theiconmanager, wxTreeItemId theid, const wxString &thepath, FileFilterType thefilespec)
 Constuctor. More...
 
virtual wxDirTraverseResult OnFile (const wxString &filename)
 This method classifies the files found during traversing the directory and appends them to the tree, if they correspond to one of the selected file filter types. More...
 
virtual wxDirTraverseResult OnDir (const wxString &dirname)
 This method appends the folders found during traversing the directory to the file tree. More...
 

Private Attributes

wxTreeCtrl * rootNode
 
IconManagericonManager
 
wxTreeItemId id
 
FileFilterType fileSpec
 
wxString path
 
std::vector< wxTreeItemId > vcurrentnodes
 
unsigned int ncurrentdepth
 

Detailed Description

Definition at line 28 of file DirTraverser.hpp.

Constructor & Destructor Documentation

◆ DirTraverser()

DirTraverser::DirTraverser ( wxTreeCtrl *  therootNode,
IconManager theiconmanager,
wxTreeItemId  theid,
const wxString &  thepath,
FileFilterType  thefilespec 
)

Constuctor.

Parameters
therootNodewxTreeCtrl*
theiconmanagerIconManager*
theidwxTreeItemId
thepathconst wxString&
thefilespecFileFilterType

Definition at line 34 of file DirTraverser.cpp.

References fileSpec, iconManager, ncurrentdepth, path, rootNode, and vcurrentnodes.

Member Function Documentation

◆ OnDir()

wxDirTraverseResult DirTraverser::OnDir ( const wxString &  dirname)
virtual

This method appends the folders found during traversing the directory to the file tree.

Parameters
dirnameconst wxString&
Returns
wxDirTraverseResult

Definition at line 150 of file DirTraverser.cpp.

References FileNameTreeData::filename, IconManager::GetIconIndex(), iconManager, FileNameTreeData::isDir, ncurrentdepth, rootNode, and vcurrentnodes.

Here is the call graph for this function:

◆ OnFile()

wxDirTraverseResult DirTraverser::OnFile ( const wxString &  filename)
virtual

This method classifies the files found during traversing the directory and appends them to the tree, if they correspond to one of the selected file filter types.

Parameters
filenameconst wxString&
Returns
wxDirTraverseResult

Definition at line 63 of file DirTraverser.cpp.

References FILE_DATAFILES, FILE_IMAGEFILES, FILE_NPRC, FILE_NSCR, FILE_NUMERE, FileNameTreeData::filename, fileSpec, IconManager::GetIconIndex(), iconManager, ncurrentdepth, rootNode, and vcurrentnodes.

Here is the call graph for this function:

Member Data Documentation

◆ fileSpec

FileFilterType DirTraverser::fileSpec
private

Definition at line 34 of file DirTraverser.hpp.

Referenced by DirTraverser(), and OnFile().

◆ iconManager

IconManager* DirTraverser::iconManager
private

Definition at line 32 of file DirTraverser.hpp.

Referenced by DirTraverser(), OnDir(), and OnFile().

◆ id

wxTreeItemId DirTraverser::id
private

Definition at line 33 of file DirTraverser.hpp.

◆ ncurrentdepth

unsigned int DirTraverser::ncurrentdepth
private

Definition at line 37 of file DirTraverser.hpp.

Referenced by DirTraverser(), OnDir(), and OnFile().

◆ path

wxString DirTraverser::path
private

Definition at line 35 of file DirTraverser.hpp.

Referenced by DirTraverser().

◆ rootNode

wxTreeCtrl* DirTraverser::rootNode
private

Definition at line 31 of file DirTraverser.hpp.

Referenced by DirTraverser(), OnDir(), and OnFile().

◆ vcurrentnodes

std::vector<wxTreeItemId> DirTraverser::vcurrentnodes
private

Definition at line 36 of file DirTraverser.hpp.

Referenced by DirTraverser(), OnDir(), and OnFile().


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