Sign in Join
FPDoc Onlineexperiment

TMaskBase class

In unit Masks

Implements the base class used to define and evaluate a mask expression.

Declaration

pascal
TMaskBase = class

Descends 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

CaseSensitivepublicIndicates if the mask expression is case sensitive.
AutoReverseRangepublicIndicates if a range expression is automatically reversed when the starting value is larger than the ending value.
EscapeCharpublicContains the character used to escape the following character in a mask expression.
MaskOpCodespublicContains the set of mask op codes enabled for the class instance.

Methods

AddprotectedAdds one or more mask op codes found in the compiled mask expression.
IncrementLastCounterByprotectedMoves the internal counter for a specified op code when processing a range expression.
PrepareCompileprotectedResets values in internal members used in the implementation.
Exception_InvalidCharMaskprotectedRaises an exception when the specified mask character or offset is invalid.
Exception_MissingCloseCharprotectedRaises an EMaskError exception when the closing ']' character is omitted from a set or range expression.
Exception_IncompleteMaskprotectedRaises an EMaskError exception when escaped characters in a set is enabled, but range processing has not been enabled.
Exception_InvalidEscapeCharprotectedRaises an EMaskError exception when an invalid value is assigned to the EscapeChar property.
Exception_InternalErrorprotectedRaises an EMaskError exception when a parsed op code does not match an expected value in the mask expression.
CreatepublicConstructor for the class instance.

Fields

fCaseSensitiveprotectedMember with the case sensitivity settings for a mask expression.
fAutoReverseRangeprotectedMember with the value for the AutoReverseRange property.
fMaskIsCompiledprotectedMember which indicates if the mask expression has been compiled.
fMaskCompiledprotectedMember which stores the op codes needed to evaluate the mask expression and compare specified values.
fMaskCompiledIndexprotectedMember with the current offset an op code for the compiled mask expression.
fMaskCompiledAllocatedprotectedMember with the allocated storage for the compiled mask expression.
fMaskCompiledLimitprotectedMember with the ordinal position represented in cMaskCompiledIndex.
fMaskLimitprotectedMember with the last position in the mask expression where an op code can be applied.
fMatchStringLimitprotectedMember with the last position in a compared value that can used to match the mask expression.
fMatchMinimumLiteralBytesprotectedMember with the minimum number of bytes for a literal character (normally 1).
fMatchMaximumLiteralBytesprotectedMember with the maximum number of bytes for a literal character (normally 4 for UTF-8 codepoints).
fMaskOpcodesAllowedprotectedMember with the op code identifiers allowed for the mask expression.
fMaskEscapeCharprotectedMember 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

TMaskParsedCodeprotectedRepresents op codes found when parsing / compiling a mask expression.
TMaskFailCauseprotectedRepresents success or failure conditions when handling mask characters.
GROW_BYprotectedNumber bytes used to grow the storage for op codes in a compiled mask expression.
DefaultSpecialCharsprotected

An experiment, built from Lazarus main 2dfa93c66e of 10-22-2026. Not the official Lazarus documentation.