xref: /aosp_15_r20/external/pdfium/fxbarcode/pdf417/BC_PDF417BarcodeRow.h (revision 3ac0a46f773bac49fa9476ec2b1cf3f8da5ec3a4)
1 // Copyright 2014 The PDFium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 
7 #ifndef FXBARCODE_PDF417_BC_PDF417BARCODEROW_H_
8 #define FXBARCODE_PDF417_BC_PDF417BARCODEROW_H_
9 
10 #include <stdint.h>
11 
12 #include "core/fxcrt/fixed_zeroed_data_vector.h"
13 #include "third_party/base/containers/span.h"
14 
15 class CBC_BarcodeRow final {
16  public:
17   explicit CBC_BarcodeRow(size_t width);
18   ~CBC_BarcodeRow();
19 
20   void AddBar(bool black, size_t width);
GetRow()21   pdfium::span<const uint8_t> GetRow() const { return row_; }
22 
23  private:
24   FixedZeroedDataVector<uint8_t> row_;
25   size_t offset_ = 0;
26 };
27 
28 #endif  // FXBARCODE_PDF417_BC_PDF417BARCODEROW_H_
29