.. 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
Inheritance diagram for class PreProcessChain:
| |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