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>
30 namespace datamatrix {
37 ECB(int count, int dataCodewords);
39 int getDataCodewords();
45 std::vector<ECB*> ecBlocks_;
47 ECBlocks(int ecCodewords, ECB *ecBlocks);
48 ECBlocks(int ecCodewords, ECB *ecBlocks1, ECB *ecBlocks2);
50 std::vector<ECB*>& getECBlocks();
54 class Version : public Counted {
58 int symbolSizeColumns_;
59 int dataRegionSizeRows_;
60 int dataRegionSizeColumns_;
63 Version(int versionNumber, int symbolSizeRows, int symbolSizeColumns, int dataRegionSizeRows,
64 int dataRegionSizeColumns, ECBlocks *ecBlocks);
67 static std::vector<Ref<Version> > VERSIONS;
70 int getVersionNumber();
71 int getSymbolSizeRows();
72 int getSymbolSizeColumns();
73 int getDataRegionSizeRows();
74 int getDataRegionSizeColumns();
75 int getTotalCodewords();
76 ECBlocks* getECBlocks();
77 static int buildVersions();
78 Ref<Version> getVersionForDimensions(int numRows, int numColumns);
81 Version(const Version&);
82 Version & operator=(const Version&);
87 #endif // __VERSION_H__