Back to index

tetex-bin  3.0
Public Member Functions | Private Attributes
UnicodeMapCache Class Reference

#include <UnicodeMap.h>

Collaboration diagram for UnicodeMapCache:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 UnicodeMapCache ()
 ~UnicodeMapCache ()
UnicodeMapgetUnicodeMap (GString *encodingName)

Private Attributes

UnicodeMapcache [unicodeMapCacheSize]

Detailed Description

Definition at line 107 of file UnicodeMap.h.


Constructor & Destructor Documentation

Definition at line 244 of file UnicodeMap.cc.

                                 {
  int i;

  for (i = 0; i < unicodeMapCacheSize; ++i) {
    cache[i] = NULL;
  }
}

Definition at line 252 of file UnicodeMap.cc.

                                  {
  int i;

  for (i = 0; i < unicodeMapCacheSize; ++i) {
    if (cache[i]) {
      cache[i]->decRefCnt();
    }
  }
}

Here is the call graph for this function:


Member Function Documentation

Definition at line 262 of file UnicodeMap.cc.

                                                                {
  UnicodeMap *map;
  int i, j;

  if (cache[0] && cache[0]->match(encodingName)) {
    cache[0]->incRefCnt();
    return cache[0];
  }
  for (i = 1; i < unicodeMapCacheSize; ++i) {
    if (cache[i] && cache[i]->match(encodingName)) {
      map = cache[i];
      for (j = i; j >= 1; --j) {
       cache[j] = cache[j - 1];
      }
      cache[0] = map;
      map->incRefCnt();
      return map;
    }
  }
  if ((map = UnicodeMap::parse(encodingName))) {
    if (cache[unicodeMapCacheSize - 1]) {
      cache[unicodeMapCacheSize - 1]->decRefCnt();
    }
    for (j = unicodeMapCacheSize - 1; j >= 1; --j) {
      cache[j] = cache[j - 1];
    }
    cache[0] = map;
    map->incRefCnt();
    return map;
  }
  return NULL;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 120 of file UnicodeMap.h.


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