LibreOffice Module sw (master) 1
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
SwCacheAccess Class Referenceabstract

Access class for the Cache. More...

#include <swcache.hxx>

Inheritance diagram for SwCacheAccess:
Collaboration diagram for SwCacheAccess:

Public Member Functions

virtual ~SwCacheAccess ()

Protected Member Functions

virtual SwCacheObjNewObj ()=0
 Can be use in NewObj. More...
SwCacheObjGet (bool isDuplicateOwnerAllowed)
 SwCacheAccess (SwCache &rCache, const void *pOwner, bool bSeek)
 SwCacheAccess (SwCache &rCache, const void *nCacheId, const sal_uInt16 nIndex)

Protected Attributes

const void * m_pOwner

Private Member Functions

void Get_ (bool isDuplicateOwnerAllowed)

Private Attributes


Detailed Description

Access class for the Cache.

The Cache object is created in the ctor. If the Cache does not return one, the member is set to 0 and one is created on the Get() and added to the Cache (if possible). Cache users must derive a class from SwCacheAccess in order to guarantee type safety. The base class should always be called for the Get(). A derived Get() should only ever guarantee type safety. Cache objects are always locked for the instance's life time.

Definition at line 197 of file swcache.hxx.

Constructor & Destructor Documentation

◆ SwCacheAccess() [1/2]

SwCacheAccess::SwCacheAccess ( SwCache rCache,
const void *  pOwner,
bool  bSeek 

Definition at line 232 of file swcache.hxx.

References SwCache::Get(), SwCacheObj::Lock(), m_pObj, m_pOwner, m_pOwner, and m_rCache.

◆ SwCacheAccess() [2/2]

SwCacheAccess::SwCacheAccess ( SwCache rCache,
const void *  nCacheId,
const sal_uInt16  nIndex 

Definition at line 245 of file swcache.hxx.

References SwCache::Get(), SwCacheObj::Lock(), m_pObj, m_pOwner, m_pOwner, m_rCache, and nIndex.

◆ ~SwCacheAccess()

SwCacheAccess::~SwCacheAccess ( )

Definition at line 484 of file swcache.cxx.

References m_pObj, and SwCacheObj::Unlock().

Member Function Documentation

◆ Get()

SwCacheObj * SwCacheAccess::Get ( bool  isDuplicateOwnerAllowed = true)

◆ Get_()

void SwCacheAccess::Get_ ( bool  isDuplicateOwnerAllowed)

Definition at line 490 of file swcache.cxx.

References SwCache::Insert(), SwCacheObj::Lock(), m_pObj, m_rCache, and NewObj().

Referenced by Get().

◆ NewObj()

virtual SwCacheObj * SwCacheAccess::NewObj ( )
protectedpure virtual

Can be use in NewObj.

Implemented in SwFntAccess, SwBorderAttrAccess, SwFontAccess, and SwTextLineAccess.

Referenced by Get_().

Member Data Documentation

◆ m_pObj

SwCacheObj* SwCacheAccess::m_pObj

◆ m_pOwner

const void* SwCacheAccess::m_pOwner

◆ m_rCache

SwCache& SwCacheAccess::m_rCache

Definition at line 199 of file swcache.hxx.

Referenced by Get_(), and SwCacheAccess().

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