In C++ I might do the following in a header:
cClass {
enum eList { FIRST, SECOND };
}
… and this in some other class:
cClass::eList ListValue = GetListValue();
if(ListValue == cClass::FIRST) {
...
}
Is there an equivalent either using straight Objective-C language features or some trickery in Cocoa which would allow similarly scoped enums?
Well, you can emulate parts of it using C:
create a C enumeration and type:
declare container:
declare storage:
define storage:
in use: