1 // Copyright 2014 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 7 #ifndef XFA_FXBARCODE_COMMON_BC_COMMONBITARRAY_H_ 8 #define XFA_FXBARCODE_COMMON_BC_COMMONBITARRAY_H_ 9 10 #include "core/fxcrt/fx_basic.h" 11 12 class CBC_CommonBitArray { 13 public: 14 explicit CBC_CommonBitArray(CBC_CommonBitArray* array); 15 explicit CBC_CommonBitArray(int32_t size); 16 CBC_CommonBitArray(); 17 virtual ~CBC_CommonBitArray(); 18 19 int32_t GetSize(); 20 CFX_ArrayTemplate<int32_t>& GetBits(); 21 int32_t GetSizeInBytes(); 22 bool Get(int32_t i); 23 void Set(int32_t i); 24 void Flip(int32_t i); 25 void SetBulk(int32_t i, int32_t newBits); 26 bool IsRange(int32_t start, int32_t end, bool value, int32_t& e); 27 int32_t* GetBitArray(); 28 void Reverse(); 29 void Clear(); 30 31 private: 32 int32_t m_size; 33 CFX_ArrayTemplate<int32_t> m_bits; 34 }; 35 36 #endif // XFA_FXBARCODE_COMMON_BC_COMMONBITARRAY_H_ 37