Analytical Perspectives in Game Design


 

All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class bvyy.command.Command

java.lang.Object
   |
   +----java.util.EventObject
           |
           +----bvyy.util.GeneralEvent
                   |
                   +----bvyy.command.Command

public abstract class Command
extends GeneralEvent
All commands are types of general events. This allows them to be transported across the model using the listener interfaces in addition to the RMI and data bus transport.

As you can see the commands closely match the Java beans standard commands and those used by Sun generally inside Java. This is deliberate. There needs to be a 1:1 mapping between these commands and their implementation inside the objects and beans. This will greatly add to readability and reliability.

A command has an ordered set of argument objects. Initially these objects are sent by the user interface. Latter in the processing of the command, these objects are replaced with the actual database objects where the command action is processed.

Version:
0.0.1 27 October 1998
Author:
(c)1998 Brian Voon Yee Yap

Constructor Index

 o Command()
Creates a new command.
 o Command(String)
Creates a new command with a description of S.

Method Index

 o execute(Hashtable)
execure this command.
 o getArguments()
Returns the current command arguments list.
 o setArguments(Hashtable)
Allows replacement of the current command argument list with a new command argument list.

Constructors

 o Command
 public Command()
Creates a new command.

 o Command
 public Command(String S)
Creates a new command with a description of S.

Parameters:
s - the event description.

Methods

 o execute
 public abstract void execute(Hashtable theArguments) throws CommandCompletelyFailedException, CommandPartlyFailedException
execure this command.

Parameters:
arguments - This is a hash table of the arguments.
 o getArguments
 public Hashtable getArguments()
Returns the current command arguments list. The command arguments list is a vector and this allows modification this list using the normal vector functions.

For example: comand.getArguments.addElement(ArgumentX);

See Also:
vector
 o setArguments
 public void setArguments(Hashtable newArguments)
Allows replacement of the current command argument list with a new command argument list. All current arguments are lost.

Note: The command comes with it's own command srgument list so it will not normally be necessary to call this function.

It a null command srgument list is supplied it will be ignored.

Parameters:
newArguments - the list that replaces the current list.

All Packages  Class Hierarchy  This Package  Previous  Next  Index

22/11/99

 


See also: [Role Playing Games] [Game Engine]
© 1998, 1999 Brian Yap. These pages are available under the GNU licence.