LibreOffice Module connectivity (master) 1
|
#include <dindexnode.hxx>
Public Member Functions | |
sal_uInt16 | Count () const |
bool | Insert (ONDXNode &rNode, sal_uInt32 nRowsLeft=0) |
bool | Insert (sal_uInt16 nIndex, ONDXNode &rNode) |
bool | Append (ONDXNode &rNode) |
void | Delete (sal_uInt16) |
void | Remove (sal_uInt16) |
void | Release (bool bSave=true) |
void | ReleaseFull () |
ONDXNode | Split (ONDXPage &rPage) |
void | Merge (sal_uInt16 nParentNodePos, const ONDXPagePtr &xPage) |
ONDXNode & | operator[] (sal_uInt16 nPos) |
const ONDXNode & | operator[] (sal_uInt16 nPos) const |
bool | IsRoot () const |
bool | IsLeaf () const |
bool | IsModified () const |
bool | HasParent () const |
bool | IsFull () const |
sal_uInt32 | GetPagePos () const |
ONDXPagePtr & | GetChild (ODbaseIndex const *pIndex=nullptr) |
const ONDXPagePtr & | GetParent () const |
ODbaseIndex & | GetIndex () |
const ODbaseIndex & | GetIndex () const |
void | SetChild (ONDXPagePtr aCh) |
void | SetParent (ONDXPagePtr aPa) |
sal_uInt16 | Search (const ONDXKey &rSearch) |
sal_uInt16 | Search (const ONDXPage *pPage) |
void | SearchAndReplace (const ONDXKey &rSearch, ONDXKey const &rReplace) |
Protected Member Functions | |
ONDXPage (ODbaseIndex &rIndex, sal_uInt32 nPos, ONDXPage *) | |
~ONDXPage () | |
void | ReleaseRef () |
void | QueryDelete () |
void | AddNextRef () |
void | AddFirstRef () |
void | SetModified (bool bMod) |
void | SetPagePos (sal_uInt32 nPage) |
bool | Find (const ONDXKey &) |
sal_uInt16 | FindPos (const ONDXKey &rKey) const |
void | PrintPage () |
Private Attributes | |
unsigned int | nRefCount: 31 |
unsigned int | bNoDelete: 1 |
sal_uInt32 | nPagePos |
bool | bModified: 1 |
sal_uInt16 | nCount |
ONDXPagePtr | aParent |
ONDXPagePtr | aChild |
ODbaseIndex & | rIndex |
std::unique_ptr< ONDXNode[]> | ppNodes |
Friends | |
class | ODbaseIndex |
class | ONDXPagePtr |
SvStream & | WriteONDXPage (SvStream &rStream, const ONDXPage &) |
SvStream & | operator>> (SvStream &rStream, ONDXPage &) |
Definition at line 107 of file dindexnode.hxx.
|
protected |
Definition at line 68 of file dindexnode.cxx.
References connectivity::dbase::ODbaseIndex::NDXHeader::db_maxkeys, connectivity::dbase::ODbaseIndex::getHeader(), nCount, nPos, nRefCount, ppNodes, and rIndex.
|
protected |
Definition at line 81 of file dindexnode.cxx.
|
inlineprotected |
Definition at line 184 of file dindexnode.hxx.
References bNoDelete, and nRefCount.
Referenced by connectivity::dbase::ONDXPagePtr::ONDXPagePtr().
|
inlineprotected |
Definition at line 179 of file dindexnode.hxx.
References nRefCount.
Referenced by connectivity::dbase::ONDXPagePtr::ONDXPagePtr().
bool ONDXPage::Append | ( | ONDXNode & | rNode | ) |
Definition at line 335 of file dindexnode.cxx.
References DBG_ASSERT, Insert(), IsFull(), and nCount.
|
inline |
Definition at line 132 of file dindexnode.hxx.
References nCount.
Referenced by Delete(), connectivity::dbase::OIndexIterator::GetFirstKey(), connectivity::dbase::OIndexIterator::GetNextKey(), Insert(), IsFull(), Merge(), and Search().
void ONDXPage::Delete | ( | sal_uInt16 | nNodePos | ) |
Definition at line 377 of file dindexnode.cxx.
References aParent, Count(), Delete(), GetChild(), connectivity::dbase::ONDXNode::GetKey(), connectivity::dbase::ODbaseIndex::GetMaxNodes(), HasParent(), IsLeaf(), IsRoot(), Merge(), nCount, nPagePos, Remove(), rIndex, Search(), SearchAndReplace(), and connectivity::dbase::ODbaseIndex::SetRootPos().
Referenced by Delete(), and connectivity::dbase::ODbaseIndex::Delete().
|
protected |
Definition at line 150 of file dindexnode.cxx.
References Find(), GetChild(), i, connectivity::dbase::ONDXPagePtr::Is(), IsLeaf(), connectivity::dbase::ODbaseIndex::m_aCurLeaf, connectivity::dbase::ODbaseIndex::m_nCurNode, nCount, and rIndex.
Referenced by Find(), and connectivity::dbase::ODbaseIndex::Find().
|
protected |
ONDXPagePtr & ONDXPage::GetChild | ( | ODbaseIndex const * | pIndex = nullptr | ) |
Definition at line 129 of file dindexnode.cxx.
References aChild, connectivity::dbase::ODbaseIndex::CreatePage(), connectivity::dbase::ONDXPagePtr::GetPagePos(), connectivity::dbase::ONDXPagePtr::HasPage(), connectivity::dbase::ONDXPagePtr::Is(), and rIndex.
Referenced by Delete(), connectivity::dbase::OIndexIterator::Find(), Find(), connectivity::dbase::OIndexIterator::GetCompare(), connectivity::dbase::OIndexIterator::GetFirstKey(), connectivity::dbase::OIndexIterator::GetLike(), connectivity::dbase::OIndexIterator::GetNextKey(), connectivity::dbase::OIndexIterator::GetNull(), Merge(), PrintPage(), QueryDelete(), Release(), ReleaseFull(), and Search().
|
inline |
Definition at line 162 of file dindexnode.hxx.
References rIndex.
Referenced by connectivity::dbase::operator>>(), and connectivity::dbase::ONDXNode::Write().
|
inline |
Definition at line 163 of file dindexnode.hxx.
References rIndex.
|
inline |
Definition at line 157 of file dindexnode.hxx.
References nPagePos.
Referenced by connectivity::dbase::ONDXPagePtr::ONDXPagePtr(), connectivity::dbase::operator>>(), PrintPage(), and connectivity::dbase::WriteONDXPage().
|
inline |
Definition at line 210 of file dindexnode.hxx.
References aParent.
Referenced by connectivity::dbase::OIndexIterator::GetNextKey().
|
inline |
Definition at line 209 of file dindexnode.hxx.
References aParent, and connectivity::dbase::ONDXPagePtr::Is().
Referenced by Delete(), Insert(), Merge(), PrintPage(), and Split().
bool ONDXPage::Insert | ( | ONDXNode & | rNode, |
sal_uInt32 | nRowsLeft = 0 |
||
) |
Definition at line 184 of file dindexnode.cxx.
References aParent, Append(), Count(), connectivity::dbase::ODbaseIndex::CreatePage(), FindPos(), connectivity::dbase::ONDXNode::GetChild(), connectivity::dbase::ONDXNode::GetKey(), connectivity::dbase::ODbaseIndex::GetMaxNodes(), connectivity::dbase::ODbaseIndex::GetPageCount(), HasParent(), Insert(), IsFull(), IsLeaf(), connectivity::dbase::ODbaseIndex::isUnique(), connectivity::dbase::ODbaseIndex::m_aCurLeaf, connectivity::dbase::ODbaseIndex::m_aRoot, connectivity::dbase::ODbaseIndex::m_nCurNode, o3tl::make_unsigned(), nCount, NODE_NOTFOUND, nPos, ReleaseFull(), connectivity::dbase::ONDXKey::ResetRecord(), rIndex, SetChild(), connectivity::dbase::ONDXNode::SetChild(), connectivity::dbase::ODbaseIndex::SetPageCount(), connectivity::dbase::ODbaseIndex::SetRootPos(), and Split().
Referenced by Append(), connectivity::dbase::ODbaseIndex::CreateImpl(), Insert(), connectivity::dbase::ODbaseIndex::Insert(), Merge(), and Split().
bool ONDXPage::Insert | ( | sal_uInt16 | nIndex, |
ONDXNode & | rNode | ||
) |
Definition at line 303 of file dindexnode.cxx.
References bModified, connectivity::dbase::ODbaseIndex::NDXHeader::db_maxkeys, connectivity::dbase::ONDXNode::GetChild(), connectivity::dbase::ODbaseIndex::getHeader(), i, connectivity::dbase::ONDXPagePtr::Is(), nCount, nPos, rIndex, and SetParent().
bool ONDXPage::IsFull | ( | ) | const |
Definition at line 967 of file dindexnode.cxx.
References Count(), connectivity::dbase::ODbaseIndex::NDXHeader::db_maxkeys, connectivity::dbase::ODbaseIndex::getHeader(), and rIndex.
|
inline |
Definition at line 207 of file dindexnode.hxx.
References aChild, and connectivity::dbase::ONDXPagePtr::HasPage().
Referenced by Delete(), connectivity::dbase::OIndexIterator::Find(), Find(), connectivity::dbase::OIndexIterator::GetCompare(), connectivity::dbase::OIndexIterator::GetFirstKey(), connectivity::dbase::OIndexIterator::GetLike(), connectivity::dbase::OIndexIterator::GetNextKey(), connectivity::dbase::OIndexIterator::GetNull(), Insert(), Merge(), PrintPage(), Split(), and connectivity::dbase::ONDXNode::Write().
|
inline |
|
inline |
Definition at line 206 of file dindexnode.hxx.
References aParent, and connectivity::dbase::ONDXPagePtr::Is().
void ONDXPage::Merge | ( | sal_uInt16 | nParentNodePos, |
const ONDXPagePtr & | xPage | ||
) |
Definition at line 476 of file dindexnode.cxx.
References aParent, Append(), connectivity::dbase::ONDXPagePtr::Clear(), Count(), DBG_ASSERT, GetChild(), connectivity::dbase::ONDXNode::GetKey(), connectivity::dbase::ODbaseIndex::GetMaxNodes(), HasParent(), i, Insert(), IsLeaf(), IsRoot(), connectivity::dbase::ODbaseIndex::m_aRoot, nCount, NODE_NOTFOUND, nPagePos, ReleaseFull(), Remove(), rIndex, SearchAndReplace(), SetChild(), SetModified(), and connectivity::dbase::ODbaseIndex::SetRootPos().
Referenced by Delete().
ONDXNode & ONDXPage::operator[] | ( | sal_uInt16 | nPos | ) |
Definition at line 1022 of file dindexnode.cxx.
References DBG_ASSERT, nCount, nPos, and ppNodes.
const ONDXNode & ONDXPage::operator[] | ( | sal_uInt16 | nPos | ) | const |
Definition at line 1029 of file dindexnode.cxx.
References DBG_ASSERT, nCount, nPos, and ppNodes.
|
protected |
Definition at line 924 of file dindexnode.cxx.
References aChild, aParent, connectivity::dbase::ODbaseIndex::NDXHeader::db_keytype, connectivity::dbase::ONDXNode::GetChild(), GetChild(), connectivity::ORowSetValue::getDouble(), connectivity::dbase::ODbaseIndex::getHeader(), connectivity::dbase::ONDXNode::GetKey(), connectivity::dbase::ONDXPagePtr::GetPagePos(), GetPagePos(), connectivity::dbase::ONDXKey::GetRecord(), connectivity::ORowSetValue::getString(), connectivity::dbase::ONDXKey::getValue(), HasParent(), i, IsLeaf(), connectivity::ORowSetValue::isNull(), nCount, nPagePos, PrintPage(), rIndex, and SAL_WARN.
Referenced by connectivity::dbase::ODbaseIndex::Delete(), and PrintPage().
|
protected |
Definition at line 94 of file dindexnode.cxx.
References aChild, aParent, bModified, bNoDelete, connectivity::dbase::ONDXPagePtr::Clear(), connectivity::dbase::ODbaseIndex::Collect(), GetChild(), connectivity::dbase::ODbaseIndex::getHeader(), i, connectivity::dbase::ONDXPagePtr::Is(), IsModified(), connectivity::dbase::ODbaseIndex::m_pFileStream, nCount, nRefCount, ppNodes, Release(), rIndex, connectivity::dbase::ODbaseIndex::UseCollector(), and WriteONDXPage.
Referenced by ReleaseRef().
void ONDXPage::Release | ( | bool | bSave = true | ) |
Definition at line 341 of file dindexnode.cxx.
References aChild, aParent, connectivity::dbase::ONDXPagePtr::Clear(), GetChild(), connectivity::dbase::ODbaseIndex::getHeader(), i, connectivity::dbase::ONDXPagePtr::Is(), ppNodes, Release(), and rIndex.
Referenced by QueryDelete(), connectivity::dbase::ODbaseIndex::Release(), Release(), and ReleaseFull().
void ONDXPage::ReleaseFull | ( | ) |
Definition at line 360 of file dindexnode.cxx.
References aParent, connectivity::dbase::ONDXPagePtr::Clear(), GetChild(), connectivity::dbase::ONDXPagePtr::Is(), NODE_NOTFOUND, Release(), and Search().
|
protected |
Definition at line 85 of file dindexnode.cxx.
References bNoDelete, nRefCount, and QueryDelete().
Referenced by connectivity::dbase::ONDXPagePtr::Clear(), connectivity::dbase::ONDXPagePtr::operator=(), and connectivity::dbase::ONDXPagePtr::~ONDXPagePtr().
void ONDXPage::Remove | ( | sal_uInt16 | nPos | ) |
Definition at line 1035 of file dindexnode.cxx.
References bModified, DBG_ASSERT, i, nCount, and nPos.
sal_uInt16 ONDXPage::Search | ( | const ONDXKey & | rSearch | ) |
Definition at line 973 of file dindexnode.cxx.
References Count(), i, and NODE_NOTFOUND.
Referenced by Delete(), connectivity::dbase::OIndexIterator::GetNextKey(), ReleaseFull(), and SearchAndReplace().
sal_uInt16 ONDXPage::Search | ( | const ONDXPage * | pPage | ) |
Definition at line 985 of file dindexnode.cxx.
References Count(), GetChild(), i, and NODE_NOTFOUND.
Definition at line 997 of file dindexnode.cxx.
References aParent, NODE_NOTFOUND, nPos, Search(), and SetModified().
|
inline |
Definition at line 217 of file dindexnode.hxx.
References aChild, connectivity::dbase::ONDXPagePtr::Is(), and SetParent().
|
inlineprotected |
Definition at line 192 of file dindexnode.hxx.
References bModified.
Referenced by connectivity::dbase::ODbaseIndex::CreateImpl(), Merge(), and SearchAndReplace().
|
inlineprotected |
Definition at line 193 of file dindexnode.hxx.
References nPagePos.
Referenced by connectivity::dbase::ODbaseIndex::CreatePage().
|
inline |
Definition at line 212 of file dindexnode.hxx.
References aParent.
Referenced by connectivity::dbase::ODbaseIndex::CreatePage(), Insert(), SetChild(), and connectivity::dbase::ONDXNode::SetChild().
Definition at line 426 of file dindexnode.cxx.
References aParent, bModified, DBG_ASSERT, connectivity::dbase::ONDXNode::GetChild(), connectivity::dbase::ONDXNode::GetKey(), HasParent(), i, Insert(), IsFull(), IsLeaf(), connectivity::dbase::ODbaseIndex::isUnique(), nCount, connectivity::dbase::ONDXKey::ResetRecord(), rIndex, SearchAndReplace(), SetChild(), and connectivity::dbase::ONDXNode::SetChild().
Referenced by Insert().
|
friend |
Definition at line 109 of file dindexnode.hxx.
|
friend |
Definition at line 110 of file dindexnode.hxx.
Referenced by QueryDelete().
|
private |
Definition at line 125 of file dindexnode.hxx.
Referenced by GetChild(), IsLeaf(), connectivity::dbase::operator>>(), PrintPage(), QueryDelete(), Release(), SetChild(), and connectivity::dbase::WriteONDXPage().
|
private |
Definition at line 124 of file dindexnode.hxx.
Referenced by Delete(), GetParent(), HasParent(), Insert(), IsRoot(), Merge(), PrintPage(), QueryDelete(), Release(), ReleaseFull(), SearchAndReplace(), SetParent(), and Split().
|
private |
Definition at line 121 of file dindexnode.hxx.
Referenced by Insert(), IsModified(), QueryDelete(), Remove(), SetModified(), and Split().
|
private |
Definition at line 119 of file dindexnode.hxx.
Referenced by AddFirstRef(), QueryDelete(), and ReleaseRef().
|
private |
Definition at line 122 of file dindexnode.hxx.
Referenced by Append(), Count(), Delete(), Find(), Insert(), Merge(), connectivity::dbase::operator>>(), operator[](), PrintPage(), QueryDelete(), Remove(), Split(), and connectivity::dbase::WriteONDXPage().
|
private |
Definition at line 120 of file dindexnode.hxx.
Referenced by Delete(), GetPagePos(), Merge(), PrintPage(), and SetPagePos().
|
private |
Definition at line 117 of file dindexnode.hxx.
Referenced by AddFirstRef(), AddNextRef(), QueryDelete(), and ReleaseRef().
|
private |
Definition at line 128 of file dindexnode.hxx.
Referenced by ONDXPage(), operator[](), QueryDelete(), and Release().
|
private |
Definition at line 126 of file dindexnode.hxx.
Referenced by Delete(), Find(), GetChild(), GetIndex(), Insert(), IsFull(), Merge(), ONDXPage(), PrintPage(), QueryDelete(), Release(), Split(), and connectivity::dbase::WriteONDXPage().