ALib C++ Library
Library Version: 2402 R1
Documentation generated by doxygen
No Matches
FileExpressions::Filter Class Reference


Implementation of abstract class FFilter which uses run-time compiled and evaluated expressions to determine inclusion of files or directories. Instances of this type can be created with outer classes' method FileExpressions::CreateFilter and for example be attached to fields FileFilter , DirectoryFilterPreRecursion and DirectoryFilterPostRecursion of class ScanParameters.

Definition at line 160 of file fileexpressions.hpp.

#include <fileexpressions.hpp>

Inheritance diagram for FileExpressions::Filter:
Collaboration diagram for FileExpressions::Filter:

Public Method Index:

virtual bool Includes (const FTree::ConstCursor &node, const String &parentPath) override
- Public Method Index: inherited from FFilter
virtual ~FFilter ()=default

Friends And Related Entity Details:

◆ FileExpressions

friend class FileExpressions

The outer class is our friend.

Definition at line 163 of file fileexpressions.hpp.

Field Details:

◆ expression

SPExpression expression

The compiled expression.

Definition at line 166 of file fileexpressions.hpp.

◆ fex

FileExpressions& fex

The scope used with this filter.

Definition at line 164 of file fileexpressions.hpp.

◆ scope

FileExpressions::FexScope scope

The scope used with this filter.

Definition at line 165 of file fileexpressions.hpp.

Constructor(s) / Destructor Details::

◆ Filter()

Filter ( FileExpressions & pFex,
const String & expressionString )

Protected constructor. Compiles the given expression. To create an instance of this class, use FileExpressions::CreateFilter .

pFexThe expression compiler to use.
expressionStringThe expression string.

Definition at line 225 of file fileexpressions.cpp.

Here is the call graph for this function:

Method Details:

◆ Includes()

virtual bool Includes ( const FTree::ConstCursor & node,
const String & parentPath )

The filter method.

nodeThe node in the file-tree to examine.
parentPathThe absolute path to the parent directory that the file resides in.
The result determines, whether the given file or directory has passed the filter or not. Consequently, true means "passed" and false means "filtered out".

Implements FFilter.

Definition at line 185 of file fileexpressions.hpp.

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