ICSharpCode::SharpZipLib::Core::NameFilter Class Reference

NameFilter is a string matching class which allows for both positive and negative matching. A filter is a sequence of independant Regex regular expressions separated by semi-colons ';' Each expression can be prefixed by a plus '+' sign or a minus '-' sign to denote the expression is intended to include or exclude names. If neither a plus or minus sign is found include is the default A given name is tested for inclusion before checking exclusions. Only names matching an include spec and not matching an exclude spec are deemed to match the filter. An empty filter matches any name. More...

List of all members.

Public Member Functions

 NameFilter (string filter)
 Construct an instance based on the filter expression passed.
override string ToString ()
 Convert this filter to its string equivalent.
bool IsIncluded (string testValue)
 Test a value to see if it is included by the filter.
bool IsExcluded (string testValue)
 Test a value to see if it is excluded by the filter.
bool IsMatch (string testValue)
 Test a value to see if it matches the filter.

Static Public Member Functions

static bool IsValidExpression (string e)
 Test a string to see if it is a valid regular expression.
static bool IsValidFilterExpression (string toTest)
 Test an expression to see if it is valid as a filter.

Private Member Functions

void Compile ()
 Compile this filter.

Private Attributes

string filter
ArrayList inclusions
ArrayList exclusions


Detailed Description

NameFilter is a string matching class which allows for both positive and negative matching. A filter is a sequence of independant Regex regular expressions separated by semi-colons ';' Each expression can be prefixed by a plus '+' sign or a minus '-' sign to denote the expression is intended to include or exclude names. If neither a plus or minus sign is found include is the default A given name is tested for inclusion before checking exclusions. Only names matching an include spec and not matching an exclude spec are deemed to match the filter. An empty filter matches any name.

Definition at line 53 of file NameFilter.cs.


Constructor & Destructor Documentation

ICSharpCode::SharpZipLib::Core::NameFilter::NameFilter string  filter  )  [inline]
 

Construct an instance based on the filter expression passed.

Parameters:
filter The filter expression.

Definition at line 59 of file NameFilter.cs.


Member Function Documentation

void ICSharpCode::SharpZipLib::Core::NameFilter::Compile  )  [inline, private]
 

Compile this filter.

Definition at line 178 of file NameFilter.cs.

bool ICSharpCode::SharpZipLib::Core::NameFilter::IsExcluded string  testValue  )  [inline]
 

Test a value to see if it is excluded by the filter.

Parameters:
testValue The value to test.
Returns:
True if the value is excluded, false otherwise.

Definition at line 153 of file NameFilter.cs.

bool ICSharpCode::SharpZipLib::Core::NameFilter::IsIncluded string  testValue  )  [inline]
 

Test a value to see if it is included by the filter.

Parameters:
testValue The value to test.
Returns:
True if the value is included, false otherwise.

Definition at line 132 of file NameFilter.cs.

bool ICSharpCode::SharpZipLib::Core::NameFilter::IsMatch string  testValue  )  [inline]
 

Test a value to see if it matches the filter.

Parameters:
testValue The value to test.
Returns:
True if the value matches, false otherwise.

Definition at line 170 of file NameFilter.cs.

static bool ICSharpCode::SharpZipLib::Core::NameFilter::IsValidExpression string  e  )  [inline, static]
 

Test a string to see if it is a valid regular expression.

Parameters:
e The expression to test.
Returns:
True if expression is a valid System::Text::RegularExpressions::Regex false otherwise.

Definition at line 72 of file NameFilter.cs.

static bool ICSharpCode::SharpZipLib::Core::NameFilter::IsValidFilterExpression string  toTest  )  [inline, static]
 

Test an expression to see if it is valid as a filter.

Parameters:
toTest The filter expression to test.
Returns:
True if the expression is valid, false otherwise.

Definition at line 89 of file NameFilter.cs.

override string ICSharpCode::SharpZipLib::Core::NameFilter::ToString  )  [inline]
 

Convert this filter to its string equivalent.

Returns:
The string equivalent for this filter.

Definition at line 122 of file NameFilter.cs.


Member Data Documentation

ArrayList ICSharpCode::SharpZipLib::Core::NameFilter::exclusions [private]
 

Definition at line 210 of file NameFilter.cs.

string ICSharpCode::SharpZipLib::Core::NameFilter::filter [private]
 

Definition at line 208 of file NameFilter.cs.

ArrayList ICSharpCode::SharpZipLib::Core::NameFilter::inclusions [private]
 

Definition at line 209 of file NameFilter.cs.


The documentation for this class was generated from the following file:
Generated on Fri Jun 23 21:50:05 2006 for OblivionModTranslator by  doxygen 1.4.6-NO