File: wx.lib.delayedresult.PreProcessChain.txt

package info (click to toggle)
wxpython4.0 4.2.0%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 232,540 kB
  • sloc: cpp: 958,937; python: 233,059; ansic: 150,441; makefile: 51,662; sh: 8,687; perl: 1,563; javascript: 584; php: 326; xml: 200
file content (111 lines) | stat: -rw-r--r-- 4,349 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
.. wxPython Phoenix documentation

   This file was generated by Phoenix's sphinx generator and associated
   tools, do not edit by hand.

   Copyright: (c) 2011-2020 by Total Control Software
   License:   wxWindows License

.. include:: headings.inc

.. currentmodule:: wx.lib.delayedresult

.. highlight:: python



.. _wx.lib.delayedresult.PreProcessChain:

==========================================================================================================================================
|phoenix_title|  **wx.lib.delayedresult.PreProcessChain**
==========================================================================================================================================

Represent a 'delayed result pre-processing chain', a kind of Handler.
Useful when lower-level objects need to apply a sequence of transformations
to the delayed result before handing it over to a final handler.
This allows the starter of the worker function to not know
anything about the lower-level objects.



|

|class_hierarchy| Class Hierarchy
=================================

.. raw:: html

   <div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;">
   <img id="toggleBlock-trigger" src="_static/images/closed.png"/>
   Inheritance diagram for class <strong>PreProcessChain</strong>:
   </div>
   <div id="toggleBlock-summary" style="display:block;"></div>
   <div id="toggleBlock-content" style="display:none;">
   <p class="graphviz">
   <center><img src="_static/images/inheritance/wx.lib.delayedresult.PreProcessChain_inheritance.png" alt="Inheritance diagram of PreProcessChain" usemap="#dummy" class="inheritance"/></center>
   <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
   <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.lib.delayedresult.PreProcessChain.html" title="wx.lib.delayedresult.PreProcessChain" alt="" coords="5,5,272,35"/> </map> 
   </p>
   </div>

|


|method_summary| Methods Summary
================================

================================================================================ ================================================================================
:meth:`~wx.lib.delayedresult.PreProcessChain.__init__`                           Wrap `handler(result, *args, **kwargs)` so that the result
:meth:`~wx.lib.delayedresult.PreProcessChain.addSub`                             Add a sub-callable, ie a `callable(result, *args, **kwargs)`
:meth:`~wx.lib.delayedresult.PreProcessChain.clone`                              Clone the chain. Shallow only. Useful when several threads
:meth:`~wx.lib.delayedresult.PreProcessChain.cloneAddSub`                        Convenience method that first clones self, then calls addSub()
:meth:`~wx.lib.delayedresult.PreProcessChain.count`                              How many pre-processors in the chain
================================================================================ ================================================================================


|


|api| Class API
===============


.. class:: PreProcessChain

   Represent a 'delayed result pre-processing chain', a kind of Handler.
   Useful when lower-level objects need to apply a sequence of transformations
   to the delayed result before handing it over to a final handler.
   This allows the starter of the worker function to not know
   anything about the lower-level objects.

   .. method:: __init__(self, handler, \*args, \*\*kwargs)

      Wrap `handler(result, *args, **kwargs)` so that the result
      it receives has been transformed by us. 


   .. method:: addSub(self, callable, \*args, \*\*kwargs)

      Add a sub-callable, ie a `callable(result, *args, **kwargs)`
      that returns a transformed result to the previously added
      sub-callable (or the handler given at construction, if this is
      the first call to addSub). 


   .. method:: clone(self)

      Clone the chain. Shallow only. Useful when several threads
      must be started but have different sub-callables. 


   .. method:: cloneAddSub(self, callable, \*args, \*\*kwargs)

      Convenience method that first clones self, then calls addSub()
      on that clone with given arguments. 


   .. method:: count(self)

      How many pre-processors in the chain