convert enum ElementFlag into enum class