Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
pip._vendor.distlib.util.EventMixin Class Reference
Inheritance diagram for pip._vendor.distlib.util.EventMixin:
Inheritance graph
[legend]
Collaboration diagram for pip._vendor.distlib.util.EventMixin:
Collaboration graph
[legend]

Public Member Functions

 __init__ (self)
 
 add (self, event, subscriber, append=True)
 
 remove (self, event, subscriber)
 
 get_subscribers (self, event)
 
 publish (self, event, *args, **kwargs)
 

Protected Attributes

 _subscribers
 

Detailed Description

A very simple publish/subscribe system.

Member Function Documentation

◆ add()

pip._vendor.distlib.util.EventMixin.add (   self,
  event,
  subscriber,
  append = True 
)
Add a subscriber for an event.

:param event: The name of an event.
:param subscriber: The subscriber to be added (and called when the
                   event is published).
:param append: Whether to append or prepend the subscriber to an
               existing subscriber list for the event.

◆ get_subscribers()

pip._vendor.distlib.util.EventMixin.get_subscribers (   self,
  event 
)
Return an iterator for the subscribers for an event.
:param event: The event to return subscribers for.

◆ publish()

pip._vendor.distlib.util.EventMixin.publish (   self,
  event,
args,
**  kwargs 
)
Publish a event and return a list of values returned by its
subscribers.

:param event: The event to publish.
:param args: The positional arguments to pass to the event's
             subscribers.
:param kwargs: The keyword arguments to pass to the event's
               subscribers.

◆ remove()

pip._vendor.distlib.util.EventMixin.remove (   self,
  event,
  subscriber 
)
Remove a subscriber for an event.

:param event: The name of an event.
:param subscriber: The subscriber to be removed.

The documentation for this class was generated from the following file: