| Home | Trees | Indices | Help |
|
|---|
|
|
Generators generate data. Examples of generators could be a static
string or integer, a string repeater, etc. Generators can be
"incremented" by calling next() to produce the
next varient of data. Generators can be fairly complex, comainting
sub-generators to build things like packets.
Generators support the interator protocol and can be used as such.
When building a Generator one should keep in mind that the value from
a generator could be asked for more then once per "round".
Also it is recommended that you use the default getValue()
implementation and override the getRawValue() method
instead.
See Also: SimpleGenerator
|
|||
|
|||
|
|||
| Generator |
|
||
|
|||
| string |
|
||
| string |
|
||
| Group |
|
||
|
|||
| Transformer |
|
||
| Generator |
|
||
|
|||
|
|||
|
|||
|
|||
Return iterator for Generator object. This is always the Generator object itself.
|
Next value. OVERRIDE From Python docs on next(): The intention of the protocol is that once an iterator's next() method raises StopIteration, it will continue to do so on subsequent calls. Implementations that do not obey this property are deemed broken. (This constraint was added in Python 2.3; in Python 2.2, various iterators are broken according to this rule.) For Generators, please use the GeneratorCompleted exception instead of StopIteration (its a subclass). |
Return data, passed through a transformer if set.
|
Return raw value w/o passing through transformer if set. OVERRIDE
|
Get group this Generator belongs to. Groups are used to increment sets of Generators.
|
Set group this Generator belongs to. This function will automaticly add the Generator into the Group. Groups are used to increment sets of Generators.
|
Get transformer (if set). Transformers are used to transform data in some way (such as HTML encoding, etc).
|
Set trasnformer. Transformers are used to transform data in some way (such as HTML encoding, etc).
|
Called to reset the generator to its initial state. OVERRIDE |
Get the name of this generator. Usefull for debugging. |
Set the name of this generator. Usefull for debugging complex data generators. Stacktraces may end up in a generator creation statement giving limited feedback on which generator in an array might be causing the problem.
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Sat Aug 16 12:17:14 2008 | http://epydoc.sourceforge.net |