MCPcopy Create free account
hub / github.com/devilsen/CZXing / EncodeECC200

Function EncodeECC200

czxing/src/main/cpp/zxing/src/datamatrix/DMECEncoder.cpp:120–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118}
119
120void EncodeECC200(ByteArray& codewords, const SymbolInfo& symbolInfo)
121{
122 if (codewords.size() != (size_t)symbolInfo.dataCapacity()) {
123 throw std::invalid_argument("The number of codewords does not match the selected symbol");
124 }
125 codewords.resize(symbolInfo.codewordCount(), 0);
126 int blockCount = symbolInfo.interleavedBlockCount();
127 if (blockCount == 1) {
128 CreateECCBlock(codewords, 0, symbolInfo.dataCapacity(), symbolInfo.dataCapacity(), symbolInfo.errorCodewords(), 1);
129 }
130 else {
131 for (int block = 0; block < blockCount; block++)
132 CreateECCBlock(codewords, block, symbolInfo.dataLengthForInterleavedBlock(block + 1),
133 symbolInfo.dataCapacity() + block, symbolInfo.errorLengthForInterleavedBlock(), blockCount);
134 }
135}
136
137} // namespace ZXing::DataMatrix

Callers 1

encodeMethod · 0.85

Calls 9

CreateECCBlockFunction · 0.85
dataCapacityMethod · 0.80
interleavedBlockCountMethod · 0.80
errorCodewordsMethod · 0.80
sizeMethod · 0.45
resizeMethod · 0.45
codewordCountMethod · 0.45

Tested by

no test coverage detected