
21 Jun
2005
21 Jun
'05
4:06 p.m.
To set the names, we use
SA_BEGIN_ENUMERATOR_REGISTRATION(example) SA_REGISTER_ENUMERATOR(enumerator1, "Some long description") SA_REGISTER_SIMPLE_ENUMERATOR(enumerator1) ... SA_END_ENUMERATOR_REGISTRATION(example) Did you look at my library? You can register with enumerators not only short and verbose names but also arbitrary data (example of such data is expression on the right of enumerator).
We use that regularly. Since the macros generate typesafe code, we don't find their use problematic.
For me using macro is also not a problem. If one finds macros ugly he can declare enumerator in plain C++. Sincerely, Maksym Motornyy.