Public Types | Static Public Member Functions | Protected Types | Protected Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | Friends

GR_CharWidthsCache Class Reference

#include <gr_CharWidthsCache.h>

List of all members.

Public Types

enum  { CACHE_FONT_SIZE = 120 }

Static Public Member Functions

static GR_CharWidthsCachegetCharWidthCache ()
static void destroyCharWidthsCache ()

Protected Types

typedef std::map< std::string,
GR_CharWidths * > 
FontCache

Protected Member Functions

FontCache::iterator addFont (const GR_Font *pFont)
GR_CharWidthsgetWidthsForFont (const GR_Font *pFont)

Private Member Functions

 GR_CharWidthsCache ()
 ~GR_CharWidthsCache ()

Static Private Member Functions

static void _instantiate (void)

Private Attributes

FontCache m_fontHash

Static Private Attributes

static GR_CharWidthsCaches_pInstance = NULL

Friends

class GR_Font

Member Typedef Documentation

typedef std::map<std::string, GR_CharWidths*> GR_CharWidthsCache::FontCache [protected]

Member Enumeration Documentation

anonymous enum
Enumerator:
CACHE_FONT_SIZE 

Constructor & Destructor Documentation

GR_CharWidthsCache::GR_CharWidthsCache (  )  [private]
GR_CharWidthsCache::~GR_CharWidthsCache (  )  [private]

Member Function Documentation

void GR_CharWidthsCache::_instantiate ( void   )  [static, private]

Instanciate the singleton instance.

References s_pInstance.

GR_CharWidthsCache::FontCache::iterator GR_CharWidthsCache::addFont ( const GR_Font pFont  )  [protected]
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(), GR_Font::hashKey(), m_fontHash, and UT_DEBUGMSG.

Referenced by GR_Font::getCharWidthFromCache().


Friends And Related Function Documentation

friend class GR_Font [friend]

Member Data Documentation

The font hash that contains the GR_CharWidths

Referenced by addFont(), getWidthsForFont(), and ~GR_CharWidthsCache().

The singleton instance.

Referenced by _instantiate().


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