Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
BC_OnedCode128Writer.h
Go to the documentation of this file.
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_ONED_BC_ONEDCODE128WRITER_H_
8#define FXBARCODE_ONED_BC_ONEDCODE128WRITER_H_
9
10#include <stdint.h>
11
12#include <vector>
13
14#include "core/fxcrt/fx_string.h"
15#include "fxbarcode/BC_Library.h"
16#include "fxbarcode/oned/BC_OneDimWriter.h"
17
18class CBC_OnedCode128Writer final : public CBC_OneDimWriter {
19 public:
20 explicit CBC_OnedCode128Writer(BC_TYPE type);
22
23 // Exposed for testing.
24 static int32_t Encode128B(const ByteString& contents,
25 std::vector<int32_t>* patterns);
26 static int32_t Encode128C(const ByteString& contents,
27 std::vector<int32_t>* patterns);
28
29 // CBC_OneDimWriter
30 DataVector<uint8_t> Encode(const ByteString& contents) override;
31 bool CheckContentValidity(WideStringView contents) override;
32 WideString FilterContents(WideStringView contents) override;
33 void SetTextLocation(BC_TEXT_LOC location) override;
34
35 BC_TYPE GetType() const { return m_codeFormat; }
36
37 private:
38 const BC_TYPE m_codeFormat;
39};
40
41#endif // FXBARCODE_ONED_BC_ONEDCODE128WRITER_H_
BC_TEXT_LOC
Definition BC_Library.h:12
BC_TYPE
Definition BC_Library.h:25
BC_TYPE GetType() override
bool RenderDevice(CFX_RenderDevice *device, const CFX_Matrix &matrix) override
bool Encode(WideStringView contents) override
CBC_Code128(BC_TYPE type)
~CBC_Code128() override
static int32_t Encode128B(const ByteString &contents, std::vector< int32_t > *patterns)
WideString FilterContents(WideStringView contents) override
bool CheckContentValidity(WideStringView contents) override
static int32_t Encode128C(const ByteString &contents, std::vector< int32_t > *patterns)
~CBC_OnedCode128Writer() override
DataVector< uint8_t > Encode(const ByteString &contents) override
void SetTextLocation(BC_TEXT_LOC location) override
WideString & operator+=(wchar_t ch)