Crossfire JXClient, Trunk
Public Member Functions | Private Attributes | List of all members
com.realtime.crossfire.jxclient.faces.FaceCache Class Reference
Collaboration diagram for com.realtime.crossfire.jxclient.faces.FaceCache:
Collaboration graph

Public Member Functions

void addFace (@NotNull final Face face)
 
void addFace (final int faceNum, final int faceSetNum, final int faceChecksum, @NotNull final String faceName)
 
 FaceCache ()
 
Face getFace (final int faceNum)
 
void reset ()
 

Private Attributes

final Face[] faces = new Face[65536]
 

Detailed Description

A cache for Face instances.

Author
Andreas Kirschbaum

Definition at line 33 of file FaceCache.java.

Constructor & Destructor Documentation

◆ FaceCache()

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

Creates a new instance.

Definition at line 44 of file FaceCache.java.

References com.realtime.crossfire.jxclient.faces.FaceCache.faces.

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 52 of file FaceCache.java.

References com.realtime.crossfire.jxclient.faces.FaceCache.faces.

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 89 of file FaceCache.java.

References com.realtime.crossfire.jxclient.faces.FaceCache.faces.

◆ 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 62 of file FaceCache.java.

References com.realtime.crossfire.jxclient.faces.FaceCache.faces.

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 77 of file FaceCache.java.

References com.realtime.crossfire.jxclient.faces.FaceCache.faces.

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 documentation for this class was generated from the following file: