com.threerings.tudey.config
Class AreaConfig

java.lang.Object
  extended by com.threerings.util.DeepObject
      extended by com.threerings.config.ManagedConfig
          extended by com.threerings.config.ParameterizedConfig
              extended by com.threerings.tudey.config.AreaConfig
All Implemented Interfaces:
ConfigUpdateListener<ManagedConfig>, Exportable, ResourceManager.ModificationObserver, Copyable, Cloneable

public class AreaConfig
extends ParameterizedConfig

The configuration of an area.


Nested Class Summary
static class AreaConfig.Derived
          A derived implementation.
static class AreaConfig.Implementation
          Contains the actual implementation of the area.
static class AreaConfig.Original
          An original implementation.
 
Field Summary
 AreaConfig.Implementation implementation
          The actual area implementation.
static AreaConfig.Original NULL_ORIGINAL
          Used when we can't resolve the area's underlying original implementation.
 
Fields inherited from class com.threerings.config.ParameterizedConfig
_args, _base, _derived, parameters
 
Fields inherited from class com.threerings.config.ManagedConfig
_cfgmgr, _listeners, _name, _updateConfigs, _updateResources
 
Constructor Summary
AreaConfig()
           
 
Method Summary
protected  void fireConfigUpdated()
          Fires a configuration updated event.
 AreaCursor.Implementation getCursorImplementation(TudeyContext ctx, Scope scope, AreaCursor.Implementation impl)
          Creates or updates a cursor implementation for this configuration.
 AreaConfig.Original getOriginal(ConfigManager cfgmgr)
          Returns a reference to the config's underlying original implementation.
 AreaSprite.Implementation getSpriteImplementation(TudeyContext ctx, Scope scope, AreaSprite.Implementation impl)
          Creates or updates a sprite implementation for this configuration.
protected  void getUpdateReferences(ConfigReferenceSet refs)
          Collects all of the references within this config to configs that, when updated, should trigger a call to ManagedConfig.fireConfigUpdated().
 
Methods inherited from class com.threerings.config.ParameterizedConfig
applyArguments, applyArguments, getBound, getInstance, getParameter, getParameter, getReference, maybeFireOnConfigManager, validateOuters, validateReferences, wasUpdated
 
Methods inherited from class com.threerings.config.ManagedConfig
addListener, addUpdateDependencies, clearUpdateDependencies, configUpdated, getConfigManager, getInstance, getInstance, getInstance, getInstance, getName, getUpdateResources, init, removeListener, resourceModified, setName, updateFromSource
 
Methods inherited from class com.threerings.util.DeepObject
clone, copy, copy, equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

NULL_ORIGINAL

public static final AreaConfig.Original NULL_ORIGINAL
Used when we can't resolve the area's underlying original implementation.


implementation

@Editable
public AreaConfig.Implementation implementation
The actual area implementation.

Constructor Detail

AreaConfig

public AreaConfig()
Method Detail

getOriginal

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


getCursorImplementation

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

Parameters:
scope - the area'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 AreaSprite.Implementation getSpriteImplementation(TudeyContext ctx,
                                                         Scope scope,
                                                         AreaSprite.Implementation impl)
Creates or updates a sprite implementation for this configuration.

Parameters:
scope - the area'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.

fireConfigUpdated

protected void fireConfigUpdated()
Description copied from class: ManagedConfig
Fires a configuration updated event.

Overrides:
fireConfigUpdated in class ManagedConfig

getUpdateReferences

protected void getUpdateReferences(ConfigReferenceSet refs)
Description copied from class: ManagedConfig
Collects all of the references within this config to configs that, when updated, should trigger a call to ManagedConfig.fireConfigUpdated().

Overrides:
getUpdateReferences in class ManagedConfig