This is the sample program that can see the decode result of barcode data on Watson IoT.

Dependencies:   AsciiFont DisplayApp GR-PEACH_video LCD_shield_config LWIPBP3595Interface_STA_for_mbed-os USBDevice

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers GenericGF.h Source File

GenericGF.h

00001 // -*- mode:c++; tab-width:2; indent-tabs-mode:nil; c-basic-offset:2 -*-
00002 /*
00003  *  GenericGF.h
00004  *  zxing
00005  *
00006  *  Created by Lukas Stabe on 13/02/2012.
00007  *  Copyright 2012 ZXing authors All rights reserved.
00008  *
00009  * Licensed under the Apache License, Version 2.0 (the "License");
00010  * you may not use this file except in compliance with the License.
00011  * You may obtain a copy of the License at
00012  *
00013  *      http://www.apache.org/licenses/LICENSE-2.0
00014  *
00015  * Unless required by applicable law or agreed to in writing, software
00016  * distributed under the License is distributed on an "AS IS" BASIS,
00017  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00018  * See the License for the specific language governing permissions and
00019  * limitations under the License.
00020  */
00021 
00022 #ifndef GENERICGF_H
00023 #define GENERICGF_H
00024 
00025 #include <vector>
00026 #include <zxing/common/Counted.h>
00027 
00028 namespace zxing {
00029   class GenericGFPoly;
00030   
00031   class GenericGF : public Counted {
00032     
00033   private:
00034     std::vector<int> expTable;
00035     std::vector<int> logTable;
00036     Ref<GenericGFPoly> zero;
00037     Ref<GenericGFPoly> one;
00038     int size;
00039     int primitive;
00040     int generatorBase;
00041     bool initialized;
00042     
00043     void initialize();
00044     void checkInit();
00045     
00046   public:
00047     static Ref<GenericGF> AZTEC_DATA_12;
00048     static Ref<GenericGF> AZTEC_DATA_10;
00049     static Ref<GenericGF> AZTEC_DATA_8;
00050     static Ref<GenericGF> AZTEC_DATA_6;
00051     static Ref<GenericGF> AZTEC_PARAM;
00052     static Ref<GenericGF> QR_CODE_FIELD_256;
00053     static Ref<GenericGF> DATA_MATRIX_FIELD_256;
00054     static Ref<GenericGF> MAXICODE_FIELD_64;
00055     
00056     GenericGF(int primitive, int size, int b);
00057     
00058     Ref<GenericGFPoly> getZero();
00059     Ref<GenericGFPoly> getOne();
00060     int getSize();
00061     int getGeneratorBase();
00062     Ref<GenericGFPoly> buildMonomial(int degree, int coefficient);
00063     
00064     static int addOrSubtract(int a, int b);
00065     int exp(int a);
00066     int log(int a);
00067     int inverse(int a);
00068     int multiply(int a, int b);
00069   };
00070 }
00071 
00072 #endif //GENERICGF_H
00073