Analytical Perspectives in Game Design


 

All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class bvyy.database.Thing

java.lang.Object
   |
   +----bvyy.database.Thing

public class Thing
extends Object
implements Serializable
A Thing is the base data object within the game. It is provided to allow limited loads for database access. When a Thnig is loaded, no children are loaded. Similarly, a Thing has a Database ID. This allows it to be retreived by the database functions.

Version:
0.0.2 6 December 1998
Author:
(c) 1998 Brian Voon Yee Yap

Constructor Index

 o Thing()

Method Index

 o disassemble()
Call this method to get a thing to disassemble itself.
 o disassemble(Thing)
Called by a contained thing to actually perform the disassemble funciton.
 o getDatastoreID()
Returns the datastoreID for this object.
 o getName()
Returns the name of this thing.
 o getQuantity()
Returns the number of things represented by this object.
 o load()
Returns the fully loaded object.
 o setDatastoreID(dbID)
Sets the data store id to the new ID.
 o setName(String)
Changes the name for this thing.
 o setQuantity(Long)
Sets how many real-world objects are represented by this one object.
 o unload()
Returns the fully unloaded object.

Constructors

 o Thing
 public Thing()

Methods

 o getDatastoreID
 public dbID getDatastoreID()
Returns the datastoreID for this object.

Returns:
the datastoreID for this object.
 o setDatastoreID
 public void setDatastoreID(dbID newDatastoreID)
Sets the data store id to the new ID.

Parameters:
newDatastoreID - the new ID.
 o setName
 public void setName(String newName)
Changes the name for this thing. Note that the name is a propoer noun.

Parameters:
newName - the new name for this thing.
 o getName
 public String getName()
Returns the name of this thing.

Returns:
the name of this thing.
 o setQuantity
 public void setQuantity(Long newQuantity)
Sets how many real-world objects are represented by this one object.

Parameters:
newQuantity - the new number of things
 o getQuantity
 public Long getQuantity()
Returns the number of things represented by this object.

Returns:
the number of things represented by this object.
 o load
 public RealThing load()
Returns the fully loaded object. Needs a factory class??? Does not extend well to the sub-classes.

Returns:
the fully loaded object.
 o unload
 public Thing unload()
Returns the fully unloaded object.

Returns:
the fully unloaded object.
 o disassemble
 public void disassemble()
Call this method to get a thing to disassemble itself.

 o disassemble
 public void disassemble(Thing theThing)
Called by a contained thing to actually perform the disassemble funciton.

Parameters:
theThing - the thing that is being disassembled.

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.