Lines Matching refs:CBC_QRCoderMode
44 using ModeStringPair = std::pair<CBC_QRCoderMode*, ByteString>;
161 void AppendModeInfo(CBC_QRCoderMode* mode, CBC_QRCoderBitVector* bits) { in AppendModeInfo()
163 if (mode == CBC_QRCoderMode::sGBK) in AppendModeInfo()
169 CBC_QRCoderMode* mode, in AppendLengthInfo()
181 if (mode == CBC_QRCoderMode::sGBK) in AppendLengthInfo()
188 CBC_QRCoderMode* mode, in AppendBytes()
192 if (mode == CBC_QRCoderMode::sNUMERIC) in AppendBytes()
194 else if (mode == CBC_QRCoderMode::sALPHANUMERIC) in AppendBytes()
196 else if (mode == CBC_QRCoderMode::sBYTE) in AppendBytes()
198 else if (mode == CBC_QRCoderMode::sKANJI) in AppendBytes()
200 else if (mode == CBC_QRCoderMode::sGBK) in AppendBytes()
208 CBC_QRCoderMode* mode, in InitQRCode()
249 int32_t GetSpanByVersion(CBC_QRCoderMode* modeFirst, in GetSpanByVersion()
250 CBC_QRCoderMode* modeSecond, in GetSpanByVersion()
256 if (modeFirst == CBC_QRCoderMode::sALPHANUMERIC && in GetSpanByVersion()
257 modeSecond == CBC_QRCoderMode::sBYTE) { in GetSpanByVersion()
267 if (modeSecond == CBC_QRCoderMode::sALPHANUMERIC && in GetSpanByVersion()
268 modeFirst == CBC_QRCoderMode::sNUMERIC) { in GetSpanByVersion()
278 if (modeSecond == CBC_QRCoderMode::sBYTE && in GetSpanByVersion()
279 modeFirst == CBC_QRCoderMode::sNUMERIC) { in GetSpanByVersion()
378 if (element1.first == CBC_QRCoderMode::sALPHANUMERIC) { in MergeString()
379 int32_t tmp = GetSpanByVersion(CBC_QRCoderMode::sALPHANUMERIC, in MergeString()
380 CBC_QRCoderMode::sBYTE, versionNum, e); in MergeString()
383 if (element2.first == CBC_QRCoderMode::sBYTE && tmp >= 0 && in MergeString()
390 } else if (element1.first == CBC_QRCoderMode::sBYTE) { in MergeString()
391 if (element2.first == CBC_QRCoderMode::sBYTE) { in MergeString()
397 } else if (element1.first == CBC_QRCoderMode::sNUMERIC) { in MergeString()
398 int32_t tmp = GetSpanByVersion(CBC_QRCoderMode::sNUMERIC, in MergeString()
399 CBC_QRCoderMode::sBYTE, versionNum, e); in MergeString()
402 if (element2.first == CBC_QRCoderMode::sBYTE && tmp >= 0 && in MergeString()
409 tmp = GetSpanByVersion(CBC_QRCoderMode::sNUMERIC, in MergeString()
410 CBC_QRCoderMode::sALPHANUMERIC, versionNum, e); in MergeString()
413 if (element2.first == CBC_QRCoderMode::sALPHANUMERIC && tmp >= 0 && in MergeString()
436 result->push_back({CBC_QRCoderMode::sGBK, content.Left(index)}); in SplitString()
457 {CBC_QRCoderMode::sBYTE, content.Mid(flag, index - flag)}); in SplitString()
468 {CBC_QRCoderMode::sNUMERIC, content.Mid(flag, index - flag)}); in SplitString()
480 {CBC_QRCoderMode::sALPHANUMERIC, content.Mid(flag, index - flag)}); in SplitString()
487 CBC_QRCoderMode* ChooseMode(const ByteString& content, ByteString encoding) { in ChooseMode()
489 return CBC_QRCoderMode::sKANJI; in ChooseMode()
499 return CBC_QRCoderMode::sBYTE; in ChooseMode()
503 return CBC_QRCoderMode::sALPHANUMERIC; in ChooseMode()
505 return CBC_QRCoderMode::sNUMERIC; in ChooseMode()
506 return CBC_QRCoderMode::sBYTE; in ChooseMode()
574 CBC_QRCoderMode* mode = ChooseMode(utf8Data, encoding); in Encode()
585 int32_t numLetters = mode == CBC_QRCoderMode::sBYTE ? dataBits.sizeInBytes() in Encode()