summaryrefslogtreecommitdiff
path: root/fxbarcode/oned/BC_OnedCode128Writer.h
diff options
context:
space:
mode:
Diffstat (limited to 'fxbarcode/oned/BC_OnedCode128Writer.h')
-rw-r--r--fxbarcode/oned/BC_OnedCode128Writer.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/fxbarcode/oned/BC_OnedCode128Writer.h b/fxbarcode/oned/BC_OnedCode128Writer.h
index c4c0bf0037..f1b346ddbd 100644
--- a/fxbarcode/oned/BC_OnedCode128Writer.h
+++ b/fxbarcode/oned/BC_OnedCode128Writer.h
@@ -15,10 +15,15 @@
class CBC_OnedCode128Writer : public CBC_OneDimWriter {
public:
- CBC_OnedCode128Writer();
explicit CBC_OnedCode128Writer(BC_TYPE type);
~CBC_OnedCode128Writer() override;
+ // Exposed for testing.
+ static int32_t Encode128B(const CFX_ByteString& contents,
+ std::vector<int32_t>* patterns);
+ static int32_t Encode128C(const CFX_ByteString& contents,
+ std::vector<int32_t>* patterns);
+
// CBC_OneDimWriter
uint8_t* EncodeWithHint(const CFX_ByteString& contents,
BCFORMAT format,
@@ -32,15 +37,9 @@ class CBC_OnedCode128Writer : public CBC_OneDimWriter {
bool SetTextLocation(BC_TEXT_LOC location);
- BC_TYPE GetType();
+ BC_TYPE GetType() const { return m_codeFormat; }
private:
- bool IsDigits(const CFX_ByteString& contents, int32_t start, int32_t length);
- int32_t Encode128B(const CFX_ByteString& contents,
- std::vector<const int8_t*>* patterns);
- int32_t Encode128C(const CFX_ByteString& contents,
- std::vector<const int8_t*>* patterns);
-
BC_TYPE m_codeFormat;
};