A unified theory of a class of mode conversion problems