CTmTextFontCache Class Reference

class CTmTextFontCache
Public Member Functions
voidClose()
CFont &Font()
CTmTextFontCache *New(MGraphicsDeviceMap &, CFont &)
voidOpen()
Private Member Functions
CTmTextFontCache(MGraphicsDeviceMap &, CFont &)
~CTmTextFontCache()
Private Attributes
MGraphicsDeviceMap &iDevice
CFont &iFont
TInt iRefCount

Constructor & Destructor Documentation

CTmTextFontCache(MGraphicsDeviceMap &, CFont &)

CTmTextFontCache(MGraphicsDeviceMap &aDevice,
CFont &aFont
)[private, inline]

Parameters

MGraphicsDeviceMap & aDevice
CFont & aFont

~CTmTextFontCache()

~CTmTextFontCache()[private, inline]

Member Functions Documentation

Close()

voidClose()[inline]

This should be called when the font is no longer used. The font is released when all references have been closed.

Font()

CFont &Font()[inline]

New(MGraphicsDeviceMap &, CFont &)

CTmTextFontCache *New(MGraphicsDeviceMap &aDevice,
CFont &aFont
)[static, inline]

The constructor is protected by a New here not because there is a 2 stage constructor, but to enforce that this object should be allocated on the heap, so that 'delete this' works This reference counting is required because this object can be deleted by either (1) a client of RTmTextCache when it is finished using a font, or (2) by the RTmTextCache itself, when the font in the cache is replaced

Parameters

MGraphicsDeviceMap & aDevice
CFont & aFont

Open()

voidOpen()[inline]

This should be called before the font is retrieved and used Open does not need to be called by the creator of the font (the reference count is initialized to 1)

Member Data Documentation

MGraphicsDeviceMap & iDevice

MGraphicsDeviceMap &iDevice[private]

CFont & iFont

CFont &iFont[private]

TInt iRefCount

TInt iRefCount[private]