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

A small helper class to implement a simple search pattern filter that can contain multiple parts. 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
 
bool IsEmpty () const
 
bool ContainsExclusions () const
 
bool PassesFilters (xiiStringView sText) const
 Determines whether the given text matches the filter patterns.
 

Detailed Description

A small helper class to implement a simple search pattern filter that can contain multiple parts.

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: