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
|
.. wxPython Phoenix documentation
This file was generated by Phoenix's sphinx generator and associated
tools, do not edit by hand.
Copyright: (c) 2011-2018 by Total Control Software
License: wxWindows License
.. include:: headings.inc
.. currentmodule:: wx.lib.pubsub.core.topictreetraverser
.. highlight:: python
.. _wx.lib.pubsub.core.topictreetraverser.TopicTreeTraverser:
==========================================================================================================================================
|phoenix_title| **wx.lib.pubsub.core.topictreetraverser.TopicTreeTraverser**
==========================================================================================================================================
Supports taking action on every topic in the topic tree. The traverse() method
traverses a topic tree and calls visitor._onTopic() for each topic in the tree
that satisfies visitor._accept(). Additionally it calls visitor._startChildren()
whenever it starts traversing the subtopics of a topic, and
visitor._endChildren() when it is done with the subtopics. Finally, it calls
visitor._doneTraversal() when traversal has been completed. The visitor must
therefore adhere to the ITopicTreeVisitor interface.
|
|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>TopicTreeTraverser</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.pubsub.core.topictreetraverser.TopicTreeTraverser_inheritance.png" alt="Inheritance diagram of TopicTreeTraverser" usemap="#dummy" class="inheritance"/></center>
</div>
<script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
<map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.lib.pubsub.core.topictreetraverser.TopicTreeTraverser.html" title="wx.lib.pubsub.core.topictreetraverser.TopicTreeTraverser" alt="" coords="5,5,381,35"/> </map>
</p>
|
|method_summary| Methods Summary
================================
================================================================================ ================================================================================
:meth:`~wx.lib.pubsub.core.topictreetraverser.TopicTreeTraverser.__init__` The visitor, if given, must adhere to API of
:meth:`~wx.lib.pubsub.core.topictreetraverser.TopicTreeTraverser.setVisitor` The visitor must adhere to API of ITopicTreeVisitor.
:meth:`~wx.lib.pubsub.core.topictreetraverser.TopicTreeTraverser.traverse` Start traversing tree at topicObj. Note that topicObj is a
================================================================================ ================================================================================
|
|api| Class API
===============
.. class:: TopicTreeTraverser
Supports taking action on every topic in the topic tree. The traverse() method
traverses a topic tree and calls visitor._onTopic() for each topic in the tree
that satisfies visitor._accept(). Additionally it calls visitor._startChildren()
whenever it starts traversing the subtopics of a topic, and
visitor._endChildren() when it is done with the subtopics. Finally, it calls
visitor._doneTraversal() when traversal has been completed. The visitor must
therefore adhere to the ITopicTreeVisitor interface.
.. method:: __init__(self, visitor = None)
The visitor, if given, must adhere to API of
ITopicTreeVisitor. The visitor can be changed or
set via setVisitor(visitor) before calling traverse().
.. method:: setVisitor(self, visitor)
The visitor must adhere to API of ITopicTreeVisitor.
.. method:: traverse(self, topicObj, how=DEPTH, onlyFiltered=True)
Start traversing tree at topicObj. Note that topicObj is a
Topic object, not a topic name. The how defines if tree should
be traversed breadth or depth first. If onlyFiltered is
False, then all nodes are accepted (_accept(node) not called).
This method can be called multiple times.
|