xref: /aosp_15_r20/external/pdfium/fxbarcode/cbc_ean8.cpp (revision 3ac0a46f773bac49fa9476ec2b1cf3f8da5ec3a4)
1*3ac0a46fSAndroid Build Coastguard Worker // Copyright 2016 The PDFium Authors
2*3ac0a46fSAndroid Build Coastguard Worker // Use of this source code is governed by a BSD-style license that can be
3*3ac0a46fSAndroid Build Coastguard Worker // found in the LICENSE file.
4*3ac0a46fSAndroid Build Coastguard Worker 
5*3ac0a46fSAndroid Build Coastguard Worker // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6*3ac0a46fSAndroid Build Coastguard Worker /*
7*3ac0a46fSAndroid Build Coastguard Worker  * Copyright 2011 ZXing authors
8*3ac0a46fSAndroid Build Coastguard Worker  *
9*3ac0a46fSAndroid Build Coastguard Worker  * Licensed under the Apache License, Version 2.0 (the "License");
10*3ac0a46fSAndroid Build Coastguard Worker  * you may not use this file except in compliance with the License.
11*3ac0a46fSAndroid Build Coastguard Worker  * You may obtain a copy of the License at
12*3ac0a46fSAndroid Build Coastguard Worker  *
13*3ac0a46fSAndroid Build Coastguard Worker  *      http://www.apache.org/licenses/LICENSE-2.0
14*3ac0a46fSAndroid Build Coastguard Worker  *
15*3ac0a46fSAndroid Build Coastguard Worker  * Unless required by applicable law or agreed to in writing, software
16*3ac0a46fSAndroid Build Coastguard Worker  * distributed under the License is distributed on an "AS IS" BASIS,
17*3ac0a46fSAndroid Build Coastguard Worker  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18*3ac0a46fSAndroid Build Coastguard Worker  * See the License for the specific language governing permissions and
19*3ac0a46fSAndroid Build Coastguard Worker  * limitations under the License.
20*3ac0a46fSAndroid Build Coastguard Worker  */
21*3ac0a46fSAndroid Build Coastguard Worker 
22*3ac0a46fSAndroid Build Coastguard Worker #include "fxbarcode/cbc_ean8.h"
23*3ac0a46fSAndroid Build Coastguard Worker 
24*3ac0a46fSAndroid Build Coastguard Worker #include <memory>
25*3ac0a46fSAndroid Build Coastguard Worker 
26*3ac0a46fSAndroid Build Coastguard Worker #include "fxbarcode/oned/BC_OnedEAN8Writer.h"
27*3ac0a46fSAndroid Build Coastguard Worker 
CBC_EAN8()28*3ac0a46fSAndroid Build Coastguard Worker CBC_EAN8::CBC_EAN8() : CBC_EANCode(std::make_unique<CBC_OnedEAN8Writer>()) {}
29*3ac0a46fSAndroid Build Coastguard Worker 
30*3ac0a46fSAndroid Build Coastguard Worker CBC_EAN8::~CBC_EAN8() = default;
31*3ac0a46fSAndroid Build Coastguard Worker 
GetType()32*3ac0a46fSAndroid Build Coastguard Worker BC_TYPE CBC_EAN8::GetType() {
33*3ac0a46fSAndroid Build Coastguard Worker   return BC_TYPE::kEAN8;
34*3ac0a46fSAndroid Build Coastguard Worker }
35*3ac0a46fSAndroid Build Coastguard Worker 
GetMaxLength() const36*3ac0a46fSAndroid Build Coastguard Worker size_t CBC_EAN8::GetMaxLength() const {
37*3ac0a46fSAndroid Build Coastguard Worker   return 7;
38*3ac0a46fSAndroid Build Coastguard Worker }
39