24 #ifndef __PMLocaleId_h__ 25 #define __PMLocaleId_h__ 27 #include "ICUForwardDeclare.h" 29 #include "IPMStream.h" 30 #include "PMLocaleIds.h" 50 inline PMLocaleId(int16 featureSetId, int16 userInterfaceId);
111 inline bool16
IsProductFS(
const int16 productFS)
const;
117 inline bool16
IsLanguageFS(
const int16 languageFS)
const;
144 inline bool operator<(
const PMLocaleId& other)
const;
148 int16 fUserInterfaceId;
163 fFeatureSetId((combinedId & 0xFFFF0000) >> 16),
164 fUserInterfaceId(combinedId & 0x0000FFFF)
169 fFeatureSetId(featureSetId),
170 fUserInterfaceId(userInterfaceId)
176 return fFeatureSetId == other.fFeatureSetId && fUserInterfaceId == other.fUserInterfaceId;
181 return fFeatureSetId != other.fFeatureSetId || fUserInterfaceId != other.fUserInterfaceId;
186 return (fFeatureSetId << 16) & fUserInterfaceId;
189 inline bool PMLocaleId::operator< (
const PMLocaleId& other)
const 191 if (fFeatureSetId < other.fFeatureSetId)
193 else if (fFeatureSetId == other.fFeatureSetId && fUserInterfaceId < other.fUserInterfaceId)
201 return fFeatureSetId;
206 if (fUserInterfaceId == k_enAE || fUserInterfaceId == k_enIL)
208 return fUserInterfaceId;
213 return fUserInterfaceId;
218 return (fFeatureSetId & 0xFF00);
223 return (fFeatureSetId & 0x00FF);
229 uint16 product =
static_cast<uint16
>(fFeatureSetId) & 0xFF00;
231 return ((product == kAllProductsFS) || (
static_cast<uint16
>(productFS) == kAllProductsFS) || (product ==
static_cast<uint16
>(productFS)));
237 return ((product == (int16)kAllProductsFS) || (productFS == (int16)kAllProductsFS) || ((productFS & product) != 0));
244 int16 language = fFeatureSetId & 0x00FF;
245 return ((language == (int16)kAllLanguagesFS) || (languageFS == (int16)kAllLanguagesFS) || (language == languageFS));
261 #endif // __PMLocaleId_h__