8 * Created by Luiz Silva on 09/02/2010.
9 * Copyright 2010 ZXing authors All rights reserved.
11 * Licensed under the Apache License, Version 2.0 (the "License");
12 * you may not use this file except in compliance with the License.
13 * You may obtain a copy of the License at
15 * http://www.apache.org/licenses/LICENSE-2.0
17 * Unless required by applicable law or agreed to in writing, software
18 * distributed under the License is distributed on an "AS IS" BASIS,
19 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 * See the License for the specific language governing permissions and
21 * limitations under the License.
24 #include <zxing/ReaderException.h>
25 #include <zxing/common/BitMatrix.h>
26 #include <zxing/common/Counted.h>
31 namespace datamatrix {
39 ECB(int count, int dataCodewords);
41 int getDataCodewords();
47 std::vector<ECB*> ecBlocks_;
49 ECBlocks(int ecCodewords, ECB *ecBlocks);
50 ECBlocks(int ecCodewords, ECB *ecBlocks1, ECB *ecBlocks2);
52 std::vector<ECB*>& getECBlocks();
56 class Version : public Counted {
59 int symbolSizeRows_;
\r
60 int symbolSizeColumns_;
\r
61 int dataRegionSizeRows_;
\r
62 int dataRegionSizeColumns_;
65 Version(int versionNumber, int symbolSizeRows, int symbolSizeColumns, int dataRegionSizeRows,
66 int dataRegionSizeColumns, ECBlocks *ecBlocks);
69 static std::vector<Ref<Version> > VERSIONS;
72 int getVersionNumber();
\r
73 int getSymbolSizeRows();
\r
74 int getSymbolSizeColumns();
\r
75 int getDataRegionSizeRows();
\r
76 int getDataRegionSizeColumns();
77 int getTotalCodewords();
78 ECBlocks* getECBlocks();
79 static int buildVersions();
\r
80 Version* getVersionForDimensions(int numRows, int numColumns);
85 #endif // __VERSION_H__