![]() |
XII Release 0.1.0
|
Copyright (c) Theophilus Eriata. All Rights Reserved. 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 xiiString & | GetSearchText () 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. | |
Copyright (c) Theophilus Eriata. All Rights Reserved.
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.
| void xiiSearchPatternFilter::SetSearchText | ( | xiiStringView | sSearchText | ) |
Sets the search text and splits it into its part for faster checks.
Copyright (c) Theophilus Eriata. All Rights Reserved.