本文整理汇总了C++中CFX_ByteString::Insert方法的典型用法代码示例。如果您正苦于以下问题:C++ CFX_ByteString::Insert方法的具体用法?C++ CFX_ByteString::Insert怎么用?C++ CFX_ByteString::Insert使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFX_ByteString
的用法示例。
在下文中一共展示了CFX_ByteString::Insert方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DecodeAsciiSegment
int32_t CBC_DataMatrixDecodedBitStreamParser::DecodeAsciiSegment(
CBC_CommonBitSource* bits,
CFX_ByteString& result,
CFX_ByteString& resultTrailer,
int32_t& e) {
FX_CHAR buffer[128];
FX_BOOL upperShift = FALSE;
do {
int32_t oneByte = bits->ReadBits(8, e);
BC_EXCEPTION_CHECK_ReturnValue(e, 0);
if (oneByte == 0) {
e = BCExceptionFormatException;
return 0;
} else if (oneByte <= 128) {
oneByte = upperShift ? oneByte + 128 : oneByte;
upperShift = FALSE;
result += ((FX_CHAR)(oneByte - 1));
return ASCII_ENCODE;
} else if (oneByte == 129) {
return PAD_ENCODE;
} else if (oneByte <= 229) {
int32_t value = oneByte - 130;
#if defined(_FX_WINAPI_PARTITION_APP_)
memset(buffer, 0, sizeof(FX_CHAR) * 128);
_itoa_s(value, buffer, 128, 10);
#else
FXSYS_itoa(value, buffer, 10);
#endif
if (value < 10) {
result += '0';
buffer[1] = '\0';
} else {
buffer[2] = '\0';
}
result += buffer;
} else if (oneByte == 230) {
return C40_ENCODE;
} else if (oneByte == 231) {
return BASE256_ENCODE;
} else if (oneByte == 232 || oneByte == 233 || oneByte == 234) {
} else if (oneByte == 235) {
upperShift = TRUE;
} else if (oneByte == 236) {
result += "[)>";
result += 0x1E;
result += "05";
result += 0x1D;
resultTrailer.Insert(0, 0x1E);
resultTrailer.Insert(0 + 1, 0x04);
} else if (oneByte == 237) {
result += "[)>";
result += 0x1E;
result += "06";
result += 0x1D;
resultTrailer.Insert(0, 0x1E);
resultTrailer.Insert(0 + 1, 0x04);
} else if (oneByte == 238) {
return ANSIX12_ENCODE;
} else if (oneByte == 239) {
return TEXT_ENCODE;
} else if (oneByte == 240) {
return EDIFACT_ENCODE;
} else if (oneByte == 241) {
} else if (oneByte >= 242) {
if (oneByte == 254 && bits->Available() == 0) {
} else {
e = BCExceptionFormatException;
return 0;
}
}
} while (bits->Available() > 0);
return ASCII_ENCODE;
}