I defined the following as a consistent convention for
my business objects' status (the mapping here is quite arbitrary, i don't
care:-):
typedef enum _EObjectStatus {
STATUS_Pending = -5,
STATUS_Incomplete = -4,
STATUS_Expired = -3,
STATUS_Disabled = -2,
STATUS_Denied = -1,
STATUS_Active = 1,
STATUS_Complete = 2,
STATUS_Reserved = 3,
STATUS_Paid = 4,
STATUS_Confirmed = 5,
} EObjectStatus;
It works quite handy but sometimes i need to display the status valueName
for a runtime status value.
Of course i can define a dictionary to find out value name from value, but
is there a better solution?
(without duplicated mapping definition?)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Objc-language mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/objc-language/email@hidden
This email sent to email@hidden