Created
June 23, 2014 06:54
-
-
Save dwilliamson/b8c93458e62ac0216897 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum clcpp_attr(reflect) Enums | |
{ | |
A, B, C, D | |
}; | |
const clcpp::Type* enum_type = clcpp::GetType<Enums>()->AsEnum(); | |
for (size_t i = 0; i < enum_type->constants.size; i++) | |
{ | |
const clcpp::EnumConstant& enum_k = enum_type->constants[i]; | |
printf("%s:%d\n", enum_k.name.text, enum_k.value); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment