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:
[legend]
Collaboration diagram for SwCacheAccess:
[legend]

Public Member Functions

virtual ~SwCacheAccess ()
 
bool IsAvail () const
 Shorthand for those who know that they did not override isAvailable() FIXME: wtf? More...
 

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

SwCacheObjm_pObj
 
const voidm_pOwner
 

Private Member Functions

void Get_ (bool isDuplicateOwnerAllowed)
 

Private Attributes

SwCachem_rCache
 

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 derrive a class from SwCacheAccess in order to guarantee type safety. The base class should always be called for the Get(). A derrived Get() should only ever guarantee type safety. Cache objects are always locked for the instance's life time.

Definition at line 194 of file swcache.hxx.

Constructor & Destructor Documentation

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

Definition at line 233 of file swcache.hxx.

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

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

Definition at line 242 of file swcache.hxx.

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

SwCacheAccess::~SwCacheAccess ( )
virtual

Definition at line 491 of file swcache.cxx.

References m_pObj, and SwCacheObj::Unlock().

Member Function Documentation

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

Definition at line 497 of file swcache.cxx.

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

Referenced by Get().

bool SwCacheAccess::IsAvail ( ) const
inline

Shorthand for those who know that they did not override isAvailable() FIXME: wtf?

Definition at line 216 of file swcache.hxx.

Referenced by SwFntAccess::SwFntAccess().

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
protected
const void* SwCacheAccess::m_pOwner
protected
SwCache& SwCacheAccess::m_rCache
private

Definition at line 196 of file swcache.hxx.

Referenced by Get_(), and SwCacheAccess().


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