com.threerings.config
Class ParameterizedConfig

java.lang.Object
  extended by com.threerings.util.DeepObject
      extended by com.threerings.config.ManagedConfig
          extended by com.threerings.config.ParameterizedConfig
All Implemented Interfaces:
ConfigUpdateListener<ManagedConfig>, Exportable, com.threerings.resource.ResourceManager.ModificationObserver, Copyable, Cloneable
Direct Known Subclasses:
ActorConfig, AnimationConfig, AreaConfig, BehaviorConfig, BoundConfig, EffectConfig, MaterialConfig, ModelConfig, PaintableConfig, PathConfig, PlaceableConfig, SceneGlobalConfig, ShaderConfig, SounderConfig, StyleConfig, TextureConfig, TileConfig, UserInterfaceConfig

public class ParameterizedConfig
extends ManagedConfig

A configuration that may include a number of parameters to be configured when the configuration is referenced.


Field Summary
 Parameter[] parameters
          The parameters of the configuration.
 
Constructor Summary
ParameterizedConfig()
           
 
Method Summary
 ParameterizedConfig getInstance(Scope scope, ArgumentMap args)
          Returns the derived instance in the specified scope with the supplied arguments.
 Parameter getParameter(String name)
          Returns a reference to the parameter with the supplied name, or null if it doesn't exist.
 ConfigReference<? extends ManagedConfig> getReference()
          Returns a reference to this configuration based on its name and arguments.
 void validateOuters(String where)
          Validates the outer object references in this config.
 boolean validateReferences(String where, PrintStream out)
          Validates the references in this config.
 void wasUpdated()
          Notes that this configuration has been updated.
 
Methods inherited from class com.threerings.config.ManagedConfig
addListener, configUpdated, getConfigManager, getInstance, getInstance, getInstance, getInstance, getName, 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
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

parameters

@Editable(weight=1.0)
public Parameter[] parameters
The parameters of the configuration.

Constructor Detail

ParameterizedConfig

public ParameterizedConfig()
Method Detail

getParameter

public Parameter getParameter(String name)
Returns a reference to the parameter with the supplied name, or null if it doesn't exist.


getReference

public ConfigReference<? extends ManagedConfig> getReference()
Description copied from class: ManagedConfig
Returns a reference to this configuration based on its name and arguments.

Overrides:
getReference in class ManagedConfig

getInstance

public ParameterizedConfig getInstance(Scope scope,
                                       ArgumentMap args)
Description copied from class: ManagedConfig
Returns the derived instance in the specified scope with the supplied arguments.

Overrides:
getInstance in class ManagedConfig

wasUpdated

public void wasUpdated()
Description copied from class: ManagedConfig
Notes that this configuration has been updated.

Overrides:
wasUpdated in class ManagedConfig

validateReferences

public boolean validateReferences(String where,
                                  PrintStream out)
Description copied from class: ManagedConfig
Validates the references in this config.

Overrides:
validateReferences in class ManagedConfig
Returns:
true if the references are valid

validateOuters

public void validateOuters(String where)
Description copied from class: ManagedConfig
Validates the outer object references in this config.

Overrides:
validateOuters in class ManagedConfig


Copyright © 2011. All Rights Reserved.