XII Release 0.1.0
Loading...
Searching...
No Matches
xiiSearchPatternFilter Class Reference

A helper class to implement a multi-part, case-insensitive search pattern filter with support for exclusions. More...

#include <SearchPatternFilter.h>

Public Member Functions

void SetSearchText (xiiStringView sSearchText)
 Sets the search text and splits it into its part for faster checks.
 
const xiiStringGetSearchText () const
 Returns the current search text.
 
bool IsEmpty () const
 Returns true if the search text is empty.
 
bool ContainsExclusions () const
 Returns true if the filter contains any exclusion patterns.
 
bool PassesFilters (xiiStringView sText) const
 Determines whether the given text matches the filter patterns.
 

Detailed Description

A helper class to implement a multi-part, case-insensitive search pattern filter with support for exclusions.

The search text is split into multiple parts by spaces. A text passes the filter if it contains all parts. The check is always case insensitive and the order of the parts does not matter. It is also possible to exclude parts by prefixing them with a minus. E.g. "com mesh" would pass all texts that contain "com" and "mesh" like xiiMeshComponent. "com -mesh" would pass xiiLightComponent but would fail xiiMeshComponent.


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