Opened 11 years ago

Last modified 10 years ago

#407 new enhancement

Consider nesting enum inside enumParams

Reported by: Peter Powers Owned by:
Priority: minor Milestone: OpenSHA 1.4
Component: sha Version:
Keywords: Cc:


To improve clarity of what choices are available when using an EnumParameter?, perhaps the enum should be defined inside the Parameter class. This would reduce the overall number of classes at the expense of increasing the class hierarchy for anyone wanting direct access to the enum.

Thoughts on implementation:
Rather than duplication the name of the enum in the parameter, rename the enum to Options. e.g.
TestEnumParam?.Options.OPT1 TestEnumParam?.Options.OPT2 etc... instead of

Change History (3)

comment:1 Changed 11 years ago by Kevin Milner

Hi Peter, I'm not quite sure what you mean. Can you provide an example? What is changing?

comment:2 Changed 10 years ago by Kevin Milner

Peter, punt to future release or "wontfix"?

comment:3 Changed 10 years ago by Peter Powers

Milestone: OpenSHA 1.3OpenSHA 1.4

Ned had me submit this ticket. The question is this: for an EnumPrameter?, do we nest the enum as a Child class of the Parameter? for the sake of reducing classes and confusion.

For my part, I think nesting an enum (that someone might want to use independently) in a Parameter is bad design.


Note: See TracTickets for help on using tickets.