com.threerings.tudey.server.logic
Class ExpressionLogic

java.lang.Object
  extended by com.threerings.util.ShallowObject
      extended by com.threerings.tudey.server.logic.Logic
          extended by com.threerings.tudey.server.logic.ExpressionLogic
Direct Known Subclasses:
ExpressionLogic.BinaryOperation, ExpressionLogic.Constant, ExpressionLogic.NumTargets, ExpressionLogic.Parsed, ExpressionLogic.Previous, ExpressionLogic.Reference, ExpressionLogic.UnaryOperation

public abstract class ExpressionLogic
extends Logic

Handles the server-side expression evaluation.


Nested Class Summary
static class ExpressionLogic.Add
          Evaluates an add expression.
static class ExpressionLogic.And
          Evaluates a logical AND expression.
static class ExpressionLogic.BinaryOperation
          Base class for the binary operations.
static class ExpressionLogic.Constant
          Evaluates a constant expression.
static class ExpressionLogic.Decrement
          Evaluates a decrement expression.
static class ExpressionLogic.Divide
          Evaluates an add expression.
static class ExpressionLogic.Equals
          Evaluates an equal to expression.
static class ExpressionLogic.Greater
          Evaluates a greater than expression.
static class ExpressionLogic.GreaterEquals
          Evaluates a greater than or equal to expression.
static class ExpressionLogic.Increment
          Evaluates an increment expression.
static class ExpressionLogic.Less
          Evaluates a less than expression.
static class ExpressionLogic.LessEquals
          Evaluates a less than or equal to expression.
static class ExpressionLogic.Multiply
          Evaluates an add expression.
static class ExpressionLogic.Negate
          Evaluates a negate expression.
static class ExpressionLogic.Not
          Evaluates a logical NOT expression.
static class ExpressionLogic.NumTargets
          Evaluates a num targets expression.
static class ExpressionLogic.Or
          Evaluates a logical OR expression.
static class ExpressionLogic.Parsed
          Evaluates a parsed expression.
static class ExpressionLogic.Previous
          Evaluates a constant expression.
static class ExpressionLogic.Reference
          Evaluates a reference expression.
static class ExpressionLogic.Remainder
          Evaluates an add expression.
static class ExpressionLogic.Subtract
          Evaluates an add expression.
static class ExpressionLogic.UnaryOperation
          Base class for unary operations.
static class ExpressionLogic.Xor
          Evaluates a logical XOR expression.
 
Nested classes/interfaces inherited from class com.threerings.tudey.server.logic.Logic
Logic.ShapeObserver
 
Constructor Summary
ExpressionLogic()
           
 
Method Summary
abstract  Object evaluate(Logic activator, Object previous)
          Evaluates the expression.
 EntityKey getEntityKey()
          Returns the entity key for this logic, if any.
 float getRotation()
          Returns the rotation of this logic for the purpose of spawning actors, etc.
 Vector2f getTranslation()
          Returns the translation of this logic for the purpose of spawning actors, etc.
 void init(TudeySceneManager scenemgr, ExpressionConfig config, Logic source)
          Initializes the logic.
 boolean isActive()
          Determines whether this logic object is still active in the scene.
 
Methods inherited from class com.threerings.tudey.server.logic.Logic
addShapeObserver, getModel, getPatrolPath, getSceneManager, getShape, getTags, getTransform, getTransform, getVariable, init, isDefaultEntrance, isVisible, removeShapeObserver, request, resolveTarget, setVariable, signal, transfer
 
Methods inherited from class com.threerings.util.ShallowObject
equals, hashCode
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExpressionLogic

public ExpressionLogic()
Method Detail

init

public void init(TudeySceneManager scenemgr,
                 ExpressionConfig config,
                 Logic source)
Initializes the logic.


evaluate

public abstract Object evaluate(Logic activator,
                                Object previous)
Evaluates the expression.


isActive

public boolean isActive()
Description copied from class: Logic
Determines whether this logic object is still active in the scene.

Overrides:
isActive in class Logic

getEntityKey

public EntityKey getEntityKey()
Description copied from class: Logic
Returns the entity key for this logic, if any.

Overrides:
getEntityKey in class Logic

getTranslation

public Vector2f getTranslation()
Description copied from class: Logic
Returns the translation of this logic for the purpose of spawning actors, etc.

Overrides:
getTranslation in class Logic

getRotation

public float getRotation()
Description copied from class: Logic
Returns the rotation of this logic for the purpose of spawning actors, etc.

Overrides:
getRotation in class Logic


Copyright © 2011. All Rights Reserved.