How do I check MovementMode from C++?

Almost exactly the same.

Example:

if(GetCharacterMovement()->MovementMode == EMovementMode::MOVE_Swimming))