#include <gr_CharWidthsCache.h>
Public Types | |
| enum | { CACHE_FONT_SIZE = 120 } |
Static Public Member Functions | |
| static GR_CharWidthsCache * | getCharWidthCache () |
| static void | destroyCharWidthsCache () |
Protected Member Functions | |
| bool | addFont (const GR_Font *pFont) |
| GR_CharWidths * | getWidthsForFont (const GR_Font *pFont) |
Private Member Functions | |
| GR_CharWidthsCache () | |
| ~GR_CharWidthsCache () | |
Static Private Member Functions | |
| static void | _instantiate (void) |
Private Attributes | |
| UT_GenericStringMap < GR_CharWidths * > * | m_pFontHash |
Static Private Attributes | |
| static GR_CharWidthsCache * | s_pInstance = NULL |
Friends | |
| class | GR_Font |
| GR_CharWidthsCache::GR_CharWidthsCache | ( | ) | [private] |
| GR_CharWidthsCache::~GR_CharWidthsCache | ( | ) | [private] |
References DELETEP, m_pFontHash, and UT_GenericStringMap< T >::purgeData().
| void GR_CharWidthsCache::_instantiate | ( | void | ) | [static, private] |
Instanciate the singleton instance.
References s_pInstance.
| bool GR_CharWidthsCache::addFont | ( | const GR_Font * | pFont | ) | [protected] |
References DELETEP, GR_Font::hashKey(), UT_GenericStringMap< T >::insert(), m_pFontHash, GR_Font::newFontWidths(), and UT_DEBUGMSG.
Referenced by getWidthsForFont().
| static void GR_CharWidthsCache::destroyCharWidthsCache | ( | ) | [inline, static] |
Referenced by XAP_App::~XAP_App().
| static GR_CharWidthsCache* GR_CharWidthsCache::getCharWidthCache | ( | ) | [inline, static] |
Get the singleton instance for the class. Instantiate it if needed.
Referenced by GR_Font::getCharWidthFromCache().
| GR_CharWidths * GR_CharWidthsCache::getWidthsForFont | ( | const GR_Font * | pFont | ) | [protected] |
Return the char Width for the font
References addFont(), UT_String::c_str(), GR_Font::hashKey(), m_pFontHash, UT_GenericStringMap< T >::pick(), UT_ASSERT, and UT_DEBUGMSG.
Referenced by GR_Font::getCharWidthFromCache().
friend class GR_Font [friend] |
The font hash that contains the GR_CharWidths
Referenced by addFont(), getWidthsForFont(), and ~GR_CharWidthsCache().
GR_CharWidthsCache * GR_CharWidthsCache::s_pInstance = NULL [static, private] |
The singleton instance.
Referenced by _instantiate().
1.7.1