Orbits  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
Public Member Functions | Private Attributes | List of all members
pip._vendor.distlib.util.EventMixin Class Reference
Inheritance diagram for pip._vendor.distlib.util.EventMixin:
_object

Public Member Functions

def __init__
 
def add
 
def remove
 
def get_subscribers
 
def publish
 

Private Attributes

 _subscribers
 

Detailed Description

A very simple publish/subscribe system.

Constructor & Destructor Documentation

def pip._vendor.distlib.util.EventMixin.__init__ (   self)

Member Function Documentation

def 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.
def 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.
def 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.
def 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.

Member Data Documentation

pip._vendor.distlib.util.EventMixin._subscribers
private

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

Copyright 2014 Google Inc. All rights reserved.