New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add EnumTags class and generate tags for all enums #241
Conversation
ce7a476
to
719adb1
Compare
719adb1
to
155ec2c
Compare
Added to Makefile.am |
155ec2c
to
6e18a47
Compare
Sorry for this basic question but how am I supposed to use this? The template looks pretty straight-forward but I'm lost. As an example lets say I want a tag-iterator for RPG::Item::Type. (accessing kTypeTags directly doesn't work, gives linker error) |
d5835d3
to
6733857
Compare
You can use it like this: for (auto& x: RPG::Skill::kTypeTags) {
std::cout << x << std::endl;
}
std::cout << RPG::Skill::kTypeTags[RPG::Skill::Type_normal] << std::endl;
My fault. I forgot to provide definitions for these. static variables require a definition, although a lot of times you can get away without one in release builds. I've added a new I've rebased this branch onto master directly, as the other stuff is not really dependent on it. |
1549440
to
49613ef
Compare
(just updated the MSVC project file, some final love for it before we drop it after 0.5.4 ^^) |
4810574
to
80823cc
Compare
Introduces an enum_tags<E,N> class which provides enum to string functionality. Generator creates these for all RPG enums.