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 _FX_UTILS_IMP 8 #define _FX_UTILS_IMP 9 class CFX_BaseMassArrayImp : public CFX_Target { 10 public: 11 CFX_BaseMassArrayImp(int32_t iChunkSize, int32_t iBlockSize); 12 ~CFX_BaseMassArrayImp(); 13 uint8_t* AddSpace() { return AddSpaceTo(m_iBlockCount); } 14 uint8_t* AddSpaceTo(int32_t index); 15 uint8_t* GetAt(int32_t index) const; 16 int32_t Append(const CFX_BaseMassArrayImp& src, 17 int32_t iStart = 0, 18 int32_t iCount = -1); 19 int32_t Copy(const CFX_BaseMassArrayImp& src, 20 int32_t iStart = 0, 21 int32_t iCount = -1); 22 int32_t RemoveLast(int32_t iCount = -1); 23 void RemoveAll(FX_BOOL bLeaveMemory = FALSE); 24 int32_t m_iChunkSize; 25 int32_t m_iBlockSize; 26 int32_t m_iChunkCount; 27 int32_t m_iBlockCount; 28 CFX_PtrArray* m_pData; 29 30 protected: 31 void Append(int32_t iDstStart, 32 const CFX_BaseMassArrayImp& src, 33 int32_t iSrcStart = 0, 34 int32_t iSrcCount = -1); 35 }; 36 #endif 37