Class Index | File Index

Classes


Class com.jiffeegames.Priorities

A Priorities object keeps track of named priority levels, especially their order.
Defined in: jiffee-priorities.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Create an empty Priorities object.
Method Summary
Method Attributes Method Name and Description
 
add(before, after)
Add a new name to the list of priorities that may be used, and make it come before or after an existing priority.
 
init(locate, language)
 
resolve(str)
Resolve a priority into its value.
 
Freeze the set of strings that may be used as priorities, by not allowing any more add() calls.
Class Detail
com.jiffeegames.Priorities()
Create an empty Priorities object. The normal call is
var priority = new com.jiffeegames.Priorities();
Method Detail
{void} add(before, after)
Add a new name to the list of priorities that may be used, and make it come before or after an existing priority. Exactly one of "before" and "after" should already be defined. The one which is not defined will be ordered before or after the one that is already defined. The priority "normal" is already defined and acts as the base for all others.
Parameters:
{String} before
The priority which comes first.
{String} after
The priority which comes second.

init(locate, language)
Parameters:
locate
language

{String or integer} resolve(str)
Resolve a priority into its value.
Parameters:
{String} str
The name of the priority to be resolved.
Returns:
The original string (before priorities are started), or an integer that is guaranteed not to change (after priorities are started).

{void} start()
Freeze the set of strings that may be used as priorities, by not allowing any more add() calls. This lets all priorities be resolved into integers that are guaranteed not to change.

Documentation generated by JsDoc Toolkit 2.3.2 on Sun Jul 25 2010 13:49:31 GMT-0700 (PDT)