Back to index

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

#include <CharCodeToUnicode.h>

Collaboration diagram for CharCodeToUnicodeCache:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 CharCodeToUnicodeCache (int sizeA)
 ~CharCodeToUnicodeCache ()
CharCodeToUnicodegetCharCodeToUnicode (GString *tag)
void add (CharCodeToUnicode *ctu)

Private Attributes

CharCodeToUnicode ** cache
int size

Detailed Description

Definition at line 93 of file CharCodeToUnicode.h.


Constructor & Destructor Documentation

Definition at line 479 of file CharCodeToUnicode.cc.

                                                        {
  int i;

  size = sizeA;
  cache = (CharCodeToUnicode **)gmalloc(size * sizeof(CharCodeToUnicode *));
  for (i = 0; i < size; ++i) {
    cache[i] = NULL;
  }
}

Here is the call graph for this function:

Definition at line 489 of file CharCodeToUnicode.cc.

                                                {
  int i;

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

Here is the call graph for this function:


Member Function Documentation

Definition at line 522 of file CharCodeToUnicode.cc.

                                                       {
  int i;

  if (cache[size - 1]) {
    cache[size - 1]->decRefCnt();
  }
  for (i = size - 1; i >= 1; --i) {
    cache[i] = cache[i - 1];
  }
  cache[0] = ctu;
  ctu->incRefCnt();
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 500 of file CharCodeToUnicode.cc.

                                                                            {
  CharCodeToUnicode *ctu;
  int i, j;

  if (cache[0] && cache[0]->match(tag)) {
    cache[0]->incRefCnt();
    return cache[0];
  }
  for (i = 1; i < size; ++i) {
    if (cache[i] && cache[i]->match(tag)) {
      ctu = cache[i];
      for (j = i; j >= 1; --j) {
       cache[j] = cache[j - 1];
      }
      cache[0] = ctu;
      ctu->incRefCnt();
      return ctu;
    }
  }
  return NULL;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 109 of file CharCodeToUnicode.h.

Definition at line 110 of file CharCodeToUnicode.h.


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