enum class use to create function