MagicMatch

One of magic rules in magic definition. Represents <match> element in source XML.

Constructors

this
this(Type type, immutable(ubyte)[] value, immutable(ubyte)[] mask, uint startOffset, uint rangeLength)

Construct MagicMatch from type, value, mask, startOffset and rangeLength

Members

Enums

Type
enum Type

Type of match value.

Functions

addSubmatch
void addSubmatch(MagicMatch match)

Add subrule to the children of this rule.

clone
MagicMatch clone()
Undocumented in source. Be warned that the author may not have intended to support it.
hasMask
bool hasMask()

Check if the rule has value mask.

mask
immutable(ubyte)[] mask()

The number to AND the value in the file with before comparing it to value

rangeLength
uint rangeLength()

The length of the region in the file to check.

rangeLength
uint rangeLength(uint length)
Undocumented in source. Be warned that the author may not have intended to support it.
startOffset
uint startOffset()

The offset into the file to look for a match.

startOffset
uint startOffset(uint offset)
Undocumented in source. Be warned that the author may not have intended to support it.
submatches
auto submatches()

Get match subrules

submatches
auto submatches()
Undocumented in source. Be warned that the author may not have intended to support it.
type
Type type()

Type of match value.

value
immutable(ubyte)[] value()

The value to compare the file contents with

Meta