[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Defines/Enums/Flags in extensions
The code that I'm writing the extension for uses defines, enums, and flags. I was wondering what the standard way to implement these might be, if there is a standard way. Originally I was using symbols for the defines and enums, when passed to an extension function I retrieve the define/enum value based on the string value of the symbol.
However I didn't particularly like that way for the flags since these can be combined with bit-wise operations. I could just accept a single symbol and/or a list of symbols and assume the list is to be or'ed. I could also just create integer constants as well, if I go that way do you upper or lower case the variables?
What have other people done, what do you think is the best way?
Thanks.
RJA