blob: de63d9ac5db679ba06c8fc6b26b261047aacb016 [file] [log] [blame]
Dan Sinclaira98600a2016-03-21 15:15:56 -04001// Copyright 2016 PDFium Authors. All rights reserved.
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
Dan Sinclaire7786682017-03-29 15:18:41 -04007#ifndef FXBARCODE_CBC_CODE128_H_
8#define FXBARCODE_CBC_CODE128_H_
Dan Sinclaira98600a2016-03-21 15:15:56 -04009
Tom Sepez1e151c62021-11-22 23:46:09 +000010#include "core/fxcrt/widestring.h"
Tom Sepez92f4fb52021-08-24 20:57:33 +000011#include "fxbarcode/BC_Library.h"
Dan Sinclaire7786682017-03-29 15:18:41 -040012#include "fxbarcode/cbc_onecode.h"
Dan Sinclaira98600a2016-03-21 15:15:56 -040013
Lei Zhang1badb852017-04-20 15:58:56 -070014class CBC_OnedCode128Writer;
Tom Sepez1e7fd162021-07-27 20:44:31 +000015class CFX_Matrix;
Lei Zhang1badb852017-04-20 15:58:56 -070016
Tom Sepez55865452018-08-27 20:18:04 +000017class CBC_Code128 final : public CBC_OneCode {
Dan Sinclaira98600a2016-03-21 15:15:56 -040018 public:
19 explicit CBC_Code128(BC_TYPE type);
thestigfbe14b92016-05-02 13:31:10 -070020 ~CBC_Code128() override;
Dan Sinclaira98600a2016-03-21 15:15:56 -040021
thestigfbe14b92016-05-02 13:31:10 -070022 // CBC_OneCode:
Lei Zhangc5709dd2018-09-17 18:10:36 +000023 BC_TYPE GetType() override;
Tom Sepez1ab27572018-12-14 20:31:31 +000024 bool Encode(WideStringView contents) override;
tsepezd19e9122016-11-02 15:43:18 -070025 bool RenderDevice(CFX_RenderDevice* device,
Tom Sepezc052ab02021-04-14 16:59:48 +000026 const CFX_Matrix& matrix) override;
Dan Sinclaira98600a2016-03-21 15:15:56 -040027
28 private:
Lei Zhang1badb852017-04-20 15:58:56 -070029 CBC_OnedCode128Writer* GetOnedCode128Writer();
30
Ryan Harrison275e2602017-09-18 14:23:18 -040031 WideString m_renderContents;
Dan Sinclaira98600a2016-03-21 15:15:56 -040032};
33
Dan Sinclaire7786682017-03-29 15:18:41 -040034#endif // FXBARCODE_CBC_CODE128_H_