是否有一种公认的方法来调整它,以便我所有的 `enum class` 元素都在 ClassView 中组合在一起?
Is there an accepted way to adjust this so that all of my `enum class` elements are grouped together in the ClassView?
旧代码:
typedef enum tagUndoAction { UNDO_CHANGE_CELL = 0,
UNDO_CHANGE_SELECTION_START,
UNDO_CHANGE_SELECTION_SUB } UNDO_ACTION_E;
新代码:
enum class UndoAction { ChangeCell = 0,
ChangeSelectionStart,
ChangeSelectionSub } ;
在类视图中:
我喜欢以前的方法的一点是,所有枚举都在 ClassView 中一起列出。现在它们以 A-Z 的方式显示,所有 类.
是否有可接受的调整方法,以便我的所有 enum class
元素在 ClassView 中组合在一起?
我想这取决于个人口味,但我已经确定了几种方法的折衷方案:
- 我已经将一些
enum class definitions
移到了最常用的 class 中。
- 对于其他人,我已将它们移动到
AppEnums
命名空间中。
这对我有用。
旧代码:
typedef enum tagUndoAction { UNDO_CHANGE_CELL = 0,
UNDO_CHANGE_SELECTION_START,
UNDO_CHANGE_SELECTION_SUB } UNDO_ACTION_E;
新代码:
enum class UndoAction { ChangeCell = 0,
ChangeSelectionStart,
ChangeSelectionSub } ;
在类视图中:
我喜欢以前的方法的一点是,所有枚举都在 ClassView 中一起列出。现在它们以 A-Z 的方式显示,所有 类.
是否有可接受的调整方法,以便我的所有 enum class
元素在 ClassView 中组合在一起?
我想这取决于个人口味,但我已经确定了几种方法的折衷方案:
- 我已经将一些
enum class definitions
移到了最常用的 class 中。 - 对于其他人,我已将它们移动到
AppEnums
命名空间中。
这对我有用。