ALib C++ Framework
by
Library Version: 2605 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
alib::filetree::FileExpressions::Filter Class Reference

Description:

Implementation of abstract class FFilter which uses runtime compiled and evaluated expressions to determine the inclusion of files or directories. Instances of this type can be created with outer classes' method SPFileFilter CreateFilter(const String&)  and, for example, be attached to fields FileFilter, DirectoryFilterPreRecursion and DirectoryFilterPostRecursion of class ScanParameters.

Availability
This class is available only if the module ALib Expressions is included in the ALib Build.

Definition at line 163 of file fileexpressions.hpp.

#include <fileexpressions.hpp>

Inheritance diagram for alib::filetree::FileExpressions::Filter:
[legend]
Collaboration diagram for alib::filetree::FileExpressions::Filter:
[legend]

Public Method Index:

virtual bool Includes (const FTFile &node, const PathString &parentPath) override
Public Method Index: inherited from alib::filetree::FFilter
virtual ~FFilter ()=default
 Destructor.

Protected Field Index:

Expression expression
 The compiled expression.
FileExpressionsfex
FileExpressions::FexScope scope
 The scope used with this filter.

Protected Method Index:

 Filter (FileExpressions &pFex, const String &expressionString)

Field Details:

◆ expression

Expression alib::filetree::FileExpressions::Filter::expression
protected

The compiled expression.

Definition at line 173 of file fileexpressions.hpp.

◆ fex

FileExpressions& alib::filetree::FileExpressions::Filter::fex
protected

A reference to the instance that this filter uses.

Definition at line 170 of file fileexpressions.hpp.

◆ scope

FileExpressions::FexScope alib::filetree::FileExpressions::Filter::scope
protected

The scope used with this filter.

Definition at line 172 of file fileexpressions.hpp.

Constructor(s) / Destructor Details:

◆ Filter()

alib::filetree::FileExpressions::Filter::Filter ( FileExpressions & pFex,
const String & expressionString )
protected

Protected constructor. Compiles the given expression. To create an instance of this class, use SPFileFilter CreateFilter(const String&) .

Parameters
pFexThe expression compiler to use.
expressionStringThe expression string.

Definition at line 202 of file fileexpressions.cpp.

Here is the call graph for this function:

Method Details:

◆ Includes()

virtual bool alib::filetree::FileExpressions::Filter::Includes ( const FTFile & node,
const PathString & parentPath )
inlineoverridevirtual

The filter method.

Parameters
nodeThe node in the file-tree to examine.
parentPathThe absolute path to the parent directory that the file resides in.
Returns
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 alib::filetree::FFilter.

Definition at line 192 of file fileexpressions.hpp.


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