本文整理汇总了C++中LocalPointer::getCurrency方法的典型用法代码示例。如果您正苦于以下问题:C++ LocalPointer::getCurrency方法的具体用法?C++ LocalPointer::getCurrency怎么用?C++ LocalPointer::getCurrency使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LocalPointer
的用法示例。
在下文中一共展示了LocalPointer::getCurrency方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: doStuff
UBool ThreadSafeFormat::doStuff(int32_t offset, UnicodeString &appendErr, UErrorCode &status) const {
UBool okay = TRUE;
if(u_strcmp(fFormat->getCurrency(), kUSD)) {
appendErr.append("fFormat currency != ")
.append(kUSD)
.append(", =")
.append(fFormat->getCurrency())
.append("! ");
okay = FALSE;
}
if(u_strcmp(gSharedData->fFormat->getCurrency(), kUSD)) {
appendErr.append("gFormat currency != ")
.append(kUSD)
.append(", =")
.append(gSharedData->fFormat->getCurrency())
.append("! ");
okay = FALSE;
}
UnicodeString str;
const UnicodeString *o=NULL;
Formattable f;
const NumberFormat *nf = NULL; // only operate on it as const.
switch(offset%4) {
case 0: f = gSharedData->fYDDThing; o = &gSharedData->fYDDStr; nf = gSharedData->fFormat.getAlias(); break;
case 1: f = gSharedData->fBBDThing; o = &gSharedData->fBBDStr; nf = gSharedData->fFormat.getAlias(); break;
case 2: f = gSharedData->fYDDThing; o = &gSharedData->fYDDStr; nf = fFormat.getAlias(); break;
case 3: f = gSharedData->fBBDThing; o = &gSharedData->fBBDStr; nf = fFormat.getAlias(); break;
}
nf->format(f, str, NULL, status);
if(*o != str) {
appendErr.append(showDifference(*o, str));
okay = FALSE;
}
return okay;
}