This is a refactor of the Msg class that gets rid of the need for MsgType, which was a separate, non-scoped enum. Having the non-scoped enum around meant we had bare identifiers everywhere. I'm using an "enhanced enum" here (the kind we used for SchedulerAlgorithmName) to do the refactor.
The benefits of the refactor are that we no longer need a separate variable to hold the enum value anymore because we can just use the object itself, and as a result it's a lot easier to output the actual name of the message in logs. In addition, having a scoped enum means the object is more self-container, and it will be easier to do other refactors.
Sorry for the mess with all the forced pushes. I was working on something else entirely and realized too late I needed to split this out. The next PR will be a lot better.
This is a refactor of the
Msg
class that gets rid of the need forMsgType
, which was a separate, non-scopedenum
. Having the non-scopedenum
around meant we had bare identifiers everywhere. I'm using an "enhancedenum
" here (the kind we used forSchedulerAlgorithmName
) to do the refactor.The benefits of the refactor are that we no longer need a separate variable to hold the
enum
value anymore because we can just use the object itself, and as a result it's a lot easier to output the actual name of the message in logs. In addition, having a scopedenum
means the object is more self-container, and it will be easier to do other refactors.