From cb69d2e1c7ced951cbf7a31ee286b0ed92cab8a8 Mon Sep 17 00:00:00 2001 From: rcoh Date: Fri, 18 Feb 2011 16:56:43 -0500 Subject: Adding Epydoc generated docs. --- ...aviors.SwitchBehavior.SwitchBehavior-class.html | 364 +++++++++++++++++++++ 1 file changed, 364 insertions(+) create mode 100644 html/SmootLight.behaviors.SwitchBehavior.SwitchBehavior-class.html (limited to 'html/SmootLight.behaviors.SwitchBehavior.SwitchBehavior-class.html') diff --git a/html/SmootLight.behaviors.SwitchBehavior.SwitchBehavior-class.html b/html/SmootLight.behaviors.SwitchBehavior.SwitchBehavior-class.html new file mode 100644 index 0000000..be5c1ad --- /dev/null +++ b/html/SmootLight.behaviors.SwitchBehavior.SwitchBehavior-class.html @@ -0,0 +1,364 @@ + + + + + SmootLight.behaviors.SwitchBehavior.SwitchBehavior + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + Package SmootLight :: + Package behaviors :: + Module SwitchBehavior :: + Class SwitchBehavior + + + + + + +
[hide private]
[frames] | no frames]
+
+ +

Class SwitchBehavior

source code

+
+                                    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>
+
+
+ + + + + + + + + + + + + + + + + + + +
+ + + + + +
Instance Methods[hide private]
+
+   + + + + + + +
behaviorInit(self) + source code + +
+ +
+   + + + + + + +
processResponse(self, + sInputs, + rInputs) + source code + +
+ +
+   + + + + + + +
setBehavior(self, + behavior) + source code + +
+ +
+

Inherited from operationscore.Behavior.Behavior: + addInput, + addInputs, + addMapper, + addMapperToResponse, + getLastOutput, + immediateProcessInput, + init, + setLastOutput, + timeStep +

+

Inherited from operationscore.SmootCoreObject.SmootCoreObject: + __contains__, + __getitem__, + __getiter__, + __init__, + __setitem__, + acquireLock, + addDieListener, + className, + die, + releaseLock, + removeDieListener, + validateArgDict, + validateArgs +

+

Inherited from object: + __delattr__, + __format__, + __getattribute__, + __hash__, + __new__, + __reduce__, + __reduce_ex__, + __repr__, + __setattr__, + __sizeof__, + __str__, + __subclasshook__ +

+
+ + + + + + + + + +
+ + + + + +
Static Methods[hide private]
+
+

Inherited from operationscore.Behavior.Behavior: + deepCopyPacket +

+
+ + + + + + + + + +
+ + + + + +
Properties[hide private]
+
+

Inherited from object: + __class__ +

+
+ + + + + + +
+ + + + + +
Method Details[hide private]
+
+ +
+ +
+ + +
+

behaviorInit(self) +

+
source code  +
+ + +
+
Overrides: + operationscore.Behavior.Behavior.behaviorInit +
+
+
+
+ +
+ +
+ + +
+

processResponse(self, + sInputs, + rInputs) +

+
source code  +
+ + +
+
Overrides: + operationscore.Behavior.Behavior.processResponse +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + + + -- cgit v1.2.3