The pipe (|) operator is simply bitwise-or operator. It will go through the respective bits of two numbers, and the resulting number will have an on bit where either of the two input bits were on. In the case you gave us, the operator is used to add a flag to a bitfield.
For example, if you have a number flags
, which (let's say) is 4, it would look like
00000100b
in binary. If you |
it with the number 00010000b
(16), the result is
00010100b,
which contains the original flag (at bit position 3) and the new flag (at bit position 5).