C# Class OpenStory.Common.PacketCodeTable

Represents a lookup table for packet op codes and labels.
Inheritance: IPacketCodeTable
Datei anzeigen Open project: shoftee/OpenStory

Public Methods

Method Description
GetIncomingLabel ( ushort code ) : string
GetOutgoingCode ( string label ) : ushort
LoadPacketCodes ( ) : void

Loads the op code information for this instance of PacketCodeTable.

TryGetIncomingLabel ( ushort code, string &label ) : bool
TryGetOutgoingCode ( string label, ushort &code ) : bool

Protected Methods

Method Description
AddIncoming ( ushort code, string label ) : bool

Adds an entry to the incoming packet information list.

AddOutgoing ( string label, ushort code ) : bool

Adds an entry to the outgoing packet information list.

LoadPacketCodesInternal ( ) : void

This is a hook to the end of the LoadPacketCodes method.

PacketCodeTable ( ) : System

Initializes a new instance of the PacketCodeTable class.

Method Details

AddIncoming() protected method

Adds an entry to the incoming packet information list.
/// Thrown if is . /// /// Thrown if is the empty string. ///
protected AddIncoming ( ushort code, string label ) : bool
code ushort The packet code pf the incoming packet.
label string The label for the incoming packet.
return bool

AddOutgoing() protected method

Adds an entry to the outgoing packet information list.
/// Thrown if is . /// /// Thrown if is the empty string. ///
protected AddOutgoing ( string label, ushort code ) : bool
label string The label for the outgoing packet.
code ushort The packet code of the outgoing packet.
return bool

GetIncomingLabel() public method

public GetIncomingLabel ( ushort code ) : string
code ushort
return string

GetOutgoingCode() public method

/// Thrown if is . /// /// Thrown if is the empty string. ///
public GetOutgoingCode ( string label ) : ushort
label string
return ushort

LoadPacketCodes() public method

Loads the op code information for this instance of PacketCodeTable.
public LoadPacketCodes ( ) : void
return void

LoadPacketCodesInternal() protected abstract method

This is a hook to the end of the LoadPacketCodes method.
protected abstract LoadPacketCodesInternal ( ) : void
return void

PacketCodeTable() protected method

Initializes a new instance of the PacketCodeTable class.
protected PacketCodeTable ( ) : System
return System

TryGetIncomingLabel() public method

public TryGetIncomingLabel ( ushort code, string &label ) : bool
code ushort
label string
return bool

TryGetOutgoingCode() public method

/// Thrown if is . /// /// Thrown if is the empty string. ///
public TryGetOutgoingCode ( string label, ushort &code ) : bool
label string
code ushort
return bool