summaryrefslogtreecommitdiff
path: root/xfa/src/fgas/src/crt/fx_utils.h
blob: 92c2bcb19890f65e06dfedc37f113dd1753669ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Copyright 2014 PDFium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com

#ifndef _FX_UTILS_IMP
#define _FX_UTILS_IMP
class CFX_BaseMassArrayImp : public CFX_Target
{
public:
    CFX_BaseMassArrayImp(int32_t iChunkSize, int32_t iBlockSize);
    ~CFX_BaseMassArrayImp();
    FX_LPBYTE	AddSpace()
    {
        return AddSpaceTo(m_iBlockCount);
    }
    FX_LPBYTE	AddSpaceTo(int32_t index);
    FX_LPBYTE	GetAt(int32_t index) const;
    int32_t	Append(const CFX_BaseMassArrayImp &src, int32_t iStart = 0, int32_t iCount = -1);
    int32_t	Copy(const CFX_BaseMassArrayImp &src, int32_t iStart = 0, int32_t iCount = -1);
    int32_t	RemoveLast(int32_t iCount = -1);
    void		RemoveAll(FX_BOOL bLeaveMemory = FALSE);
    int32_t		m_iChunkSize;
    int32_t		m_iBlockSize;
    int32_t		m_iChunkCount;
    int32_t		m_iBlockCount;
    CFX_PtrArray	*m_pData;
protected:
    void	Append(int32_t iDstStart, const CFX_BaseMassArrayImp &src, int32_t iSrcStart = 0, int32_t iSrcCount = -1);
};
#endif