convert enum P_ID into enum class