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 voidm_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 195 of file swcache.hxx.

Constructor & Destructor Documentation

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

Definition at line 230 of file swcache.hxx.

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

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

Definition at line 243 of file swcache.hxx.

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

SwCacheAccess::~SwCacheAccess ( )

Definition at line 490 of file swcache.cxx.

References m_pObj, and SwCacheObj::Unlock().

Member Function Documentation

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

Definition at line 496 of file swcache.cxx.

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

Referenced by Get().

virtual SwCacheObj* SwCacheAccess::NewObj ( )
protectedpure virtual

Can be use in NewObj.

Implemented in SwBorderAttrAccess, SwFntAccess, SwFontAccess, and SwTextLineAccess.

Referenced by Get_().

Member Data Documentation

SwCacheObj* SwCacheAccess::m_pObj
const void* SwCacheAccess::m_pOwner
SwCache& SwCacheAccess::m_rCache

Definition at line 197 of file swcache.hxx.

Referenced by Get_(), and SwCacheAccess().

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