Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

oofDirectoryVisitor Class Reference
[OOFILE file and directory manipulation.]

#include <ooffiles.h>

Inheritance diagram for oofDirectoryVisitor:

Inheritance graph
[legend]
List of all members.

Detailed Description

Abstract base class used to visit directory tree.

Descends tree depth first including traversing aliases on Mac.


Public Member Functions

 oofDirectoryVisitor (bool ignoreBadAliases=false)
virtual ~oofDirectoryVisitor ()
virtual void visit (const oofFileRef &, oofDirectory *caller=0)=0
virtual bool enterRoot (oofDirectory *caller=0)
 enterDir for starting directory

virtual bool enterDir (const oofFileRef &, oofDirectory *caller=0)
 Called before iterating an oofDirectory's contents.

virtual void leaveDir (const oofFileRef &, oofDirectory *caller=0)
virtual bool handleLinkUnresolved (const oofFileRef &)
 default implementation returns false


Protected Attributes

short mDirDepth
bool mIgnoreBadAliases


Constructor & Destructor Documentation

oofDirectoryVisitor::oofDirectoryVisitor bool  ignoreBadAliases = false  ) 
 

virtual oofDirectoryVisitor::~oofDirectoryVisitor  )  [inline, virtual]
 


Member Function Documentation

bool oofDirectoryVisitor::enterDir const oofFileRef ,
oofDirectory caller = 0
[virtual]
 

Called before iterating an oofDirectory's contents.

The convention for subclasses is increment mDirDepth BEFORE any other processing in enterDir the reason being that we enter a directory as a result of iterating items in the preceding directory thus the very first directory being iterated is level 0 and we must increment BEFORE enterDir does anything to ensure that this dir is processed as level 1 or deeper.

Reimplemented in oofDirectoryList.

bool oofDirectoryVisitor::enterRoot oofDirectory caller = 0  )  [virtual]
 

enterDir for starting directory

for consistency in depth, best if overriden versions also call this or update depth

if wanted to treat just like any other dir, override with:

Returns:
enterDir(oofFileRef(*caller));

bool oofDirectoryVisitor::handleLinkUnresolved const oofFileRef  )  [virtual]
 

default implementation returns false

Reimplemented in oofDirectoryList.

void oofDirectoryVisitor::leaveDir const oofFileRef ,
oofDirectory caller = 0
[virtual]
 

Reimplemented in oofDirectoryList, and oofDelDirTreeVisitor.

virtual void oofDirectoryVisitor::visit const oofFileRef ,
oofDirectory caller = 0
[pure virtual]
 

Implemented in oofDirectoryList, and oofDelDirTreeVisitor.


Member Data Documentation

short oofDirectoryVisitor::mDirDepth [protected]
 

bool oofDirectoryVisitor::mIgnoreBadAliases [protected]
 


The documentation for this class was generated from the following files:
Generated on Fri Jan 2 00:53:13 2004 for OOFILE by doxygen 1.3.5