| is the bitwise OR operator. It takes two numeric values and compares them bit by bit and if either of the bits are equal to 1, then it returns 1 for that bit position
// Just as
myIntegerValue += 1;
// is the same as writing
myIntegerValue = myIntegerValue + 1;
// It follows that
dirtyFlag |= 0x0001;
// is the same as writing
dirtyFlag = dirtyFlag | 0x0001;
The dirtyFlag variable is keeping track of which fields were edited.
I would imagine that there is a series of values that are being compared. The dirtyFlag will let you know which values will need to be modified.
value0 = 0x0001 in hexadecimal = 1 = 00000001 in binary
value1 = 0x0002 in hexadecimal = 2 = 00000010 in binary
value2 = 0x0004 in hexadecimal = 4 = 00000100 in binary
value3 = 0x0008 in hexadecimal = 8 = 00001000 in binary
value4 = 0x0010 in hexadecimal = 16 = 00010000 in binary
So if you've modified fields 0 and 4, dirtyFlag will be
00010001 = 17 = 0x0011