TMaskBase class
Implements the base class used to define and evaluate a mask expression.
Declaration
TMaskBase = classDescends from it: TMaskUTF8
Description
TMaskBase provides the framework or API used to examine and handle a mask expression. It provides member fields used to store the compiled op codes for the mask expression as well other state information. Methods are provides to raise exceptions for specific mask error conditions. Properties are also implemented to represent the case sensitivity, escape character, range handling, and op codes enabled for a mask expression.
Please note that TMaskBase does not capture, compile or store the mask expression. Those actions are performed in a descendent class.
See also
Properties
CaseSensitive | public | Indicates if the mask expression is case sensitive. |
AutoReverseRange | public | Indicates if a range expression is automatically reversed when the starting value is larger than the ending value. |
EscapeChar | public | Contains the character used to escape the following character in a mask expression. |
MaskOpCodes | public | Contains the set of mask op codes enabled for the class instance. |
Methods
Add | protected | Adds one or more mask op codes found in the compiled mask expression. |
IncrementLastCounterBy | protected | Moves the internal counter for a specified op code when processing a range expression. |
PrepareCompile | protected | Resets values in internal members used in the implementation. |
Exception_InvalidCharMask | protected | Raises an exception when the specified mask character or offset is invalid. |
Exception_MissingCloseChar | protected | Raises an EMaskError exception when the closing ']' character is omitted from a set or range expression. |
Exception_IncompleteMask | protected | Raises an EMaskError exception when escaped characters in a set is enabled, but range processing has not been enabled. |
Exception_InvalidEscapeChar | protected | Raises an EMaskError exception when an invalid value is assigned to the EscapeChar property. |
Exception_InternalError | protected | Raises an EMaskError exception when a parsed op code does not match an expected value in the mask expression. |
Create | public | Constructor for the class instance. |
Fields
fCaseSensitive | protected | Member with the case sensitivity settings for a mask expression. |
fAutoReverseRange | protected | Member with the value for the AutoReverseRange property. |
fMaskIsCompiled | protected | Member which indicates if the mask expression has been compiled. |
fMaskCompiled | protected | Member which stores the op codes needed to evaluate the mask expression and compare specified values. |
fMaskCompiledIndex | protected | Member with the current offset an op code for the compiled mask expression. |
fMaskCompiledAllocated | protected | Member with the allocated storage for the compiled mask expression. |
fMaskCompiledLimit | protected | Member with the ordinal position represented in cMaskCompiledIndex. |
fMaskLimit | protected | Member with the last position in the mask expression where an op code can be applied. |
fMatchStringLimit | protected | Member with the last position in a compared value that can used to match the mask expression. |
fMatchMinimumLiteralBytes | protected | Member with the minimum number of bytes for a literal character (normally 1). |
fMatchMaximumLiteralBytes | protected | Member with the maximum number of bytes for a literal character (normally 4 for UTF-8 codepoints). |
fMaskOpcodesAllowed | protected | Member with the op code identifiers allowed for the mask expression. |
fMaskEscapeChar | protected | Member with the escape character for the mask expression. An escape character forces the next mask character to be treated as a literal and not a wildcard. |
Types and constants
TMaskParsedCode | protected | Represents op codes found when parsing / compiling a mask expression. |
TMaskFailCause | protected | Represents success or failure conditions when handling mask characters. |
GROW_BY | protected | Number bytes used to grow the storage for op codes in a compiled mask expression. |
DefaultSpecialChars | protected |
An experiment, built from Lazarus main 2dfa93c66e of 10-22-2026. Not the official Lazarus documentation.
