Home | Trees | Indices | Help |
---|
|
object --+ | operationscore.SmootCoreObject.SmootCoreObject --+ | operationscore.Behavior.Behavior --+ | SwitchBehavior
SwitchBehavior is a behavior that transform into different behaviors base on the input data. The behavior expects a JSON formatted argument 'PrefixToBehavior' that maps prefixes to behaviors. The behavior detects the prefix on the data and use the corresponding Behavior to process the data and return the outputs. In Config file, include: <PrefixToBehavior>JSON format dict with prefix keys and behavior ID values</PrefixToBehavior> <DefaultBehavior>Default behavior's ID</DefaultBehavior> An example config excerpt: <Behavior> <Class>behaviors.SwitchBehavior</Class> <Args> <Id>switch</Id> <PrefixToBehavior>{'@':'game1', '#':'game2', '$':'game3'}</PrefixToBehavior> <DefaultBehavior>game1</DefaultBehavior> </Args> </Behavior>
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from Inherited from |
|
|||
Inherited from |
|
|||
Inherited from |
|
|
|
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Fri Feb 18 16:55:25 2011 | http://epydoc.sourceforge.net |