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

#include <DIndex.hxx>

Inheritance diagram for connectivity::dbase::ODbaseIndex:
[legend]
Collaboration diagram for connectivity::dbase::ODbaseIndex:
[legend]

Classes

struct  NDXHeader
 

Public Member Functions

 ODbaseIndex (ODbaseTable *_pTable)
 
 ODbaseIndex (ODbaseTable *_pTable, const NDXHeader &_aHeader, const OUString &Name)
 
void openIndexFile ()
 
virtual void refreshColumns () override
 
const ODbaseTablegetTable () const
 
const NDXHeadergetHeader () const
 
std::unique_ptr< OIndexIteratorcreateIterator ()
 
void SetRootPos (sal_uInt32 nPos)
 
void SetPageCount (sal_uInt32 nCount)
 
sal_uInt32 GetPageCount () const
 
sal_uInt16 GetMaxNodes () const
 
bool Insert (sal_uInt32 nRec, const ORowSetValue &rValue)
 
bool Update (sal_uInt32 nRec, const ORowSetValue &, const ORowSetValue &)
 
bool Delete (sal_uInt32 nRec, const ORowSetValue &rValue)
 
bool Find (sal_uInt32 nRec, const ORowSetValue &rValue)
 
void createINFEntry ()
 
void CreateImpl ()
 
void DropImpl ()
 
 DECLARE_SERVICE_INFO ()
 
- Public Member Functions inherited from connectivity::sdbcx::OIndex
 OIndex (bool _bCase)
 
 OIndex (const OUString &Name, OUString Catalog, bool _isUnique, bool _isPrimaryKeyIndex, bool _isClustered, bool _bCase)
 
virtual ~OIndex () override
 
 DECLARE_SERVICE_INFO ()
 
virtual css::uno::Any SAL_CALL queryInterface (const css::uno::Type &rType) override
 
virtual void SAL_CALL acquire () noexcept override
 
virtual void SAL_CALL release () noexcept override
 
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes () override
 
virtual void construct () override
 
virtual void SAL_CALL disposing () override
 
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo () override
 
virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getColumns () override
 
virtual OUString SAL_CALL getName () override
 
virtual void SAL_CALL setName (const OUString &aName) override
 
virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL createDataDescriptor () override
 
virtual void refreshColumns ()=0
 
- Public Member Functions inherited from comphelper::OIdPropertyArrayUsageHelper< class TYPE >
 OIdPropertyArrayUsageHelper ()
 
virtual ~OIdPropertyArrayUsageHelper ()
 
::cppu::IPropertyArrayHelpergetArrayHelper (sal_Int32 nId)
 
- Public Member Functions inherited from connectivity::sdbcx::ODescriptor
 ODescriptor (::cppu::OBroadcastHelper &_rBHelper, bool _bCase, bool _bNew=false)
 
virtual ~ODescriptor () override
 
bool isNew () const
 
void setNew (bool _bNew)
 
bool isCaseSensitive () const
 
virtual void construct ()
 
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes ()
 
- Public Member Functions inherited from comphelper::OPropertyContainer
virtual ~OPropertyContainer ()
 
- Public Member Functions inherited from cppu::ImplHelper1< class Ifc1 >
virtual css::uno::Any SAL_CALL queryInterface (css::uno::Type const &rType) SAL_OVERRIDE
 
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes () SAL_OVERRIDE
 
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId () SAL_OVERRIDE
 

Protected Member Functions

virtual ~ODbaseIndex () override
 
ONDXPageCreatePage (sal_uInt32 nPagePos, ONDXPage *pParent=nullptr, bool bLoad=false)
 
void Collect (ONDXPage *)
 
ONDXPagePtr const & getRoot ()
 
bool isUnique () const
 
bool UseCollector () const
 
void Release (bool bSave=true)
 
bool ConvertToKey (ONDXKey *rKey, sal_uInt32 nRec, const ORowSetValue &rValue)
 
- Protected Member Functions inherited from connectivity::sdbcx::OIndex
virtual void refreshColumns () override
 
virtual ::cppu::IPropertyArrayHelpercreateArrayHelper (sal_Int32 _nId) const override
 
virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper () override
 
- Protected Member Functions inherited from connectivity::sdbcx::IRefreshableColumns
 ~IRefreshableColumns ()
 
virtual ::cppu::IPropertyArrayHelpercreateArrayHelper (sal_Int32 nId) const=0
 
- Protected Member Functions inherited from connectivity::sdbcx::ODescriptor
::cppu::IPropertyArrayHelperdoCreateArrayHelper () const
 helper for derived classes to implement OPropertyArrayUsageHelper::createArrayHelper More...
 
- Protected Member Functions inherited from comphelper::OPropertyContainer
 OPropertyContainer (::cppu::OBroadcastHelper &_rBHelper)
 
virtual sal_Bool SAL_CALL convertFastPropertyValue (css::uno::Any &rConvertedValue, css::uno::Any &rOldValue, sal_Int32 nHandle, const css::uno::Any &rValue) override
 
virtual void SAL_CALL setFastPropertyValue_NoBroadcast (sal_Int32 nHandle, const css::uno::Any &rValue) override
 
virtual void SAL_CALL getFastPropertyValue (css::uno::Any &rValue, sal_Int32 nHandle) const override
 
virtual css::uno::Any SAL_CALL getFastPropertyValue (sal_Int32 nHandle) override final
 
virtual void getFastPropertyValue (std::unique_lock< std::mutex > &rGuard, css::uno::Any &rValue, sal_Int32 nHandle) const =0
 
virtual void SAL_CALL setFastPropertyValue (sal_Int32 nHandle, const css::uno::Any &rValue) override final
 
- Protected Member Functions inherited from comphelper::OPropertyContainerHelper
 OPropertyContainerHelper ()
 
 ~OPropertyContainerHelper ()
 
void registerProperty (const OUString &_rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, void *_pPointerToMember, const css::uno::Type &_rMemberType)
 
void registerMayBeVoidProperty (const OUString &_rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, css::uno::Any *_pPointerToMember, const css::uno::Type &_rExpectedType)
 
void registerPropertyNoMember (const OUString &_rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, const css::uno::Type &_rType, css::uno::Any const &_pInitialValue)
 
void revokeProperty (sal_Int32 _nHandle)
 
bool isRegisteredProperty (sal_Int32 _nHandle) const
 
bool isRegisteredProperty (const OUString &_rName) const
 
bool convertFastPropertyValue (css::uno::Any &rConvertedValue, css::uno::Any &rOldValue, sal_Int32 nHandle, const css::uno::Any &rValue)
 
void setFastPropertyValue (sal_Int32 nHandle, const css::uno::Any &rValue)
 
void getFastPropertyValue (css::uno::Any &rValue, sal_Int32 nHandle) const
 
void describeProperties (css::uno::Sequence< css::beans::Property > &_rProps) const
 
const css::beans::Property & getProperty (const OUString &_rName) const
 
- Protected Member Functions inherited from cppu::ImplHelper1< class Ifc1 >
 ~ImplHelper1 () SAL_NOEXCEPT
 

Private Member Functions

OUString getCompletePath () const
 
void closeImpl ()
 
void impl_killFileAndthrowError_throw (TranslateId pErrorId, const OUString &_sFile)
 

Private Attributes

std::unique_ptr< SvStreamm_pFileStream
 
NDXHeader m_aHeader = {}
 
std::vector< ONDXPage * > m_aCollector
 
ONDXPagePtr m_aRoot
 
ONDXPagePtr m_aCurLeaf
 
sal_uInt16 m_nCurNode
 
sal_uInt32 m_nPageCount
 
sal_uInt32 m_nRootPage
 
ODbaseTablem_pTable
 
bool m_bUseCollector: 1
 

Friends

class ONDXNode
 
class ONDXPage
 
class ONDXPagePtr
 
class OIndexIterator
 
SvStreamWriteODbaseIndex (SvStream &rStream, const ODbaseIndex &)
 
SvStreamoperator>> (SvStream &rStream, ODbaseIndex &)
 

Additional Inherited Members

- Static Public Member Functions inherited from connectivity::sdbcx::ODescriptor
static bool isNew (const css::uno::Reference< css::uno::XInterface > &_rxDescriptor)
 
- Static Protected Member Functions inherited from comphelper::OPropertyContainer
static css::uno::Sequence< css::uno::Type > getBaseTypes ()
 
- Protected Attributes inherited from connectivity::sdbcx::OIndex
OUString m_Catalog
 
bool m_IsUnique
 
bool m_IsPrimaryKeyIndex
 
bool m_IsClustered
 
std::unique_ptr< OCollectionm_pColumns
 
- Protected Attributes inherited from cppu::BaseMutex
mutable::osl::Mutex m_aMutex
 
- Protected Attributes inherited from connectivity::sdbcx::ODescriptor
OUString m_Name
 

Detailed Description

Definition at line 35 of file DIndex.hxx.

Constructor & Destructor Documentation

◆ ~ODbaseIndex()

ODbaseIndex::~ODbaseIndex ( )
overrideprotectedvirtual

Definition at line 79 of file DIndex.cxx.

References closeImpl().

◆ ODbaseIndex() [1/2]

ODbaseIndex::ODbaseIndex ( ODbaseTable _pTable)

Definition at line 54 of file DIndex.cxx.

References connectivity::sdbcx::OIndex::construct().

◆ ODbaseIndex() [2/2]

ODbaseIndex::ODbaseIndex ( ODbaseTable _pTable,
const NDXHeader _aHeader,
const OUString &  Name 
)

Definition at line 65 of file DIndex.cxx.

References connectivity::sdbcx::OIndex::construct().

Member Function Documentation

◆ closeImpl()

void ODbaseIndex::closeImpl ( )
private

Definition at line 288 of file DIndex.cxx.

References m_pFileStream.

Referenced by DropImpl(), impl_killFileAndthrowError_throw(), Release(), and ~ODbaseIndex().

◆ Collect()

void ODbaseIndex::Collect ( ONDXPage pPage)
protected

Definition at line 245 of file DIndex.cxx.

References m_aCollector.

Referenced by connectivity::dbase::ONDXPage::QueryDelete().

◆ ConvertToKey()

bool ODbaseIndex::ConvertToKey ( ONDXKey rKey,
sal_uInt32  nRec,
const ORowSetValue rValue 
)
protected

◆ CreateImpl()

void ODbaseIndex::CreateImpl ( )

Definition at line 454 of file DIndex.cxx.

References aName, createINFEntry(), CreatePage(), connectivity::file::OConnection::createStatement(), connectivity::dbase::ODbaseIndex::NDXHeader::db_keylen, connectivity::dbase::ODbaseIndex::NDXHeader::db_keyrec, connectivity::dbase::ODbaseIndex::NDXHeader::db_keytype, connectivity::dbase::ODbaseIndex::NDXHeader::db_maxkeys, connectivity::dbase::ODbaseIndex::NDXHeader::db_name, connectivity::dbase::ODbaseIndex::NDXHeader::db_unique, DINDEX_PAGE_SIZE, Exception, connectivity::find(), getCompletePath(), connectivity::file::OFileTable::getConnection(), connectivity::dbase::ODbaseResultSet::getCurrentFilePos(), getINT32(), connectivity::file::OConnection::getMetaData(), connectivity::file::OFileTable::getName(), dbtools::OPropertyMap::getNameByIndex(), connectivity::OMetaConnection::getPropMap(), connectivity::OMetaConnection::getResources(), connectivity::SharedResources::getResourceStringWithSubstitution(), getString(), connectivity::file::OFileTable::getTableColumns(), connectivity::OMetaConnection::getTextEncoding(), utl::SharedUNOComponent< class INTERFACE, class COMPONENT >::getTyped(), impl_killFileAndthrowError_throw(), connectivity::dbase::ONDXPage::Insert(), utl::SharedUNOComponent< class INTERFACE, class COMPONENT >::is(), connectivity::sdbcx::ODescriptor::isCaseSensitive(), m_aCurLeaf, m_aHeader, m_aRoot, m_bUseCollector, connectivity::sdbcx::OIndex::m_IsUnique, m_nCurNode, m_nPageCount, m_nRootPage, connectivity::sdbcx::OIndex::m_pColumns, m_pFileStream, m_pTable, NODE_NOTFOUND, nType, pq_sdbc_driver::OUStringToOString(), PROPERTY_ID_NAME, PROPERTY_ID_PRECISION, PROPERTY_ID_TYPE, Release(), utl::SharedUNOComponent< class INTERFACE, class COMPONENT >::set(), connectivity::dbase::ONDXPage::SetModified(), connectivity::dbase::ONDXKey::setRecord(), connectivity::dbase::ONDXKey::setValue(), dbtools::throwFunctionSequenceException(), dbtools::throwGenericSQLException(), and connectivity::OMetaConnection::throwGenericSQLException().

Referenced by connectivity::dbase::ODbaseIndexes::appendObject().

◆ createINFEntry()

void ODbaseIndex::createINFEntry ( )

◆ createIterator()

std::unique_ptr< OIndexIterator > ODbaseIndex::createIterator ( )

Definition at line 142 of file DIndex.cxx.

References openIndexFile().

Referenced by connectivity::dbase::ODbaseResultSet::fillIndexValues().

◆ CreatePage()

ONDXPage * ODbaseIndex::CreatePage ( sal_uInt32  nPagePos,
ONDXPage pParent = nullptr,
bool  bLoad = false 
)
protected

◆ DECLARE_SERVICE_INFO()

connectivity::dbase::ODbaseIndex::DECLARE_SERVICE_INFO ( )

◆ Delete()

bool ODbaseIndex::Delete ( sal_uInt32  nRec,
const ORowSetValue rValue 
)

◆ DropImpl()

void ODbaseIndex::DropImpl ( )

◆ Find()

bool ODbaseIndex::Find ( sal_uInt32  nRec,
const ORowSetValue rValue 
)

◆ getCompletePath()

OUString ODbaseIndex::getCompletePath ( ) const
private

◆ getHeader()

const NDXHeader & connectivity::dbase::ODbaseIndex::getHeader ( ) const
inline

◆ GetMaxNodes()

sal_uInt16 connectivity::dbase::ODbaseIndex::GetMaxNodes ( ) const
inline

◆ GetPageCount()

sal_uInt32 connectivity::dbase::ODbaseIndex::GetPageCount ( ) const
inline

Definition at line 101 of file DIndex.hxx.

References m_nPageCount.

Referenced by connectivity::dbase::ONDXPage::Insert().

◆ getRoot()

ONDXPagePtr const & ODbaseIndex::getRoot ( )
protected

◆ getTable()

const ODbaseTable * connectivity::dbase::ODbaseIndex::getTable ( ) const
inline

◆ impl_killFileAndthrowError_throw()

void ODbaseIndex::impl_killFileAndthrowError_throw ( TranslateId  pErrorId,
const OUString &  _sFile 
)
private

◆ Insert()

bool ODbaseIndex::Insert ( sal_uInt32  nRec,
const ORowSetValue rValue 
)

◆ isUnique()

bool connectivity::dbase::ODbaseIndex::isUnique ( ) const
inlineprotected

◆ openIndexFile()

void ODbaseIndex::openIndexFile ( )

◆ refreshColumns()

void ODbaseIndex::refreshColumns ( )
overridevirtual

◆ Release()

void ODbaseIndex::Release ( bool  bSave = true)
protected

◆ SetPageCount()

void connectivity::dbase::ODbaseIndex::SetPageCount ( sal_uInt32  nCount)
inline

Definition at line 99 of file DIndex.hxx.

References m_nPageCount, and nCount.

Referenced by connectivity::dbase::ONDXPage::Insert().

◆ SetRootPos()

void connectivity::dbase::ODbaseIndex::SetRootPos ( sal_uInt32  nPos)
inline

◆ Update()

bool ODbaseIndex::Update ( sal_uInt32  nRec,
const ORowSetValue rOldValue,
const ORowSetValue rNewValue 
)

◆ UseCollector()

bool connectivity::dbase::ODbaseIndex::UseCollector ( ) const
inlineprotected

Definition at line 122 of file DIndex.hxx.

References m_bUseCollector.

Referenced by connectivity::dbase::ONDXPage::QueryDelete().

Friends And Related Function Documentation

◆ OIndexIterator

friend class OIndexIterator
friend

Definition at line 43 of file DIndex.hxx.

◆ ONDXNode

friend class ONDXNode
friend

Definition at line 40 of file DIndex.hxx.

◆ ONDXPage

friend class ONDXPage
friend

Definition at line 41 of file DIndex.hxx.

Referenced by CreatePage().

◆ ONDXPagePtr

friend class ONDXPagePtr
friend

Definition at line 42 of file DIndex.hxx.

◆ operator>>

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

◆ WriteODbaseIndex

SvStream & WriteODbaseIndex ( SvStream rStream,
const ODbaseIndex  
)
friend

Referenced by Release().

Member Data Documentation

◆ m_aCollector

std::vector<ONDXPage*> connectivity::dbase::ODbaseIndex::m_aCollector
private

Definition at line 70 of file DIndex.hxx.

Referenced by Collect(), CreatePage(), and Release().

◆ m_aCurLeaf

ONDXPagePtr connectivity::dbase::ODbaseIndex::m_aCurLeaf
private

◆ m_aHeader

NDXHeader connectivity::dbase::ODbaseIndex::m_aHeader = {}
private

◆ m_aRoot

ONDXPagePtr connectivity::dbase::ODbaseIndex::m_aRoot
private

◆ m_bUseCollector

bool connectivity::dbase::ODbaseIndex::m_bUseCollector
private

Definition at line 79 of file DIndex.hxx.

Referenced by CreateImpl(), Release(), and UseCollector().

◆ m_nCurNode

sal_uInt16 connectivity::dbase::ODbaseIndex::m_nCurNode
private

◆ m_nPageCount

sal_uInt32 connectivity::dbase::ODbaseIndex::m_nPageCount
private

◆ m_nRootPage

sal_uInt32 connectivity::dbase::ODbaseIndex::m_nRootPage
private

Definition at line 76 of file DIndex.hxx.

Referenced by CreateImpl(), getRoot(), connectivity::dbase::operator>>(), Release(), and SetRootPos().

◆ m_pFileStream

std::unique_ptr<SvStream> connectivity::dbase::ODbaseIndex::m_pFileStream
private

◆ m_pTable

ODbaseTable* connectivity::dbase::ODbaseIndex::m_pTable
private

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