LibreOffice Module connectivity (master) 1
Public Member Functions | Protected Member Functions | Private Attributes | Friends | List of all members
connectivity::dbase::ONDXPage Class Reference

#include <dindexnode.hxx>

Collaboration diagram for connectivity::dbase::ONDXPage:
[legend]

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)
 
ONDXNodeoperator[] (sal_uInt16 nPos)
 
const ONDXNodeoperator[] (sal_uInt16 nPos) const
 
bool IsRoot () const
 
bool IsLeaf () const
 
bool IsModified () const
 
bool HasParent () const
 
bool IsFull () const
 
sal_uInt32 GetPagePos () const
 
ONDXPagePtrGetChild (ODbaseIndex const *pIndex=nullptr)
 
const ONDXPagePtrGetParent () const
 
ODbaseIndexGetIndex ()
 
const ODbaseIndexGetIndex () 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
 
ODbaseIndexrIndex
 
std::unique_ptr< ONDXNode[]> ppNodes
 

Friends

class ODbaseIndex
 
class ONDXPagePtr
 
SvStreamWriteONDXPage (SvStream &rStream, const ONDXPage &)
 
SvStreamoperator>> (SvStream &rStream, ONDXPage &)
 

Detailed Description

Definition at line 107 of file dindexnode.hxx.

Constructor & Destructor Documentation

◆ ONDXPage()

ONDXPage::ONDXPage ( ODbaseIndex rIndex,
sal_uInt32  nPos,
ONDXPage pParent 
)
protected

◆ ~ONDXPage()

ONDXPage::~ONDXPage ( )
protected

Definition at line 81 of file dindexnode.cxx.

Member Function Documentation

◆ AddFirstRef()

void connectivity::dbase::ONDXPage::AddFirstRef ( )
inlineprotected

Definition at line 184 of file dindexnode.hxx.

References bNoDelete, and nRefCount.

Referenced by connectivity::dbase::ONDXPagePtr::ONDXPagePtr().

◆ AddNextRef()

void connectivity::dbase::ONDXPage::AddNextRef ( )
inlineprotected

Definition at line 179 of file dindexnode.hxx.

References nRefCount.

Referenced by connectivity::dbase::ONDXPagePtr::ONDXPagePtr().

◆ Append()

bool ONDXPage::Append ( ONDXNode rNode)

Definition at line 335 of file dindexnode.cxx.

References DBG_ASSERT, Insert(), IsFull(), and nCount.

Referenced by Insert(), and Merge().

◆ Count()

sal_uInt16 connectivity::dbase::ONDXPage::Count ( ) const
inline

◆ Delete()

void ONDXPage::Delete ( sal_uInt16  nNodePos)

◆ Find()

bool ONDXPage::Find ( const ONDXKey rKey)
protected

◆ FindPos()

sal_uInt16 ONDXPage::FindPos ( const ONDXKey rKey) const
protected

Definition at line 139 of file dindexnode.cxx.

References i.

Referenced by Insert().

◆ GetChild()

ONDXPagePtr & ONDXPage::GetChild ( ODbaseIndex const *  pIndex = nullptr)

◆ GetIndex() [1/2]

ODbaseIndex & connectivity::dbase::ONDXPage::GetIndex ( )
inline

Definition at line 162 of file dindexnode.hxx.

References rIndex.

Referenced by connectivity::dbase::operator>>(), and connectivity::dbase::ONDXNode::Write().

◆ GetIndex() [2/2]

const ODbaseIndex & connectivity::dbase::ONDXPage::GetIndex ( ) const
inline

Definition at line 163 of file dindexnode.hxx.

References rIndex.

◆ GetPagePos()

sal_uInt32 connectivity::dbase::ONDXPage::GetPagePos ( ) const
inline

◆ GetParent()

const ONDXPagePtr & connectivity::dbase::ONDXPage::GetParent ( ) const
inline

Definition at line 210 of file dindexnode.hxx.

References aParent.

Referenced by connectivity::dbase::OIndexIterator::GetNextKey().

◆ HasParent()

bool connectivity::dbase::ONDXPage::HasParent ( ) const
inline

Definition at line 209 of file dindexnode.hxx.

References aParent, and connectivity::dbase::ONDXPagePtr::Is().

Referenced by Delete(), Insert(), Merge(), PrintPage(), and Split().

◆ Insert() [1/2]

bool ONDXPage::Insert ( ONDXNode rNode,
sal_uInt32  nRowsLeft = 0 
)

◆ Insert() [2/2]

bool ONDXPage::Insert ( sal_uInt16  nIndex,
ONDXNode rNode 
)

◆ IsFull()

bool ONDXPage::IsFull ( ) const

◆ IsLeaf()

bool connectivity::dbase::ONDXPage::IsLeaf ( ) const
inline

◆ IsModified()

bool connectivity::dbase::ONDXPage::IsModified ( ) const
inline

Definition at line 208 of file dindexnode.hxx.

References bModified.

Referenced by QueryDelete().

◆ IsRoot()

bool connectivity::dbase::ONDXPage::IsRoot ( ) const
inline

Definition at line 206 of file dindexnode.hxx.

References aParent, and connectivity::dbase::ONDXPagePtr::Is().

Referenced by Delete(), and Merge().

◆ Merge()

void ONDXPage::Merge ( sal_uInt16  nParentNodePos,
const ONDXPagePtr xPage 
)

◆ operator[]() [1/2]

ONDXNode & ONDXPage::operator[] ( sal_uInt16  nPos)

Definition at line 1022 of file dindexnode.cxx.

References DBG_ASSERT, nCount, nPos, and ppNodes.

◆ operator[]() [2/2]

const ONDXNode & ONDXPage::operator[] ( sal_uInt16  nPos) const

Definition at line 1029 of file dindexnode.cxx.

References DBG_ASSERT, nCount, nPos, and ppNodes.

◆ PrintPage()

void ONDXPage::PrintPage ( )
protected

◆ QueryDelete()

void ONDXPage::QueryDelete ( )
protected

◆ Release()

void ONDXPage::Release ( bool  bSave = true)

◆ ReleaseFull()

void ONDXPage::ReleaseFull ( )

◆ ReleaseRef()

void ONDXPage::ReleaseRef ( )
protected

◆ Remove()

void ONDXPage::Remove ( sal_uInt16  nPos)

Definition at line 1035 of file dindexnode.cxx.

References bModified, DBG_ASSERT, i, nCount, and nPos.

Referenced by Delete(), and Merge().

◆ Search() [1/2]

sal_uInt16 ONDXPage::Search ( const ONDXKey rSearch)

◆ Search() [2/2]

sal_uInt16 ONDXPage::Search ( const ONDXPage pPage)

Definition at line 985 of file dindexnode.cxx.

References Count(), GetChild(), i, and NODE_NOTFOUND.

◆ SearchAndReplace()

void ONDXPage::SearchAndReplace ( const ONDXKey rSearch,
ONDXKey const &  rReplace 
)

Definition at line 997 of file dindexnode.cxx.

References aParent, NODE_NOTFOUND, nPos, Search(), and SetModified().

Referenced by Delete(), Merge(), and Split().

◆ SetChild()

void connectivity::dbase::ONDXPage::SetChild ( ONDXPagePtr  aCh = ONDXPagePtr())
inline

Definition at line 217 of file dindexnode.hxx.

References aChild, connectivity::dbase::ONDXPagePtr::Is(), and SetParent().

Referenced by Insert(), Merge(), and Split().

◆ SetModified()

void connectivity::dbase::ONDXPage::SetModified ( bool  bMod)
inlineprotected

Definition at line 192 of file dindexnode.hxx.

References bModified.

Referenced by connectivity::dbase::ODbaseIndex::CreateImpl(), Merge(), and SearchAndReplace().

◆ SetPagePos()

void connectivity::dbase::ONDXPage::SetPagePos ( sal_uInt32  nPage)
inlineprotected

Definition at line 193 of file dindexnode.hxx.

References nPagePos.

Referenced by connectivity::dbase::ODbaseIndex::CreatePage().

◆ SetParent()

void connectivity::dbase::ONDXPage::SetParent ( ONDXPagePtr  aPa = ONDXPagePtr())
inline

◆ Split()

ONDXNode ONDXPage::Split ( ONDXPage rPage)

Friends And Related Function Documentation

◆ ODbaseIndex

friend class ODbaseIndex
friend

Definition at line 109 of file dindexnode.hxx.

◆ ONDXPagePtr

friend class ONDXPagePtr
friend

Definition at line 110 of file dindexnode.hxx.

◆ operator>>

SvStream & operator>> ( SvStream rStream,
ONDXPage  
)
friend

◆ WriteONDXPage

SvStream & WriteONDXPage ( SvStream rStream,
const ONDXPage  
)
friend

Referenced by QueryDelete().

Member Data Documentation

◆ aChild

ONDXPagePtr connectivity::dbase::ONDXPage::aChild
private

◆ aParent

ONDXPagePtr connectivity::dbase::ONDXPage::aParent
private

◆ bModified

bool connectivity::dbase::ONDXPage::bModified
private

Definition at line 121 of file dindexnode.hxx.

Referenced by Insert(), IsModified(), QueryDelete(), Remove(), SetModified(), and Split().

◆ bNoDelete

unsigned int connectivity::dbase::ONDXPage::bNoDelete
private

Definition at line 119 of file dindexnode.hxx.

Referenced by AddFirstRef(), QueryDelete(), and ReleaseRef().

◆ nCount

sal_uInt16 connectivity::dbase::ONDXPage::nCount
private

◆ nPagePos

sal_uInt32 connectivity::dbase::ONDXPage::nPagePos
private

Definition at line 120 of file dindexnode.hxx.

Referenced by Delete(), GetPagePos(), Merge(), PrintPage(), and SetPagePos().

◆ nRefCount

unsigned int connectivity::dbase::ONDXPage::nRefCount
private

Definition at line 117 of file dindexnode.hxx.

Referenced by AddFirstRef(), AddNextRef(), QueryDelete(), and ReleaseRef().

◆ ppNodes

std::unique_ptr<ONDXNode[]> connectivity::dbase::ONDXPage::ppNodes
private

Definition at line 128 of file dindexnode.hxx.

Referenced by ONDXPage(), operator[](), QueryDelete(), and Release().

◆ rIndex

ODbaseIndex& connectivity::dbase::ONDXPage::rIndex
private

The documentation for this class was generated from the following files: