com.threerings.tudey.config
Class TileConfig.Implementation

java.lang.Object
  extended by com.threerings.util.DeepObject
      extended by com.threerings.tudey.config.TileConfig.Implementation
All Implemented Interfaces:
Exportable, Copyable, Cloneable
Direct Known Subclasses:
TileConfig.Derived, TileConfig.Original
Enclosing class:
TileConfig

@EditorTypes(value={TileConfig.Original.class,TileConfig.Derived.class})
public abstract static class TileConfig.Implementation
extends DeepObject
implements Exportable

Contains the actual implementation of the tile.


Constructor Summary
TileConfig.Implementation()
           
 
Method Summary
abstract  TileCursor.Implementation getCursorImplementation(TudeyContext ctx, Scope scope, TileCursor.Implementation impl)
          Creates or updates a cursor implementation for this configuration.
abstract  TileConfig.Original getOriginal(ConfigManager cfgmgr)
          Returns a reference to the config's underlying original implementation.
abstract  TileSprite.Implementation getSpriteImplementation(TudeyContext ctx, Scope scope, TileSprite.Implementation impl)
          Creates or updates a sprite implementation for this configuration.
 void getUpdateReferences(ConfigReferenceSet refs)
          Adds the implementation's update references to the provided set.
 void invalidate()
          Invalidates any cached data.
 
Methods inherited from class com.threerings.util.DeepObject
clone, copy, copy, equals, hashCode, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TileConfig.Implementation

public TileConfig.Implementation()
Method Detail

getUpdateReferences

public void getUpdateReferences(ConfigReferenceSet refs)
Adds the implementation's update references to the provided set.


getOriginal

public abstract TileConfig.Original getOriginal(ConfigManager cfgmgr)
Returns a reference to the config's underlying original implementation.


getCursorImplementation

public abstract TileCursor.Implementation getCursorImplementation(TudeyContext ctx,
                                                                  Scope scope,
                                                                  TileCursor.Implementation impl)
Creates or updates a cursor implementation for this configuration.

Parameters:
scope - the tile's expression scope.
impl - an existing implementation to reuse, if possible.
Returns:
either a reference to the existing implementation (if reused), a new implementation, or null if no implementation could be created.

getSpriteImplementation

public abstract TileSprite.Implementation getSpriteImplementation(TudeyContext ctx,
                                                                  Scope scope,
                                                                  TileSprite.Implementation impl)
Creates or updates a sprite implementation for this configuration.

Parameters:
scope - the tile's expression scope.
impl - an existing implementation to reuse, if possible.
Returns:
either a reference to the existing implementation (if reused), a new implementation, or null if no implementation could be created.

invalidate

public void invalidate()
Invalidates any cached data.



Copyright © 2011. All Rights Reserved.