LibreOffice Module store (master) 1
Classes | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
store::OStorePageBIOS Class Reference

#include <storbios.hxx>

Inheritance diagram for store::OStorePageBIOS:
[legend]
Collaboration diagram for store::OStorePageBIOS:
[legend]

Classes

struct  Ace
 Page Access (control). More...
 
class  AceCache
 

Public Member Functions

 OStorePageBIOS ()
 
 operator osl::Mutex & (void) const
 Conversion into Mutex&. More...
 
virtual storeError initialize (ILockBytes *pLockBytes, storeAccessMode eAccessMode, sal_uInt16 &rnPageSize)
 Initialization. More...
 
rtl::Reference< PageData::Allocator > & allocator ()
 
storeError read (sal_uInt32 nAddr, void *pData, sal_uInt32 nSize) const
 
storeError write (sal_uInt32 nAddr, const void *pData, sal_uInt32 nSize) const
 
bool isWriteable () const
 
bool isValid () const
 
storeError acquirePage (const OStorePageDescriptor &rDescr, storeAccessMode eMode)
 
storeError releasePage (const OStorePageDescriptor &rDescr)
 
storeError allocate (OStorePageObject &rPage)
 
storeError free (sal_uInt32 nAddr)
 
storeError loadObjectAt (OStorePageObject &rPage, sal_uInt32 nAddr)
 Page I/O. More...
 
storeError saveObjectAt (OStorePageObject &rPage, sal_uInt32 nAddr)
 
storeError close ()
 close. More...
 
storeError flush ()
 flush. More...
 
- Public Member Functions inherited from store::OStoreObject
 OStoreObject ()
 
virtual bool isKindOf (sal_uInt32 nTypeId)
 Replaces dynamic_cast type checking. More...
 
- Public Member Functions inherited from salhelper::SimpleReferenceObject
 SimpleReferenceObject ()
 
void acquire ()
 
void release ()
 

Protected Member Functions

virtual ~OStorePageBIOS () override
 
- Protected Member Functions inherited from store::OStoreObject
virtual ~OStoreObject () override
 
- Protected Member Functions inherited from salhelper::SimpleReferenceObject
virtual ~SimpleReferenceObject () COVERITY_NOEXCEPT_FALSE
 

Private Member Functions

storeError initialize_Impl (ILockBytes *pLockBytes, storeAccessMode eAccessMode, sal_uInt16 &rnPageSize)
 initialize_Impl. More...
 
void cleanup_Impl ()
 
storeError loadObjectAt_Impl (OStorePageObject &rPage, sal_uInt32 nAddr) const
 
storeError saveObjectAt_Impl (OStorePageObject &rPage, sal_uInt32 nAddr) const
 
 OStorePageBIOS (const OStorePageBIOS &)=delete
 
OStorePageBIOSoperator= (const OStorePageBIOS &)=delete
 

Private Attributes

rtl::Reference< ILockBytesm_xLockBytes
 
osl::Mutex m_aMutex
 
std::unique_ptr< SuperBlockPagem_pSuper
 
bool m_bWriteable
 
rtl::Reference< PageData::Allocatorm_xAllocator
 
rtl::Reference< PageCachem_xCache
 
Ace m_ace_head
 

Additional Inherited Members

- Static Public Member Functions inherited from salhelper::SimpleReferenceObject
static void * operator new (std::size_t nSize)
 
static void * operator new (std::size_t nSize, std::nothrow_t const &rNothrow)
 
static void operator delete (void *pPtr)
 
static void operator delete (void *pPtr, std::nothrow_t const &rNothrow)
 
- Protected Attributes inherited from salhelper::SimpleReferenceObject
oslInterlockedCount m_nCount
 

Detailed Description

Definition at line 37 of file storbios.hxx.

Constructor & Destructor Documentation

◆ OStorePageBIOS() [1/2]

OStorePageBIOS::OStorePageBIOS ( )

Definition at line 474 of file storbios.cxx.

◆ ~OStorePageBIOS()

OStorePageBIOS::~OStorePageBIOS ( )
overrideprotectedvirtual

Definition at line 479 of file storbios.cxx.

References cleanup_Impl().

◆ OStorePageBIOS() [2/2]

store::OStorePageBIOS::OStorePageBIOS ( const OStorePageBIOS )
privatedelete

Member Function Documentation

◆ acquirePage()

storeError OStorePageBIOS::acquirePage ( const OStorePageDescriptor rDescr,
storeAccessMode  eMode 
)

◆ allocate()

storeError OStorePageBIOS::allocate ( OStorePageObject rPage)

◆ allocator()

rtl::Reference< PageData::Allocator > & store::OStorePageBIOS::allocator ( )
inline

◆ cleanup_Impl()

void OStorePageBIOS::cleanup_Impl ( )
private

◆ close()

storeError OStorePageBIOS::close ( )

close.

Returns
store_E_None upon success.
Precondition
none.

Definition at line 862 of file storbios.cxx.

References cleanup_Impl(), m_aMutex, and store_E_None.

Referenced by store_closeFile().

◆ flush()

storeError OStorePageBIOS::flush ( )

flush.

Returns
store_E_None upon success.
Precondition
initialized.

Definition at line 877 of file storbios.cxx.

References m_aMutex, m_xLockBytes, and store_E_InvalidAccess.

◆ free()

storeError OStorePageBIOS::free ( sal_uInt32  nAddr)

◆ initialize()

storeError OStorePageBIOS::initialize ( ILockBytes pLockBytes,
storeAccessMode  eAccessMode,
sal_uInt16 &  rnPageSize 
)
virtual

Initialization.

Parameters
pLockBytes[in]
eAccessMode[in]
rnPageSize[inout]
Returns
store_E_None upon success

Reimplemented in store::OStorePageManager.

Definition at line 484 of file storbios.cxx.

References cleanup_Impl(), initialize_Impl(), m_aMutex, and store_E_None.

Referenced by store::OStorePageManager::initialize().

◆ initialize_Impl()

storeError OStorePageBIOS::initialize_Impl ( ILockBytes pLockBytes,
storeAccessMode  eAccessMode,
sal_uInt16 &  rnPageSize 
)
private

◆ isValid()

bool store::OStorePageBIOS::isValid ( ) const
inline

Definition at line 163 of file storbios.hxx.

References m_xLockBytes.

Referenced by store::OStorePageManager::isValid().

◆ isWriteable()

bool store::OStorePageBIOS::isWriteable ( ) const
inline

◆ loadObjectAt()

storeError OStorePageBIOS::loadObjectAt ( OStorePageObject rPage,
sal_uInt32  nAddr 
)

◆ loadObjectAt_Impl()

storeError OStorePageBIOS::loadObjectAt_Impl ( OStorePageObject rPage,
sal_uInt32  nAddr 
) const
private
Precondition
initialized, readable, exclusive access.

Definition at line 796 of file storbios.cxx.

References store::OStorePageObject::clean(), store::OStorePageObject::get(), m_xCache, m_xLockBytes, store_E_None, store_E_NotExists, and store::OStorePageObject::verify().

Referenced by loadObjectAt().

◆ operator osl::Mutex &()

store::OStorePageBIOS::operator osl::Mutex & ( void  ) const
inline

Conversion into Mutex&.

Definition at line 153 of file storbios.hxx.

References m_aMutex.

◆ operator=()

OStorePageBIOS & store::OStorePageBIOS::operator= ( const OStorePageBIOS )
privatedelete

◆ read()

storeError OStorePageBIOS::read ( sal_uInt32  nAddr,
void *  pData,
sal_uInt32  nSize 
) const
Precondition
initialized, exclusive access.

Definition at line 616 of file storbios.cxx.

References m_xLockBytes, pData, and store_E_InvalidAccess.

Referenced by initialize_Impl(), store::SuperBlockPage::unusedHead(), and store::SuperBlockPage::unusedPush().

◆ releasePage()

storeError OStorePageBIOS::releasePage ( const OStorePageDescriptor rDescr)

◆ saveObjectAt()

storeError OStorePageBIOS::saveObjectAt ( OStorePageObject rPage,
sal_uInt32  nAddr 
)

◆ saveObjectAt_Impl()

storeError OStorePageBIOS::saveObjectAt_Impl ( OStorePageObject rPage,
sal_uInt32  nAddr 
) const
private
Precondition
initialized, writeable, exclusive access.

Definition at line 840 of file storbios.cxx.

References store::OStorePageObject::clean(), store::OStorePageObject::get(), store::OStorePageObject::guard(), m_xCache, m_xLockBytes, and store_E_None.

Referenced by allocate(), and saveObjectAt().

◆ write()

storeError OStorePageBIOS::write ( sal_uInt32  nAddr,
const void *  pData,
sal_uInt32  nSize 
) const
Precondition
initialized, writeable, exclusive access.

Definition at line 630 of file storbios.cxx.

References m_bWriteable, m_xLockBytes, pData, store_E_AccessViolation, and store_E_InvalidAccess.

Referenced by store::SuperBlockPage::save(), store::SuperBlockPage::unusedPush(), and store::SuperBlockPage::verify().

Member Data Documentation

◆ m_ace_head

Ace store::OStorePageBIOS::m_ace_head
private

Definition at line 134 of file storbios.hxx.

Referenced by acquirePage(), cleanup_Impl(), and releasePage().

◆ m_aMutex

osl::Mutex store::OStorePageBIOS::m_aMutex
private

◆ m_bWriteable

bool store::OStorePageBIOS::m_bWriteable
private

◆ m_pSuper

std::unique_ptr<SuperBlockPage> store::OStorePageBIOS::m_pSuper
private

Definition at line 106 of file storbios.hxx.

Referenced by allocate(), cleanup_Impl(), free(), and initialize_Impl().

◆ m_xAllocator

rtl::Reference< PageData::Allocator > store::OStorePageBIOS::m_xAllocator
private

Definition at line 110 of file storbios.hxx.

Referenced by allocator(), cleanup_Impl(), and initialize_Impl().

◆ m_xCache

rtl::Reference< PageCache > store::OStorePageBIOS::m_xCache
private

◆ m_xLockBytes

rtl::Reference<ILockBytes> store::OStorePageBIOS::m_xLockBytes
private

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