We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
for example,
#define MODULE_A_STATUS_VALUES \ MODULE_A_OK, \ MODULE_A_FAILED, \ MODULE_A_SPECIFIC_FAILURE MU_DEFINE_ENUM(MODULE_A_STATUS, MODULE_A_STATUS_VALUES); #define MODULE_B_STATUS_VALUES \ MODULE_B_FAILED, \ MODULE_B_OK, \ MODULE_B_CANCELED MU_DEFINE_ENUM(MODULE_B_STATUS, MODULE_B_STATUS_VALUES);
May want to translate between MODULE_A_STATUS and MODULE_B_STATUS
MODULE_A_STATUS
MODULE_B_STATUS
// generates MODULE_A_STATUS_translate_to_MODULE_B_STATUS MU_DEFINE_ENUM_TRANSLATION( MODULE_A_STATUS /*from*/, MODULE_B_STATUS /*to*/, MODULE_B_FAILED /*default for unknown values*/, MODULE_A_OK, MODULE_B_OK, MODULE_A_FAILED, MODULE_B_FAILED, MODULE_A_SPECIFIC_FAILURE, MODULE_B_FAILED); MODULE_B_STATUS do_module_a_work(void) { MODULE_A_STATUS result = foo(); MODULE_B_STATUS converted = MODULE_A_STATUS_translate_to_MODULE_B_STATUS(result); return converted; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
for example,
May want to translate between
MODULE_A_STATUS
andMODULE_B_STATUS
The text was updated successfully, but these errors were encountered: