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

Description:

Implementation of abstract class FFilter which uses run-time compiled and evaluated expressions to determine the 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.

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

Definition at line 147 of file fileexpressions.inl.

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

Public Method Index:

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

Protected Field Index:

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

Protected Method Index:

ALIB_DLL Filter (FileExpressions &pFex, const String &expressionString)
 

Friends And Related Entity Details:

◆ FileExpressions

friend class FileExpressions
friend

The outer class is our friend.

Definition at line 150 of file fileexpressions.inl.

Field Details:

◆ expression

Expression alib::files::FileExpressions::Filter::expression
protected

The compiled expression.

Definition at line 153 of file fileexpressions.inl.

◆ fex

FileExpressions& alib::files::FileExpressions::Filter::fex
protected

The scope used with this filter.

Definition at line 151 of file fileexpressions.inl.

◆ scope

FileExpressions::FexScope alib::files::FileExpressions::Filter::scope
protected

The scope used with this filter.

Definition at line 152 of file fileexpressions.inl.

Constructor(s) / Destructor Details:

◆ Filter()

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

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

Parameters
pFexThe expression compiler to use.
expressionStringThe expression string.

Definition at line 256 of file fileexpressions.cpp.

Here is the call graph for this function:

Method Details:

◆ Includes()

virtual bool alib::files::FileExpressions::Filter::Includes ( const File & node,
const system::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::files::FFilter.

Definition at line 172 of file fileexpressions.inl.


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