|
-
August 31st, 2005, 02:08 AM
#1
Enum <-> String
Do we have any general purpose C++ class to convert a enumeration value to corresponding string?
Not by mapping to string tables or maps... If we have 100's of enumeration it is just impossible to define corresponding strings to enums....
I have seen some implementation in .NET
---- Enum::GetName
enum Styles
{
one=1,
two,
three,
four
};
Enum::GetName(__typeof(Styles), __box(3)));
This returns the corresponding name from the enum itself 'three'....
Do we have any similar class for using in normal C++ application not depending on any MS specific libraries?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|