org.mega.gasp.moods
Interface CustomTypes


public interface CustomTypes

When the game programmer wants to use his custom types classes, first he must describe his custom types in the types.xml with the correct syntax. Then he must run the custom types generator in org.mega.moods package with the command line: MoodsGenerator types.xml packageName The generator generate a file CustomTypes.java that is the encoder/decoder of the game custom types.

Author:
PELLERIN Romain (pellerin@cnam.fr) - MEGA Project

Method Summary
 java.util.Hashtable decodeData(java.io.DataInputStream dis)
          Decode the game custom types objects read in the data input stream and returns the associated objects hashtable.
 void encodeData(java.util.Hashtable h, java.io.DataOutputStream dos)
          Encode the hashtable of game custom types objects on the given data output stream.
 

Method Detail

encodeData

public void encodeData(java.util.Hashtable h,
                       java.io.DataOutputStream dos)
                throws java.lang.Exception
Encode the hashtable of game custom types objects on the given data output stream.

Parameters:
h -
dos -
Throws:
java.lang.Exception

decodeData

public java.util.Hashtable decodeData(java.io.DataInputStream dis)
                               throws java.lang.Exception
Decode the game custom types objects read in the data input stream and returns the associated objects hashtable.

Parameters:
dis -
Returns:
the game custom objects hashtable
Throws:
java.lang.Exception