创建一个定制类,使其名称与枚举名称相同。
Create a custom class with the same name as the enumeration name.
为枚举中的每项创建一个Const全局变量,各Const的名称都以枚举名称开头,后接下划线(在本例中为BookType_xxx)。
Create a global Const variable for each item in the enumeration with each Const name starting with the enumeration name followed by an underscore (in our case, BookType_xxx).
创建一个全局列表,使其数据类型等同于枚举名称,且名称以enum _开头,后接枚举名称(在本例中为Enum_BookType)。
Create a global list with a data type equal to the enumeration name and with a name of Enum_ followed by the enumeration name (in our case, Enum_BookType).
应用推荐