Package sulley :: Module blocks :: Class block
[show private | hide private]
[frames | no frames]

Class block

Known Subclasses:
dns_hostname, integer, ndr_conformant_array, ndr_string, ndr_wstring, string, string, tag

Method Summary
  __init__(self, name, request, group, encoder, dep, dep_value, dep_values, dep_compare)
The basic building block.
  mutate(self)
Integer num_mutations(self)
Determine the number of repetitions we will be making.
  push(self, item)
Push an arbitrary item onto this blocks stack.
  render(self)
Step through every item on this blocks stack and render it.
  reset(self)
Reset the primitives on this blocks stack to the starting mutation state.

Method Details

__init__(self, name, request, group=None, encoder=None, dep=None, dep_value=None, dep_values=[], dep_compare='==')
(Constructor)

The basic building block. Can contain primitives, sizers, checksums or other blocks.
Parameters:
name - Name of the new block
           (type=String)
request - Request this block belongs to
           (type=s_request)
group - (Optional, def=None) Name of group to associate this block with
           (type=String)
encoder - (Optional, def=None) Optional pointer to a function to pass rendered data to prior to return
           (type=Function Pointer)
dep - (Optional, def=None) Optional primitive whose specific value this block is dependant on
           (type=String)
dep_value - (Optional, def=None) Value that field "dep" must contain for block to be rendered
           (type=Mixed)
dep_values - (Optional, def=[]) Values that field "dep" may contain for block to be rendered
           (type=List of Mixed Types)
dep_compare - (Optional, def="==") Comparison method to apply to dependency (==, !=, >, >=, <, <=)
           (type=String)

num_mutations(self)

Determine the number of repetitions we will be making.
Returns:
Number of mutated forms this primitive can take.
           (type=Integer)

push(self, item)

Push an arbitrary item onto this blocks stack.

render(self)

Step through every item on this blocks stack and render it. Subsequent blocks recursively render their stacks.

reset(self)

Reset the primitives on this blocks stack to the starting mutation state.

Generated by Epydoc 2.1 on Fri Jul 27 17:40:03 2007 http://epydoc.sf.net