LibTidy users may want to use TidyReportCallback
to enable their own localization lookup features.
Because Tidy's report codes are enums the specific values can change over time. Using these functions provides the ability for LibTidy users to use LibTidy's enum values as strings for lookup purposes.
Functions | |
TY_PRIVATE TidyIterator | TY_❪getErrorCodeList❫ (void) |
Initializes the TidyIterator to point to the first item in Tidy's list of error codes that can be return with TidyReportFilter3 . More... | |
TY_PRIVATE uint | TY_❪getNextErrorCode❫ (TidyIterator *iter) |
Returns the next error code having initialized the iterator with getErrorCodeList() . More... | |
TY_PRIVATE ctmbstr | TY_❪tidyErrorCodeAsKey❫ (uint code) |
This function returns a string representing the enum value name that can be used as a lookup key independent of changing string values. More... | |
TY_PRIVATE uint | TY_❪tidyErrorCodeFromKey❫ (ctmbstr code) |
Given an error code string, return the integer value of it, or UINT_MAX as an error flag. More... | |
TY_PRIVATE TidyIterator TY_❪getErrorCodeList❫ | ( | void | ) |
Initializes the TidyIterator to point to the first item in Tidy's list of error codes that can be return with TidyReportFilter3
.
Items can be retrieved with getNextErrorCode();
TY_PRIVATE uint TY_❪getNextErrorCode❫ | ( | TidyIterator * | iter | ) |
Returns the next error code having initialized the iterator with getErrorCodeList()
.
You can use tidyErrorCodeAsKey to determine the key for this value.
TY_PRIVATE ctmbstr TY_❪tidyErrorCodeAsKey❫ | ( | uint | code | ) |
This function returns a string representing the enum value name that can be used as a lookup key independent of changing string values.
TidyReportCallback
will return this general string as the report message key.
TY_PRIVATE uint TY_❪tidyErrorCodeFromKey❫ | ( | ctmbstr | code | ) |
Given an error code string, return the integer value of it, or UINT_MAX as an error flag.