void
LocaleKeyFactory::updateVisibleIDs(Hashtable& result, UErrorCode& status) const { const Hashtable* supported = getSupportedIDs(status); if (supported) {
UBool visible = (_coverage & 0x1) == 0; const UHashElement* elem = nullptr;
int32_t pos = UHASH_FIRST; while ((elem = supported->nextElement(pos)) != nullptr) { const UnicodeString& id = *static_cast<const UnicodeString*>(elem->key.pointer); if (!visible) {
result.remove(id);
} else {
result.put(id, (void*)this, status); // this is dummy non-void marker used for set semantics if (U_FAILURE(status)) { break;
}
}
}
}
}
UnicodeString&
LocaleKeyFactory::getDisplayName(const UnicodeString& id, const Locale& locale, UnicodeString& result) const { if ((_coverage & 0x1) == 0) { //UErrorCode status = U_ZERO_ERROR; // assume if this is called on us, we support some fallback of this id // if (isSupportedID(id, status)) {
Locale loc;
LocaleUtility::initLocaleFromName(id, loc); return loc.getDisplayName(locale, result); // }
}
result.setToBogus(); return result;
}
UObject*
LocaleKeyFactory::handleCreate(const Locale& /* loc */,
int32_t /* kind */, const ICUService* /* service */,
UErrorCode& /* status */) const { return nullptr;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.