LibreOffice Module sw (master) 1
|
#include <bparr.hxx>
Public Member Functions | |
BigPtrArray () | |
~BigPtrArray () | |
sal_Int32 | Count () const |
void | Insert (BigPtrEntry *p, sal_Int32 pos) |
void | Remove (sal_Int32 pos, sal_Int32 n=1) |
void | Move (sal_Int32 from, sal_Int32 to) |
void | Replace (sal_Int32 pos, BigPtrEntry *p) |
BigPtrEntry * | operator[] (sal_Int32) const |
Protected Member Functions | |
sal_uInt16 | Index2Block (sal_Int32) const |
block search More... | |
BlockInfo * | InsBlock (sal_uInt16) |
insert block More... | |
void | BlockDel (sal_uInt16) |
some blocks were deleted More... | |
void | UpdIndex (sal_uInt16) |
recalculate indices More... | |
sal_uInt16 | Compress () |
Compress the array. More... | |
Protected Attributes | |
std::unique_ptr< BlockInfo *[]> | m_ppInf |
block info More... | |
sal_Int32 | m_nSize |
number of elements More... | |
sal_uInt16 | m_nMaxBlock |
current max. number of blocks More... | |
sal_uInt16 | m_nBlock |
number of blocks More... | |
sal_uInt16 | m_nCur |
last used block More... | |
BigPtrArray::BigPtrArray | ( | ) |
Definition at line 48 of file bparr.cxx.
References m_nBlock, m_nCur, m_nMaxBlock, m_nSize, m_ppInf, and nBlockGrowSize.
BigPtrArray::~BigPtrArray | ( | ) |
|
protected |
some blocks were deleted
Definition at line 187 of file bparr.cxx.
References m_nBlock, m_nMaxBlock, m_ppInf, and nBlockGrowSize.
Referenced by Compress(), and Remove().
|
protected |
Compress the array.
Definition at line 401 of file bparr.cxx.
References BlockDel(), CHECKIDX, COMPRESSLVL, m_nBlock, m_nCur, m_nSize, m_ppInf, MAXENTRY, BlockInfo::mvData, n, nCount, BlockInfo::nElem, p, and UpdIndex().
|
inline |
Definition at line 87 of file bparr.hxx.
References m_nSize.
Referenced by SwNodes::Count(), and SwNodes::ForEach().
|
protected |
|
protected |
insert block
Create and insert new block.
Existing blocks will be moved rearward.
pos | Position at which the new block should be created. |
Definition at line 157 of file bparr.cxx.
References m_nBlock, m_nMaxBlock, m_ppInf, nBlockGrowSize, p, and pos.
Referenced by Insert().
void BigPtrArray::Insert | ( | BigPtrEntry * | p, |
sal_Int32 | pos | ||
) |
Definition at line 201 of file bparr.cxx.
References CHECKIDX, Compress(), Index2Block(), InsBlock(), Insert(), m_nBlock, m_nCur, BigPtrEntry::m_nOffset, m_nSize, BigPtrEntry::m_pBlock, m_ppInf, MAXENTRY, BlockInfo::mvData, nCount, BlockInfo::nElem, BlockInfo::nEnd, BlockInfo::nStart, p, pos, and UpdIndex().
Referenced by Insert(), SwNodes::InsertNode(), and Move().
void BigPtrArray::Move | ( | sal_Int32 | from, |
sal_Int32 | to | ||
) |
Definition at line 70 of file bparr.cxx.
References from, Index2Block(), Insert(), m_ppInf, p, Remove(), and to.
Referenced by SwNodes::ChgNode(), and SwNodes::MoveNodes().
BigPtrEntry * BigPtrArray::operator[] | ( | sal_Int32 | idx | ) | const |
Definition at line 82 of file bparr.cxx.
References idx, Index2Block(), m_nCur, m_nSize, m_ppInf, and p.
Referenced by SwNodes::operator[](), and SwNodes::RemoveNode().
void BigPtrArray::Remove | ( | sal_Int32 | pos, |
sal_Int32 | n = 1 |
||
) |
Definition at line 306 of file bparr.cxx.
References BlockDel(), CHECKIDX, Compress(), i, Index2Block(), m_nBlock, m_nCur, m_nSize, m_ppInf, MAXENTRY, n, nCount, p, pos, and UpdIndex().
Referenced by Move(), and SwNodes::RemoveNode().
void BigPtrArray::Replace | ( | sal_Int32 | pos, |
BigPtrEntry * | p | ||
) |
Definition at line 390 of file bparr.cxx.
References idx, Index2Block(), m_nCur, BigPtrEntry::m_nOffset, m_nSize, BigPtrEntry::m_pBlock, m_ppInf, and p.
Referenced by SwNodes::RemoveNode().
|
protected |
|
protected |
number of blocks
Definition at line 71 of file bparr.hxx.
Referenced by BigPtrArray(), BlockDel(), Compress(), Index2Block(), InsBlock(), Insert(), Remove(), UpdIndex(), and ~BigPtrArray().
|
mutableprotected |
last used block
Definition at line 73 of file bparr.hxx.
Referenced by BigPtrArray(), Compress(), Index2Block(), Insert(), operator[](), Remove(), and Replace().
|
protected |
current max. number of blocks
Definition at line 70 of file bparr.hxx.
Referenced by BigPtrArray(), BlockDel(), and InsBlock().
|
protected |
number of elements
Definition at line 69 of file bparr.hxx.
Referenced by BigPtrArray(), Compress(), SwNodes::ForEach(), Insert(), operator[](), Remove(), and Replace().
|
protected |
block info
Definition at line 68 of file bparr.hxx.
Referenced by BigPtrArray(), BlockDel(), Compress(), SwNodes::ForEach(), Index2Block(), InsBlock(), Insert(), Move(), operator[](), Remove(), Replace(), UpdIndex(), and ~BigPtrArray().