Crossfire JXClient, Trunk  R20561
com.realtime.crossfire.jxclient.faces.FaceCache Class Reference

A cache for Face instances. More...

+ Collaboration diagram for com.realtime.crossfire.jxclient.faces.FaceCache:

Public Member Functions

void addFace (@NotNull final Face face)
 Adds a new face to the cache. More...
 
void addFace (final int faceNum, final int faceSetNum, final int faceChecksum, @NotNull final String faceName)
 Adds a new face. More...
 
 FaceCache ()
 Creates a new instance. More...
 
Face getFace (final int faceNum)
 Returns a face by face id. More...
 
void reset ()
 Forgets about all face information. More...
 

Private Attributes

final Face [] faces = new Face[65536]
 The cached faces. More...
 

Detailed Description

A cache for Face instances.

Author
Andreas Kirschbaum

Definition at line 31 of file FaceCache.java.

Constructor & Destructor Documentation

◆ FaceCache()

com.realtime.crossfire.jxclient.faces.FaceCache.FaceCache ( )

Creates a new instance.

Definition at line 42 of file FaceCache.java.

Member Function Documentation

◆ addFace() [1/2]

void com.realtime.crossfire.jxclient.faces.FaceCache.addFace ( @NotNull final Face  face)

Adds a new face to the cache.

Parameters
facethe face to add

Definition at line 50 of file FaceCache.java.

Referenced by com.realtime.crossfire.jxclient.server.crossfire.AbstractCrossfireServerConnection.fireFaceReceived().

+ Here is the caller graph for this function:

◆ addFace() [2/2]

void com.realtime.crossfire.jxclient.faces.FaceCache.addFace ( final int  faceNum,
final int  faceSetNum,
final int  faceChecksum,
@NotNull final String  faceName 
)

Adds a new face.

Parameters
faceNumthe face ID
faceSetNumthe face set
faceChecksumthe face checksum
faceNamethe face name

Definition at line 87 of file FaceCache.java.

◆ getFace()

Face com.realtime.crossfire.jxclient.faces.FaceCache.getFace ( final int  faceNum)

Returns a face by face id.

Parameters
faceNumthe face id to look up
Returns
the face

Definition at line 60 of file FaceCache.java.

Referenced by com.realtime.crossfire.jxclient.faces.AbstractFacesManager.getFace(), com.realtime.crossfire.jxclient.faces.AbstractFacesManager.getFace2(), and com.realtime.crossfire.jxclient.faces.AbstractFacesManager.lookupFace().

+ Here is the caller graph for this function:

◆ reset()

void com.realtime.crossfire.jxclient.faces.FaceCache.reset ( )

Forgets about all face information.

Should be called when connecting to a Crossfire server.

Definition at line 75 of file FaceCache.java.

Referenced by com.realtime.crossfire.jxclient.faces.AbstractFacesManager.reset().

+ Here is the caller graph for this function:

Member Data Documentation

◆ faces

final Face [] com.realtime.crossfire.jxclient.faces.FaceCache.faces = new Face[65536]
private

The cached faces.

Empty slots are set to

null

.

Definition at line 37 of file FaceCache.java.


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