added api html files
This commit is contained in:
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/html/* linguist-vendored
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -90,4 +90,3 @@ ENV/
|
||||
|
||||
# Other
|
||||
.idea
|
||||
html/
|
||||
|
||||
142
html/api-objects.txt
vendored
Normal file
142
html/api-objects.txt
vendored
Normal file
@@ -0,0 +1,142 @@
|
||||
pypat pypat-module.html
|
||||
pypat.__package__ pypat-module.html#__package__
|
||||
pypat.behavioral pypat.behavioral-module.html
|
||||
pypat.behavioral.__package__ pypat.behavioral-module.html#__package__
|
||||
pypat.behavioral.chain pypat.behavioral.chain-module.html
|
||||
pypat.behavioral.command pypat.behavioral.command-module.html
|
||||
pypat.behavioral.iterator pypat.behavioral.iterator-module.html
|
||||
pypat.behavioral.mediator pypat.behavioral.mediator-module.html
|
||||
pypat.behavioral.mediator.__package__ pypat.behavioral.mediator-module.html#__package__
|
||||
pypat.behavioral.memento pypat.behavioral.memento-module.html
|
||||
pypat.behavioral.memento.__package__ pypat.behavioral.memento-module.html#__package__
|
||||
pypat.behavioral.null pypat.behavioral.null-module.html
|
||||
pypat.behavioral.null.__package__ pypat.behavioral.null-module.html#__package__
|
||||
pypat.behavioral.observer pypat.behavioral.observer-module.html
|
||||
pypat.behavioral.visitor pypat.behavioral.visitor-module.html
|
||||
pypat.creational pypat.creational-module.html
|
||||
pypat.creational.__package__ pypat.creational-module.html#__package__
|
||||
pypat.creational.builder pypat.creational.builder-module.html
|
||||
pypat.creational.factory pypat.creational.factory-module.html
|
||||
pypat.creational.pool pypat.creational.pool-module.html
|
||||
pypat.creational.prototype pypat.creational.prototype-module.html
|
||||
pypat.creational.prototype.__package__ pypat.creational.prototype-module.html#__package__
|
||||
pypat.creational.singleton pypat.creational.singleton-module.html
|
||||
pypat.creational.singleton.__package__ pypat.creational.singleton-module.html#__package__
|
||||
pypat.structural pypat.structural-module.html
|
||||
pypat.structural.__package__ pypat.structural-module.html#__package__
|
||||
pypat.structural.adapter pypat.structural.adapter-module.html
|
||||
pypat.structural.adapter.__package__ pypat.structural.adapter-module.html#__package__
|
||||
pypat.structural.composite pypat.structural.composite-module.html
|
||||
pypat.structural.composite.__package__ pypat.structural.composite-module.html#__package__
|
||||
pypat.structural.decorator pypat.structural.decorator-module.html
|
||||
pypat.structural.flyweight pypat.structural.flyweight-module.html
|
||||
pypat.structural.flyweight.__package__ pypat.structural.flyweight-module.html#__package__
|
||||
pypat.behavioral.chain.Chain pypat.behavioral.chain.Chain-class.html
|
||||
pypat.behavioral.chain.Chain.fail pypat.behavioral.chain.Chain-class.html#fail
|
||||
pypat.behavioral.chain.Chain.handle pypat.behavioral.chain.Chain-class.html#handle
|
||||
pypat.behavioral.chain.Chain.__init__ pypat.behavioral.chain.Chain-class.html#__init__
|
||||
pypat.behavioral.chain.ChainLink pypat.behavioral.chain.ChainLink-class.html
|
||||
pypat.behavioral.chain.ChainLink.set_successor pypat.behavioral.chain.ChainLink-class.html#set_successor
|
||||
pypat.behavioral.chain.ChainLink.successor_handle pypat.behavioral.chain.ChainLink-class.html#successor_handle
|
||||
pypat.behavioral.chain.ChainLink.handle pypat.behavioral.chain.ChainLink-class.html#handle
|
||||
pypat.behavioral.chain.ChainLink.__init__ pypat.behavioral.chain.ChainLink-class.html#__init__
|
||||
pypat.behavioral.command.Command pypat.behavioral.command.Command-class.html
|
||||
pypat.behavioral.command.Command.execute pypat.behavioral.command.Command-class.html#execute
|
||||
pypat.behavioral.command.Command.unexecute pypat.behavioral.command.Command-class.html#unexecute
|
||||
pypat.behavioral.command.Command.__init__ pypat.behavioral.command.Command-class.html#__init__
|
||||
pypat.behavioral.command.Invoker pypat.behavioral.command.Invoker-class.html
|
||||
pypat.behavioral.command.Invoker.execute pypat.behavioral.command.Invoker-class.html#execute
|
||||
pypat.behavioral.command.Invoker.undo pypat.behavioral.command.Invoker-class.html#undo
|
||||
pypat.behavioral.command.Invoker.__init__ pypat.behavioral.command.Invoker-class.html#__init__
|
||||
pypat.behavioral.command.Receiver pypat.behavioral.command.Receiver-class.html
|
||||
pypat.behavioral.command.Receiver.action pypat.behavioral.command.Receiver-class.html#action
|
||||
pypat.behavioral.iterator.Iterable pypat.behavioral.iterator.Iterable-class.html
|
||||
pypat.behavioral.iterator.Iterable.__next__ pypat.behavioral.iterator.Iterable-class.html#__next__
|
||||
pypat.behavioral.iterator.Iterator pypat.behavioral.iterator.Iterator-class.html
|
||||
pypat.behavioral.iterator.Iterator.__next__ pypat.behavioral.iterator.Iterator-class.html#__next__
|
||||
pypat.behavioral.iterator.Iterator.__iter__ pypat.behavioral.iterator.Iterator-class.html#__iter__
|
||||
pypat.behavioral.iterator.Iterator.__init__ pypat.behavioral.iterator.Iterator-class.html#__init__
|
||||
pypat.behavioral.mediator.Mediator pypat.behavioral.mediator.Mediator-class.html
|
||||
pypat.behavioral.mediator.Mediator.disconnect pypat.behavioral.mediator.Mediator-class.html#disconnect
|
||||
pypat.behavioral.mediator.Mediator.signal pypat.behavioral.mediator.Mediator-class.html#signal
|
||||
pypat.behavioral.mediator.Mediator.connect pypat.behavioral.mediator.Mediator-class.html#connect
|
||||
pypat.behavioral.mediator.Mediator.__init__ pypat.behavioral.mediator.Mediator-class.html#__init__
|
||||
pypat.behavioral.memento.Memento pypat.behavioral.memento.Memento-class.html
|
||||
pypat.behavioral.memento.Memento.state pypat.behavioral.memento.Memento-class.html#state
|
||||
pypat.behavioral.memento.Memento.__init__ pypat.behavioral.memento.Memento-class.html#__init__
|
||||
pypat.behavioral.memento.Originator pypat.behavioral.memento.Originator-class.html
|
||||
pypat.behavioral.memento.Originator.rollback pypat.behavioral.memento.Originator-class.html#rollback
|
||||
pypat.behavioral.memento.Originator.commit pypat.behavioral.memento.Originator-class.html#commit
|
||||
pypat.behavioral.null.Null pypat.behavioral.null.Null-class.html
|
||||
pypat.behavioral.null.Null.__setattr__ pypat.behavioral.null.Null-class.html#__setattr__
|
||||
pypat.behavioral.null.Null.__str__ pypat.behavioral.null.Null-class.html#__str__
|
||||
pypat.behavioral.null.Null.__bool__ pypat.behavioral.null.Null-class.html#__bool__
|
||||
pypat.behavioral.null.Null.__getattr__ pypat.behavioral.null.Null-class.html#__getattr__
|
||||
pypat.behavioral.null.Null.__delattr__ pypat.behavioral.null.Null-class.html#__delattr__
|
||||
pypat.behavioral.null.Null.__repr__ pypat.behavioral.null.Null-class.html#__repr__
|
||||
pypat.behavioral.null.Null.__call__ pypat.behavioral.null.Null-class.html#__call__
|
||||
pypat.behavioral.null.Null.__init__ pypat.behavioral.null.Null-class.html#__init__
|
||||
pypat.behavioral.observer.Observable pypat.behavioral.observer.Observable-class.html
|
||||
pypat.behavioral.observer.Observable.attach pypat.behavioral.observer.Observable-class.html#attach
|
||||
pypat.behavioral.observer.Observable.notify pypat.behavioral.observer.Observable-class.html#notify
|
||||
pypat.behavioral.observer.Observable.detach pypat.behavioral.observer.Observable-class.html#detach
|
||||
pypat.behavioral.observer.Observable.__init__ pypat.behavioral.observer.Observable-class.html#__init__
|
||||
pypat.behavioral.observer.Observer pypat.behavioral.observer.Observer-class.html
|
||||
pypat.behavioral.observer.Observer.update pypat.behavioral.observer.Observer-class.html#update
|
||||
pypat.behavioral.visitor.Visitee pypat.behavioral.visitor.Visitee-class.html
|
||||
pypat.behavioral.visitor.Visitee.accept pypat.behavioral.visitor.Visitee-class.html#accept
|
||||
pypat.behavioral.visitor.Visitor pypat.behavioral.visitor.Visitor-class.html
|
||||
pypat.behavioral.visitor.Visitor.generic_visit pypat.behavioral.visitor.Visitor-class.html#generic_visit
|
||||
pypat.behavioral.visitor.Visitor.visit pypat.behavioral.visitor.Visitor-class.html#visit
|
||||
pypat.creational.builder.Builder pypat.creational.builder.Builder-class.html
|
||||
pypat.creational.builder.Builder._register pypat.creational.builder.Builder-class.html#_register
|
||||
pypat.creational.builder.Builder.build pypat.creational.builder.Builder-class.html#build
|
||||
pypat.creational.builder.Builder.__init__ pypat.creational.builder.Builder-class.html#__init__
|
||||
pypat.creational.builder.Director pypat.creational.builder.Director-class.html
|
||||
pypat.creational.builder.Director.get_constructed_object pypat.creational.builder.Director-class.html#get_constructed_object
|
||||
pypat.creational.builder.Director.construct pypat.creational.builder.Director-class.html#construct
|
||||
pypat.creational.builder.Director.__init__ pypat.creational.builder.Director-class.html#__init__
|
||||
pypat.creational.factory.AbstractFactory pypat.creational.factory.AbstractFactory-class.html
|
||||
pypat.creational.factory.AbstractFactory._register pypat.creational.factory.AbstractFactory-class.html#_register
|
||||
pypat.creational.factory.AbstractFactory.create pypat.creational.factory.AbstractFactory-class.html#create
|
||||
pypat.creational.factory.AbstractFactory.__init__ pypat.creational.factory.AbstractFactory-class.html#__init__
|
||||
pypat.creational.factory.Factory pypat.creational.factory.Factory-class.html
|
||||
pypat.creational.factory.Factory.create pypat.creational.factory.Factory-class.html#create
|
||||
pypat.creational.pool.Pool pypat.creational.pool.Pool-class.html
|
||||
pypat.creational.pool.Pool._expand pypat.creational.pool.Pool-class.html#_expand
|
||||
pypat.creational.pool.Pool.acquire pypat.creational.pool.Pool-class.html#acquire
|
||||
pypat.creational.pool.Pool.release pypat.creational.pool.Pool-class.html#release
|
||||
pypat.creational.pool.Pool.__init__ pypat.creational.pool.Pool-class.html#__init__
|
||||
pypat.creational.pool.Reusable pypat.creational.pool.Reusable-class.html
|
||||
pypat.creational.pool.Reusable.reset pypat.creational.pool.Reusable-class.html#reset
|
||||
pypat.creational.pool.Reusable.__init__ pypat.creational.pool.Reusable-class.html#__init__
|
||||
pypat.creational.prototype.Prototype pypat.creational.prototype.Prototype-class.html
|
||||
pypat.creational.prototype.Prototype.prototype pypat.creational.prototype.Prototype-class.html#prototype
|
||||
pypat.creational.singleton.Singleton pypat.creational.singleton.Singleton-class.html
|
||||
pypat.creational.singleton.Singleton.__call__ pypat.creational.singleton.Singleton-class.html#__call__
|
||||
pypat.creational.singleton.Singleton.__instance pypat.creational.singleton.Singleton-class.html#__instance
|
||||
pypat.structural.adapter.Adapter pypat.structural.adapter.Adapter-class.html
|
||||
pypat.structural.adapter.Adapter.__getattr__ pypat.structural.adapter.Adapter-class.html#__getattr__
|
||||
pypat.structural.adapter.Adapter.original_dict pypat.structural.adapter.Adapter-class.html#original_dict
|
||||
pypat.structural.adapter.Adapter.__init__ pypat.structural.adapter.Adapter-class.html#__init__
|
||||
pypat.structural.composite.Composite pypat.structural.composite.Composite-class.html
|
||||
pypat.structural.composite.Composite.add_component pypat.structural.composite.Composite-class.html#add_component
|
||||
pypat.structural.composite.Composite.__getattr__ pypat.structural.composite.Composite-class.html#__getattr__
|
||||
pypat.structural.composite.Composite._delegate pypat.structural.composite.Composite-class.html#_delegate
|
||||
pypat.structural.composite.Composite.remove_component pypat.structural.composite.Composite-class.html#remove_component
|
||||
pypat.structural.composite.Composite.__init__ pypat.structural.composite.Composite-class.html#__init__
|
||||
pypat.structural.decorator.CallWrapper pypat.structural.decorator.CallWrapper-class.html
|
||||
pypat.structural.decorator.CallWrapper.__call__ pypat.structural.decorator.CallWrapper-class.html#__call__
|
||||
pypat.structural.decorator.DecoratorSimple.__init__ pypat.structural.decorator.DecoratorSimple-class.html#__init__
|
||||
pypat.structural.decorator.Decorator pypat.structural.decorator.Decorator-class.html
|
||||
pypat.structural.decorator.Decorator.__call__ pypat.structural.decorator.Decorator-class.html#__call__
|
||||
pypat.structural.decorator.Decorator.__get__ pypat.structural.decorator.Decorator-class.html#__get__
|
||||
pypat.structural.decorator.DecoratorComplex pypat.structural.decorator.DecoratorComplex-class.html
|
||||
pypat.structural.decorator.DecoratorComplex.__call__ pypat.structural.decorator.DecoratorComplex-class.html#__call__
|
||||
pypat.structural.decorator.DecoratorComplex.__init__ pypat.structural.decorator.DecoratorComplex-class.html#__init__
|
||||
pypat.structural.decorator.DecoratorSimple pypat.structural.decorator.DecoratorSimple-class.html
|
||||
pypat.structural.decorator.DecoratorSimple.__init__ pypat.structural.decorator.DecoratorSimple-class.html#__init__
|
||||
pypat.structural.flyweight.FlyweightMeta pypat.structural.flyweight.FlyweightMeta-class.html
|
||||
pypat.structural.flyweight.FlyweightMeta.__new__ pypat.structural.flyweight.FlyweightMeta-class.html#__new__
|
||||
pypat.structural.flyweight.FlyweightMeta.__call__ pypat.structural.flyweight.FlyweightMeta-class.html#__call__
|
||||
pypat.structural.flyweight.FlyweightMeta._serialize pypat.structural.flyweight.FlyweightMeta-class.html#_serialize
|
||||
154
html/class-tree.html
vendored
Normal file
154
html/class-tree.html
vendored
Normal file
@@ -0,0 +1,154 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class Hierarchy</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th bgcolor="#70b0f0" class="navbar-select"
|
||||
> Trees </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%"> </td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="class-tree.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<center><b>
|
||||
[ <a href="module-tree.html">Module Hierarchy</a>
|
||||
| <a href="class-tree.html">Class Hierarchy</a> ]
|
||||
</b></center><br />
|
||||
<h1 class="epydoc">Class Hierarchy</h1>
|
||||
<ul class="nomargin-top">
|
||||
<li> <strong class="uidlink">object</strong>:
|
||||
<em class="summary">The most base type</em>
|
||||
<ul>
|
||||
<li> <strong class="uidlink"><a href="pypat.structural.adapter.Adapter-class.html">pypat.structural.adapter.Adapter</a></strong>:
|
||||
<em class="summary">Adapter class as part of the Adapter design pattern.</em>
|
||||
</li>
|
||||
<li> <strong class="uidlink"><a href="pypat.structural.composite.Composite-class.html">pypat.structural.composite.Composite</a></strong>:
|
||||
<em class="summary">Composite class as part of the Composite pattern.</em>
|
||||
</li>
|
||||
<li> <strong class="uidlink"><a href="pypat.behavioral.iterator.Iterator-class.html">pypat.behavioral.iterator.Iterator</a></strong>:
|
||||
<em class="summary">An Iterator class for the Iterator design pattern.</em>
|
||||
</li>
|
||||
<li> <strong class="uidlink"><a href="pypat.behavioral.mediator.Mediator-class.html">pypat.behavioral.mediator.Mediator</a></strong>:
|
||||
<em class="summary">Mediator class as part of the Mediator design pattern.</em>
|
||||
</li>
|
||||
<li> <strong class="uidlink"><a href="pypat.behavioral.memento.Memento-class.html">pypat.behavioral.memento.Memento</a></strong>:
|
||||
<em class="summary">Memento class as part of the Memento design pattern.</em>
|
||||
</li>
|
||||
<li> <strong class="uidlink"><a href="pypat.behavioral.null.Null-class.html">pypat.behavioral.null.Null</a></strong>:
|
||||
<em class="summary">A Null object class as part of the Null object design pattern.</em>
|
||||
</li>
|
||||
<li> <strong class="uidlink"><a href="pypat.behavioral.observer.Observable-class.html">pypat.behavioral.observer.Observable</a></strong>:
|
||||
<em class="summary">Base Observable class as part of the Observer design pattern.</em>
|
||||
</li>
|
||||
<li> <strong class="uidlink"><a href="pypat.behavioral.memento.Originator-class.html">pypat.behavioral.memento.Originator</a></strong>:
|
||||
<em class="summary">Originator base class as part of the Memento design pattern.</em>
|
||||
</li>
|
||||
<li> <strong class="uidlink"><a href="pypat.creational.pool.Pool-class.html">pypat.creational.pool.Pool</a></strong>:
|
||||
<em class="summary">An Object Pool design pattern implementation.</em>
|
||||
</li>
|
||||
<li> <strong class="uidlink"><a href="pypat.creational.prototype.Prototype-class.html">pypat.creational.prototype.Prototype</a></strong>:
|
||||
<em class="summary">Prototype design pattern abstract class.</em>
|
||||
</li>
|
||||
<li> <strong class="uidlink"><a href="pypat.behavioral.visitor.Visitee-class.html">pypat.behavioral.visitor.Visitee</a></strong>:
|
||||
<em class="summary">A base class for objects that wish to be able to be visited by a Visitor class.</em>
|
||||
</li>
|
||||
<li> <strong class="uidlink">type</strong>:
|
||||
<em class="summary">type(object) -> the object's type type(name, bases, dict) ->
|
||||
a new type</em>
|
||||
<ul>
|
||||
<li> <strong class="uidlink"><a href="pypat.structural.flyweight.FlyweightMeta-class.html">pypat.structural.flyweight.FlyweightMeta</a></strong>:
|
||||
<em class="summary">Flyweight meta class as part of the Flyweight design pattern.</em>
|
||||
</li>
|
||||
<li> <strong class="uidlink"><a href="pypat.creational.singleton.Singleton-class.html">pypat.creational.singleton.Singleton</a></strong>:
|
||||
<em class="summary">Singleton Metaclass.</em>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th bgcolor="#70b0f0" class="navbar-select"
|
||||
> Trees </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
BIN
html/crarr.png
vendored
Normal file
BIN
html/crarr.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 340 B |
322
html/epydoc.css
vendored
Normal file
322
html/epydoc.css
vendored
Normal file
@@ -0,0 +1,322 @@
|
||||
|
||||
|
||||
/* Epydoc CSS Stylesheet
|
||||
*
|
||||
* This stylesheet can be used to customize the appearance of epydoc's
|
||||
* HTML output.
|
||||
*
|
||||
*/
|
||||
|
||||
/* Default Colors & Styles
|
||||
* - Set the default foreground & background color with 'body'; and
|
||||
* link colors with 'a:link' and 'a:visited'.
|
||||
* - Use bold for decision list terms.
|
||||
* - The heading styles defined here are used for headings *within*
|
||||
* docstring descriptions. All headings used by epydoc itself use
|
||||
* either class='epydoc' or class='toc' (CSS styles for both
|
||||
* defined below).
|
||||
*/
|
||||
body { background: #ffffff; color: #000000; }
|
||||
p { margin-top: 0.5em; margin-bottom: 0.5em; }
|
||||
a:link { color: #0000ff; }
|
||||
a:visited { color: #204080; }
|
||||
dt { font-weight: bold; }
|
||||
h1 { font-size: +140%; font-style: italic;
|
||||
font-weight: bold; }
|
||||
h2 { font-size: +125%; font-style: italic;
|
||||
font-weight: bold; }
|
||||
h3 { font-size: +110%; font-style: italic;
|
||||
font-weight: normal; }
|
||||
code { font-size: 100%; }
|
||||
/* N.B.: class, not pseudoclass */
|
||||
a.link { font-family: monospace; }
|
||||
|
||||
/* Page Header & Footer
|
||||
* - The standard page header consists of a navigation bar (with
|
||||
* pointers to standard pages such as 'home' and 'trees'); a
|
||||
* breadcrumbs list, which can be used to navigate to containing
|
||||
* classes or modules; options links, to show/hide private
|
||||
* variables and to show/hide frames; and a page title (using
|
||||
* <h1>). The page title may be followed by a link to the
|
||||
* corresponding source code (using 'span.codelink').
|
||||
* - The footer consists of a navigation bar, a timestamp, and a
|
||||
* pointer to epydoc's homepage.
|
||||
*/
|
||||
h1.epydoc { margin: 0; font-size: +140%; font-weight: bold; }
|
||||
h2.epydoc { font-size: +130%; font-weight: bold; }
|
||||
h3.epydoc { font-size: +115%; font-weight: bold;
|
||||
margin-top: 0.2em; }
|
||||
td h3.epydoc { font-size: +115%; font-weight: bold;
|
||||
margin-bottom: 0; }
|
||||
table.navbar { background: #a0c0ff; color: #000000;
|
||||
border: 2px groove #c0d0d0; }
|
||||
table.navbar table { color: #000000; }
|
||||
th.navbar-select { background: #70b0ff;
|
||||
color: #000000; }
|
||||
table.navbar a { text-decoration: none; }
|
||||
table.navbar a:link { color: #0000ff; }
|
||||
table.navbar a:visited { color: #204080; }
|
||||
span.breadcrumbs { font-size: 85%; font-weight: bold; }
|
||||
span.options { font-size: 70%; }
|
||||
span.codelink { font-size: 85%; }
|
||||
td.footer { font-size: 85%; }
|
||||
|
||||
/* Table Headers
|
||||
* - Each summary table and details section begins with a 'header'
|
||||
* row. This row contains a section title (marked by
|
||||
* 'span.table-header') as well as a show/hide private link
|
||||
* (marked by 'span.options', defined above).
|
||||
* - Summary tables that contain user-defined groups mark those
|
||||
* groups using 'group header' rows.
|
||||
*/
|
||||
td.table-header { background: #70b0ff; color: #000000;
|
||||
border: 1px solid #608090; }
|
||||
td.table-header table { color: #000000; }
|
||||
td.table-header table a:link { color: #0000ff; }
|
||||
td.table-header table a:visited { color: #204080; }
|
||||
span.table-header { font-size: 120%; font-weight: bold; }
|
||||
th.group-header { background: #c0e0f8; color: #000000;
|
||||
text-align: left; font-style: italic;
|
||||
font-size: 115%;
|
||||
border: 1px solid #608090; }
|
||||
|
||||
/* Summary Tables (functions, variables, etc)
|
||||
* - Each object is described by a single row of the table with
|
||||
* two cells. The left cell gives the object's type, and is
|
||||
* marked with 'code.summary-type'. The right cell gives the
|
||||
* object's name and a summary description.
|
||||
* - CSS styles for the table's header and group headers are
|
||||
* defined above, under 'Table Headers'
|
||||
*/
|
||||
table.summary { border-collapse: collapse;
|
||||
background: #e8f0f8; color: #000000;
|
||||
border: 1px solid #608090;
|
||||
margin-bottom: 0.5em; }
|
||||
td.summary { border: 1px solid #608090; }
|
||||
code.summary-type { font-size: 85%; }
|
||||
table.summary a:link { color: #0000ff; }
|
||||
table.summary a:visited { color: #204080; }
|
||||
|
||||
|
||||
/* Details Tables (functions, variables, etc)
|
||||
* - Each object is described in its own div.
|
||||
* - A single-row summary table w/ table-header is used as
|
||||
* a header for each details section (CSS style for table-header
|
||||
* is defined above, under 'Table Headers').
|
||||
*/
|
||||
table.details { border-collapse: collapse;
|
||||
background: #e8f0f8; color: #000000;
|
||||
border: 1px solid #608090;
|
||||
margin: .2em 0 0 0; }
|
||||
table.details table { color: #000000; }
|
||||
table.details a:link { color: #0000ff; }
|
||||
table.details a:visited { color: #204080; }
|
||||
|
||||
/* Fields */
|
||||
dl.fields { margin-left: 2em; margin-top: 1em;
|
||||
margin-bottom: 1em; }
|
||||
dl.fields dd ul { margin-left: 0em; padding-left: 0em; }
|
||||
dl.fields dd ul li ul { margin-left: 2em; padding-left: 0em; }
|
||||
div.fields { margin-left: 2em; }
|
||||
div.fields p { margin-bottom: 0.5em; }
|
||||
|
||||
/* Index tables (identifier index, term index, etc)
|
||||
* - link-index is used for indices containing lists of links
|
||||
* (namely, the identifier index & term index).
|
||||
* - index-where is used in link indices for the text indicating
|
||||
* the container/source for each link.
|
||||
* - metadata-index is used for indices containing metadata
|
||||
* extracted from fields (namely, the bug index & todo index).
|
||||
*/
|
||||
table.link-index { border-collapse: collapse;
|
||||
background: #e8f0f8; color: #000000;
|
||||
border: 1px solid #608090; }
|
||||
td.link-index { border-width: 0px; }
|
||||
table.link-index a:link { color: #0000ff; }
|
||||
table.link-index a:visited { color: #204080; }
|
||||
span.index-where { font-size: 70%; }
|
||||
table.metadata-index { border-collapse: collapse;
|
||||
background: #e8f0f8; color: #000000;
|
||||
border: 1px solid #608090;
|
||||
margin: .2em 0 0 0; }
|
||||
td.metadata-index { border-width: 1px; border-style: solid; }
|
||||
table.metadata-index a:link { color: #0000ff; }
|
||||
table.metadata-index a:visited { color: #204080; }
|
||||
|
||||
/* Function signatures
|
||||
* - sig* is used for the signature in the details section.
|
||||
* - .summary-sig* is used for the signature in the summary
|
||||
* table, and when listing property accessor functions.
|
||||
* */
|
||||
.sig-name { color: #006080; }
|
||||
.sig-arg { color: #008060; }
|
||||
.sig-default { color: #602000; }
|
||||
.summary-sig { font-family: monospace; }
|
||||
.summary-sig-name { color: #006080; font-weight: bold; }
|
||||
table.summary a.summary-sig-name:link
|
||||
{ color: #006080; font-weight: bold; }
|
||||
table.summary a.summary-sig-name:visited
|
||||
{ color: #006080; font-weight: bold; }
|
||||
.summary-sig-arg { color: #006040; }
|
||||
.summary-sig-default { color: #501800; }
|
||||
|
||||
/* Subclass list
|
||||
*/
|
||||
ul.subclass-list { display: inline; }
|
||||
ul.subclass-list li { display: inline; }
|
||||
|
||||
/* To render variables, classes etc. like functions */
|
||||
table.summary .summary-name { color: #006080; font-weight: bold;
|
||||
font-family: monospace; }
|
||||
table.summary
|
||||
a.summary-name:link { color: #006080; font-weight: bold;
|
||||
font-family: monospace; }
|
||||
table.summary
|
||||
a.summary-name:visited { color: #006080; font-weight: bold;
|
||||
font-family: monospace; }
|
||||
|
||||
/* Variable values
|
||||
* - In the 'variable details' sections, each varaible's value is
|
||||
* listed in a 'pre.variable' box. The width of this box is
|
||||
* restricted to 80 chars; if the value's repr is longer than
|
||||
* this it will be wrapped, using a backslash marked with
|
||||
* class 'variable-linewrap'. If the value's repr is longer
|
||||
* than 3 lines, the rest will be ellided; and an ellipsis
|
||||
* marker ('...' marked with 'variable-ellipsis') will be used.
|
||||
* - If the value is a string, its quote marks will be marked
|
||||
* with 'variable-quote'.
|
||||
* - If the variable is a regexp, it is syntax-highlighted using
|
||||
* the re* CSS classes.
|
||||
*/
|
||||
pre.variable { padding: .5em; margin: 0;
|
||||
background: #dce4ec; color: #000000;
|
||||
border: 1px solid #708890; }
|
||||
.variable-linewrap { color: #604000; font-weight: bold; }
|
||||
.variable-ellipsis { color: #604000; font-weight: bold; }
|
||||
.variable-quote { color: #604000; font-weight: bold; }
|
||||
.variable-group { color: #008000; font-weight: bold; }
|
||||
.variable-op { color: #604000; font-weight: bold; }
|
||||
.variable-string { color: #006030; }
|
||||
.variable-unknown { color: #a00000; font-weight: bold; }
|
||||
.re { color: #000000; }
|
||||
.re-char { color: #006030; }
|
||||
.re-op { color: #600000; }
|
||||
.re-group { color: #003060; }
|
||||
.re-ref { color: #404040; }
|
||||
|
||||
/* Base tree
|
||||
* - Used by class pages to display the base class hierarchy.
|
||||
*/
|
||||
pre.base-tree { font-size: 80%; margin: 0; }
|
||||
|
||||
/* Frames-based table of contents headers
|
||||
* - Consists of two frames: one for selecting modules; and
|
||||
* the other listing the contents of the selected module.
|
||||
* - h1.toc is used for each frame's heading
|
||||
* - h2.toc is used for subheadings within each frame.
|
||||
*/
|
||||
h1.toc { text-align: center; font-size: 105%;
|
||||
margin: 0; font-weight: bold;
|
||||
padding: 0; }
|
||||
h2.toc { font-size: 100%; font-weight: bold;
|
||||
margin: 0.5em 0 0 -0.3em; }
|
||||
|
||||
/* Syntax Highlighting for Source Code
|
||||
* - doctest examples are displayed in a 'pre.py-doctest' block.
|
||||
* If the example is in a details table entry, then it will use
|
||||
* the colors specified by the 'table pre.py-doctest' line.
|
||||
* - Source code listings are displayed in a 'pre.py-src' block.
|
||||
* Each line is marked with 'span.py-line' (used to draw a line
|
||||
* down the left margin, separating the code from the line
|
||||
* numbers). Line numbers are displayed with 'span.py-lineno'.
|
||||
* The expand/collapse block toggle button is displayed with
|
||||
* 'a.py-toggle' (Note: the CSS style for 'a.py-toggle' should not
|
||||
* modify the font size of the text.)
|
||||
* - If a source code page is opened with an anchor, then the
|
||||
* corresponding code block will be highlighted. The code
|
||||
* block's header is highlighted with 'py-highlight-hdr'; and
|
||||
* the code block's body is highlighted with 'py-highlight'.
|
||||
* - The remaining py-* classes are used to perform syntax
|
||||
* highlighting (py-string for string literals, py-name for names,
|
||||
* etc.)
|
||||
*/
|
||||
pre.py-doctest { padding: .5em; margin: 1em;
|
||||
background: #e8f0f8; color: #000000;
|
||||
border: 1px solid #708890; }
|
||||
table pre.py-doctest { background: #dce4ec;
|
||||
color: #000000; }
|
||||
pre.py-src { border: 2px solid #000000;
|
||||
background: #f0f0f0; color: #000000; }
|
||||
.py-line { border-left: 2px solid #000000;
|
||||
margin-left: .2em; padding-left: .4em; }
|
||||
.py-lineno { font-style: italic; font-size: 90%;
|
||||
padding-left: .5em; }
|
||||
a.py-toggle { text-decoration: none; }
|
||||
div.py-highlight-hdr { border-top: 2px solid #000000;
|
||||
border-bottom: 2px solid #000000;
|
||||
background: #d8e8e8; }
|
||||
div.py-highlight { border-bottom: 2px solid #000000;
|
||||
background: #d0e0e0; }
|
||||
.py-prompt { color: #005050; font-weight: bold;}
|
||||
.py-more { color: #005050; font-weight: bold;}
|
||||
.py-string { color: #006030; }
|
||||
.py-comment { color: #003060; }
|
||||
.py-keyword { color: #600000; }
|
||||
.py-output { color: #404040; }
|
||||
.py-name { color: #000050; }
|
||||
.py-name:link { color: #000050 !important; }
|
||||
.py-name:visited { color: #000050 !important; }
|
||||
.py-number { color: #005000; }
|
||||
.py-defname { color: #000060; font-weight: bold; }
|
||||
.py-def-name { color: #000060; font-weight: bold; }
|
||||
.py-base-class { color: #000060; }
|
||||
.py-param { color: #000060; }
|
||||
.py-docstring { color: #006030; }
|
||||
.py-decorator { color: #804020; }
|
||||
/* Use this if you don't want links to names underlined: */
|
||||
/*a.py-name { text-decoration: none; }*/
|
||||
|
||||
/* Graphs & Diagrams
|
||||
* - These CSS styles are used for graphs & diagrams generated using
|
||||
* Graphviz dot. 'img.graph-without-title' is used for bare
|
||||
* diagrams (to remove the border created by making the image
|
||||
* clickable).
|
||||
*/
|
||||
img.graph-without-title { border: none; }
|
||||
img.graph-with-title { border: 1px solid #000000; }
|
||||
span.graph-title { font-weight: bold; }
|
||||
span.graph-caption { }
|
||||
|
||||
/* General-purpose classes
|
||||
* - 'p.indent-wrapped-lines' defines a paragraph whose first line
|
||||
* is not indented, but whose subsequent lines are.
|
||||
* - The 'nomargin-top' class is used to remove the top margin (e.g.
|
||||
* from lists). The 'nomargin' class is used to remove both the
|
||||
* top and bottom margin (but not the left or right margin --
|
||||
* for lists, that would cause the bullets to disappear.)
|
||||
*/
|
||||
p.indent-wrapped-lines { padding: 0 0 0 7em; text-indent: -7em;
|
||||
margin: 0; }
|
||||
.nomargin-top { margin-top: 0; }
|
||||
.nomargin { margin-top: 0; margin-bottom: 0; }
|
||||
|
||||
/* HTML Log */
|
||||
div.log-block { padding: 0; margin: .5em 0 .5em 0;
|
||||
background: #e8f0f8; color: #000000;
|
||||
border: 1px solid #000000; }
|
||||
div.log-error { padding: .1em .3em .1em .3em; margin: 4px;
|
||||
background: #ffb0b0; color: #000000;
|
||||
border: 1px solid #000000; }
|
||||
div.log-warning { padding: .1em .3em .1em .3em; margin: 4px;
|
||||
background: #ffffb0; color: #000000;
|
||||
border: 1px solid #000000; }
|
||||
div.log-info { padding: .1em .3em .1em .3em; margin: 4px;
|
||||
background: #b0ffb0; color: #000000;
|
||||
border: 1px solid #000000; }
|
||||
h2.log-hdr { background: #70b0ff; color: #000000;
|
||||
margin: 0; padding: 0em 0.5em 0em 0.5em;
|
||||
border-bottom: 1px solid #000000; font-size: 110%; }
|
||||
p.log { font-weight: bold; margin: .5em 0 .5em 0; }
|
||||
tr.opt-changed { color: #000000; font-weight: bold; }
|
||||
tr.opt-default { color: #606060; }
|
||||
pre.log { margin: 0; padding: 0; padding-left: 1em; }
|
||||
293
html/epydoc.js
vendored
Normal file
293
html/epydoc.js
vendored
Normal file
@@ -0,0 +1,293 @@
|
||||
function toggle_private() {
|
||||
// Search for any private/public links on this page. Store
|
||||
// their old text in "cmd," so we will know what action to
|
||||
// take; and change their text to the opposite action.
|
||||
var cmd = "?";
|
||||
var elts = document.getElementsByTagName("a");
|
||||
for(var i=0; i<elts.length; i++) {
|
||||
if (elts[i].className == "privatelink") {
|
||||
cmd = elts[i].innerHTML;
|
||||
elts[i].innerHTML = ((cmd && cmd.substr(0,4)=="show")?
|
||||
"hide private":"show private");
|
||||
}
|
||||
}
|
||||
// Update all DIVs containing private objects.
|
||||
var elts = document.getElementsByTagName("div");
|
||||
for(var i=0; i<elts.length; i++) {
|
||||
if (elts[i].className == "private") {
|
||||
elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?"none":"block");
|
||||
}
|
||||
else if (elts[i].className == "public") {
|
||||
elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?"block":"none");
|
||||
}
|
||||
}
|
||||
// Update all table rows containing private objects. Note, we
|
||||
// use "" instead of "block" becaue IE & firefox disagree on what
|
||||
// this should be (block vs table-row), and "" just gives the
|
||||
// default for both browsers.
|
||||
var elts = document.getElementsByTagName("tr");
|
||||
for(var i=0; i<elts.length; i++) {
|
||||
if (elts[i].className == "private") {
|
||||
elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?"none":"");
|
||||
}
|
||||
}
|
||||
// Update all list items containing private objects.
|
||||
var elts = document.getElementsByTagName("li");
|
||||
for(var i=0; i<elts.length; i++) {
|
||||
if (elts[i].className == "private") {
|
||||
elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?
|
||||
"none":"");
|
||||
}
|
||||
}
|
||||
// Update all list items containing private objects.
|
||||
var elts = document.getElementsByTagName("ul");
|
||||
for(var i=0; i<elts.length; i++) {
|
||||
if (elts[i].className == "private") {
|
||||
elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?"none":"block");
|
||||
}
|
||||
}
|
||||
// Set a cookie to remember the current option.
|
||||
document.cookie = "EpydocPrivate="+cmd;
|
||||
}
|
||||
function show_private() {
|
||||
var elts = document.getElementsByTagName("a");
|
||||
for(var i=0; i<elts.length; i++) {
|
||||
if (elts[i].className == "privatelink") {
|
||||
cmd = elts[i].innerHTML;
|
||||
if (cmd && cmd.substr(0,4)=="show")
|
||||
toggle_private();
|
||||
}
|
||||
}
|
||||
}
|
||||
function getCookie(name) {
|
||||
var dc = document.cookie;
|
||||
var prefix = name + "=";
|
||||
var begin = dc.indexOf("; " + prefix);
|
||||
if (begin == -1) {
|
||||
begin = dc.indexOf(prefix);
|
||||
if (begin != 0) return null;
|
||||
} else
|
||||
{ begin += 2; }
|
||||
var end = document.cookie.indexOf(";", begin);
|
||||
if (end == -1)
|
||||
{ end = dc.length; }
|
||||
return unescape(dc.substring(begin + prefix.length, end));
|
||||
}
|
||||
function setFrame(url1, url2) {
|
||||
parent.frames[1].location.href = url1;
|
||||
parent.frames[2].location.href = url2;
|
||||
}
|
||||
function checkCookie() {
|
||||
var cmd=getCookie("EpydocPrivate");
|
||||
if (cmd && cmd.substr(0,4)!="show" && location.href.indexOf("#_") < 0)
|
||||
toggle_private();
|
||||
}
|
||||
function toggleCallGraph(id) {
|
||||
var elt = document.getElementById(id);
|
||||
if (elt.style.display == "none")
|
||||
elt.style.display = "block";
|
||||
else
|
||||
elt.style.display = "none";
|
||||
}
|
||||
function expand(id) {
|
||||
var elt = document.getElementById(id+"-expanded");
|
||||
if (elt) elt.style.display = "block";
|
||||
var elt = document.getElementById(id+"-expanded-linenums");
|
||||
if (elt) elt.style.display = "block";
|
||||
var elt = document.getElementById(id+"-collapsed");
|
||||
if (elt) { elt.innerHTML = ""; elt.style.display = "none"; }
|
||||
var elt = document.getElementById(id+"-collapsed-linenums");
|
||||
if (elt) { elt.innerHTML = ""; elt.style.display = "none"; }
|
||||
var elt = document.getElementById(id+"-toggle");
|
||||
if (elt) { elt.innerHTML = "-"; }
|
||||
}
|
||||
|
||||
function collapse(id) {
|
||||
var elt = document.getElementById(id+"-expanded");
|
||||
if (elt) elt.style.display = "none";
|
||||
var elt = document.getElementById(id+"-expanded-linenums");
|
||||
if (elt) elt.style.display = "none";
|
||||
var elt = document.getElementById(id+"-collapsed-linenums");
|
||||
if (elt) { elt.innerHTML = "<br />"; elt.style.display="block"; }
|
||||
var elt = document.getElementById(id+"-toggle");
|
||||
if (elt) { elt.innerHTML = "+"; }
|
||||
var elt = document.getElementById(id+"-collapsed");
|
||||
if (elt) {
|
||||
elt.style.display = "block";
|
||||
|
||||
var indent = elt.getAttribute("indent");
|
||||
var pad = elt.getAttribute("pad");
|
||||
var s = "<tt class='py-lineno'>";
|
||||
for (var i=0; i<pad.length; i++) { s += " " }
|
||||
s += "</tt>";
|
||||
s += " <tt class='py-line'>";
|
||||
for (var i=0; i<indent.length; i++) { s += " " }
|
||||
s += "<a href='#' onclick='expand(\"" + id;
|
||||
s += "\");return false'>...</a></tt><br />";
|
||||
elt.innerHTML = s;
|
||||
}
|
||||
}
|
||||
|
||||
function toggle(id) {
|
||||
elt = document.getElementById(id+"-toggle");
|
||||
if (elt.innerHTML == "-")
|
||||
collapse(id);
|
||||
else
|
||||
expand(id);
|
||||
return false;
|
||||
}
|
||||
|
||||
function highlight(id) {
|
||||
var elt = document.getElementById(id+"-def");
|
||||
if (elt) elt.className = "py-highlight-hdr";
|
||||
var elt = document.getElementById(id+"-expanded");
|
||||
if (elt) elt.className = "py-highlight";
|
||||
var elt = document.getElementById(id+"-collapsed");
|
||||
if (elt) elt.className = "py-highlight";
|
||||
}
|
||||
|
||||
function num_lines(s) {
|
||||
var n = 1;
|
||||
var pos = s.indexOf("\n");
|
||||
while ( pos > 0) {
|
||||
n += 1;
|
||||
pos = s.indexOf("\n", pos+1);
|
||||
}
|
||||
return n;
|
||||
}
|
||||
|
||||
// Collapse all blocks that mave more than `min_lines` lines.
|
||||
function collapse_all(min_lines) {
|
||||
var elts = document.getElementsByTagName("div");
|
||||
for (var i=0; i<elts.length; i++) {
|
||||
var elt = elts[i];
|
||||
var split = elt.id.indexOf("-");
|
||||
if (split > 0)
|
||||
if (elt.id.substring(split, elt.id.length) == "-expanded")
|
||||
if (num_lines(elt.innerHTML) > min_lines)
|
||||
collapse(elt.id.substring(0, split));
|
||||
}
|
||||
}
|
||||
|
||||
function expandto(href) {
|
||||
var start = href.indexOf("#")+1;
|
||||
if (start != 0 && start != href.length) {
|
||||
if (href.substring(start, href.length) != "-") {
|
||||
collapse_all(4);
|
||||
pos = href.indexOf(".", start);
|
||||
while (pos != -1) {
|
||||
var id = href.substring(start, pos);
|
||||
expand(id);
|
||||
pos = href.indexOf(".", pos+1);
|
||||
}
|
||||
var id = href.substring(start, href.length);
|
||||
expand(id);
|
||||
highlight(id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function kill_doclink(id) {
|
||||
var parent = document.getElementById(id);
|
||||
parent.removeChild(parent.childNodes.item(0));
|
||||
}
|
||||
function auto_kill_doclink(ev) {
|
||||
if (!ev) var ev = window.event;
|
||||
if (!this.contains(ev.toElement)) {
|
||||
var parent = document.getElementById(this.parentID);
|
||||
parent.removeChild(parent.childNodes.item(0));
|
||||
}
|
||||
}
|
||||
|
||||
function doclink(id, name, targets_id) {
|
||||
var elt = document.getElementById(id);
|
||||
|
||||
// If we already opened the box, then destroy it.
|
||||
// (This case should never occur, but leave it in just in case.)
|
||||
if (elt.childNodes.length > 1) {
|
||||
elt.removeChild(elt.childNodes.item(0));
|
||||
}
|
||||
else {
|
||||
// The outer box: relative + inline positioning.
|
||||
var box1 = document.createElement("div");
|
||||
box1.style.position = "relative";
|
||||
box1.style.display = "inline";
|
||||
box1.style.top = 0;
|
||||
box1.style.left = 0;
|
||||
|
||||
// A shadow for fun
|
||||
var shadow = document.createElement("div");
|
||||
shadow.style.position = "absolute";
|
||||
shadow.style.left = "-1.3em";
|
||||
shadow.style.top = "-1.3em";
|
||||
shadow.style.background = "#404040";
|
||||
|
||||
// The inner box: absolute positioning.
|
||||
var box2 = document.createElement("div");
|
||||
box2.style.position = "relative";
|
||||
box2.style.border = "1px solid #a0a0a0";
|
||||
box2.style.left = "-.2em";
|
||||
box2.style.top = "-.2em";
|
||||
box2.style.background = "white";
|
||||
box2.style.padding = ".3em .4em .3em .4em";
|
||||
box2.style.fontStyle = "normal";
|
||||
box2.onmouseout=auto_kill_doclink;
|
||||
box2.parentID = id;
|
||||
|
||||
// Get the targets
|
||||
var targets_elt = document.getElementById(targets_id);
|
||||
var targets = targets_elt.getAttribute("targets");
|
||||
var links = "";
|
||||
target_list = targets.split(",");
|
||||
for (var i=0; i<target_list.length; i++) {
|
||||
var target = target_list[i].split("=");
|
||||
links += "<li><a href='" + target[1] +
|
||||
"' style='text-decoration:none'>" +
|
||||
target[0] + "</a></li>";
|
||||
}
|
||||
|
||||
// Put it all together.
|
||||
elt.insertBefore(box1, elt.childNodes.item(0));
|
||||
//box1.appendChild(box2);
|
||||
box1.appendChild(shadow);
|
||||
shadow.appendChild(box2);
|
||||
box2.innerHTML =
|
||||
"Which <b>"+name+"</b> do you want to see documentation for?" +
|
||||
"<ul style='margin-bottom: 0;'>" +
|
||||
links +
|
||||
"<li><a href='#' style='text-decoration:none' " +
|
||||
"onclick='kill_doclink(\""+id+"\");return false;'>"+
|
||||
"<i>None of the above</i></a></li></ul>";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function get_anchor() {
|
||||
var href = location.href;
|
||||
var start = href.indexOf("#")+1;
|
||||
if ((start != 0) && (start != href.length))
|
||||
return href.substring(start, href.length);
|
||||
}
|
||||
function redirect_url(dottedName) {
|
||||
// Scan through each element of the "pages" list, and check
|
||||
// if "name" matches with any of them.
|
||||
for (var i=0; i<pages.length; i++) {
|
||||
|
||||
// Each page has the form "<pagename>-m" or "<pagename>-c";
|
||||
// extract the <pagename> portion & compare it to dottedName.
|
||||
var pagename = pages[i].substring(0, pages[i].length-2);
|
||||
if (pagename == dottedName.substring(0,pagename.length)) {
|
||||
|
||||
// We've found a page that matches `dottedName`;
|
||||
// construct its URL, using leftover `dottedName`
|
||||
// content to form an anchor.
|
||||
var pagetype = pages[i].charAt(pages[i].length-1);
|
||||
var url = pagename + ((pagetype=="m")?"-module.html":
|
||||
"-class.html");
|
||||
if (dottedName.length > pagename.length)
|
||||
url += "#" + dottedName.substring(pagename.length+1,
|
||||
dottedName.length);
|
||||
return url;
|
||||
}
|
||||
}
|
||||
}
|
||||
17
html/frames.html
vendored
Normal file
17
html/frames.html
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
|
||||
"DTD/xhtml1-frameset.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title> API Documentation </title>
|
||||
</head>
|
||||
<frameset cols="20%,80%">
|
||||
<frameset rows="30%,70%">
|
||||
<frame src="toc.html" name="moduleListFrame"
|
||||
id="moduleListFrame" />
|
||||
<frame src="toc-everything.html" name="moduleFrame"
|
||||
id="moduleFrame" />
|
||||
</frameset>
|
||||
<frame src="pypat-module.html" name="mainFrame" id="mainFrame" />
|
||||
</frameset>
|
||||
</html>
|
||||
268
html/help.html
vendored
Normal file
268
html/help.html
vendored
Normal file
@@ -0,0 +1,268 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Help</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th bgcolor="#70b0f0" class="navbar-select"
|
||||
> Help </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%"> </td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="help.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1 class="epydoc"> API Documentation </h1>
|
||||
|
||||
<p> This document contains the API (Application Programming Interface)
|
||||
documentation for this project. Documentation for the Python
|
||||
objects defined by the project is divided into separate pages for each
|
||||
package, module, and class. The API documentation also includes two
|
||||
pages containing information about the project as a whole: a trees
|
||||
page, and an index page. </p>
|
||||
|
||||
<h2> Object Documentation </h2>
|
||||
|
||||
<p>Each <strong>Package Documentation</strong> page contains: </p>
|
||||
<ul>
|
||||
<li> A description of the package. </li>
|
||||
<li> A list of the modules and sub-packages contained by the
|
||||
package. </li>
|
||||
<li> A summary of the classes defined by the package. </li>
|
||||
<li> A summary of the functions defined by the package. </li>
|
||||
<li> A summary of the variables defined by the package. </li>
|
||||
<li> A detailed description of each function defined by the
|
||||
package. </li>
|
||||
<li> A detailed description of each variable defined by the
|
||||
package. </li>
|
||||
</ul>
|
||||
|
||||
<p>Each <strong>Module Documentation</strong> page contains:</p>
|
||||
<ul>
|
||||
<li> A description of the module. </li>
|
||||
<li> A summary of the classes defined by the module. </li>
|
||||
<li> A summary of the functions defined by the module. </li>
|
||||
<li> A summary of the variables defined by the module. </li>
|
||||
<li> A detailed description of each function defined by the
|
||||
module. </li>
|
||||
<li> A detailed description of each variable defined by the
|
||||
module. </li>
|
||||
</ul>
|
||||
|
||||
<p>Each <strong>Class Documentation</strong> page contains: </p>
|
||||
<ul>
|
||||
<li> A class inheritance diagram. </li>
|
||||
<li> A list of known subclasses. </li>
|
||||
<li> A description of the class. </li>
|
||||
<li> A summary of the methods defined by the class. </li>
|
||||
<li> A summary of the instance variables defined by the class. </li>
|
||||
<li> A summary of the class (static) variables defined by the
|
||||
class. </li>
|
||||
<li> A detailed description of each method defined by the
|
||||
class. </li>
|
||||
<li> A detailed description of each instance variable defined by the
|
||||
class. </li>
|
||||
<li> A detailed description of each class (static) variable defined
|
||||
by the class. </li>
|
||||
</ul>
|
||||
|
||||
<h2> Project Documentation </h2>
|
||||
|
||||
<p> The <strong>Trees</strong> page contains the module and class hierarchies: </p>
|
||||
<ul>
|
||||
<li> The <em>module hierarchy</em> lists every package and module, with
|
||||
modules grouped into packages. At the top level, and within each
|
||||
package, modules and sub-packages are listed alphabetically. </li>
|
||||
<li> The <em>class hierarchy</em> lists every class, grouped by base
|
||||
class. If a class has more than one base class, then it will be
|
||||
listed under each base class. At the top level, and under each base
|
||||
class, classes are listed alphabetically. </li>
|
||||
</ul>
|
||||
|
||||
<p> The <strong>Index</strong> page contains indices of terms and
|
||||
identifiers: </p>
|
||||
<ul>
|
||||
<li> The <em>term index</em> lists every term indexed by any object's
|
||||
documentation. For each term, the index provides links to each
|
||||
place where the term is indexed. </li>
|
||||
<li> The <em>identifier index</em> lists the (short) name of every package,
|
||||
module, class, method, function, variable, and parameter. For each
|
||||
identifier, the index provides a short description, and a link to
|
||||
its documentation. </li>
|
||||
</ul>
|
||||
|
||||
<h2> The Table of Contents </h2>
|
||||
|
||||
<p> The table of contents occupies the two frames on the left side of
|
||||
the window. The upper-left frame displays the <em>project
|
||||
contents</em>, and the lower-left frame displays the <em>module
|
||||
contents</em>: </p>
|
||||
|
||||
<table class="help summary" border="1" cellspacing="0" cellpadding="3">
|
||||
<tr style="height: 30%">
|
||||
<td align="center" style="font-size: small">
|
||||
Project<br />Contents<hr />...</td>
|
||||
<td align="center" style="font-size: small" rowspan="2" width="70%">
|
||||
API<br />Documentation<br />Frame<br /><br /><br />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" style="font-size: small">
|
||||
Module<br />Contents<hr /> <br />...<br />
|
||||
</td>
|
||||
</tr>
|
||||
</table><br />
|
||||
|
||||
<p> The <strong>project contents frame</strong> contains a list of all packages
|
||||
and modules that are defined by the project. Clicking on an entry
|
||||
will display its contents in the module contents frame. Clicking on a
|
||||
special entry, labeled "Everything," will display the contents of
|
||||
the entire project. </p>
|
||||
|
||||
<p> The <strong>module contents frame</strong> contains a list of every
|
||||
submodule, class, type, exception, function, and variable defined by a
|
||||
module or package. Clicking on an entry will display its
|
||||
documentation in the API documentation frame. Clicking on the name of
|
||||
the module, at the top of the frame, will display the documentation
|
||||
for the module itself. </p>
|
||||
|
||||
<p> The "<strong>frames</strong>" and "<strong>no frames</strong>" buttons below the top
|
||||
navigation bar can be used to control whether the table of contents is
|
||||
displayed or not. </p>
|
||||
|
||||
<h2> The Navigation Bar </h2>
|
||||
|
||||
<p> A navigation bar is located at the top and bottom of every page.
|
||||
It indicates what type of page you are currently viewing, and allows
|
||||
you to go to related pages. The following table describes the labels
|
||||
on the navigation bar. Note that not some labels (such as
|
||||
[Parent]) are not displayed on all pages. </p>
|
||||
|
||||
<table class="summary" border="1" cellspacing="0" cellpadding="3" width="100%">
|
||||
<tr class="summary">
|
||||
<th>Label</th>
|
||||
<th>Highlighted when...</th>
|
||||
<th>Links to...</th>
|
||||
</tr>
|
||||
<tr><td valign="top"><strong>[Parent]</strong></td>
|
||||
<td valign="top"><em>(never highlighted)</em></td>
|
||||
<td valign="top"> the parent of the current package </td></tr>
|
||||
<tr><td valign="top"><strong>[Package]</strong></td>
|
||||
<td valign="top">viewing a package</td>
|
||||
<td valign="top">the package containing the current object
|
||||
</td></tr>
|
||||
<tr><td valign="top"><strong>[Module]</strong></td>
|
||||
<td valign="top">viewing a module</td>
|
||||
<td valign="top">the module containing the current object
|
||||
</td></tr>
|
||||
<tr><td valign="top"><strong>[Class]</strong></td>
|
||||
<td valign="top">viewing a class </td>
|
||||
<td valign="top">the class containing the current object</td></tr>
|
||||
<tr><td valign="top"><strong>[Trees]</strong></td>
|
||||
<td valign="top">viewing the trees page</td>
|
||||
<td valign="top"> the trees page </td></tr>
|
||||
<tr><td valign="top"><strong>[Index]</strong></td>
|
||||
<td valign="top">viewing the index page</td>
|
||||
<td valign="top"> the index page </td></tr>
|
||||
<tr><td valign="top"><strong>[Help]</strong></td>
|
||||
<td valign="top">viewing the help page</td>
|
||||
<td valign="top"> the help page </td></tr>
|
||||
</table>
|
||||
|
||||
<p> The "<strong>show private</strong>" and "<strong>hide private</strong>" buttons below
|
||||
the top navigation bar can be used to control whether documentation
|
||||
for private objects is displayed. Private objects are usually defined
|
||||
as objects whose (short) names begin with a single underscore, but do
|
||||
not end with an underscore. For example, "<code>_x</code>",
|
||||
"<code>__pprint</code>", and "<code>epydoc.epytext._tokenize</code>"
|
||||
are private objects; but "<code>re.sub</code>",
|
||||
"<code>__init__</code>", and "<code>type_</code>" are not. However,
|
||||
if a module defines the "<code>__all__</code>" variable, then its
|
||||
contents are used to decide which objects are private. </p>
|
||||
|
||||
<p> A timestamp below the bottom navigation bar indicates when each
|
||||
page was last updated. </p>
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th bgcolor="#70b0f0" class="navbar-select"
|
||||
> Help </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
638
html/identifier-index.html
vendored
Normal file
638
html/identifier-index.html
vendored
Normal file
@@ -0,0 +1,638 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Identifier Index</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th bgcolor="#70b0f0" class="navbar-select"
|
||||
> Indices </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%"> </td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="identifier-index.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" width="100%">
|
||||
<tr valign="bottom"><td>
|
||||
<h1 class="epydoc">Identifier Index</h1>
|
||||
</td><td>
|
||||
[
|
||||
<a href="#A">A</a>
|
||||
<a href="#B">B</a>
|
||||
<a href="#C">C</a>
|
||||
<a href="#D">D</a>
|
||||
<a href="#E">E</a>
|
||||
<a href="#F">F</a>
|
||||
<a href="#G">G</a>
|
||||
<a href="#H">H</a>
|
||||
<a href="#I">I</a>
|
||||
J
|
||||
K
|
||||
L
|
||||
<a href="#M">M</a>
|
||||
<a href="#N">N</a>
|
||||
<a href="#O">O</a>
|
||||
<a href="#P">P</a>
|
||||
Q
|
||||
<a href="#R">R</a>
|
||||
<a href="#S">S</a>
|
||||
T
|
||||
<a href="#U">U</a>
|
||||
<a href="#V">V</a>
|
||||
W
|
||||
X
|
||||
Y
|
||||
Z
|
||||
<a href="#_">_</a>
|
||||
]
|
||||
</td></table>
|
||||
<table border="0" width="100%">
|
||||
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="A">A</a></h2></td>
|
||||
<td valign="top">
|
||||
<table class="link-index" width="100%" border="1">
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pypat.creational.factory.AbstractFactory-class.html">AbstractFactory</a><br />
|
||||
<span class="index-where">(in <a href="pypat.creational.factory-module.html">pypat.creational.factory</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.command.Receiver-class.html#action">action()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.command.Receiver-class.html">Receiver</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.structural.composite.Composite-class.html#add_component">add_component()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.structural.composite.Composite-class.html">Composite</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.visitor.Visitee-class.html#accept">accept()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.visitor.Visitee-class.html">Visitee</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.structural.adapter-module.html">adapter</a><br />
|
||||
<span class="index-where">(in <a href="pypat.structural-module.html">pypat.structural</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.observer.Observable-class.html#attach">attach()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.observer.Observable-class.html">Observable</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pypat.creational.pool.Pool-class.html#acquire">acquire()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.creational.pool.Pool-class.html">Pool</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.structural.adapter.Adapter-class.html">Adapter</a><br />
|
||||
<span class="index-where">(in <a href="pypat.structural.adapter-module.html">pypat.structural.adapter</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="B">B</a></h2></td>
|
||||
<td valign="top">
|
||||
<table class="link-index" width="100%" border="1">
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral-module.html">behavioral</a><br />
|
||||
<span class="index-where">(in <a href="pypat-module.html">pypat</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.creational.builder-module.html">builder</a><br />
|
||||
<span class="index-where">(in <a href="pypat.creational-module.html">pypat.creational</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pypat.creational.builder.Builder-class.html#build">build()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.creational.builder.Builder-class.html">Builder</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.creational.builder.Builder-class.html">Builder</a><br />
|
||||
<span class="index-where">(in <a href="pypat.creational.builder-module.html">pypat.creational.builder</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="C">C</a></h2></td>
|
||||
<td valign="top">
|
||||
<table class="link-index" width="100%" border="1">
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pypat.structural.decorator.CallWrapper-class.html">CallWrapper</a><br />
|
||||
<span class="index-where">(in <a href="pypat.structural.decorator-module.html">pypat.structural.decorator</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.command.Command-class.html">Command</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.command-module.html">pypat.behavioral.command</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.creational.builder.Director-class.html#construct">construct()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.creational.builder.Director-class.html">Director</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.chain-module.html">chain</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral-module.html">pypat.behavioral</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.memento.Originator-class.html#commit">commit()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.memento.Originator-class.html">Originator</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.creational.factory.AbstractFactory-class.html#create">create()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.creational.factory.AbstractFactory-class.html">AbstractFactory</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.chain.Chain-class.html">Chain</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.chain-module.html">pypat.behavioral.chain</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.structural.composite-module.html">composite</a><br />
|
||||
<span class="index-where">(in <a href="pypat.structural-module.html">pypat.structural</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.creational.factory.Factory-class.html#create">create()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.creational.factory.Factory-class.html">Factory</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.chain.ChainLink-class.html">ChainLink</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.chain-module.html">pypat.behavioral.chain</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.structural.composite.Composite-class.html">Composite</a><br />
|
||||
<span class="index-where">(in <a href="pypat.structural.composite-module.html">pypat.structural.composite</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.creational-module.html">creational</a><br />
|
||||
<span class="index-where">(in <a href="pypat-module.html">pypat</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.command-module.html">command</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral-module.html">pypat.behavioral</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.mediator.Mediator-class.html#connect">connect()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.mediator.Mediator-class.html">Mediator</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="D">D</a></h2></td>
|
||||
<td valign="top">
|
||||
<table class="link-index" width="100%" border="1">
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pypat.structural.decorator-module.html">decorator</a><br />
|
||||
<span class="index-where">(in <a href="pypat.structural-module.html">pypat.structural</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.structural.decorator.DecoratorSimple-class.html">DecoratorSimple</a><br />
|
||||
<span class="index-where">(in <a href="pypat.structural.decorator-module.html">pypat.structural.decorator</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.mediator.Mediator-class.html#disconnect">disconnect()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.mediator.Mediator-class.html">Mediator</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pypat.structural.decorator.Decorator-class.html">Decorator</a><br />
|
||||
<span class="index-where">(in <a href="pypat.structural.decorator-module.html">pypat.structural.decorator</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.observer.Observable-class.html#detach">detach()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.observer.Observable-class.html">Observable</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pypat.structural.decorator.DecoratorComplex-class.html">DecoratorComplex</a><br />
|
||||
<span class="index-where">(in <a href="pypat.structural.decorator-module.html">pypat.structural.decorator</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.creational.builder.Director-class.html">Director</a><br />
|
||||
<span class="index-where">(in <a href="pypat.creational.builder-module.html">pypat.creational.builder</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="E">E</a></h2></td>
|
||||
<td valign="top">
|
||||
<table class="link-index" width="100%" border="1">
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.command.Command-class.html#execute">execute()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.command.Command-class.html">Command</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.command.Invoker-class.html#execute">execute()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.command.Invoker-class.html">Invoker</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
<tr><td class="link-index"> </td><td class="link-index"> </td><td class="link-index"> </td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="F">F</a></h2></td>
|
||||
<td valign="top">
|
||||
<table class="link-index" width="100%" border="1">
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pypat.creational.factory-module.html">factory</a><br />
|
||||
<span class="index-where">(in <a href="pypat.creational-module.html">pypat.creational</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.chain.Chain-class.html#fail">fail()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.chain.Chain-class.html">Chain</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.structural.flyweight.FlyweightMeta-class.html">FlyweightMeta</a><br />
|
||||
<span class="index-where">(in <a href="pypat.structural.flyweight-module.html">pypat.structural.flyweight</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pypat.creational.factory.Factory-class.html">Factory</a><br />
|
||||
<span class="index-where">(in <a href="pypat.creational.factory-module.html">pypat.creational.factory</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.structural.flyweight-module.html">flyweight</a><br />
|
||||
<span class="index-where">(in <a href="pypat.structural-module.html">pypat.structural</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="G">G</a></h2></td>
|
||||
<td valign="top">
|
||||
<table class="link-index" width="100%" border="1">
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.visitor.Visitor-class.html#generic_visit">generic_visit()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.visitor.Visitor-class.html">Visitor</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.creational.builder.Director-class.html#get_constructed_object">get_constructed_object()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.creational.builder.Director-class.html">Director</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
<tr><td class="link-index"> </td><td class="link-index"> </td><td class="link-index"> </td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="H">H</a></h2></td>
|
||||
<td valign="top">
|
||||
<table class="link-index" width="100%" border="1">
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.chain.Chain-class.html#handle">handle()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.chain.Chain-class.html">Chain</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.chain.ChainLink-class.html#handle">handle()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.chain.ChainLink-class.html">ChainLink</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
<tr><td class="link-index"> </td><td class="link-index"> </td><td class="link-index"> </td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="I">I</a></h2></td>
|
||||
<td valign="top">
|
||||
<table class="link-index" width="100%" border="1">
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.command.Invoker-class.html">Invoker</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.command-module.html">pypat.behavioral.command</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.iterator-module.html">iterator</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral-module.html">pypat.behavioral</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.iterator.Iterable-class.html">Iterable</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.iterator-module.html">pypat.behavioral.iterator</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.iterator.Iterator-class.html">Iterator</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.iterator-module.html">pypat.behavioral.iterator</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="M">M</a></h2></td>
|
||||
<td valign="top">
|
||||
<table class="link-index" width="100%" border="1">
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.mediator-module.html">mediator</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral-module.html">pypat.behavioral</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.memento-module.html">memento</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral-module.html">pypat.behavioral</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.mediator.Mediator-class.html">Mediator</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.mediator-module.html">pypat.behavioral.mediator</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.memento.Memento-class.html">Memento</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.memento-module.html">pypat.behavioral.memento</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="N">N</a></h2></td>
|
||||
<td valign="top">
|
||||
<table class="link-index" width="100%" border="1">
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.observer.Observable-class.html#notify">notify()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.observer.Observable-class.html">Observable</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.null-module.html">null</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral-module.html">pypat.behavioral</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.null.Null-class.html">Null</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.null-module.html">pypat.behavioral.null</a>)</span></td>
|
||||
</tr>
|
||||
<tr><td class="link-index"> </td><td class="link-index"> </td><td class="link-index"> </td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="O">O</a></h2></td>
|
||||
<td valign="top">
|
||||
<table class="link-index" width="100%" border="1">
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.observer.Observable-class.html">Observable</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.observer-module.html">pypat.behavioral.observer</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.observer.Observer-class.html">Observer</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.observer-module.html">pypat.behavioral.observer</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.memento.Originator-class.html">Originator</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.memento-module.html">pypat.behavioral.memento</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.observer-module.html">observer</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral-module.html">pypat.behavioral</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.structural.adapter.Adapter-class.html#original_dict">original_dict()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.structural.adapter.Adapter-class.html">Adapter</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="P">P</a></h2></td>
|
||||
<td valign="top">
|
||||
<table class="link-index" width="100%" border="1">
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pypat.creational.pool-module.html">pool</a><br />
|
||||
<span class="index-where">(in <a href="pypat.creational-module.html">pypat.creational</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.creational.prototype-module.html">prototype</a><br />
|
||||
<span class="index-where">(in <a href="pypat.creational-module.html">pypat.creational</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.creational.prototype.Prototype-class.html#prototype">prototype()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.creational.prototype.Prototype-class.html">Prototype</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pypat.creational.pool.Pool-class.html">Pool</a><br />
|
||||
<span class="index-where">(in <a href="pypat.creational.pool-module.html">pypat.creational.pool</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.creational.prototype.Prototype-class.html">Prototype</a><br />
|
||||
<span class="index-where">(in <a href="pypat.creational.prototype-module.html">pypat.creational.prototype</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat-module.html">pypat</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="R">R</a></h2></td>
|
||||
<td valign="top">
|
||||
<table class="link-index" width="100%" border="1">
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.command.Receiver-class.html">Receiver</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.command-module.html">pypat.behavioral.command</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.structural.composite.Composite-class.html#remove_component">remove_component()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.structural.composite.Composite-class.html">Composite</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.creational.pool.Reusable-class.html">Reusable</a><br />
|
||||
<span class="index-where">(in <a href="pypat.creational.pool-module.html">pypat.creational.pool</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pypat.creational.pool.Pool-class.html#release">release()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.creational.pool.Pool-class.html">Pool</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.creational.pool.Reusable-class.html#reset">reset()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.creational.pool.Reusable-class.html">Reusable</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.memento.Originator-class.html#rollback">rollback()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.memento.Originator-class.html">Originator</a>)</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="S">S</a></h2></td>
|
||||
<td valign="top">
|
||||
<table class="link-index" width="100%" border="1">
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.chain.ChainLink-class.html#set_successor">set_successor()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.chain.ChainLink-class.html">ChainLink</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.creational.singleton.Singleton-class.html">Singleton</a><br />
|
||||
<span class="index-where">(in <a href="pypat.creational.singleton-module.html">pypat.creational.singleton</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.chain.ChainLink-class.html#successor_handle">successor_handle()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.chain.ChainLink-class.html">ChainLink</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.mediator.Mediator-class.html#signal">signal()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.mediator.Mediator-class.html">Mediator</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.memento.Memento-class.html#state">state</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.memento.Memento-class.html">Memento</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pypat.creational.singleton-module.html">singleton</a><br />
|
||||
<span class="index-where">(in <a href="pypat.creational-module.html">pypat.creational</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.structural-module.html">structural</a><br />
|
||||
<span class="index-where">(in <a href="pypat-module.html">pypat</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="U">U</a></h2></td>
|
||||
<td valign="top">
|
||||
<table class="link-index" width="100%" border="1">
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.command.Invoker-class.html#undo">undo()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.command.Invoker-class.html">Invoker</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.command.Command-class.html#unexecute">unexecute()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.command.Command-class.html">Command</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.observer.Observer-class.html#update">update()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.observer.Observer-class.html">Observer</a>)</span></td>
|
||||
</tr>
|
||||
<tr><td class="link-index"> </td><td class="link-index"> </td><td class="link-index"> </td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="V">V</a></h2></td>
|
||||
<td valign="top">
|
||||
<table class="link-index" width="100%" border="1">
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.visitor.Visitor-class.html#visit">visit()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.visitor.Visitor-class.html">Visitor</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.visitor-module.html">visitor</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral-module.html">pypat.behavioral</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.visitor.Visitee-class.html">Visitee</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.visitor-module.html">pypat.behavioral.visitor</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.visitor.Visitor-class.html">Visitor</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.visitor-module.html">pypat.behavioral.visitor</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="_">_</a></h2></td>
|
||||
<td valign="top">
|
||||
<table class="link-index" width="100%" border="1">
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.null.Null-class.html#__bool__">__bool__()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.null.Null-class.html">Null</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.null.Null-class.html#__init__">__init__()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.null.Null-class.html">Null</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.memento-module.html#__package__">__package__</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.memento-module.html">pypat.behavioral.memento</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.null.Null-class.html#__call__">__call__()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.null.Null-class.html">Null</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.observer.Observable-class.html#__init__">__init__()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.observer.Observable-class.html">Observable</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.null-module.html#__package__">__package__</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.null-module.html">pypat.behavioral.null</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pypat.creational.singleton.Singleton-class.html#__call__">__call__()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.creational.singleton.Singleton-class.html">Singleton</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.creational.builder.Builder-class.html#__init__">__init__()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.creational.builder.Builder-class.html">Builder</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.creational-module.html#__package__">__package__</a><br />
|
||||
<span class="index-where">(in <a href="pypat.creational-module.html">pypat.creational</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pypat.structural.decorator.CallWrapper-class.html#__call__">__call__()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.structural.decorator.CallWrapper-class.html">CallWrapper</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.creational.builder.Director-class.html#__init__">__init__()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.creational.builder.Director-class.html">Director</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.creational.prototype-module.html#__package__">__package__</a><br />
|
||||
<span class="index-where">(in <a href="pypat.creational.prototype-module.html">pypat.creational.prototype</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pypat.structural.decorator.Decorator-class.html#__call__">__call__()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.structural.decorator.Decorator-class.html">Decorator</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.creational.factory.AbstractFactory-class.html#__init__">__init__()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.creational.factory.AbstractFactory-class.html">AbstractFactory</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.creational.singleton-module.html#__package__">__package__</a><br />
|
||||
<span class="index-where">(in <a href="pypat.creational.singleton-module.html">pypat.creational.singleton</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pypat.structural.decorator.DecoratorComplex-class.html#__call__">__call__()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.structural.decorator.DecoratorComplex-class.html">DecoratorComplex</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.creational.pool.Pool-class.html#__init__">__init__()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.creational.pool.Pool-class.html">Pool</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.structural-module.html#__package__">__package__</a><br />
|
||||
<span class="index-where">(in <a href="pypat.structural-module.html">pypat.structural</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pypat.structural.flyweight.FlyweightMeta-class.html#__call__">__call__()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.structural.flyweight.FlyweightMeta-class.html">FlyweightMeta</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.creational.pool.Reusable-class.html#__init__">__init__()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.creational.pool.Reusable-class.html">Reusable</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.structural.adapter-module.html#__package__">__package__</a><br />
|
||||
<span class="index-where">(in <a href="pypat.structural.adapter-module.html">pypat.structural.adapter</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.null.Null-class.html#__delattr__">__delattr__()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.null.Null-class.html">Null</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.structural.adapter.Adapter-class.html#__init__">__init__()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.structural.adapter.Adapter-class.html">Adapter</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.structural.composite-module.html#__package__">__package__</a><br />
|
||||
<span class="index-where">(in <a href="pypat.structural.composite-module.html">pypat.structural.composite</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pypat.structural.decorator.Decorator-class.html#__get__">__get__()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.structural.decorator.Decorator-class.html">Decorator</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.structural.composite.Composite-class.html#__init__">__init__()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.structural.composite.Composite-class.html">Composite</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.structural.flyweight-module.html#__package__">__package__</a><br />
|
||||
<span class="index-where">(in <a href="pypat.structural.flyweight-module.html">pypat.structural.flyweight</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.null.Null-class.html#__getattr__">__getattr__()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.null.Null-class.html">Null</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.structural.decorator.DecoratorComplex-class.html#__init__">__init__()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.structural.decorator.DecoratorComplex-class.html">DecoratorComplex</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.null.Null-class.html#__repr__">__repr__()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.null.Null-class.html">Null</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pypat.structural.adapter.Adapter-class.html#__getattr__">__getattr__()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.structural.adapter.Adapter-class.html">Adapter</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.structural.decorator.DecoratorSimple-class.html#__init__">__init__()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.structural.decorator.DecoratorSimple-class.html">DecoratorSimple</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.null.Null-class.html#__setattr__">__setattr__()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.null.Null-class.html">Null</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pypat.structural.composite.Composite-class.html#__getattr__">__getattr__()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.structural.composite.Composite-class.html">Composite</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.creational.singleton.Singleton-class.html#__instance">__instance</a><br />
|
||||
<span class="index-where">(in <a href="pypat.creational.singleton.Singleton-class.html">Singleton</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.null.Null-class.html#__str__">__str__()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.null.Null-class.html">Null</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.chain.Chain-class.html#__init__">__init__()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.chain.Chain-class.html">Chain</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.iterator.Iterator-class.html#__iter__">__iter__()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.iterator.Iterator-class.html">Iterator</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.structural.composite.Composite-class.html#_delegate">_delegate()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.structural.composite.Composite-class.html">Composite</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.chain.ChainLink-class.html#__init__">__init__()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.chain.ChainLink-class.html">ChainLink</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.structural.flyweight.FlyweightMeta-class.html#__new__">__new__()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.structural.flyweight.FlyweightMeta-class.html">FlyweightMeta</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.creational.pool.Pool-class.html#_expand">_expand()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.creational.pool.Pool-class.html">Pool</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.command.Command-class.html#__init__">__init__()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.command.Command-class.html">Command</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.iterator.Iterable-class.html#__next__">__next__()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.iterator.Iterable-class.html">Iterable</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.creational.builder.Builder-class.html#_register">_register()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.creational.builder.Builder-class.html">Builder</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.command.Invoker-class.html#__init__">__init__()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.command.Invoker-class.html">Invoker</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.iterator.Iterator-class.html#__next__">__next__()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.iterator.Iterator-class.html">Iterator</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.creational.factory.AbstractFactory-class.html#_register">_register()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.creational.factory.AbstractFactory-class.html">AbstractFactory</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.iterator.Iterator-class.html#__init__">__init__()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.iterator.Iterator-class.html">Iterator</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat-module.html#__package__">__package__</a><br />
|
||||
<span class="index-where">(in <a href="pypat-module.html">pypat</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.structural.flyweight.FlyweightMeta-class.html#_serialize">_serialize()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.structural.flyweight.FlyweightMeta-class.html">FlyweightMeta</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.mediator.Mediator-class.html#__init__">__init__()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.mediator.Mediator-class.html">Mediator</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral-module.html#__package__">__package__</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral-module.html">pypat.behavioral</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.memento.Memento-class.html#__init__">__init__()</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.memento.Memento-class.html">Memento</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypat.behavioral.mediator-module.html#__package__">__package__</a><br />
|
||||
<span class="index-where">(in <a href="pypat.behavioral.mediator-module.html">pypat.behavioral.mediator</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
</table>
|
||||
<br /><br /><!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th bgcolor="#70b0f0" class="navbar-select"
|
||||
> Indices </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
17
html/index.html
vendored
Normal file
17
html/index.html
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
|
||||
"DTD/xhtml1-frameset.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title> API Documentation </title>
|
||||
</head>
|
||||
<frameset cols="20%,80%">
|
||||
<frameset rows="30%,70%">
|
||||
<frame src="toc.html" name="moduleListFrame"
|
||||
id="moduleListFrame" />
|
||||
<frame src="toc-everything.html" name="moduleFrame"
|
||||
id="moduleFrame" />
|
||||
</frameset>
|
||||
<frame src="pypat-module.html" name="mainFrame" id="mainFrame" />
|
||||
</frameset>
|
||||
</html>
|
||||
137
html/module-tree.html
vendored
Normal file
137
html/module-tree.html
vendored
Normal file
@@ -0,0 +1,137 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module Hierarchy</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th bgcolor="#70b0f0" class="navbar-select"
|
||||
> Trees </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%"> </td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="module-tree.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<center><b>
|
||||
[ <a href="module-tree.html">Module Hierarchy</a>
|
||||
| <a href="class-tree.html">Class Hierarchy</a> ]
|
||||
</b></center><br />
|
||||
<h1 class="epydoc">Module Hierarchy</h1>
|
||||
<ul class="nomargin-top">
|
||||
<li> <strong class="uidlink"><a href="pypat-module.html">pypat</a></strong>
|
||||
<ul>
|
||||
<li> <strong class="uidlink"><a href="pypat.behavioral-module.html">pypat.behavioral</a></strong>
|
||||
<ul>
|
||||
<li> <strong class="uidlink"><a href="pypat.behavioral.chain-module.html">pypat.behavioral.chain</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypat.behavioral.command-module.html">pypat.behavioral.command</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypat.behavioral.iterator-module.html">pypat.behavioral.iterator</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypat.behavioral.mediator-module.html">pypat.behavioral.mediator</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypat.behavioral.memento-module.html">pypat.behavioral.memento</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypat.behavioral.null-module.html">pypat.behavioral.null</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypat.behavioral.observer-module.html">pypat.behavioral.observer</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypat.behavioral.visitor-module.html">pypat.behavioral.visitor</a></strong> </li>
|
||||
</ul>
|
||||
</li>
|
||||
<li> <strong class="uidlink"><a href="pypat.creational-module.html">pypat.creational</a></strong>
|
||||
<ul>
|
||||
<li> <strong class="uidlink"><a href="pypat.creational.builder-module.html">pypat.creational.builder</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypat.creational.factory-module.html">pypat.creational.factory</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypat.creational.pool-module.html">pypat.creational.pool</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypat.creational.prototype-module.html">pypat.creational.prototype</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypat.creational.singleton-module.html">pypat.creational.singleton</a></strong> </li>
|
||||
</ul>
|
||||
</li>
|
||||
<li> <strong class="uidlink"><a href="pypat.structural-module.html">pypat.structural</a></strong>
|
||||
<ul>
|
||||
<li> <strong class="uidlink"><a href="pypat.structural.adapter-module.html">pypat.structural.adapter</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypat.structural.composite-module.html">pypat.structural.composite</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypat.structural.decorator-module.html">pypat.structural.decorator</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypat.structural.flyweight-module.html">pypat.structural.flyweight</a></strong> </li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th bgcolor="#70b0f0" class="navbar-select"
|
||||
> Trees </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
180
html/pypat-module.html
vendored
Normal file
180
html/pypat-module.html
vendored
Normal file
@@ -0,0 +1,180 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th bgcolor="#70b0f0" class="navbar-select"
|
||||
> Home </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
Package pypat
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat-module.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== PACKAGE DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Package pypat</h1><p class="nomargin-top"><span class="codelink"><a href="pypat-pysrc.html">source code</a></span></p>
|
||||
<!-- ==================== SUBMODULES ==================== -->
|
||||
<a name="section-Submodules"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Submodules</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Submodules"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td class="summary">
|
||||
<ul class="nomargin">
|
||||
<li> <strong class="uidlink"><a href="pypat.behavioral-module.html">pypat.behavioral</a></strong>
|
||||
<ul>
|
||||
<li> <strong class="uidlink"><a href="pypat.behavioral.chain-module.html">pypat.behavioral.chain</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypat.behavioral.command-module.html">pypat.behavioral.command</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypat.behavioral.iterator-module.html">pypat.behavioral.iterator</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypat.behavioral.mediator-module.html">pypat.behavioral.mediator</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypat.behavioral.memento-module.html">pypat.behavioral.memento</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypat.behavioral.null-module.html">pypat.behavioral.null</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypat.behavioral.observer-module.html">pypat.behavioral.observer</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypat.behavioral.visitor-module.html">pypat.behavioral.visitor</a></strong> </li>
|
||||
</ul>
|
||||
</li>
|
||||
<li> <strong class="uidlink"><a href="pypat.creational-module.html">pypat.creational</a></strong>
|
||||
<ul>
|
||||
<li> <strong class="uidlink"><a href="pypat.creational.builder-module.html">pypat.creational.builder</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypat.creational.factory-module.html">pypat.creational.factory</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypat.creational.pool-module.html">pypat.creational.pool</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypat.creational.prototype-module.html">pypat.creational.prototype</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypat.creational.singleton-module.html">pypat.creational.singleton</a></strong> </li>
|
||||
</ul>
|
||||
</li>
|
||||
<li> <strong class="uidlink"><a href="pypat.structural-module.html">pypat.structural</a></strong>
|
||||
<ul>
|
||||
<li> <strong class="uidlink"><a href="pypat.structural.adapter-module.html">pypat.structural.adapter</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypat.structural.composite-module.html">pypat.structural.composite</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypat.structural.decorator-module.html">pypat.structural.decorator</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypat.structural.flyweight-module.html">pypat.structural.flyweight</a></strong> </li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul></td></tr>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
<!-- ==================== VARIABLES ==================== -->
|
||||
<a name="section-Variables"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Variables</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Variables"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="__package__"></a><span class="summary-name">__package__</span> = <code title="None">None</code>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th bgcolor="#70b0f0" class="navbar-select"
|
||||
> Home </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
111
html/pypat-pysrc.html
vendored
Normal file
111
html/pypat-pysrc.html
vendored
Normal file
@@ -0,0 +1,111 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th bgcolor="#70b0f0" class="navbar-select"
|
||||
> Home </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
Package pypat
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat-pysrc.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h1 class="epydoc">Source Code for <a href="pypat-module.html">Package pypat</a></h1>
|
||||
<pre class="py-src">
|
||||
<a name="L1"></a><tt class="py-lineno">1</tt> <tt class="py-line"> </tt>
|
||||
<a name="L2"></a><tt class="py-lineno">2</tt> <tt class="py-line"> </tt><script type="text/javascript">
|
||||
<!--
|
||||
expandto(location.href);
|
||||
// -->
|
||||
</script>
|
||||
</pre>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th bgcolor="#70b0f0" class="navbar-select"
|
||||
> Home </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
160
html/pypat.behavioral-module.html
vendored
Normal file
160
html/pypat.behavioral-module.html
vendored
Normal file
@@ -0,0 +1,160 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.behavioral</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
Package behavioral
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.behavioral-module.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== PACKAGE DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Package behavioral</h1><p class="nomargin-top"><span class="codelink"><a href="pypat.behavioral-pysrc.html">source code</a></span></p>
|
||||
<!-- ==================== SUBMODULES ==================== -->
|
||||
<a name="section-Submodules"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Submodules</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Submodules"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td class="summary">
|
||||
<ul class="nomargin">
|
||||
<li> <strong class="uidlink"><a href="pypat.behavioral.chain-module.html">pypat.behavioral.chain</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypat.behavioral.command-module.html">pypat.behavioral.command</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypat.behavioral.iterator-module.html">pypat.behavioral.iterator</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypat.behavioral.mediator-module.html">pypat.behavioral.mediator</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypat.behavioral.memento-module.html">pypat.behavioral.memento</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypat.behavioral.null-module.html">pypat.behavioral.null</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypat.behavioral.observer-module.html">pypat.behavioral.observer</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypat.behavioral.visitor-module.html">pypat.behavioral.visitor</a></strong> </li>
|
||||
</ul></td></tr>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
<!-- ==================== VARIABLES ==================== -->
|
||||
<a name="section-Variables"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Variables</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Variables"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="__package__"></a><span class="summary-name">__package__</span> = <code title="None">None</code>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
112
html/pypat.behavioral-pysrc.html
vendored
Normal file
112
html/pypat.behavioral-pysrc.html
vendored
Normal file
@@ -0,0 +1,112 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.behavioral</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
Package behavioral
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.behavioral-pysrc.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h1 class="epydoc">Source Code for <a href="pypat.behavioral-module.html">Package pypat.behavioral</a></h1>
|
||||
<pre class="py-src">
|
||||
<a name="L1"></a><tt class="py-lineno">1</tt> <tt class="py-line"> </tt>
|
||||
<a name="L2"></a><tt class="py-lineno">2</tt> <tt class="py-line"> </tt><script type="text/javascript">
|
||||
<!--
|
||||
expandto(location.href);
|
||||
// -->
|
||||
</script>
|
||||
</pre>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
139
html/pypat.behavioral.chain-module.html
vendored
Normal file
139
html/pypat.behavioral.chain-module.html
vendored
Normal file
@@ -0,0 +1,139 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.behavioral.chain</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.behavioral-module.html">Package behavioral</a> ::
|
||||
Module chain
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.behavioral.chain-module.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== MODULE DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Module chain</h1><p class="nomargin-top"><span class="codelink"><a href="pypat.behavioral.chain-pysrc.html">source code</a></span></p>
|
||||
<!-- ==================== CLASSES ==================== -->
|
||||
<a name="section-Classes"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Classes</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Classes"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="pypat.behavioral.chain.ChainLink-class.html" class="summary-name">ChainLink</a><br />
|
||||
Abstract ChainLink object as part of the Chain of Responsibility pattern.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="pypat.behavioral.chain.Chain-class.html" class="summary-name">Chain</a><br />
|
||||
Abstract Chain class as part of the Chain of Responsibility pattern.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
189
html/pypat.behavioral.chain-pysrc.html
vendored
Normal file
189
html/pypat.behavioral.chain-pysrc.html
vendored
Normal file
@@ -0,0 +1,189 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.behavioral.chain</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.behavioral-module.html">Package behavioral</a> ::
|
||||
Module chain
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.behavioral.chain-pysrc.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h1 class="epydoc">Source Code for <a href="pypat.behavioral.chain-module.html">Module pypat.behavioral.chain</a></h1>
|
||||
<pre class="py-src">
|
||||
<a name="L1"></a><tt class="py-lineno"> 1</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">abc</tt> <tt class="py-keyword">import</tt> <tt class="py-name">ABCMeta</tt><tt class="py-op">,</tt> <tt class="py-name">abstractmethod</tt> </tt>
|
||||
<a name="ChainLink"></a><div id="ChainLink-def"><a name="L2"></a><tt class="py-lineno"> 2</tt> <tt class="py-line"> </tt>
|
||||
<a name="L3"></a><tt class="py-lineno"> 3</tt> <tt class="py-line"> </tt>
|
||||
<a name="L4"></a><tt class="py-lineno"> 4</tt> <a class="py-toggle" href="#" id="ChainLink-toggle" onclick="return toggle('ChainLink');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pypat.behavioral.chain.ChainLink-class.html">ChainLink</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">,</tt> <tt class="py-base-class">metaclass</tt><tt class="py-op">=</tt><tt class="py-base-class">ABCMeta</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="ChainLink-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="ChainLink-expanded"><a name="L5"></a><tt class="py-lineno"> 5</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L6"></a><tt class="py-lineno"> 6</tt> <tt class="py-line"><tt class="py-docstring"> Abstract ChainLink object as part of the Chain of Responsibility pattern.</tt> </tt>
|
||||
<a name="L7"></a><tt class="py-lineno"> 7</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L8"></a><tt class="py-lineno"> 8</tt> <tt class="py-line"><tt class="py-docstring"> - External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}</tt> </tt>
|
||||
<a name="L9"></a><tt class="py-lineno"> 9</tt> <tt class="py-line"><tt class="py-docstring"> - External Chain of Responsibility Pattern documentation: U{https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern}</tt> </tt>
|
||||
<a name="L10"></a><tt class="py-lineno">10</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="ChainLink.__init__"></a><div id="ChainLink.__init__-def"><a name="L11"></a><tt class="py-lineno">11</tt> <a class="py-toggle" href="#" id="ChainLink.__init__-toggle" onclick="return toggle('ChainLink.__init__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.behavioral.chain.ChainLink-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="ChainLink.__init__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="ChainLink.__init__-expanded"><a name="L12"></a><tt class="py-lineno">12</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L13"></a><tt class="py-lineno">13</tt> <tt class="py-line"><tt class="py-docstring"> Initialize a new ChainLink instance.</tt> </tt>
|
||||
<a name="L14"></a><tt class="py-lineno">14</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L15"></a><tt class="py-lineno">15</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">successor</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
|
||||
</div><a name="L16"></a><tt class="py-lineno">16</tt> <tt class="py-line"> </tt>
|
||||
<a name="ChainLink.set_successor"></a><div id="ChainLink.set_successor-def"><a name="L17"></a><tt class="py-lineno">17</tt> <a class="py-toggle" href="#" id="ChainLink.set_successor-toggle" onclick="return toggle('ChainLink.set_successor');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.behavioral.chain.ChainLink-class.html#set_successor">set_successor</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">successor</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="ChainLink.set_successor-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="ChainLink.set_successor-expanded"><a name="L18"></a><tt class="py-lineno">18</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L19"></a><tt class="py-lineno">19</tt> <tt class="py-line"><tt class="py-docstring"> Set a chain link to call if this chain link fails.</tt> </tt>
|
||||
<a name="L20"></a><tt class="py-lineno">20</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L21"></a><tt class="py-lineno">21</tt> <tt class="py-line"><tt class="py-docstring"> @param successor: The chain link to call if this chain link fails.</tt> </tt>
|
||||
<a name="L22"></a><tt class="py-lineno">22</tt> <tt class="py-line"><tt class="py-docstring"> @type successor: ChainLink</tt> </tt>
|
||||
<a name="L23"></a><tt class="py-lineno">23</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L24"></a><tt class="py-lineno">24</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">successor</tt> <tt class="py-op">=</tt> <tt class="py-name">successor</tt> </tt>
|
||||
</div><a name="L25"></a><tt class="py-lineno">25</tt> <tt class="py-line"> </tt>
|
||||
<a name="ChainLink.successor_handle"></a><div id="ChainLink.successor_handle-def"><a name="L26"></a><tt class="py-lineno">26</tt> <a class="py-toggle" href="#" id="ChainLink.successor_handle-toggle" onclick="return toggle('ChainLink.successor_handle');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.behavioral.chain.ChainLink-class.html#successor_handle">successor_handle</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">request</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="ChainLink.successor_handle-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="ChainLink.successor_handle-expanded"><a name="L27"></a><tt class="py-lineno">27</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L28"></a><tt class="py-lineno">28</tt> <tt class="py-line"><tt class="py-docstring"> Have this chain links successor handle a request.</tt> </tt>
|
||||
<a name="L29"></a><tt class="py-lineno">29</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L30"></a><tt class="py-lineno">30</tt> <tt class="py-line"><tt class="py-docstring"> @param request: The request to handle.</tt> </tt>
|
||||
<a name="L31"></a><tt class="py-lineno">31</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L32"></a><tt class="py-lineno">32</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">successor</tt><tt class="py-op">.</tt><tt id="link-0" class="py-name" targets="Method pypat.behavioral.chain.Chain.handle()=pypat.behavioral.chain.Chain-class.html#handle,Method pypat.behavioral.chain.ChainLink.handle()=pypat.behavioral.chain.ChainLink-class.html#handle"><a title="pypat.behavioral.chain.Chain.handle
|
||||
pypat.behavioral.chain.ChainLink.handle" class="py-name" href="#" onclick="return doclink('link-0', 'handle', 'link-0');">handle</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">)</tt> </tt>
|
||||
</div><a name="L33"></a><tt class="py-lineno">33</tt> <tt class="py-line"> </tt>
|
||||
<a name="L34"></a><tt class="py-lineno">34</tt> <tt class="py-line"> <tt class="py-decorator">@</tt><tt class="py-decorator">abstractmethod</tt> </tt>
|
||||
<a name="ChainLink.handle"></a><div id="ChainLink.handle-def"><a name="L35"></a><tt class="py-lineno">35</tt> <a class="py-toggle" href="#" id="ChainLink.handle-toggle" onclick="return toggle('ChainLink.handle');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.behavioral.chain.ChainLink-class.html#handle">handle</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">request</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="ChainLink.handle-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="ChainLink.handle-expanded"><a name="L36"></a><tt class="py-lineno">36</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L37"></a><tt class="py-lineno">37</tt> <tt class="py-line"><tt class="py-docstring"> Handle a request.</tt> </tt>
|
||||
<a name="L38"></a><tt class="py-lineno">38</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L39"></a><tt class="py-lineno">39</tt> <tt class="py-line"><tt class="py-docstring"> @param request: The request to handle.</tt> </tt>
|
||||
<a name="L40"></a><tt class="py-lineno">40</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L41"></a><tt class="py-lineno">41</tt> <tt class="py-line"> <tt class="py-keyword">pass</tt> </tt>
|
||||
</div></div><a name="L42"></a><tt class="py-lineno">42</tt> <tt class="py-line"> </tt>
|
||||
<a name="Chain"></a><div id="Chain-def"><a name="L43"></a><tt class="py-lineno">43</tt> <tt class="py-line"> </tt>
|
||||
<a name="L44"></a><tt class="py-lineno">44</tt> <a class="py-toggle" href="#" id="Chain-toggle" onclick="return toggle('Chain');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pypat.behavioral.chain.Chain-class.html">Chain</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">,</tt> <tt class="py-base-class">metaclass</tt><tt class="py-op">=</tt><tt class="py-base-class">ABCMeta</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Chain-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="Chain-expanded"><a name="L45"></a><tt class="py-lineno">45</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L46"></a><tt class="py-lineno">46</tt> <tt class="py-line"><tt class="py-docstring"> Abstract Chain class as part of the Chain of Responsibility pattern.</tt> </tt>
|
||||
<a name="L47"></a><tt class="py-lineno">47</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L48"></a><tt class="py-lineno">48</tt> <tt class="py-line"><tt class="py-docstring"> - External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}</tt> </tt>
|
||||
<a name="L49"></a><tt class="py-lineno">49</tt> <tt class="py-line"><tt class="py-docstring"> - External Chain of Responsibility Pattern documentation: U{https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern}</tt> </tt>
|
||||
<a name="L50"></a><tt class="py-lineno">50</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="Chain.__init__"></a><div id="Chain.__init__-def"><a name="L51"></a><tt class="py-lineno">51</tt> <a class="py-toggle" href="#" id="Chain.__init__-toggle" onclick="return toggle('Chain.__init__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.behavioral.chain.Chain-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">chainlink</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Chain.__init__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Chain.__init__-expanded"><a name="L52"></a><tt class="py-lineno">52</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L53"></a><tt class="py-lineno">53</tt> <tt class="py-line"><tt class="py-docstring"> Initialize a new Chain instance.</tt> </tt>
|
||||
<a name="L54"></a><tt class="py-lineno">54</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L55"></a><tt class="py-lineno">55</tt> <tt class="py-line"><tt class="py-docstring"> @param chainlink: The starting chain link.</tt> </tt>
|
||||
<a name="L56"></a><tt class="py-lineno">56</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L57"></a><tt class="py-lineno">57</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">chainlink</tt> <tt class="py-op">=</tt> <tt class="py-name">chainlink</tt> </tt>
|
||||
</div><a name="L58"></a><tt class="py-lineno">58</tt> <tt class="py-line"> </tt>
|
||||
<a name="Chain.handle"></a><div id="Chain.handle-def"><a name="L59"></a><tt class="py-lineno">59</tt> <a class="py-toggle" href="#" id="Chain.handle-toggle" onclick="return toggle('Chain.handle');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.behavioral.chain.Chain-class.html#handle">handle</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">request</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Chain.handle-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Chain.handle-expanded"><a name="L60"></a><tt class="py-lineno">60</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L61"></a><tt class="py-lineno">61</tt> <tt class="py-line"><tt class="py-docstring"> Handle a request.</tt> </tt>
|
||||
<a name="L62"></a><tt class="py-lineno">62</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L63"></a><tt class="py-lineno">63</tt> <tt class="py-line"><tt class="py-docstring"> @param request: The request to handle.</tt> </tt>
|
||||
<a name="L64"></a><tt class="py-lineno">64</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L65"></a><tt class="py-lineno">65</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L66"></a><tt class="py-lineno">66</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">chainlink</tt><tt class="py-op">.</tt><tt id="link-1" class="py-name"><a title="pypat.behavioral.chain.Chain.handle
|
||||
pypat.behavioral.chain.ChainLink.handle" class="py-name" href="#" onclick="return doclink('link-1', 'handle', 'link-0');">handle</a></tt><tt class="py-op">(</tt><tt class="py-name">request</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L67"></a><tt class="py-lineno">67</tt> <tt class="py-line"> <tt class="py-keyword">except</tt> <tt class="py-name">AttributeError</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L68"></a><tt class="py-lineno">68</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2" class="py-name" targets="Method pypat.behavioral.chain.Chain.fail()=pypat.behavioral.chain.Chain-class.html#fail"><a title="pypat.behavioral.chain.Chain.fail" class="py-name" href="#" onclick="return doclink('link-2', 'fail', 'link-2');">fail</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
</div><a name="L69"></a><tt class="py-lineno">69</tt> <tt class="py-line"> </tt>
|
||||
<a name="L70"></a><tt class="py-lineno">70</tt> <tt class="py-line"> <tt class="py-decorator">@</tt><tt class="py-decorator">abstractmethod</tt> </tt>
|
||||
<a name="Chain.fail"></a><div id="Chain.fail-def"><a name="L71"></a><tt class="py-lineno">71</tt> <a class="py-toggle" href="#" id="Chain.fail-toggle" onclick="return toggle('Chain.fail');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.behavioral.chain.Chain-class.html#fail">fail</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Chain.fail-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Chain.fail-expanded"><a name="L72"></a><tt class="py-lineno">72</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L73"></a><tt class="py-lineno">73</tt> <tt class="py-line"><tt class="py-docstring"> The method to call when the chain could not handle a request.</tt> </tt>
|
||||
<a name="L74"></a><tt class="py-lineno">74</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L75"></a><tt class="py-lineno">75</tt> <tt class="py-line"> <tt class="py-keyword">pass</tt> </tt>
|
||||
</div></div><a name="L76"></a><tt class="py-lineno">76</tt> <tt class="py-line"> </tt><script type="text/javascript">
|
||||
<!--
|
||||
expandto(location.href);
|
||||
// -->
|
||||
</script>
|
||||
</pre>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:56 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
277
html/pypat.behavioral.chain.Chain-class.html
vendored
Normal file
277
html/pypat.behavioral.chain.Chain-class.html
vendored
Normal file
@@ -0,0 +1,277 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.behavioral.chain.Chain</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.behavioral-module.html">Package behavioral</a> ::
|
||||
<a href="pypat.behavioral.chain-module.html">Module chain</a> ::
|
||||
Class Chain
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.behavioral.chain.Chain-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Class Chain</h1><p class="nomargin-top"><span class="codelink"><a href="pypat.behavioral.chain-pysrc.html#Chain">source code</a></span></p>
|
||||
<pre class="literalblock">
|
||||
|
||||
Abstract Chain class as part of the Chain of Responsibility pattern.
|
||||
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
||||
- External Chain of Responsibility Pattern documentation: U{https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern}
|
||||
|
||||
</pre>
|
||||
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Instance Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-InstanceMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.behavioral.chain.Chain-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">chainlink</span>)</span><br />
|
||||
Initialize a new Chain instance.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.behavioral.chain-pysrc.html#Chain.__init__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.behavioral.chain.Chain-class.html#handle" class="summary-sig-name">handle</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">request</span>)</span><br />
|
||||
Handle a request.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.behavioral.chain-pysrc.html#Chain.handle">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.behavioral.chain.Chain-class.html#fail" class="summary-sig-name">fail</a>(<span class="summary-sig-arg">self</span>)</span><br />
|
||||
The method to call when the chain could not handle a request.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.behavioral.chain-pysrc.html#Chain.fail">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== METHOD DETAILS ==================== -->
|
||||
<a name="section-MethodDetails"></a>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Method Details</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-MethodDetails"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="__init__"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">chainlink</span>)</span>
|
||||
<br /><em class="fname">(Constructor)</em>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.behavioral.chain-pysrc.html#Chain.__init__">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Initialize a new Chain instance.</p>
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>chainlink</code></strong> - The starting chain link.</li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="handle"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">handle</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">request</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.behavioral.chain-pysrc.html#Chain.handle">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Handle a request.</p>
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>request</code></strong> - The request to handle.</li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="fail"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">fail</span>(<span class="sig-arg">self</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.behavioral.chain-pysrc.html#Chain.fail">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>The method to call when the chain could not handle a request.</p>
|
||||
<dl class="fields">
|
||||
<dt>Decorators:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><code>@abstractmethod</code></li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
299
html/pypat.behavioral.chain.ChainLink-class.html
vendored
Normal file
299
html/pypat.behavioral.chain.ChainLink-class.html
vendored
Normal file
@@ -0,0 +1,299 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.behavioral.chain.ChainLink</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.behavioral-module.html">Package behavioral</a> ::
|
||||
<a href="pypat.behavioral.chain-module.html">Module chain</a> ::
|
||||
Class ChainLink
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.behavioral.chain.ChainLink-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Class ChainLink</h1><p class="nomargin-top"><span class="codelink"><a href="pypat.behavioral.chain-pysrc.html#ChainLink">source code</a></span></p>
|
||||
<pre class="literalblock">
|
||||
|
||||
Abstract ChainLink object as part of the Chain of Responsibility pattern.
|
||||
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
||||
- External Chain of Responsibility Pattern documentation: U{https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern}
|
||||
|
||||
</pre>
|
||||
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Instance Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-InstanceMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="__init__"></a><span class="summary-sig-name">__init__</span>(<span class="summary-sig-arg">self</span>)</span><br />
|
||||
Initialize a new ChainLink instance.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.behavioral.chain-pysrc.html#ChainLink.__init__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.behavioral.chain.ChainLink-class.html#set_successor" class="summary-sig-name">set_successor</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">successor</span>)</span><br />
|
||||
Set a chain link to call if this chain link fails.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.behavioral.chain-pysrc.html#ChainLink.set_successor">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.behavioral.chain.ChainLink-class.html#successor_handle" class="summary-sig-name">successor_handle</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">request</span>)</span><br />
|
||||
Have this chain links successor handle a request.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.behavioral.chain-pysrc.html#ChainLink.successor_handle">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.behavioral.chain.ChainLink-class.html#handle" class="summary-sig-name">handle</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">request</span>)</span><br />
|
||||
Handle a request.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.behavioral.chain-pysrc.html#ChainLink.handle">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== METHOD DETAILS ==================== -->
|
||||
<a name="section-MethodDetails"></a>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Method Details</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-MethodDetails"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="set_successor"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">set_successor</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">successor</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.behavioral.chain-pysrc.html#ChainLink.set_successor">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Set a chain link to call if this chain link fails.</p>
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>successor</code></strong> (ChainLink) - The chain link to call if this chain link fails.</li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="successor_handle"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">successor_handle</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">request</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.behavioral.chain-pysrc.html#ChainLink.successor_handle">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Have this chain links successor handle a request.</p>
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>request</code></strong> - The request to handle.</li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="handle"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">handle</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">request</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.behavioral.chain-pysrc.html#ChainLink.handle">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Handle a request.</p>
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>request</code></strong> - The request to handle.</li>
|
||||
</ul></dd>
|
||||
<dt>Decorators:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><code>@abstractmethod</code></li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
147
html/pypat.behavioral.command-module.html
vendored
Normal file
147
html/pypat.behavioral.command-module.html
vendored
Normal file
@@ -0,0 +1,147 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.behavioral.command</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.behavioral-module.html">Package behavioral</a> ::
|
||||
Module command
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.behavioral.command-module.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== MODULE DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Module command</h1><p class="nomargin-top"><span class="codelink"><a href="pypat.behavioral.command-pysrc.html">source code</a></span></p>
|
||||
<!-- ==================== CLASSES ==================== -->
|
||||
<a name="section-Classes"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Classes</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Classes"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="pypat.behavioral.command.Receiver-class.html" class="summary-name">Receiver</a><br />
|
||||
Abstract receiver class as part of the Command pattern.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="pypat.behavioral.command.Command-class.html" class="summary-name">Command</a><br />
|
||||
Abstract Command class as part of the Command pattern.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="pypat.behavioral.command.Invoker-class.html" class="summary-name">Invoker</a><br />
|
||||
Abstract Invoker class as part of the Command pattern.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
203
html/pypat.behavioral.command-pysrc.html
vendored
Normal file
203
html/pypat.behavioral.command-pysrc.html
vendored
Normal file
@@ -0,0 +1,203 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.behavioral.command</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.behavioral-module.html">Package behavioral</a> ::
|
||||
Module command
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.behavioral.command-pysrc.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h1 class="epydoc">Source Code for <a href="pypat.behavioral.command-module.html">Module pypat.behavioral.command</a></h1>
|
||||
<pre class="py-src">
|
||||
<a name="L1"></a><tt class="py-lineno"> 1</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">abc</tt> <tt class="py-keyword">import</tt> <tt class="py-name">ABCMeta</tt><tt class="py-op">,</tt> <tt class="py-name">abstractmethod</tt> </tt>
|
||||
<a name="Receiver"></a><div id="Receiver-def"><a name="L2"></a><tt class="py-lineno"> 2</tt> <tt class="py-line"> </tt>
|
||||
<a name="L3"></a><tt class="py-lineno"> 3</tt> <tt class="py-line"> </tt>
|
||||
<a name="L4"></a><tt class="py-lineno"> 4</tt> <a class="py-toggle" href="#" id="Receiver-toggle" onclick="return toggle('Receiver');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pypat.behavioral.command.Receiver-class.html">Receiver</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">,</tt> <tt class="py-base-class">metaclass</tt><tt class="py-op">=</tt><tt class="py-base-class">ABCMeta</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Receiver-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="Receiver-expanded"><a name="L5"></a><tt class="py-lineno"> 5</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L6"></a><tt class="py-lineno"> 6</tt> <tt class="py-line"><tt class="py-docstring"> Abstract receiver class as part of the Command pattern.</tt> </tt>
|
||||
<a name="L7"></a><tt class="py-lineno"> 7</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L8"></a><tt class="py-lineno"> 8</tt> <tt class="py-line"><tt class="py-docstring"> - External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}</tt> </tt>
|
||||
<a name="L9"></a><tt class="py-lineno"> 9</tt> <tt class="py-line"><tt class="py-docstring"> - External Command Pattern documentation: U{https://en.wikipedia.org/wiki/Command_pattern}</tt> </tt>
|
||||
<a name="L10"></a><tt class="py-lineno">10</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="Receiver.action"></a><div id="Receiver.action-def"><a name="L11"></a><tt class="py-lineno">11</tt> <a class="py-toggle" href="#" id="Receiver.action-toggle" onclick="return toggle('Receiver.action');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.behavioral.command.Receiver-class.html#action">action</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kwargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Receiver.action-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Receiver.action-expanded"><a name="L12"></a><tt class="py-lineno">12</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L13"></a><tt class="py-lineno">13</tt> <tt class="py-line"><tt class="py-docstring"> Delegates which method to be called for a desired action.</tt> </tt>
|
||||
<a name="L14"></a><tt class="py-lineno">14</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L15"></a><tt class="py-lineno">15</tt> <tt class="py-line"><tt class="py-docstring"> @param name: The name of the action to execute.</tt> </tt>
|
||||
<a name="L16"></a><tt class="py-lineno">16</tt> <tt class="py-line"><tt class="py-docstring"> @type name: str</tt> </tt>
|
||||
<a name="L17"></a><tt class="py-lineno">17</tt> <tt class="py-line"><tt class="py-docstring"> @param args: Any arguments for the action.</tt> </tt>
|
||||
<a name="L18"></a><tt class="py-lineno">18</tt> <tt class="py-line"><tt class="py-docstring"> @param kwargs: Any keyword arguments for the action.</tt> </tt>
|
||||
<a name="L19"></a><tt class="py-lineno">19</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L20"></a><tt class="py-lineno">20</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L21"></a><tt class="py-lineno">21</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">getattr</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">name</tt><tt class="py-op">)</tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">kwargs</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L22"></a><tt class="py-lineno">22</tt> <tt class="py-line"> <tt class="py-keyword">except</tt> <tt class="py-name">AttributeError</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L23"></a><tt class="py-lineno">23</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">AttributeError</tt><tt class="py-op">(</tt><tt class="py-string">'Invalid Action.'</tt><tt class="py-op">)</tt> </tt>
|
||||
</div></div><a name="L24"></a><tt class="py-lineno">24</tt> <tt class="py-line"> </tt>
|
||||
<a name="Command"></a><div id="Command-def"><a name="L25"></a><tt class="py-lineno">25</tt> <tt class="py-line"> </tt>
|
||||
<a name="L26"></a><tt class="py-lineno">26</tt> <a class="py-toggle" href="#" id="Command-toggle" onclick="return toggle('Command');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pypat.behavioral.command.Command-class.html">Command</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">,</tt> <tt class="py-base-class">metaclass</tt><tt class="py-op">=</tt><tt class="py-base-class">ABCMeta</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Command-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="Command-expanded"><a name="L27"></a><tt class="py-lineno">27</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L28"></a><tt class="py-lineno">28</tt> <tt class="py-line"><tt class="py-docstring"> Abstract Command class as part of the Command pattern.</tt> </tt>
|
||||
<a name="L29"></a><tt class="py-lineno">29</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L30"></a><tt class="py-lineno">30</tt> <tt class="py-line"><tt class="py-docstring"> - External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}</tt> </tt>
|
||||
<a name="L31"></a><tt class="py-lineno">31</tt> <tt class="py-line"><tt class="py-docstring"> - External Command Pattern documentation: U{https://en.wikipedia.org/wiki/Command_pattern}</tt> </tt>
|
||||
<a name="L32"></a><tt class="py-lineno">32</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="Command.__init__"></a><div id="Command.__init__-def"><a name="L33"></a><tt class="py-lineno">33</tt> <a class="py-toggle" href="#" id="Command.__init__-toggle" onclick="return toggle('Command.__init__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.behavioral.command.Command-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">receiver</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Command.__init__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Command.__init__-expanded"><a name="L34"></a><tt class="py-lineno">34</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L35"></a><tt class="py-lineno">35</tt> <tt class="py-line"><tt class="py-docstring"> Initialize a new command instance.</tt> </tt>
|
||||
<a name="L36"></a><tt class="py-lineno">36</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L37"></a><tt class="py-lineno">37</tt> <tt class="py-line"><tt class="py-docstring"> @param receiver: The receiver for this command to use.</tt> </tt>
|
||||
<a name="L38"></a><tt class="py-lineno">38</tt> <tt class="py-line"><tt class="py-docstring"> @type receiver: Receiver</tt> </tt>
|
||||
<a name="L39"></a><tt class="py-lineno">39</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L40"></a><tt class="py-lineno">40</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_receiver</tt> <tt class="py-op">=</tt> <tt class="py-name">receiver</tt> </tt>
|
||||
</div><a name="L41"></a><tt class="py-lineno">41</tt> <tt class="py-line"> </tt>
|
||||
<a name="L42"></a><tt class="py-lineno">42</tt> <tt class="py-line"> <tt class="py-decorator">@</tt><tt class="py-decorator">abstractmethod</tt> </tt>
|
||||
<a name="Command.execute"></a><div id="Command.execute-def"><a name="L43"></a><tt class="py-lineno">43</tt> <a class="py-toggle" href="#" id="Command.execute-toggle" onclick="return toggle('Command.execute');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.behavioral.command.Command-class.html#execute">execute</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Command.execute-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Command.execute-expanded"><a name="L44"></a><tt class="py-lineno">44</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L45"></a><tt class="py-lineno">45</tt> <tt class="py-line"><tt class="py-docstring"> Abstract method for executing an action.</tt> </tt>
|
||||
<a name="L46"></a><tt class="py-lineno">46</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L47"></a><tt class="py-lineno">47</tt> <tt class="py-line"> <tt class="py-keyword">pass</tt> </tt>
|
||||
</div><a name="L48"></a><tt class="py-lineno">48</tt> <tt class="py-line"> </tt>
|
||||
<a name="L49"></a><tt class="py-lineno">49</tt> <tt class="py-line"> <tt class="py-decorator">@</tt><tt class="py-decorator">abstractmethod</tt> </tt>
|
||||
<a name="Command.unexecute"></a><div id="Command.unexecute-def"><a name="L50"></a><tt class="py-lineno">50</tt> <a class="py-toggle" href="#" id="Command.unexecute-toggle" onclick="return toggle('Command.unexecute');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.behavioral.command.Command-class.html#unexecute">unexecute</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Command.unexecute-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Command.unexecute-expanded"><a name="L51"></a><tt class="py-lineno">51</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L52"></a><tt class="py-lineno">52</tt> <tt class="py-line"><tt class="py-docstring"> Abstract method for unexecuting an action.</tt> </tt>
|
||||
<a name="L53"></a><tt class="py-lineno">53</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L54"></a><tt class="py-lineno">54</tt> <tt class="py-line"> <tt class="py-keyword">pass</tt> </tt>
|
||||
</div></div><a name="L55"></a><tt class="py-lineno">55</tt> <tt class="py-line"> </tt>
|
||||
<a name="Invoker"></a><div id="Invoker-def"><a name="L56"></a><tt class="py-lineno">56</tt> <tt class="py-line"> </tt>
|
||||
<a name="L57"></a><tt class="py-lineno">57</tt> <a class="py-toggle" href="#" id="Invoker-toggle" onclick="return toggle('Invoker');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pypat.behavioral.command.Invoker-class.html">Invoker</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">,</tt> <tt class="py-base-class">metaclass</tt><tt class="py-op">=</tt><tt class="py-base-class">ABCMeta</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Invoker-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="Invoker-expanded"><a name="L58"></a><tt class="py-lineno">58</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L59"></a><tt class="py-lineno">59</tt> <tt class="py-line"><tt class="py-docstring"> Abstract Invoker class as part of the Command pattern.</tt> </tt>
|
||||
<a name="L60"></a><tt class="py-lineno">60</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L61"></a><tt class="py-lineno">61</tt> <tt class="py-line"><tt class="py-docstring"> - External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}</tt> </tt>
|
||||
<a name="L62"></a><tt class="py-lineno">62</tt> <tt class="py-line"><tt class="py-docstring"> - External Command Pattern documentation: U{https://en.wikipedia.org/wiki/Command_pattern}</tt> </tt>
|
||||
<a name="L63"></a><tt class="py-lineno">63</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="Invoker.__init__"></a><div id="Invoker.__init__-def"><a name="L64"></a><tt class="py-lineno">64</tt> <a class="py-toggle" href="#" id="Invoker.__init__-toggle" onclick="return toggle('Invoker.__init__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.behavioral.command.Invoker-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">valid_commands</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Invoker.__init__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Invoker.__init__-expanded"><a name="L65"></a><tt class="py-lineno">65</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L66"></a><tt class="py-lineno">66</tt> <tt class="py-line"><tt class="py-docstring"> Initialize a new Invoker instance.</tt> </tt>
|
||||
<a name="L67"></a><tt class="py-lineno">67</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L68"></a><tt class="py-lineno">68</tt> <tt class="py-line"><tt class="py-docstring"> @param valid_commands: A list of command classes this invoker can handle.</tt> </tt>
|
||||
<a name="L69"></a><tt class="py-lineno">69</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L70"></a><tt class="py-lineno">70</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_history</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
|
||||
<a name="L71"></a><tt class="py-lineno">71</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_valid_commands</tt> <tt class="py-op">=</tt> <tt class="py-name">valid_commands</tt> </tt>
|
||||
</div><a name="L72"></a><tt class="py-lineno">72</tt> <tt class="py-line"> </tt>
|
||||
<a name="Invoker.execute"></a><div id="Invoker.execute-def"><a name="L73"></a><tt class="py-lineno">73</tt> <a class="py-toggle" href="#" id="Invoker.execute-toggle" onclick="return toggle('Invoker.execute');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.behavioral.command.Invoker-class.html#execute">execute</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">command</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Invoker.execute-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Invoker.execute-expanded"><a name="L74"></a><tt class="py-lineno">74</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L75"></a><tt class="py-lineno">75</tt> <tt class="py-line"><tt class="py-docstring"> Execute a command.</tt> </tt>
|
||||
<a name="L76"></a><tt class="py-lineno">76</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L77"></a><tt class="py-lineno">77</tt> <tt class="py-line"><tt class="py-docstring"> @param command: A command for the invoker to execute.</tt> </tt>
|
||||
<a name="L78"></a><tt class="py-lineno">78</tt> <tt class="py-line"><tt class="py-docstring"> @type command: Command</tt> </tt>
|
||||
<a name="L79"></a><tt class="py-lineno">79</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L80"></a><tt class="py-lineno">80</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt id="link-0" class="py-name" targets="Module pypat.behavioral.command=pypat.behavioral.command-module.html"><a title="pypat.behavioral.command" class="py-name" href="#" onclick="return doclink('link-0', 'command', 'link-0');">command</a></tt><tt class="py-op">.</tt><tt class="py-name">__class__</tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_valid_commands</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L81"></a><tt class="py-lineno">81</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">AttributeError</tt><tt class="py-op">(</tt><tt class="py-string">'Invalid Command'</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L82"></a><tt class="py-lineno">82</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L83"></a><tt class="py-lineno">83</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_history</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt id="link-1" class="py-name"><a title="pypat.behavioral.command" class="py-name" href="#" onclick="return doclink('link-1', 'command', 'link-0');">command</a></tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L84"></a><tt class="py-lineno">84</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt id="link-2" class="py-name"><a title="pypat.behavioral.command" class="py-name" href="#" onclick="return doclink('link-2', 'command', 'link-0');">command</a></tt><tt class="py-op">.</tt><tt id="link-3" class="py-name" targets="Method pypat.behavioral.command.Command.execute()=pypat.behavioral.command.Command-class.html#execute,Method pypat.behavioral.command.Invoker.execute()=pypat.behavioral.command.Invoker-class.html#execute"><a title="pypat.behavioral.command.Command.execute
|
||||
pypat.behavioral.command.Invoker.execute" class="py-name" href="#" onclick="return doclink('link-3', 'execute', 'link-3');">execute</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
</div><a name="L85"></a><tt class="py-lineno">85</tt> <tt class="py-line"> </tt>
|
||||
<a name="Invoker.undo"></a><div id="Invoker.undo-def"><a name="L86"></a><tt class="py-lineno">86</tt> <a class="py-toggle" href="#" id="Invoker.undo-toggle" onclick="return toggle('Invoker.undo');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.behavioral.command.Invoker-class.html#undo">undo</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Invoker.undo-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Invoker.undo-expanded"><a name="L87"></a><tt class="py-lineno">87</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L88"></a><tt class="py-lineno">88</tt> <tt class="py-line"><tt class="py-docstring"> Undo the last command.</tt> </tt>
|
||||
<a name="L89"></a><tt class="py-lineno">89</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L90"></a><tt class="py-lineno">90</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_history</tt><tt class="py-op">.</tt><tt class="py-name">pop</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-4" class="py-name" targets="Method pypat.behavioral.command.Command.unexecute()=pypat.behavioral.command.Command-class.html#unexecute"><a title="pypat.behavioral.command.Command.unexecute" class="py-name" href="#" onclick="return doclink('link-4', 'unexecute', 'link-4');">unexecute</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
</div></div><a name="L91"></a><tt class="py-lineno">91</tt> <tt class="py-line"> </tt><script type="text/javascript">
|
||||
<!--
|
||||
expandto(location.href);
|
||||
// -->
|
||||
</script>
|
||||
</pre>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
275
html/pypat.behavioral.command.Command-class.html
vendored
Normal file
275
html/pypat.behavioral.command.Command-class.html
vendored
Normal file
@@ -0,0 +1,275 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.behavioral.command.Command</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.behavioral-module.html">Package behavioral</a> ::
|
||||
<a href="pypat.behavioral.command-module.html">Module command</a> ::
|
||||
Class Command
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.behavioral.command.Command-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Class Command</h1><p class="nomargin-top"><span class="codelink"><a href="pypat.behavioral.command-pysrc.html#Command">source code</a></span></p>
|
||||
<pre class="literalblock">
|
||||
|
||||
Abstract Command class as part of the Command pattern.
|
||||
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
||||
- External Command Pattern documentation: U{https://en.wikipedia.org/wiki/Command_pattern}
|
||||
|
||||
</pre>
|
||||
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Instance Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-InstanceMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.behavioral.command.Command-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">receiver</span>)</span><br />
|
||||
Initialize a new command instance.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.behavioral.command-pysrc.html#Command.__init__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.behavioral.command.Command-class.html#execute" class="summary-sig-name">execute</a>(<span class="summary-sig-arg">self</span>)</span><br />
|
||||
Abstract method for executing an action.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.behavioral.command-pysrc.html#Command.execute">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.behavioral.command.Command-class.html#unexecute" class="summary-sig-name">unexecute</a>(<span class="summary-sig-arg">self</span>)</span><br />
|
||||
Abstract method for unexecuting an action.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.behavioral.command-pysrc.html#Command.unexecute">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== METHOD DETAILS ==================== -->
|
||||
<a name="section-MethodDetails"></a>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Method Details</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-MethodDetails"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="__init__"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">receiver</span>)</span>
|
||||
<br /><em class="fname">(Constructor)</em>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.behavioral.command-pysrc.html#Command.__init__">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Initialize a new command instance.</p>
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>receiver</code></strong> (Receiver) - The receiver for this command to use.</li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="execute"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">execute</span>(<span class="sig-arg">self</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.behavioral.command-pysrc.html#Command.execute">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Abstract method for executing an action.</p>
|
||||
<dl class="fields">
|
||||
<dt>Decorators:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><code>@abstractmethod</code></li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="unexecute"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">unexecute</span>(<span class="sig-arg">self</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.behavioral.command-pysrc.html#Command.unexecute">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Abstract method for unexecuting an action.</p>
|
||||
<dl class="fields">
|
||||
<dt>Decorators:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><code>@abstractmethod</code></li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
254
html/pypat.behavioral.command.Invoker-class.html
vendored
Normal file
254
html/pypat.behavioral.command.Invoker-class.html
vendored
Normal file
@@ -0,0 +1,254 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.behavioral.command.Invoker</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.behavioral-module.html">Package behavioral</a> ::
|
||||
<a href="pypat.behavioral.command-module.html">Module command</a> ::
|
||||
Class Invoker
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.behavioral.command.Invoker-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Class Invoker</h1><p class="nomargin-top"><span class="codelink"><a href="pypat.behavioral.command-pysrc.html#Invoker">source code</a></span></p>
|
||||
<pre class="literalblock">
|
||||
|
||||
Abstract Invoker class as part of the Command pattern.
|
||||
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
||||
- External Command Pattern documentation: U{https://en.wikipedia.org/wiki/Command_pattern}
|
||||
|
||||
</pre>
|
||||
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Instance Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-InstanceMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.behavioral.command.Invoker-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">valid_commands</span>)</span><br />
|
||||
Initialize a new Invoker instance.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.behavioral.command-pysrc.html#Invoker.__init__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.behavioral.command.Invoker-class.html#execute" class="summary-sig-name">execute</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">command</span>)</span><br />
|
||||
Execute a command.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.behavioral.command-pysrc.html#Invoker.execute">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="undo"></a><span class="summary-sig-name">undo</span>(<span class="summary-sig-arg">self</span>)</span><br />
|
||||
Undo the last command.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.behavioral.command-pysrc.html#Invoker.undo">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== METHOD DETAILS ==================== -->
|
||||
<a name="section-MethodDetails"></a>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Method Details</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-MethodDetails"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="__init__"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">valid_commands</span>)</span>
|
||||
<br /><em class="fname">(Constructor)</em>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.behavioral.command-pysrc.html#Invoker.__init__">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Initialize a new Invoker instance.</p>
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>valid_commands</code></strong> - A list of command classes this invoker can handle.</li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="execute"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">execute</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">command</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.behavioral.command-pysrc.html#Invoker.execute">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Execute a command.</p>
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>command</code></strong> (Command) - A command for the invoker to execute.</li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
200
html/pypat.behavioral.command.Receiver-class.html
vendored
Normal file
200
html/pypat.behavioral.command.Receiver-class.html
vendored
Normal file
@@ -0,0 +1,200 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.behavioral.command.Receiver</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.behavioral-module.html">Package behavioral</a> ::
|
||||
<a href="pypat.behavioral.command-module.html">Module command</a> ::
|
||||
Class Receiver
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.behavioral.command.Receiver-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Class Receiver</h1><p class="nomargin-top"><span class="codelink"><a href="pypat.behavioral.command-pysrc.html#Receiver">source code</a></span></p>
|
||||
<pre class="literalblock">
|
||||
|
||||
Abstract receiver class as part of the Command pattern.
|
||||
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
||||
- External Command Pattern documentation: U{https://en.wikipedia.org/wiki/Command_pattern}
|
||||
|
||||
</pre>
|
||||
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Instance Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-InstanceMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.behavioral.command.Receiver-class.html#action" class="summary-sig-name">action</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">name</span>,
|
||||
<span class="summary-sig-arg">*args</span>,
|
||||
<span class="summary-sig-arg">**kwargs</span>)</span><br />
|
||||
Delegates which method to be called for a desired action.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.behavioral.command-pysrc.html#Receiver.action">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== METHOD DETAILS ==================== -->
|
||||
<a name="section-MethodDetails"></a>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Method Details</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-MethodDetails"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="action"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">action</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">name</span>,
|
||||
<span class="sig-arg">*args</span>,
|
||||
<span class="sig-arg">**kwargs</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.behavioral.command-pysrc.html#Receiver.action">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Delegates which method to be called for a desired action.</p>
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>name</code></strong> (str) - The name of the action to execute.</li>
|
||||
<li><strong class="pname"><code>args</code></strong> - Any arguments for the action.</li>
|
||||
<li><strong class="pname"><code>kwargs</code></strong> - Any keyword arguments for the action.</li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
139
html/pypat.behavioral.iterator-module.html
vendored
Normal file
139
html/pypat.behavioral.iterator-module.html
vendored
Normal file
@@ -0,0 +1,139 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.behavioral.iterator</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.behavioral-module.html">Package behavioral</a> ::
|
||||
Module iterator
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.behavioral.iterator-module.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== MODULE DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Module iterator</h1><p class="nomargin-top"><span class="codelink"><a href="pypat.behavioral.iterator-pysrc.html">source code</a></span></p>
|
||||
<!-- ==================== CLASSES ==================== -->
|
||||
<a name="section-Classes"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Classes</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Classes"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="pypat.behavioral.iterator.Iterator-class.html" class="summary-name">Iterator</a><br />
|
||||
An Iterator class for the Iterator design pattern.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="pypat.behavioral.iterator.Iterable-class.html" class="summary-name">Iterable</a><br />
|
||||
An abstract class representing an Iterable object as part of the Iterator design pattern.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
152
html/pypat.behavioral.iterator-pysrc.html
vendored
Normal file
152
html/pypat.behavioral.iterator-pysrc.html
vendored
Normal file
@@ -0,0 +1,152 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.behavioral.iterator</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.behavioral-module.html">Package behavioral</a> ::
|
||||
Module iterator
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.behavioral.iterator-pysrc.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h1 class="epydoc">Source Code for <a href="pypat.behavioral.iterator-module.html">Module pypat.behavioral.iterator</a></h1>
|
||||
<pre class="py-src">
|
||||
<a name="L1"></a><tt class="py-lineno"> 1</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">abc</tt> <tt class="py-keyword">import</tt> <tt class="py-name">ABCMeta</tt><tt class="py-op">,</tt> <tt class="py-name">abstractmethod</tt> </tt>
|
||||
<a name="Iterator"></a><div id="Iterator-def"><a name="L2"></a><tt class="py-lineno"> 2</tt> <tt class="py-line"> </tt>
|
||||
<a name="L3"></a><tt class="py-lineno"> 3</tt> <tt class="py-line"> </tt>
|
||||
<a name="L4"></a><tt class="py-lineno"> 4</tt> <a class="py-toggle" href="#" id="Iterator-toggle" onclick="return toggle('Iterator');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pypat.behavioral.iterator.Iterator-class.html">Iterator</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Iterator-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="Iterator-expanded"><a name="L5"></a><tt class="py-lineno"> 5</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L6"></a><tt class="py-lineno"> 6</tt> <tt class="py-line"><tt class="py-docstring"> An Iterator class for the Iterator design pattern.</tt> </tt>
|
||||
<a name="L7"></a><tt class="py-lineno"> 7</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L8"></a><tt class="py-lineno"> 8</tt> <tt class="py-line"><tt class="py-docstring"> - External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}</tt> </tt>
|
||||
<a name="L9"></a><tt class="py-lineno"> 9</tt> <tt class="py-line"><tt class="py-docstring"> - External Iterator Pattern documentation: U{https://en.wikipedia.org/wiki/Iterator_pattern}</tt> </tt>
|
||||
<a name="L10"></a><tt class="py-lineno">10</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="Iterator.__init__"></a><div id="Iterator.__init__-def"><a name="L11"></a><tt class="py-lineno">11</tt> <a class="py-toggle" href="#" id="Iterator.__init__-toggle" onclick="return toggle('Iterator.__init__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.behavioral.iterator.Iterator-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">iterable</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Iterator.__init__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Iterator.__init__-expanded"><a name="L12"></a><tt class="py-lineno">12</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L13"></a><tt class="py-lineno">13</tt> <tt class="py-line"><tt class="py-docstring"> Initialize a new Iterator instance.</tt> </tt>
|
||||
<a name="L14"></a><tt class="py-lineno">14</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L15"></a><tt class="py-lineno">15</tt> <tt class="py-line"><tt class="py-docstring"> @param iterable: An Iterable object to iterate over.</tt> </tt>
|
||||
<a name="L16"></a><tt class="py-lineno">16</tt> <tt class="py-line"><tt class="py-docstring"> @type iterable: Iterable</tt> </tt>
|
||||
<a name="L17"></a><tt class="py-lineno">17</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L18"></a><tt class="py-lineno">18</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">iterable</tt> <tt class="py-op">=</tt> <tt class="py-name">iterable</tt> </tt>
|
||||
</div><a name="L19"></a><tt class="py-lineno">19</tt> <tt class="py-line"> </tt>
|
||||
<a name="Iterator.__iter__"></a><div id="Iterator.__iter__-def"><a name="L20"></a><tt class="py-lineno">20</tt> <a class="py-toggle" href="#" id="Iterator.__iter__-toggle" onclick="return toggle('Iterator.__iter__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.behavioral.iterator.Iterator-class.html#__iter__">__iter__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Iterator.__iter__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Iterator.__iter__-expanded"><a name="L21"></a><tt class="py-lineno">21</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt> </tt>
|
||||
</div><a name="L22"></a><tt class="py-lineno">22</tt> <tt class="py-line"> </tt>
|
||||
<a name="Iterator.__next__"></a><div id="Iterator.__next__-def"><a name="L23"></a><tt class="py-lineno">23</tt> <a class="py-toggle" href="#" id="Iterator.__next__-toggle" onclick="return toggle('Iterator.__next__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.behavioral.iterator.Iterator-class.html#__next__">__next__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Iterator.__next__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Iterator.__next__-expanded"><a name="L24"></a><tt class="py-lineno">24</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">iterable</tt><tt class="py-op">.</tt><tt id="link-0" class="py-name" targets="Method pypat.behavioral.iterator.Iterable.__next__()=pypat.behavioral.iterator.Iterable-class.html#__next__,Method pypat.behavioral.iterator.Iterator.__next__()=pypat.behavioral.iterator.Iterator-class.html#__next__"><a title="pypat.behavioral.iterator.Iterable.__next__
|
||||
pypat.behavioral.iterator.Iterator.__next__" class="py-name" href="#" onclick="return doclink('link-0', '__next__', 'link-0');">__next__</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
</div></div><a name="L25"></a><tt class="py-lineno">25</tt> <tt class="py-line"> </tt>
|
||||
<a name="Iterable"></a><div id="Iterable-def"><a name="L26"></a><tt class="py-lineno">26</tt> <tt class="py-line"> </tt>
|
||||
<a name="L27"></a><tt class="py-lineno">27</tt> <a class="py-toggle" href="#" id="Iterable-toggle" onclick="return toggle('Iterable');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pypat.behavioral.iterator.Iterable-class.html">Iterable</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">,</tt> <tt class="py-base-class">metaclass</tt><tt class="py-op">=</tt><tt class="py-base-class">ABCMeta</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Iterable-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="Iterable-expanded"><a name="L28"></a><tt class="py-lineno">28</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L29"></a><tt class="py-lineno">29</tt> <tt class="py-line"><tt class="py-docstring"> An abstract class representing an Iterable object as part of the Iterator design pattern.</tt> </tt>
|
||||
<a name="L30"></a><tt class="py-lineno">30</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L31"></a><tt class="py-lineno">31</tt> <tt class="py-line"><tt class="py-docstring"> - External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}</tt> </tt>
|
||||
<a name="L32"></a><tt class="py-lineno">32</tt> <tt class="py-line"><tt class="py-docstring"> - External Iterator Pattern documentation: U{https://en.wikipedia.org/wiki/Iterator_pattern}</tt> </tt>
|
||||
<a name="L33"></a><tt class="py-lineno">33</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L34"></a><tt class="py-lineno">34</tt> <tt class="py-line"> <tt class="py-decorator">@</tt><tt class="py-decorator">abstractmethod</tt> </tt>
|
||||
<a name="Iterable.__next__"></a><div id="Iterable.__next__-def"><a name="L35"></a><tt class="py-lineno">35</tt> <a class="py-toggle" href="#" id="Iterable.__next__-toggle" onclick="return toggle('Iterable.__next__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.behavioral.iterator.Iterable-class.html#__next__">__next__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Iterable.__next__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Iterable.__next__-expanded"><a name="L36"></a><tt class="py-lineno">36</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L37"></a><tt class="py-lineno">37</tt> <tt class="py-line"><tt class="py-docstring"> All Iterable's must implement a __next__ method which eventually raises StopIteration.</tt> </tt>
|
||||
<a name="L38"></a><tt class="py-lineno">38</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L39"></a><tt class="py-lineno">39</tt> <tt class="py-line"> <tt class="py-keyword">pass</tt> </tt>
|
||||
</div></div><a name="L40"></a><tt class="py-lineno">40</tt> <tt class="py-line"> </tt><script type="text/javascript">
|
||||
<!--
|
||||
expandto(location.href);
|
||||
// -->
|
||||
</script>
|
||||
</pre>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
194
html/pypat.behavioral.iterator.Iterable-class.html
vendored
Normal file
194
html/pypat.behavioral.iterator.Iterable-class.html
vendored
Normal file
@@ -0,0 +1,194 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.behavioral.iterator.Iterable</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.behavioral-module.html">Package behavioral</a> ::
|
||||
<a href="pypat.behavioral.iterator-module.html">Module iterator</a> ::
|
||||
Class Iterable
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.behavioral.iterator.Iterable-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Class Iterable</h1><p class="nomargin-top"><span class="codelink"><a href="pypat.behavioral.iterator-pysrc.html#Iterable">source code</a></span></p>
|
||||
<pre class="literalblock">
|
||||
|
||||
An abstract class representing an Iterable object as part of the Iterator design pattern.
|
||||
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
||||
- External Iterator Pattern documentation: U{https://en.wikipedia.org/wiki/Iterator_pattern}
|
||||
|
||||
</pre>
|
||||
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Instance Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-InstanceMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.behavioral.iterator.Iterable-class.html#__next__" class="summary-sig-name">__next__</a>(<span class="summary-sig-arg">self</span>)</span><br />
|
||||
All Iterable's must implement a __next__ method which eventually
|
||||
raises StopIteration.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.behavioral.iterator-pysrc.html#Iterable.__next__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== METHOD DETAILS ==================== -->
|
||||
<a name="section-MethodDetails"></a>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Method Details</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-MethodDetails"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="__next__"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">__next__</span>(<span class="sig-arg">self</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.behavioral.iterator-pysrc.html#Iterable.__next__">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>All Iterable's must implement a __next__ method which eventually
|
||||
raises StopIteration.</p>
|
||||
<dl class="fields">
|
||||
<dt>Decorators:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><code>@abstractmethod</code></li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
280
html/pypat.behavioral.iterator.Iterator-class.html
vendored
Normal file
280
html/pypat.behavioral.iterator.Iterator-class.html
vendored
Normal file
@@ -0,0 +1,280 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.behavioral.iterator.Iterator</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.behavioral-module.html">Package behavioral</a> ::
|
||||
<a href="pypat.behavioral.iterator-module.html">Module iterator</a> ::
|
||||
Class Iterator
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.behavioral.iterator.Iterator-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Class Iterator</h1><p class="nomargin-top"><span class="codelink"><a href="pypat.behavioral.iterator-pysrc.html#Iterator">source code</a></span></p>
|
||||
<pre class="base-tree">
|
||||
object --+
|
||||
|
|
||||
<strong class="uidshort">Iterator</strong>
|
||||
</pre>
|
||||
|
||||
<hr />
|
||||
<pre class="literalblock">
|
||||
|
||||
An Iterator class for the Iterator design pattern.
|
||||
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
||||
- External Iterator Pattern documentation: U{https://en.wikipedia.org/wiki/Iterator_pattern}
|
||||
|
||||
</pre>
|
||||
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Instance Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-InstanceMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.behavioral.iterator.Iterator-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">iterable</span>)</span><br />
|
||||
Initialize a new Iterator instance.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.behavioral.iterator-pysrc.html#Iterator.__init__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="__iter__"></a><span class="summary-sig-name">__iter__</span>(<span class="summary-sig-arg">self</span>)</span></td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.behavioral.iterator-pysrc.html#Iterator.__iter__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="__next__"></a><span class="summary-sig-name">__next__</span>(<span class="summary-sig-arg">self</span>)</span></td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.behavioral.iterator-pysrc.html#Iterator.__next__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__delattr__</code>,
|
||||
<code>__format__</code>,
|
||||
<code>__getattribute__</code>,
|
||||
<code>__hash__</code>,
|
||||
<code>__new__</code>,
|
||||
<code>__reduce__</code>,
|
||||
<code>__reduce_ex__</code>,
|
||||
<code>__repr__</code>,
|
||||
<code>__setattr__</code>,
|
||||
<code>__sizeof__</code>,
|
||||
<code>__str__</code>,
|
||||
<code>__subclasshook__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== PROPERTIES ==================== -->
|
||||
<a name="section-Properties"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Properties</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Properties"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__class__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== METHOD DETAILS ==================== -->
|
||||
<a name="section-MethodDetails"></a>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Method Details</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-MethodDetails"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="__init__"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">iterable</span>)</span>
|
||||
<br /><em class="fname">(Constructor)</em>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.behavioral.iterator-pysrc.html#Iterator.__init__">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Initialize a new Iterator instance.</p>
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>iterable</code></strong> (Iterable) - An Iterable object to iterate over.</li>
|
||||
</ul></dd>
|
||||
<dt>Overrides:
|
||||
object.__init__
|
||||
</dt>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
156
html/pypat.behavioral.mediator-module.html
vendored
Normal file
156
html/pypat.behavioral.mediator-module.html
vendored
Normal file
@@ -0,0 +1,156 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.behavioral.mediator</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.behavioral-module.html">Package behavioral</a> ::
|
||||
Module mediator
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.behavioral.mediator-module.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== MODULE DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Module mediator</h1><p class="nomargin-top"><span class="codelink"><a href="pypat.behavioral.mediator-pysrc.html">source code</a></span></p>
|
||||
<!-- ==================== CLASSES ==================== -->
|
||||
<a name="section-Classes"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Classes</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Classes"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="pypat.behavioral.mediator.Mediator-class.html" class="summary-name">Mediator</a><br />
|
||||
Mediator class as part of the Mediator design pattern.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== VARIABLES ==================== -->
|
||||
<a name="section-Variables"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Variables</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Variables"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="__package__"></a><span class="summary-name">__package__</span> = <code title="'pypat.behavioral'"><code class="variable-quote">'</code><code class="variable-string">pypat.behavioral</code><code class="variable-quote">'</code></code>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
162
html/pypat.behavioral.mediator-pysrc.html
vendored
Normal file
162
html/pypat.behavioral.mediator-pysrc.html
vendored
Normal file
@@ -0,0 +1,162 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.behavioral.mediator</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.behavioral-module.html">Package behavioral</a> ::
|
||||
Module mediator
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.behavioral.mediator-pysrc.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h1 class="epydoc">Source Code for <a href="pypat.behavioral.mediator-module.html">Module pypat.behavioral.mediator</a></h1>
|
||||
<pre class="py-src">
|
||||
<a name="L1"></a><tt class="py-lineno"> 1</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">collections</tt> <tt class="py-keyword">import</tt> <tt class="py-name">defaultdict</tt> </tt>
|
||||
<a name="L2"></a><tt class="py-lineno"> 2</tt> <tt class="py-line"> </tt>
|
||||
<a name="L3"></a><tt class="py-lineno"> 3</tt> <tt class="py-line"> </tt>
|
||||
<a name="Mediator"></a><div id="Mediator-def"><a name="L4"></a><tt class="py-lineno"> 4</tt> <a class="py-toggle" href="#" id="Mediator-toggle" onclick="return toggle('Mediator');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pypat.behavioral.mediator.Mediator-class.html">Mediator</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Mediator-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="Mediator-expanded"><a name="L5"></a><tt class="py-lineno"> 5</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L6"></a><tt class="py-lineno"> 6</tt> <tt class="py-line"><tt class="py-docstring"> Mediator class as part of the Mediator design pattern.</tt> </tt>
|
||||
<a name="L7"></a><tt class="py-lineno"> 7</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L8"></a><tt class="py-lineno"> 8</tt> <tt class="py-line"><tt class="py-docstring"> - External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}</tt> </tt>
|
||||
<a name="L9"></a><tt class="py-lineno"> 9</tt> <tt class="py-line"><tt class="py-docstring"> - External Mediator Pattern documentation: U{https://en.wikipedia.org/wiki/Mediator_pattern}</tt> </tt>
|
||||
<a name="L10"></a><tt class="py-lineno">10</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="Mediator.__init__"></a><div id="Mediator.__init__-def"><a name="L11"></a><tt class="py-lineno">11</tt> <a class="py-toggle" href="#" id="Mediator.__init__-toggle" onclick="return toggle('Mediator.__init__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.behavioral.mediator.Mediator-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Mediator.__init__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Mediator.__init__-expanded"><a name="L12"></a><tt class="py-lineno">12</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L13"></a><tt class="py-lineno">13</tt> <tt class="py-line"><tt class="py-docstring"> Initialize a new Mediator instance.</tt> </tt>
|
||||
<a name="L14"></a><tt class="py-lineno">14</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L15"></a><tt class="py-lineno">15</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">signals</tt> <tt class="py-op">=</tt> <tt class="py-name">defaultdict</tt><tt class="py-op">(</tt><tt class="py-name">list</tt><tt class="py-op">)</tt> </tt>
|
||||
</div><a name="L16"></a><tt class="py-lineno">16</tt> <tt class="py-line"> </tt>
|
||||
<a name="Mediator.signal"></a><div id="Mediator.signal-def"><a name="L17"></a><tt class="py-lineno">17</tt> <a class="py-toggle" href="#" id="Mediator.signal-toggle" onclick="return toggle('Mediator.signal');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.behavioral.mediator.Mediator-class.html#signal">signal</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">signal_name</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kwargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Mediator.signal-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Mediator.signal-expanded"><a name="L18"></a><tt class="py-lineno">18</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L19"></a><tt class="py-lineno">19</tt> <tt class="py-line"><tt class="py-docstring"> Send a signal out to all connected handlers.</tt> </tt>
|
||||
<a name="L20"></a><tt class="py-lineno">20</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L21"></a><tt class="py-lineno">21</tt> <tt class="py-line"><tt class="py-docstring"> @param signal_name: The name of the signal.</tt> </tt>
|
||||
<a name="L22"></a><tt class="py-lineno">22</tt> <tt class="py-line"><tt class="py-docstring"> @type signal_name: Str</tt> </tt>
|
||||
<a name="L23"></a><tt class="py-lineno">23</tt> <tt class="py-line"><tt class="py-docstring"> @param args: Positional arguments to send with the signal.</tt> </tt>
|
||||
<a name="L24"></a><tt class="py-lineno">24</tt> <tt class="py-line"><tt class="py-docstring"> @param kwargs: Keyword arguments to send with the signal.</tt> </tt>
|
||||
<a name="L25"></a><tt class="py-lineno">25</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L26"></a><tt class="py-lineno">26</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">handler</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">signals</tt><tt class="py-op">[</tt><tt class="py-name">signal_name</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L27"></a><tt class="py-lineno">27</tt> <tt class="py-line"> <tt class="py-name">handler</tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">kwargs</tt><tt class="py-op">)</tt> </tt>
|
||||
</div><a name="L28"></a><tt class="py-lineno">28</tt> <tt class="py-line"> </tt>
|
||||
<a name="Mediator.connect"></a><div id="Mediator.connect-def"><a name="L29"></a><tt class="py-lineno">29</tt> <a class="py-toggle" href="#" id="Mediator.connect-toggle" onclick="return toggle('Mediator.connect');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.behavioral.mediator.Mediator-class.html#connect">connect</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">signal_name</tt><tt class="py-op">,</tt> <tt class="py-param">receiver</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Mediator.connect-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Mediator.connect-expanded"><a name="L30"></a><tt class="py-lineno">30</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L31"></a><tt class="py-lineno">31</tt> <tt class="py-line"><tt class="py-docstring"> Connect a receiver to a signal.</tt> </tt>
|
||||
<a name="L32"></a><tt class="py-lineno">32</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L33"></a><tt class="py-lineno">33</tt> <tt class="py-line"><tt class="py-docstring"> @param signal_name: The name of the signal to connect the receiver to.</tt> </tt>
|
||||
<a name="L34"></a><tt class="py-lineno">34</tt> <tt class="py-line"><tt class="py-docstring"> @type signal_name: str</tt> </tt>
|
||||
<a name="L35"></a><tt class="py-lineno">35</tt> <tt class="py-line"><tt class="py-docstring"> @param receiver: A handler to call when the signal is sent out.</tt> </tt>
|
||||
<a name="L36"></a><tt class="py-lineno">36</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L37"></a><tt class="py-lineno">37</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">signals</tt><tt class="py-op">[</tt><tt class="py-name">signal_name</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">receiver</tt><tt class="py-op">)</tt> </tt>
|
||||
</div><a name="L38"></a><tt class="py-lineno">38</tt> <tt class="py-line"> </tt>
|
||||
<a name="Mediator.disconnect"></a><div id="Mediator.disconnect-def"><a name="L39"></a><tt class="py-lineno">39</tt> <a class="py-toggle" href="#" id="Mediator.disconnect-toggle" onclick="return toggle('Mediator.disconnect');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.behavioral.mediator.Mediator-class.html#disconnect">disconnect</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">signal_name</tt><tt class="py-op">,</tt> <tt class="py-param">receiver</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Mediator.disconnect-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Mediator.disconnect-expanded"><a name="L40"></a><tt class="py-lineno">40</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L41"></a><tt class="py-lineno">41</tt> <tt class="py-line"><tt class="py-docstring"> Disconnect a receiver from a signal.</tt> </tt>
|
||||
<a name="L42"></a><tt class="py-lineno">42</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L43"></a><tt class="py-lineno">43</tt> <tt class="py-line"><tt class="py-docstring"> @param signal_name: The name of the signal to disconnect the receiver from.</tt> </tt>
|
||||
<a name="L44"></a><tt class="py-lineno">44</tt> <tt class="py-line"><tt class="py-docstring"> @type signal_name: str</tt> </tt>
|
||||
<a name="L45"></a><tt class="py-lineno">45</tt> <tt class="py-line"><tt class="py-docstring"> @param receiver: The receiver to disconnect from the signal.</tt> </tt>
|
||||
<a name="L46"></a><tt class="py-lineno">46</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L47"></a><tt class="py-lineno">47</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L48"></a><tt class="py-lineno">48</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">signals</tt><tt class="py-op">[</tt><tt class="py-name">signal_name</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">remove</tt><tt class="py-op">(</tt><tt class="py-name">receiver</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L49"></a><tt class="py-lineno">49</tt> <tt class="py-line"> <tt class="py-keyword">except</tt> <tt class="py-name">ValueError</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L50"></a><tt class="py-lineno">50</tt> <tt class="py-line"> <tt class="py-keyword">pass</tt> </tt>
|
||||
</div></div><a name="L51"></a><tt class="py-lineno">51</tt> <tt class="py-line"> </tt><script type="text/javascript">
|
||||
<!--
|
||||
expandto(location.href);
|
||||
// -->
|
||||
</script>
|
||||
</pre>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:56 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
380
html/pypat.behavioral.mediator.Mediator-class.html
vendored
Normal file
380
html/pypat.behavioral.mediator.Mediator-class.html
vendored
Normal file
@@ -0,0 +1,380 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.behavioral.mediator.Mediator</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.behavioral-module.html">Package behavioral</a> ::
|
||||
<a href="pypat.behavioral.mediator-module.html">Module mediator</a> ::
|
||||
Class Mediator
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.behavioral.mediator.Mediator-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Class Mediator</h1><p class="nomargin-top"><span class="codelink"><a href="pypat.behavioral.mediator-pysrc.html#Mediator">source code</a></span></p>
|
||||
<pre class="base-tree">
|
||||
object --+
|
||||
|
|
||||
<strong class="uidshort">Mediator</strong>
|
||||
</pre>
|
||||
|
||||
<hr />
|
||||
<pre class="literalblock">
|
||||
|
||||
Mediator class as part of the Mediator design pattern.
|
||||
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
||||
- External Mediator Pattern documentation: U{https://en.wikipedia.org/wiki/Mediator_pattern}
|
||||
|
||||
</pre>
|
||||
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Instance Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-InstanceMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.behavioral.mediator.Mediator-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>)</span><br />
|
||||
Initialize a new Mediator instance.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.behavioral.mediator-pysrc.html#Mediator.__init__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.behavioral.mediator.Mediator-class.html#signal" class="summary-sig-name">signal</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">signal_name</span>,
|
||||
<span class="summary-sig-arg">*args</span>,
|
||||
<span class="summary-sig-arg">**kwargs</span>)</span><br />
|
||||
Send a signal out to all connected handlers.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.behavioral.mediator-pysrc.html#Mediator.signal">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.behavioral.mediator.Mediator-class.html#connect" class="summary-sig-name">connect</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">signal_name</span>,
|
||||
<span class="summary-sig-arg">receiver</span>)</span><br />
|
||||
Connect a receiver to a signal.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.behavioral.mediator-pysrc.html#Mediator.connect">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.behavioral.mediator.Mediator-class.html#disconnect" class="summary-sig-name">disconnect</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">signal_name</span>,
|
||||
<span class="summary-sig-arg">receiver</span>)</span><br />
|
||||
Disconnect a receiver from a signal.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.behavioral.mediator-pysrc.html#Mediator.disconnect">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__delattr__</code>,
|
||||
<code>__format__</code>,
|
||||
<code>__getattribute__</code>,
|
||||
<code>__hash__</code>,
|
||||
<code>__new__</code>,
|
||||
<code>__reduce__</code>,
|
||||
<code>__reduce_ex__</code>,
|
||||
<code>__repr__</code>,
|
||||
<code>__setattr__</code>,
|
||||
<code>__sizeof__</code>,
|
||||
<code>__str__</code>,
|
||||
<code>__subclasshook__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== PROPERTIES ==================== -->
|
||||
<a name="section-Properties"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Properties</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Properties"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__class__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== METHOD DETAILS ==================== -->
|
||||
<a name="section-MethodDetails"></a>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Method Details</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-MethodDetails"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="__init__"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>)</span>
|
||||
<br /><em class="fname">(Constructor)</em>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.behavioral.mediator-pysrc.html#Mediator.__init__">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Initialize a new Mediator instance.</p>
|
||||
<dl class="fields">
|
||||
<dt>Overrides:
|
||||
object.__init__
|
||||
</dt>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="signal"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">signal</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">signal_name</span>,
|
||||
<span class="sig-arg">*args</span>,
|
||||
<span class="sig-arg">**kwargs</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.behavioral.mediator-pysrc.html#Mediator.signal">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Send a signal out to all connected handlers.</p>
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>signal_name</code></strong> (Str) - The name of the signal.</li>
|
||||
<li><strong class="pname"><code>args</code></strong> - Positional arguments to send with the signal.</li>
|
||||
<li><strong class="pname"><code>kwargs</code></strong> - Keyword arguments to send with the signal.</li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="connect"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">connect</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">signal_name</span>,
|
||||
<span class="sig-arg">receiver</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.behavioral.mediator-pysrc.html#Mediator.connect">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Connect a receiver to a signal.</p>
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>signal_name</code></strong> (str) - The name of the signal to connect the receiver to.</li>
|
||||
<li><strong class="pname"><code>receiver</code></strong> - A handler to call when the signal is sent out.</li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="disconnect"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">disconnect</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">signal_name</span>,
|
||||
<span class="sig-arg">receiver</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.behavioral.mediator-pysrc.html#Mediator.disconnect">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Disconnect a receiver from a signal.</p>
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>signal_name</code></strong> (str) - The name of the signal to disconnect the receiver from.</li>
|
||||
<li><strong class="pname"><code>receiver</code></strong> - The receiver to disconnect from the signal.</li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
164
html/pypat.behavioral.memento-module.html
vendored
Normal file
164
html/pypat.behavioral.memento-module.html
vendored
Normal file
@@ -0,0 +1,164 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.behavioral.memento</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.behavioral-module.html">Package behavioral</a> ::
|
||||
Module memento
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.behavioral.memento-module.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== MODULE DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Module memento</h1><p class="nomargin-top"><span class="codelink"><a href="pypat.behavioral.memento-pysrc.html">source code</a></span></p>
|
||||
<!-- ==================== CLASSES ==================== -->
|
||||
<a name="section-Classes"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Classes</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Classes"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="pypat.behavioral.memento.Memento-class.html" class="summary-name">Memento</a><br />
|
||||
Memento class as part of the Memento design pattern.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="pypat.behavioral.memento.Originator-class.html" class="summary-name">Originator</a><br />
|
||||
Originator base class as part of the Memento design pattern.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== VARIABLES ==================== -->
|
||||
<a name="section-Variables"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Variables</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Variables"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="__package__"></a><span class="summary-name">__package__</span> = <code title="'pypat.behavioral'"><code class="variable-quote">'</code><code class="variable-string">pypat.behavioral</code><code class="variable-quote">'</code></code>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
159
html/pypat.behavioral.memento-pysrc.html
vendored
Normal file
159
html/pypat.behavioral.memento-pysrc.html
vendored
Normal file
@@ -0,0 +1,159 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.behavioral.memento</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.behavioral-module.html">Package behavioral</a> ::
|
||||
Module memento
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.behavioral.memento-pysrc.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h1 class="epydoc">Source Code for <a href="pypat.behavioral.memento-module.html">Module pypat.behavioral.memento</a></h1>
|
||||
<pre class="py-src">
|
||||
<a name="L1"></a><tt class="py-lineno"> 1</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">copy</tt> <tt class="py-keyword">import</tt> <tt class="py-name">deepcopy</tt> </tt>
|
||||
<a name="Memento"></a><div id="Memento-def"><a name="L2"></a><tt class="py-lineno"> 2</tt> <tt class="py-line"> </tt>
|
||||
<a name="L3"></a><tt class="py-lineno"> 3</tt> <tt class="py-line"> </tt>
|
||||
<a name="L4"></a><tt class="py-lineno"> 4</tt> <a class="py-toggle" href="#" id="Memento-toggle" onclick="return toggle('Memento');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pypat.behavioral.memento.Memento-class.html">Memento</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Memento-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="Memento-expanded"><a name="L5"></a><tt class="py-lineno"> 5</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L6"></a><tt class="py-lineno"> 6</tt> <tt class="py-line"><tt class="py-docstring"> Memento class as part of the Memento design pattern.</tt> </tt>
|
||||
<a name="L7"></a><tt class="py-lineno"> 7</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L8"></a><tt class="py-lineno"> 8</tt> <tt class="py-line"><tt class="py-docstring"> - External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}</tt> </tt>
|
||||
<a name="L9"></a><tt class="py-lineno"> 9</tt> <tt class="py-line"><tt class="py-docstring"> - External Memento Pattern documentation: U{https://en.wikipedia.org/wiki/Memento_pattern}</tt> </tt>
|
||||
<a name="L10"></a><tt class="py-lineno">10</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="Memento.__init__"></a><div id="Memento.__init__-def"><a name="L11"></a><tt class="py-lineno">11</tt> <a class="py-toggle" href="#" id="Memento.__init__-toggle" onclick="return toggle('Memento.__init__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.behavioral.memento.Memento-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">state</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Memento.__init__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Memento.__init__-expanded"><a name="L12"></a><tt class="py-lineno">12</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L13"></a><tt class="py-lineno">13</tt> <tt class="py-line"><tt class="py-docstring"> Initialize a new Memento instance.</tt> </tt>
|
||||
<a name="L14"></a><tt class="py-lineno">14</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L15"></a><tt class="py-lineno">15</tt> <tt class="py-line"><tt class="py-docstring"> @param state: The state to save in this Memento.</tt> </tt>
|
||||
<a name="L16"></a><tt class="py-lineno">16</tt> <tt class="py-line"><tt class="py-docstring"> @type state: dict</tt> </tt>
|
||||
<a name="L17"></a><tt class="py-lineno">17</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L18"></a><tt class="py-lineno">18</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__state</tt> <tt class="py-op">=</tt> <tt id="link-0" class="py-name" targets="Variable pypat.behavioral.memento.Memento.state=pypat.behavioral.memento.Memento-class.html#state"><a title="pypat.behavioral.memento.Memento.state" class="py-name" href="#" onclick="return doclink('link-0', 'state', 'link-0');">state</a></tt> </tt>
|
||||
</div><a name="L19"></a><tt class="py-lineno">19</tt> <tt class="py-line"> </tt>
|
||||
<a name="L20"></a><tt class="py-lineno">20</tt> <tt class="py-line"> <tt class="py-decorator">@</tt><tt class="py-decorator">property</tt> </tt>
|
||||
<a name="Memento.state"></a><div id="Memento.state-def"><a name="L21"></a><tt class="py-lineno">21</tt> <a class="py-toggle" href="#" id="Memento.state-toggle" onclick="return toggle('Memento.state');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.behavioral.memento.Memento-class.html#state">state</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Memento.state-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Memento.state-expanded"><a name="L22"></a><tt class="py-lineno">22</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__state</tt> </tt>
|
||||
</div></div><a name="L23"></a><tt class="py-lineno">23</tt> <tt class="py-line"> </tt>
|
||||
<a name="Originator"></a><div id="Originator-def"><a name="L24"></a><tt class="py-lineno">24</tt> <tt class="py-line"> </tt>
|
||||
<a name="L25"></a><tt class="py-lineno">25</tt> <a class="py-toggle" href="#" id="Originator-toggle" onclick="return toggle('Originator');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pypat.behavioral.memento.Originator-class.html">Originator</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Originator-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="Originator-expanded"><a name="L26"></a><tt class="py-lineno">26</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L27"></a><tt class="py-lineno">27</tt> <tt class="py-line"><tt class="py-docstring"> Originator base class as part of the Memento design pattern.</tt> </tt>
|
||||
<a name="L28"></a><tt class="py-lineno">28</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L29"></a><tt class="py-lineno">29</tt> <tt class="py-line"><tt class="py-docstring"> - External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}</tt> </tt>
|
||||
<a name="L30"></a><tt class="py-lineno">30</tt> <tt class="py-line"><tt class="py-docstring"> - External Mediator Pattern documentation: U{https://en.wikipedia.org/wiki/Memento_pattern}</tt> </tt>
|
||||
<a name="L31"></a><tt class="py-lineno">31</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="Originator.commit"></a><div id="Originator.commit-def"><a name="L32"></a><tt class="py-lineno">32</tt> <a class="py-toggle" href="#" id="Originator.commit-toggle" onclick="return toggle('Originator.commit');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.behavioral.memento.Originator-class.html#commit">commit</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Originator.commit-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Originator.commit-expanded"><a name="L33"></a><tt class="py-lineno">33</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L34"></a><tt class="py-lineno">34</tt> <tt class="py-line"><tt class="py-docstring"> Commit this objects state to a memento.</tt> </tt>
|
||||
<a name="L35"></a><tt class="py-lineno">35</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L36"></a><tt class="py-lineno">36</tt> <tt class="py-line"><tt class="py-docstring"> @return: A memento instance with this objects state.</tt> </tt>
|
||||
<a name="L37"></a><tt class="py-lineno">37</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L38"></a><tt class="py-lineno">38</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt id="link-1" class="py-name" targets="Class pypat.behavioral.memento.Memento=pypat.behavioral.memento.Memento-class.html"><a title="pypat.behavioral.memento.Memento" class="py-name" href="#" onclick="return doclink('link-1', 'Memento', 'link-1');">Memento</a></tt><tt class="py-op">(</tt><tt class="py-name">deepcopy</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__dict__</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
|
||||
</div><a name="L39"></a><tt class="py-lineno">39</tt> <tt class="py-line"> </tt>
|
||||
<a name="Originator.rollback"></a><div id="Originator.rollback-def"><a name="L40"></a><tt class="py-lineno">40</tt> <a class="py-toggle" href="#" id="Originator.rollback-toggle" onclick="return toggle('Originator.rollback');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.behavioral.memento.Originator-class.html#rollback">rollback</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">memento</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Originator.rollback-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Originator.rollback-expanded"><a name="L41"></a><tt class="py-lineno">41</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L42"></a><tt class="py-lineno">42</tt> <tt class="py-line"><tt class="py-docstring"> Rollback this objects state to a previous state.</tt> </tt>
|
||||
<a name="L43"></a><tt class="py-lineno">43</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L44"></a><tt class="py-lineno">44</tt> <tt class="py-line"><tt class="py-docstring"> @param memento: The memento object holding the state to rollback to.</tt> </tt>
|
||||
<a name="L45"></a><tt class="py-lineno">45</tt> <tt class="py-line"><tt class="py-docstring"> @type memento: Memento</tt> </tt>
|
||||
<a name="L46"></a><tt class="py-lineno">46</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L47"></a><tt class="py-lineno">47</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__dict__</tt> <tt class="py-op">=</tt> <tt id="link-2" class="py-name" targets="Module pypat.behavioral.memento=pypat.behavioral.memento-module.html"><a title="pypat.behavioral.memento" class="py-name" href="#" onclick="return doclink('link-2', 'memento', 'link-2');">memento</a></tt><tt class="py-op">.</tt><tt id="link-3" class="py-name"><a title="pypat.behavioral.memento.Memento.state" class="py-name" href="#" onclick="return doclink('link-3', 'state', 'link-0');">state</a></tt> </tt>
|
||||
</div></div><a name="L48"></a><tt class="py-lineno">48</tt> <tt class="py-line"> </tt><script type="text/javascript">
|
||||
<!--
|
||||
expandto(location.href);
|
||||
// -->
|
||||
</script>
|
||||
</pre>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:56 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
288
html/pypat.behavioral.memento.Memento-class.html
vendored
Normal file
288
html/pypat.behavioral.memento.Memento-class.html
vendored
Normal file
@@ -0,0 +1,288 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.behavioral.memento.Memento</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.behavioral-module.html">Package behavioral</a> ::
|
||||
<a href="pypat.behavioral.memento-module.html">Module memento</a> ::
|
||||
Class Memento
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.behavioral.memento.Memento-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Class Memento</h1><p class="nomargin-top"><span class="codelink"><a href="pypat.behavioral.memento-pysrc.html#Memento">source code</a></span></p>
|
||||
<pre class="base-tree">
|
||||
object --+
|
||||
|
|
||||
<strong class="uidshort">Memento</strong>
|
||||
</pre>
|
||||
|
||||
<hr />
|
||||
<pre class="literalblock">
|
||||
|
||||
Memento class as part of the Memento design pattern.
|
||||
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
||||
- External Memento Pattern documentation: U{https://en.wikipedia.org/wiki/Memento_pattern}
|
||||
|
||||
</pre>
|
||||
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Instance Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-InstanceMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.behavioral.memento.Memento-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">state</span>)</span><br />
|
||||
Initialize a new Memento instance.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.behavioral.memento-pysrc.html#Memento.__init__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__delattr__</code>,
|
||||
<code>__format__</code>,
|
||||
<code>__getattribute__</code>,
|
||||
<code>__hash__</code>,
|
||||
<code>__new__</code>,
|
||||
<code>__reduce__</code>,
|
||||
<code>__reduce_ex__</code>,
|
||||
<code>__repr__</code>,
|
||||
<code>__setattr__</code>,
|
||||
<code>__sizeof__</code>,
|
||||
<code>__str__</code>,
|
||||
<code>__subclasshook__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== PROPERTIES ==================== -->
|
||||
<a name="section-Properties"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Properties</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Properties"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="pypat.behavioral.memento.Memento-class.html#state" class="summary-name">state</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__class__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== METHOD DETAILS ==================== -->
|
||||
<a name="section-MethodDetails"></a>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Method Details</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-MethodDetails"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="__init__"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">state</span>)</span>
|
||||
<br /><em class="fname">(Constructor)</em>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.behavioral.memento-pysrc.html#Memento.__init__">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Initialize a new Memento instance.</p>
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>state</code></strong> (dict) - The state to save in this Memento.</li>
|
||||
</ul></dd>
|
||||
<dt>Overrides:
|
||||
object.__init__
|
||||
</dt>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<br />
|
||||
<!-- ==================== PROPERTY DETAILS ==================== -->
|
||||
<a name="section-PropertyDetails"></a>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Property Details</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-PropertyDetails"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="state"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<h3 class="epydoc">state</h3>
|
||||
|
||||
<dl class="fields">
|
||||
<dt>Get Method:</dt>
|
||||
<dd class="value"><span class="summary-sig"><i>unreachable</i>.state(<span class="summary-sig-arg">self</span>)</span>
|
||||
</dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
283
html/pypat.behavioral.memento.Originator-class.html
vendored
Normal file
283
html/pypat.behavioral.memento.Originator-class.html
vendored
Normal file
@@ -0,0 +1,283 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.behavioral.memento.Originator</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.behavioral-module.html">Package behavioral</a> ::
|
||||
<a href="pypat.behavioral.memento-module.html">Module memento</a> ::
|
||||
Class Originator
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.behavioral.memento.Originator-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Class Originator</h1><p class="nomargin-top"><span class="codelink"><a href="pypat.behavioral.memento-pysrc.html#Originator">source code</a></span></p>
|
||||
<pre class="base-tree">
|
||||
object --+
|
||||
|
|
||||
<strong class="uidshort">Originator</strong>
|
||||
</pre>
|
||||
|
||||
<hr />
|
||||
<pre class="literalblock">
|
||||
|
||||
Originator base class as part of the Memento design pattern.
|
||||
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
||||
- External Mediator Pattern documentation: U{https://en.wikipedia.org/wiki/Memento_pattern}
|
||||
|
||||
</pre>
|
||||
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Instance Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-InstanceMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.behavioral.memento.Originator-class.html#commit" class="summary-sig-name">commit</a>(<span class="summary-sig-arg">self</span>)</span><br />
|
||||
Commit this objects state to a memento.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.behavioral.memento-pysrc.html#Originator.commit">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.behavioral.memento.Originator-class.html#rollback" class="summary-sig-name">rollback</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">memento</span>)</span><br />
|
||||
Rollback this objects state to a previous state.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.behavioral.memento-pysrc.html#Originator.rollback">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__delattr__</code>,
|
||||
<code>__format__</code>,
|
||||
<code>__getattribute__</code>,
|
||||
<code>__hash__</code>,
|
||||
<code>__init__</code>,
|
||||
<code>__new__</code>,
|
||||
<code>__reduce__</code>,
|
||||
<code>__reduce_ex__</code>,
|
||||
<code>__repr__</code>,
|
||||
<code>__setattr__</code>,
|
||||
<code>__sizeof__</code>,
|
||||
<code>__str__</code>,
|
||||
<code>__subclasshook__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== PROPERTIES ==================== -->
|
||||
<a name="section-Properties"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Properties</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Properties"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__class__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== METHOD DETAILS ==================== -->
|
||||
<a name="section-MethodDetails"></a>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Method Details</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-MethodDetails"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="commit"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">commit</span>(<span class="sig-arg">self</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.behavioral.memento-pysrc.html#Originator.commit">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Commit this objects state to a memento.</p>
|
||||
<dl class="fields">
|
||||
<dt>Returns:</dt>
|
||||
<dd>A memento instance with this objects state.</dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="rollback"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">rollback</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">memento</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.behavioral.memento-pysrc.html#Originator.rollback">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Rollback this objects state to a previous state.</p>
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>memento</code></strong> (Memento) - The memento object holding the state to rollback to.</li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
156
html/pypat.behavioral.null-module.html
vendored
Normal file
156
html/pypat.behavioral.null-module.html
vendored
Normal file
@@ -0,0 +1,156 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.behavioral.null</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.behavioral-module.html">Package behavioral</a> ::
|
||||
Module null
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.behavioral.null-module.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== MODULE DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Module null</h1><p class="nomargin-top"><span class="codelink"><a href="pypat.behavioral.null-pysrc.html">source code</a></span></p>
|
||||
<!-- ==================== CLASSES ==================== -->
|
||||
<a name="section-Classes"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Classes</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Classes"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="pypat.behavioral.null.Null-class.html" class="summary-name">Null</a><br />
|
||||
A Null object class as part of the Null object design pattern.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== VARIABLES ==================== -->
|
||||
<a name="section-Variables"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Variables</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Variables"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="__package__"></a><span class="summary-name">__package__</span> = <code title="None">None</code>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
187
html/pypat.behavioral.null-pysrc.html
vendored
Normal file
187
html/pypat.behavioral.null-pysrc.html
vendored
Normal file
@@ -0,0 +1,187 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.behavioral.null</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.behavioral-module.html">Package behavioral</a> ::
|
||||
Module null
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.behavioral.null-pysrc.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h1 class="epydoc">Source Code for <a href="pypat.behavioral.null-module.html">Module pypat.behavioral.null</a></h1>
|
||||
<pre class="py-src">
|
||||
<a name="Null"></a><div id="Null-def"><a name="L1"></a><tt class="py-lineno"> 1</tt> <a class="py-toggle" href="#" id="Null-toggle" onclick="return toggle('Null');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pypat.behavioral.null.Null-class.html">Null</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Null-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="Null-expanded"><a name="L2"></a><tt class="py-lineno"> 2</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L3"></a><tt class="py-lineno"> 3</tt> <tt class="py-line"><tt class="py-docstring"> A Null object class as part of the Null object design pattern.</tt> </tt>
|
||||
<a name="L4"></a><tt class="py-lineno"> 4</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L5"></a><tt class="py-lineno"> 5</tt> <tt class="py-line"><tt class="py-docstring"> - External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}</tt> </tt>
|
||||
<a name="L6"></a><tt class="py-lineno"> 6</tt> <tt class="py-line"><tt class="py-docstring"> - External Null Object Pattern documentation: U{https://en.wikipedia.org/wiki/Null_Object_pattern}</tt> </tt>
|
||||
<a name="L7"></a><tt class="py-lineno"> 7</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="Null.__init__"></a><div id="Null.__init__-def"><a name="L8"></a><tt class="py-lineno"> 8</tt> <a class="py-toggle" href="#" id="Null.__init__-toggle" onclick="return toggle('Null.__init__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.behavioral.null.Null-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kwargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Null.__init__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Null.__init__-expanded"><a name="L9"></a><tt class="py-lineno"> 9</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L10"></a><tt class="py-lineno">10</tt> <tt class="py-line"><tt class="py-docstring"> Do nothing.</tt> </tt>
|
||||
<a name="L11"></a><tt class="py-lineno">11</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L12"></a><tt class="py-lineno">12</tt> <tt class="py-line"> <tt class="py-keyword">pass</tt> </tt>
|
||||
</div><a name="L13"></a><tt class="py-lineno">13</tt> <tt class="py-line"> </tt>
|
||||
<a name="Null.__call__"></a><div id="Null.__call__-def"><a name="L14"></a><tt class="py-lineno">14</tt> <a class="py-toggle" href="#" id="Null.__call__-toggle" onclick="return toggle('Null.__call__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.behavioral.null.Null-class.html#__call__">__call__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kwargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Null.__call__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Null.__call__-expanded"><a name="L15"></a><tt class="py-lineno">15</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L16"></a><tt class="py-lineno">16</tt> <tt class="py-line"><tt class="py-docstring"> Do nothing.</tt> </tt>
|
||||
<a name="L17"></a><tt class="py-lineno">17</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L18"></a><tt class="py-lineno">18</tt> <tt class="py-line"><tt class="py-docstring"> @return: This object instance.</tt> </tt>
|
||||
<a name="L19"></a><tt class="py-lineno">19</tt> <tt class="py-line"><tt class="py-docstring"> @rtype: Null</tt> </tt>
|
||||
<a name="L20"></a><tt class="py-lineno">20</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L21"></a><tt class="py-lineno">21</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt> </tt>
|
||||
</div><a name="L22"></a><tt class="py-lineno">22</tt> <tt class="py-line"> </tt>
|
||||
<a name="Null.__getattr__"></a><div id="Null.__getattr__-def"><a name="L23"></a><tt class="py-lineno">23</tt> <a class="py-toggle" href="#" id="Null.__getattr__-toggle" onclick="return toggle('Null.__getattr__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.behavioral.null.Null-class.html#__getattr__">__getattr__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Null.__getattr__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Null.__getattr__-expanded"><a name="L24"></a><tt class="py-lineno">24</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L25"></a><tt class="py-lineno">25</tt> <tt class="py-line"><tt class="py-docstring"> Do nothing.</tt> </tt>
|
||||
<a name="L26"></a><tt class="py-lineno">26</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L27"></a><tt class="py-lineno">27</tt> <tt class="py-line"><tt class="py-docstring"> @return: This object instance.</tt> </tt>
|
||||
<a name="L28"></a><tt class="py-lineno">28</tt> <tt class="py-line"><tt class="py-docstring"> @rtype: Null</tt> </tt>
|
||||
<a name="L29"></a><tt class="py-lineno">29</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L30"></a><tt class="py-lineno">30</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt> </tt>
|
||||
</div><a name="L31"></a><tt class="py-lineno">31</tt> <tt class="py-line"> </tt>
|
||||
<a name="Null.__setattr__"></a><div id="Null.__setattr__-def"><a name="L32"></a><tt class="py-lineno">32</tt> <a class="py-toggle" href="#" id="Null.__setattr__-toggle" onclick="return toggle('Null.__setattr__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.behavioral.null.Null-class.html#__setattr__">__setattr__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Null.__setattr__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Null.__setattr__-expanded"><a name="L33"></a><tt class="py-lineno">33</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L34"></a><tt class="py-lineno">34</tt> <tt class="py-line"><tt class="py-docstring"> Do nothing.</tt> </tt>
|
||||
<a name="L35"></a><tt class="py-lineno">35</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L36"></a><tt class="py-lineno">36</tt> <tt class="py-line"><tt class="py-docstring"> @return: This object instance.</tt> </tt>
|
||||
<a name="L37"></a><tt class="py-lineno">37</tt> <tt class="py-line"><tt class="py-docstring"> @rtype: Null</tt> </tt>
|
||||
<a name="L38"></a><tt class="py-lineno">38</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L39"></a><tt class="py-lineno">39</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt> </tt>
|
||||
</div><a name="L40"></a><tt class="py-lineno">40</tt> <tt class="py-line"> </tt>
|
||||
<a name="Null.__delattr__"></a><div id="Null.__delattr__-def"><a name="L41"></a><tt class="py-lineno">41</tt> <a class="py-toggle" href="#" id="Null.__delattr__-toggle" onclick="return toggle('Null.__delattr__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.behavioral.null.Null-class.html#__delattr__">__delattr__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Null.__delattr__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Null.__delattr__-expanded"><a name="L42"></a><tt class="py-lineno">42</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L43"></a><tt class="py-lineno">43</tt> <tt class="py-line"><tt class="py-docstring"> Do nothing.</tt> </tt>
|
||||
<a name="L44"></a><tt class="py-lineno">44</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L45"></a><tt class="py-lineno">45</tt> <tt class="py-line"><tt class="py-docstring"> @return: This object instance.</tt> </tt>
|
||||
<a name="L46"></a><tt class="py-lineno">46</tt> <tt class="py-line"><tt class="py-docstring"> @rtype: Null</tt> </tt>
|
||||
<a name="L47"></a><tt class="py-lineno">47</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L48"></a><tt class="py-lineno">48</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt> </tt>
|
||||
</div><a name="L49"></a><tt class="py-lineno">49</tt> <tt class="py-line"> </tt>
|
||||
<a name="Null.__repr__"></a><div id="Null.__repr__-def"><a name="L50"></a><tt class="py-lineno">50</tt> <a class="py-toggle" href="#" id="Null.__repr__-toggle" onclick="return toggle('Null.__repr__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.behavioral.null.Null-class.html#__repr__">__repr__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Null.__repr__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Null.__repr__-expanded"><a name="L51"></a><tt class="py-lineno">51</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L52"></a><tt class="py-lineno">52</tt> <tt class="py-line"><tt class="py-docstring"> Null object string representation is the empty string.</tt> </tt>
|
||||
<a name="L53"></a><tt class="py-lineno">53</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L54"></a><tt class="py-lineno">54</tt> <tt class="py-line"><tt class="py-docstring"> @return: An empty string.</tt> </tt>
|
||||
<a name="L55"></a><tt class="py-lineno">55</tt> <tt class="py-line"><tt class="py-docstring"> @rtype: String</tt> </tt>
|
||||
<a name="L56"></a><tt class="py-lineno">56</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L57"></a><tt class="py-lineno">57</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-string">''</tt> </tt>
|
||||
</div><a name="L58"></a><tt class="py-lineno">58</tt> <tt class="py-line"> </tt>
|
||||
<a name="Null.__str__"></a><div id="Null.__str__-def"><a name="L59"></a><tt class="py-lineno">59</tt> <a class="py-toggle" href="#" id="Null.__str__-toggle" onclick="return toggle('Null.__str__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.behavioral.null.Null-class.html#__str__">__str__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Null.__str__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Null.__str__-expanded"><a name="L60"></a><tt class="py-lineno">60</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L61"></a><tt class="py-lineno">61</tt> <tt class="py-line"><tt class="py-docstring"> Null object string representation is the empty string.</tt> </tt>
|
||||
<a name="L62"></a><tt class="py-lineno">62</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L63"></a><tt class="py-lineno">63</tt> <tt class="py-line"><tt class="py-docstring"> @return: An empty string.</tt> </tt>
|
||||
<a name="L64"></a><tt class="py-lineno">64</tt> <tt class="py-line"><tt class="py-docstring"> @rtype: String</tt> </tt>
|
||||
<a name="L65"></a><tt class="py-lineno">65</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L66"></a><tt class="py-lineno">66</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-string">''</tt> </tt>
|
||||
</div><a name="L67"></a><tt class="py-lineno">67</tt> <tt class="py-line"> </tt>
|
||||
<a name="Null.__bool__"></a><div id="Null.__bool__-def"><a name="L68"></a><tt class="py-lineno">68</tt> <a class="py-toggle" href="#" id="Null.__bool__-toggle" onclick="return toggle('Null.__bool__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.behavioral.null.Null-class.html#__bool__">__bool__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Null.__bool__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Null.__bool__-expanded"><a name="L69"></a><tt class="py-lineno">69</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L70"></a><tt class="py-lineno">70</tt> <tt class="py-line"><tt class="py-docstring"> Null object evaluates to False.</tt> </tt>
|
||||
<a name="L71"></a><tt class="py-lineno">71</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L72"></a><tt class="py-lineno">72</tt> <tt class="py-line"><tt class="py-docstring"> @return: False.</tt> </tt>
|
||||
<a name="L73"></a><tt class="py-lineno">73</tt> <tt class="py-line"><tt class="py-docstring"> @rtype: Boolean</tt> </tt>
|
||||
<a name="L74"></a><tt class="py-lineno">74</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L75"></a><tt class="py-lineno">75</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
|
||||
</div></div><a name="L76"></a><tt class="py-lineno">76</tt> <tt class="py-line"> </tt><script type="text/javascript">
|
||||
<!--
|
||||
expandto(location.href);
|
||||
// -->
|
||||
</script>
|
||||
</pre>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:56 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
536
html/pypat.behavioral.null.Null-class.html
vendored
Normal file
536
html/pypat.behavioral.null.Null-class.html
vendored
Normal file
@@ -0,0 +1,536 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.behavioral.null.Null</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.behavioral-module.html">Package behavioral</a> ::
|
||||
<a href="pypat.behavioral.null-module.html">Module null</a> ::
|
||||
Class Null
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.behavioral.null.Null-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Class Null</h1><p class="nomargin-top"><span class="codelink"><a href="pypat.behavioral.null-pysrc.html#Null">source code</a></span></p>
|
||||
<pre class="base-tree">
|
||||
object --+
|
||||
|
|
||||
<strong class="uidshort">Null</strong>
|
||||
</pre>
|
||||
|
||||
<hr />
|
||||
<pre class="literalblock">
|
||||
|
||||
A Null object class as part of the Null object design pattern.
|
||||
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
||||
- External Null Object Pattern documentation: U{https://en.wikipedia.org/wiki/Null_Object_pattern}
|
||||
|
||||
</pre>
|
||||
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Instance Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-InstanceMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.behavioral.null.Null-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">*args</span>,
|
||||
<span class="summary-sig-arg">**kwargs</span>)</span><br />
|
||||
Do nothing.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.behavioral.null-pysrc.html#Null.__init__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type">Null</span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.behavioral.null.Null-class.html#__call__" class="summary-sig-name">__call__</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">*args</span>,
|
||||
<span class="summary-sig-arg">**kwargs</span>)</span><br />
|
||||
Do nothing.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.behavioral.null-pysrc.html#Null.__call__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type">Null</span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.behavioral.null.Null-class.html#__getattr__" class="summary-sig-name">__getattr__</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">name</span>)</span><br />
|
||||
Do nothing.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.behavioral.null-pysrc.html#Null.__getattr__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type">Null</span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.behavioral.null.Null-class.html#__setattr__" class="summary-sig-name">__setattr__</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">name</span>,
|
||||
<span class="summary-sig-arg">value</span>)</span><br />
|
||||
Do nothing.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.behavioral.null-pysrc.html#Null.__setattr__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type">Null</span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.behavioral.null.Null-class.html#__delattr__" class="summary-sig-name">__delattr__</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">name</span>)</span><br />
|
||||
Do nothing.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.behavioral.null-pysrc.html#Null.__delattr__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type">String</span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.behavioral.null.Null-class.html#__repr__" class="summary-sig-name">__repr__</a>(<span class="summary-sig-arg">self</span>)</span><br />
|
||||
Null object string representation is the empty string.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.behavioral.null-pysrc.html#Null.__repr__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type">String</span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.behavioral.null.Null-class.html#__str__" class="summary-sig-name">__str__</a>(<span class="summary-sig-arg">self</span>)</span><br />
|
||||
Null object string representation is the empty string.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.behavioral.null-pysrc.html#Null.__str__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type">Boolean</span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.behavioral.null.Null-class.html#__bool__" class="summary-sig-name">__bool__</a>(<span class="summary-sig-arg">self</span>)</span><br />
|
||||
Null object evaluates to False.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.behavioral.null-pysrc.html#Null.__bool__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__format__</code>,
|
||||
<code>__getattribute__</code>,
|
||||
<code>__hash__</code>,
|
||||
<code>__new__</code>,
|
||||
<code>__reduce__</code>,
|
||||
<code>__reduce_ex__</code>,
|
||||
<code>__sizeof__</code>,
|
||||
<code>__subclasshook__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== PROPERTIES ==================== -->
|
||||
<a name="section-Properties"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Properties</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Properties"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__class__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== METHOD DETAILS ==================== -->
|
||||
<a name="section-MethodDetails"></a>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Method Details</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-MethodDetails"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="__init__"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">*args</span>,
|
||||
<span class="sig-arg">**kwargs</span>)</span>
|
||||
<br /><em class="fname">(Constructor)</em>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.behavioral.null-pysrc.html#Null.__init__">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Do nothing.</p>
|
||||
<dl class="fields">
|
||||
<dt>Overrides:
|
||||
object.__init__
|
||||
</dt>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="__call__"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">__call__</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">*args</span>,
|
||||
<span class="sig-arg">**kwargs</span>)</span>
|
||||
<br /><em class="fname">(Call operator)</em>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.behavioral.null-pysrc.html#Null.__call__">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Do nothing.</p>
|
||||
<dl class="fields">
|
||||
<dt>Returns: Null</dt>
|
||||
<dd>This object instance.</dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="__getattr__"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">__getattr__</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">name</span>)</span>
|
||||
<br /><em class="fname">(Qualification operator)</em>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.behavioral.null-pysrc.html#Null.__getattr__">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Do nothing.</p>
|
||||
<dl class="fields">
|
||||
<dt>Returns: Null</dt>
|
||||
<dd>This object instance.</dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="__setattr__"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">__setattr__</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">name</span>,
|
||||
<span class="sig-arg">value</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.behavioral.null-pysrc.html#Null.__setattr__">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Do nothing.</p>
|
||||
<dl class="fields">
|
||||
<dt>Returns: Null</dt>
|
||||
<dd>This object instance.</dd>
|
||||
<dt>Overrides:
|
||||
object.__setattr__
|
||||
</dt>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="__delattr__"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">__delattr__</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">name</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.behavioral.null-pysrc.html#Null.__delattr__">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Do nothing.</p>
|
||||
<dl class="fields">
|
||||
<dt>Returns: Null</dt>
|
||||
<dd>This object instance.</dd>
|
||||
<dt>Overrides:
|
||||
object.__delattr__
|
||||
</dt>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="__repr__"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">__repr__</span>(<span class="sig-arg">self</span>)</span>
|
||||
<br /><em class="fname">(Representation operator)</em>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.behavioral.null-pysrc.html#Null.__repr__">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Null object string representation is the empty string.</p>
|
||||
<dl class="fields">
|
||||
<dt>Returns: String</dt>
|
||||
<dd>An empty string.</dd>
|
||||
<dt>Overrides:
|
||||
object.__repr__
|
||||
</dt>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="__str__"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">__str__</span>(<span class="sig-arg">self</span>)</span>
|
||||
<br /><em class="fname">(Informal representation operator)</em>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.behavioral.null-pysrc.html#Null.__str__">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Null object string representation is the empty string.</p>
|
||||
<dl class="fields">
|
||||
<dt>Returns: String</dt>
|
||||
<dd>An empty string.</dd>
|
||||
<dt>Overrides:
|
||||
object.__str__
|
||||
</dt>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="__bool__"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">__bool__</span>(<span class="sig-arg">self</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.behavioral.null-pysrc.html#Null.__bool__">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Null object evaluates to False.</p>
|
||||
<dl class="fields">
|
||||
<dt>Returns: Boolean</dt>
|
||||
<dd>False.</dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
139
html/pypat.behavioral.observer-module.html
vendored
Normal file
139
html/pypat.behavioral.observer-module.html
vendored
Normal file
@@ -0,0 +1,139 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.behavioral.observer</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.behavioral-module.html">Package behavioral</a> ::
|
||||
Module observer
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.behavioral.observer-module.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== MODULE DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Module observer</h1><p class="nomargin-top"><span class="codelink"><a href="pypat.behavioral.observer-pysrc.html">source code</a></span></p>
|
||||
<!-- ==================== CLASSES ==================== -->
|
||||
<a name="section-Classes"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Classes</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Classes"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="pypat.behavioral.observer.Observer-class.html" class="summary-name">Observer</a><br />
|
||||
Abstract Observer class as part of the Observer design pattern.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="pypat.behavioral.observer.Observable-class.html" class="summary-name">Observable</a><br />
|
||||
Base Observable class as part of the Observer design pattern.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
171
html/pypat.behavioral.observer-pysrc.html
vendored
Normal file
171
html/pypat.behavioral.observer-pysrc.html
vendored
Normal file
@@ -0,0 +1,171 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.behavioral.observer</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.behavioral-module.html">Package behavioral</a> ::
|
||||
Module observer
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.behavioral.observer-pysrc.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h1 class="epydoc">Source Code for <a href="pypat.behavioral.observer-module.html">Module pypat.behavioral.observer</a></h1>
|
||||
<pre class="py-src">
|
||||
<a name="L1"></a><tt class="py-lineno"> 1</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">abc</tt> <tt class="py-keyword">import</tt> <tt class="py-name">ABCMeta</tt><tt class="py-op">,</tt> <tt class="py-name">abstractmethod</tt> </tt>
|
||||
<a name="Observer"></a><div id="Observer-def"><a name="L2"></a><tt class="py-lineno"> 2</tt> <tt class="py-line"> </tt>
|
||||
<a name="L3"></a><tt class="py-lineno"> 3</tt> <tt class="py-line"> </tt>
|
||||
<a name="L4"></a><tt class="py-lineno"> 4</tt> <a class="py-toggle" href="#" id="Observer-toggle" onclick="return toggle('Observer');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pypat.behavioral.observer.Observer-class.html">Observer</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">,</tt> <tt class="py-base-class">metaclass</tt><tt class="py-op">=</tt><tt class="py-base-class">ABCMeta</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Observer-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="Observer-expanded"><a name="L5"></a><tt class="py-lineno"> 5</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L6"></a><tt class="py-lineno"> 6</tt> <tt class="py-line"><tt class="py-docstring"> Abstract Observer class as part of the Observer design pattern.</tt> </tt>
|
||||
<a name="L7"></a><tt class="py-lineno"> 7</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L8"></a><tt class="py-lineno"> 8</tt> <tt class="py-line"><tt class="py-docstring"> - External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}</tt> </tt>
|
||||
<a name="L9"></a><tt class="py-lineno"> 9</tt> <tt class="py-line"><tt class="py-docstring"> - External Observer Pattern documentation: U{https://en.wikipedia.org/wiki/Observer_pattern}</tt> </tt>
|
||||
<a name="L10"></a><tt class="py-lineno">10</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L11"></a><tt class="py-lineno">11</tt> <tt class="py-line"> <tt class="py-decorator">@</tt><tt class="py-decorator">abstractmethod</tt> </tt>
|
||||
<a name="Observer.update"></a><div id="Observer.update-def"><a name="L12"></a><tt class="py-lineno">12</tt> <a class="py-toggle" href="#" id="Observer.update-toggle" onclick="return toggle('Observer.update');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.behavioral.observer.Observer-class.html#update">update</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">state</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Observer.update-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Observer.update-expanded"><a name="L13"></a><tt class="py-lineno">13</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L14"></a><tt class="py-lineno">14</tt> <tt class="py-line"><tt class="py-docstring"> Abstract method that is called when an Observable's state changes.</tt> </tt>
|
||||
<a name="L15"></a><tt class="py-lineno">15</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L16"></a><tt class="py-lineno">16</tt> <tt class="py-line"> <tt class="py-keyword">pass</tt> </tt>
|
||||
</div></div><a name="L17"></a><tt class="py-lineno">17</tt> <tt class="py-line"> </tt>
|
||||
<a name="Observable"></a><div id="Observable-def"><a name="L18"></a><tt class="py-lineno">18</tt> <tt class="py-line"> </tt>
|
||||
<a name="L19"></a><tt class="py-lineno">19</tt> <a class="py-toggle" href="#" id="Observable-toggle" onclick="return toggle('Observable');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pypat.behavioral.observer.Observable-class.html">Observable</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Observable-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="Observable-expanded"><a name="L20"></a><tt class="py-lineno">20</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L21"></a><tt class="py-lineno">21</tt> <tt class="py-line"><tt class="py-docstring"> Base Observable class as part of the Observer design pattern.</tt> </tt>
|
||||
<a name="L22"></a><tt class="py-lineno">22</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L23"></a><tt class="py-lineno">23</tt> <tt class="py-line"><tt class="py-docstring"> - External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}</tt> </tt>
|
||||
<a name="L24"></a><tt class="py-lineno">24</tt> <tt class="py-line"><tt class="py-docstring"> - External Observer Pattern documentation: U{https://en.wikipedia.org/wiki/Observer_pattern}</tt> </tt>
|
||||
<a name="L25"></a><tt class="py-lineno">25</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="Observable.__init__"></a><div id="Observable.__init__-def"><a name="L26"></a><tt class="py-lineno">26</tt> <a class="py-toggle" href="#" id="Observable.__init__-toggle" onclick="return toggle('Observable.__init__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.behavioral.observer.Observable-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Observable.__init__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Observable.__init__-expanded"><a name="L27"></a><tt class="py-lineno">27</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L28"></a><tt class="py-lineno">28</tt> <tt class="py-line"><tt class="py-docstring"> Initialize a new Observable instance.</tt> </tt>
|
||||
<a name="L29"></a><tt class="py-lineno">29</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L30"></a><tt class="py-lineno">30</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_observers</tt> <tt class="py-op">=</tt> <tt class="py-name">set</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
</div><a name="L31"></a><tt class="py-lineno">31</tt> <tt class="py-line"> </tt>
|
||||
<a name="Observable.attach"></a><div id="Observable.attach-def"><a name="L32"></a><tt class="py-lineno">32</tt> <a class="py-toggle" href="#" id="Observable.attach-toggle" onclick="return toggle('Observable.attach');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.behavioral.observer.Observable-class.html#attach">attach</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">observer</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Observable.attach-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Observable.attach-expanded"><a name="L33"></a><tt class="py-lineno">33</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L34"></a><tt class="py-lineno">34</tt> <tt class="py-line"><tt class="py-docstring"> Attach an observer to this Observable.</tt> </tt>
|
||||
<a name="L35"></a><tt class="py-lineno">35</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L36"></a><tt class="py-lineno">36</tt> <tt class="py-line"><tt class="py-docstring"> @param observer: The Observer to attach.</tt> </tt>
|
||||
<a name="L37"></a><tt class="py-lineno">37</tt> <tt class="py-line"><tt class="py-docstring"> @type observer: Observer</tt> </tt>
|
||||
<a name="L38"></a><tt class="py-lineno">38</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L39"></a><tt class="py-lineno">39</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_observers</tt><tt class="py-op">.</tt><tt class="py-name">add</tt><tt class="py-op">(</tt><tt id="link-0" class="py-name" targets="Module pypat.behavioral.observer=pypat.behavioral.observer-module.html"><a title="pypat.behavioral.observer" class="py-name" href="#" onclick="return doclink('link-0', 'observer', 'link-0');">observer</a></tt><tt class="py-op">)</tt> </tt>
|
||||
</div><a name="L40"></a><tt class="py-lineno">40</tt> <tt class="py-line"> </tt>
|
||||
<a name="Observable.detach"></a><div id="Observable.detach-def"><a name="L41"></a><tt class="py-lineno">41</tt> <a class="py-toggle" href="#" id="Observable.detach-toggle" onclick="return toggle('Observable.detach');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.behavioral.observer.Observable-class.html#detach">detach</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">observer</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Observable.detach-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Observable.detach-expanded"><a name="L42"></a><tt class="py-lineno">42</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L43"></a><tt class="py-lineno">43</tt> <tt class="py-line"><tt class="py-docstring"> Detach an observer from this Observable.</tt> </tt>
|
||||
<a name="L44"></a><tt class="py-lineno">44</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L45"></a><tt class="py-lineno">45</tt> <tt class="py-line"><tt class="py-docstring"> @param observer: The Observer to detach.</tt> </tt>
|
||||
<a name="L46"></a><tt class="py-lineno">46</tt> <tt class="py-line"><tt class="py-docstring"> @type observer: Observer</tt> </tt>
|
||||
<a name="L47"></a><tt class="py-lineno">47</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L48"></a><tt class="py-lineno">48</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L49"></a><tt class="py-lineno">49</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_observers</tt><tt class="py-op">.</tt><tt class="py-name">remove</tt><tt class="py-op">(</tt><tt id="link-1" class="py-name"><a title="pypat.behavioral.observer" class="py-name" href="#" onclick="return doclink('link-1', 'observer', 'link-0');">observer</a></tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L50"></a><tt class="py-lineno">50</tt> <tt class="py-line"> <tt class="py-keyword">except</tt> <tt class="py-name">KeyError</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L51"></a><tt class="py-lineno">51</tt> <tt class="py-line"> <tt class="py-keyword">pass</tt> </tt>
|
||||
</div><a name="L52"></a><tt class="py-lineno">52</tt> <tt class="py-line"> </tt>
|
||||
<a name="Observable.notify"></a><div id="Observable.notify-def"><a name="L53"></a><tt class="py-lineno">53</tt> <a class="py-toggle" href="#" id="Observable.notify-toggle" onclick="return toggle('Observable.notify');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.behavioral.observer.Observable-class.html#notify">notify</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Observable.notify-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Observable.notify-expanded"><a name="L54"></a><tt class="py-lineno">54</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L55"></a><tt class="py-lineno">55</tt> <tt class="py-line"><tt class="py-docstring"> Notify all attached Observers of the state of this Observable.</tt> </tt>
|
||||
<a name="L56"></a><tt class="py-lineno">56</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L57"></a><tt class="py-lineno">57</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt id="link-2" class="py-name"><a title="pypat.behavioral.observer" class="py-name" href="#" onclick="return doclink('link-2', 'observer', 'link-0');">observer</a></tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_observers</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L58"></a><tt class="py-lineno">58</tt> <tt class="py-line"> <tt id="link-3" class="py-name" targets="Variable pypat.behavioral.memento.Memento.state=pypat.behavioral.memento.Memento-class.html#state"><a title="pypat.behavioral.memento.Memento.state" class="py-name" href="#" onclick="return doclink('link-3', 'state', 'link-3');">state</a></tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-name">k</tt><tt class="py-op">:</tt> <tt class="py-name">v</tt> <tt class="py-keyword">for</tt> <tt class="py-name">k</tt><tt class="py-op">,</tt> <tt class="py-name">v</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__dict__</tt><tt class="py-op">.</tt><tt class="py-name">items</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">k</tt><tt class="py-op">.</tt><tt class="py-name">startswith</tt><tt class="py-op">(</tt><tt class="py-string">'__'</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">k</tt><tt class="py-op">.</tt><tt class="py-name">startswith</tt><tt class="py-op">(</tt><tt class="py-string">'_'</tt><tt class="py-op">)</tt><tt class="py-op">}</tt> </tt>
|
||||
<a name="L59"></a><tt class="py-lineno">59</tt> <tt class="py-line"> <tt id="link-4" class="py-name"><a title="pypat.behavioral.observer" class="py-name" href="#" onclick="return doclink('link-4', 'observer', 'link-0');">observer</a></tt><tt class="py-op">.</tt><tt id="link-5" class="py-name" targets="Method pypat.behavioral.observer.Observer.update()=pypat.behavioral.observer.Observer-class.html#update"><a title="pypat.behavioral.observer.Observer.update" class="py-name" href="#" onclick="return doclink('link-5', 'update', 'link-5');">update</a></tt><tt class="py-op">(</tt><tt class="py-op">**</tt><tt id="link-6" class="py-name"><a title="pypat.behavioral.memento.Memento.state" class="py-name" href="#" onclick="return doclink('link-6', 'state', 'link-3');">state</a></tt><tt class="py-op">)</tt> </tt>
|
||||
</div></div><a name="L60"></a><tt class="py-lineno">60</tt> <tt class="py-line"> </tt><script type="text/javascript">
|
||||
<!--
|
||||
expandto(location.href);
|
||||
// -->
|
||||
</script>
|
||||
</pre>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:56 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
343
html/pypat.behavioral.observer.Observable-class.html
vendored
Normal file
343
html/pypat.behavioral.observer.Observable-class.html
vendored
Normal file
@@ -0,0 +1,343 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.behavioral.observer.Observable</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.behavioral-module.html">Package behavioral</a> ::
|
||||
<a href="pypat.behavioral.observer-module.html">Module observer</a> ::
|
||||
Class Observable
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.behavioral.observer.Observable-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Class Observable</h1><p class="nomargin-top"><span class="codelink"><a href="pypat.behavioral.observer-pysrc.html#Observable">source code</a></span></p>
|
||||
<pre class="base-tree">
|
||||
object --+
|
||||
|
|
||||
<strong class="uidshort">Observable</strong>
|
||||
</pre>
|
||||
|
||||
<hr />
|
||||
<pre class="literalblock">
|
||||
|
||||
Base Observable class as part of the Observer design pattern.
|
||||
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
||||
- External Observer Pattern documentation: U{https://en.wikipedia.org/wiki/Observer_pattern}
|
||||
|
||||
</pre>
|
||||
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Instance Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-InstanceMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.behavioral.observer.Observable-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>)</span><br />
|
||||
Initialize a new Observable instance.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.behavioral.observer-pysrc.html#Observable.__init__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.behavioral.observer.Observable-class.html#attach" class="summary-sig-name">attach</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">observer</span>)</span><br />
|
||||
Attach an observer to this Observable.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.behavioral.observer-pysrc.html#Observable.attach">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.behavioral.observer.Observable-class.html#detach" class="summary-sig-name">detach</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">observer</span>)</span><br />
|
||||
Detach an observer from this Observable.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.behavioral.observer-pysrc.html#Observable.detach">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="notify"></a><span class="summary-sig-name">notify</span>(<span class="summary-sig-arg">self</span>)</span><br />
|
||||
Notify all attached Observers of the state of this Observable.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.behavioral.observer-pysrc.html#Observable.notify">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__delattr__</code>,
|
||||
<code>__format__</code>,
|
||||
<code>__getattribute__</code>,
|
||||
<code>__hash__</code>,
|
||||
<code>__new__</code>,
|
||||
<code>__reduce__</code>,
|
||||
<code>__reduce_ex__</code>,
|
||||
<code>__repr__</code>,
|
||||
<code>__setattr__</code>,
|
||||
<code>__sizeof__</code>,
|
||||
<code>__str__</code>,
|
||||
<code>__subclasshook__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== PROPERTIES ==================== -->
|
||||
<a name="section-Properties"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Properties</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Properties"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__class__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== METHOD DETAILS ==================== -->
|
||||
<a name="section-MethodDetails"></a>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Method Details</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-MethodDetails"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="__init__"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>)</span>
|
||||
<br /><em class="fname">(Constructor)</em>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.behavioral.observer-pysrc.html#Observable.__init__">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Initialize a new Observable instance.</p>
|
||||
<dl class="fields">
|
||||
<dt>Overrides:
|
||||
object.__init__
|
||||
</dt>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="attach"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">attach</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">observer</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.behavioral.observer-pysrc.html#Observable.attach">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Attach an observer to this Observable.</p>
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>observer</code></strong> (Observer) - The Observer to attach.</li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="detach"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">detach</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">observer</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.behavioral.observer-pysrc.html#Observable.detach">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Detach an observer from this Observable.</p>
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>observer</code></strong> (Observer) - The Observer to detach.</li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
194
html/pypat.behavioral.observer.Observer-class.html
vendored
Normal file
194
html/pypat.behavioral.observer.Observer-class.html
vendored
Normal file
@@ -0,0 +1,194 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.behavioral.observer.Observer</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.behavioral-module.html">Package behavioral</a> ::
|
||||
<a href="pypat.behavioral.observer-module.html">Module observer</a> ::
|
||||
Class Observer
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.behavioral.observer.Observer-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Class Observer</h1><p class="nomargin-top"><span class="codelink"><a href="pypat.behavioral.observer-pysrc.html#Observer">source code</a></span></p>
|
||||
<pre class="literalblock">
|
||||
|
||||
Abstract Observer class as part of the Observer design pattern.
|
||||
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
||||
- External Observer Pattern documentation: U{https://en.wikipedia.org/wiki/Observer_pattern}
|
||||
|
||||
</pre>
|
||||
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Instance Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-InstanceMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.behavioral.observer.Observer-class.html#update" class="summary-sig-name">update</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">**state</span>)</span><br />
|
||||
Abstract method that is called when an Observable's state changes.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.behavioral.observer-pysrc.html#Observer.update">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== METHOD DETAILS ==================== -->
|
||||
<a name="section-MethodDetails"></a>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Method Details</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-MethodDetails"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="update"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">update</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">**state</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.behavioral.observer-pysrc.html#Observer.update">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Abstract method that is called when an Observable's state changes.</p>
|
||||
<dl class="fields">
|
||||
<dt>Decorators:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><code>@abstractmethod</code></li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
139
html/pypat.behavioral.visitor-module.html
vendored
Normal file
139
html/pypat.behavioral.visitor-module.html
vendored
Normal file
@@ -0,0 +1,139 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.behavioral.visitor</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.behavioral-module.html">Package behavioral</a> ::
|
||||
Module visitor
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.behavioral.visitor-module.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== MODULE DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Module visitor</h1><p class="nomargin-top"><span class="codelink"><a href="pypat.behavioral.visitor-pysrc.html">source code</a></span></p>
|
||||
<!-- ==================== CLASSES ==================== -->
|
||||
<a name="section-Classes"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Classes</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Classes"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="pypat.behavioral.visitor.Visitor-class.html" class="summary-name">Visitor</a><br />
|
||||
Abstract Visitor class as part of the Visitor Design Pattern.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="pypat.behavioral.visitor.Visitee-class.html" class="summary-name">Visitee</a><br />
|
||||
A base class for objects that wish to be able to be visited by a Visitor class.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
170
html/pypat.behavioral.visitor-pysrc.html
vendored
Normal file
170
html/pypat.behavioral.visitor-pysrc.html
vendored
Normal file
@@ -0,0 +1,170 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.behavioral.visitor</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.behavioral-module.html">Package behavioral</a> ::
|
||||
Module visitor
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.behavioral.visitor-pysrc.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h1 class="epydoc">Source Code for <a href="pypat.behavioral.visitor-module.html">Module pypat.behavioral.visitor</a></h1>
|
||||
<pre class="py-src">
|
||||
<a name="L1"></a><tt class="py-lineno"> 1</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">abc</tt> <tt class="py-keyword">import</tt> <tt class="py-name">ABCMeta</tt><tt class="py-op">,</tt> <tt class="py-name">abstractmethod</tt> </tt>
|
||||
<a name="Visitor"></a><div id="Visitor-def"><a name="L2"></a><tt class="py-lineno"> 2</tt> <tt class="py-line"> </tt>
|
||||
<a name="L3"></a><tt class="py-lineno"> 3</tt> <tt class="py-line"> </tt>
|
||||
<a name="L4"></a><tt class="py-lineno"> 4</tt> <a class="py-toggle" href="#" id="Visitor-toggle" onclick="return toggle('Visitor');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pypat.behavioral.visitor.Visitor-class.html">Visitor</a><tt class="py-op">(</tt><tt class="py-base-class">metaclass</tt><tt class="py-op">=</tt><tt class="py-base-class">ABCMeta</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Visitor-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="Visitor-expanded"><a name="L5"></a><tt class="py-lineno"> 5</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L6"></a><tt class="py-lineno"> 6</tt> <tt class="py-line"><tt class="py-docstring"> Abstract Visitor class as part of the Visitor Design Pattern.</tt> </tt>
|
||||
<a name="L7"></a><tt class="py-lineno"> 7</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L8"></a><tt class="py-lineno"> 8</tt> <tt class="py-line"><tt class="py-docstring"> - External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}</tt> </tt>
|
||||
<a name="L9"></a><tt class="py-lineno"> 9</tt> <tt class="py-line"><tt class="py-docstring"> - External Visitor Design Pattern documentation: U{https://en.wikipedia.org/wiki/Visitor_pattern}</tt> </tt>
|
||||
<a name="L10"></a><tt class="py-lineno">10</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="Visitor.visit"></a><div id="Visitor.visit-def"><a name="L11"></a><tt class="py-lineno">11</tt> <a class="py-toggle" href="#" id="Visitor.visit-toggle" onclick="return toggle('Visitor.visit');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.behavioral.visitor.Visitor-class.html#visit">visit</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">node</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kwargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Visitor.visit-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Visitor.visit-expanded"><a name="L12"></a><tt class="py-lineno">12</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L13"></a><tt class="py-lineno">13</tt> <tt class="py-line"><tt class="py-docstring"> Visit the visitor with some object.</tt> </tt>
|
||||
<a name="L14"></a><tt class="py-lineno">14</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L15"></a><tt class="py-lineno">15</tt> <tt class="py-line"><tt class="py-docstring"> @param node: An object to call a visitor method with.</tt> </tt>
|
||||
<a name="L16"></a><tt class="py-lineno">16</tt> <tt class="py-line"><tt class="py-docstring"> @param args: Arguments to go with the visitor method call.</tt> </tt>
|
||||
<a name="L17"></a><tt class="py-lineno">17</tt> <tt class="py-line"><tt class="py-docstring"> @param kwargs: Keyword arguments to go with the visitor method call.</tt> </tt>
|
||||
<a name="L18"></a><tt class="py-lineno">18</tt> <tt class="py-line"><tt class="py-docstring"> @return: The return value of the method that was called for visiting object.</tt> </tt>
|
||||
<a name="L19"></a><tt class="py-lineno">19</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L20"></a><tt class="py-lineno">20</tt> <tt class="py-line"> <tt class="py-name">method</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
|
||||
<a name="L21"></a><tt class="py-lineno">21</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">cls</tt> <tt class="py-keyword">in</tt> <tt class="py-name">node</tt><tt class="py-op">.</tt><tt class="py-name">__class__</tt><tt class="py-op">.</tt><tt class="py-name">__mro__</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L22"></a><tt class="py-lineno">22</tt> <tt class="py-line"> <tt class="py-name">method_name</tt> <tt class="py-op">=</tt> <tt class="py-string">'visit_'</tt><tt class="py-op">+</tt><tt class="py-name">cls</tt><tt class="py-op">.</tt><tt class="py-name">__name__</tt><tt class="py-op">.</tt><tt class="py-name">lower</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L23"></a><tt class="py-lineno">23</tt> <tt class="py-line"> <tt class="py-name">method</tt> <tt class="py-op">=</tt> <tt class="py-name">getattr</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">method_name</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L24"></a><tt class="py-lineno">24</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">method</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L25"></a><tt class="py-lineno">25</tt> <tt class="py-line"> <tt class="py-keyword">break</tt> </tt>
|
||||
<a name="L26"></a><tt class="py-lineno">26</tt> <tt class="py-line"> </tt>
|
||||
<a name="L27"></a><tt class="py-lineno">27</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">method</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L28"></a><tt class="py-lineno">28</tt> <tt class="py-line"> <tt class="py-name">method</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-0" class="py-name" targets="Method pypat.behavioral.visitor.Visitor.generic_visit()=pypat.behavioral.visitor.Visitor-class.html#generic_visit"><a title="pypat.behavioral.visitor.Visitor.generic_visit" class="py-name" href="#" onclick="return doclink('link-0', 'generic_visit', 'link-0');">generic_visit</a></tt> </tt>
|
||||
<a name="L29"></a><tt class="py-lineno">29</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">method</tt><tt class="py-op">(</tt><tt class="py-name">node</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-name">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">kwargs</tt><tt class="py-op">)</tt> </tt>
|
||||
</div><a name="L30"></a><tt class="py-lineno">30</tt> <tt class="py-line"> </tt>
|
||||
<a name="L31"></a><tt class="py-lineno">31</tt> <tt class="py-line"> <tt class="py-decorator">@</tt><tt class="py-decorator">abstractmethod</tt> </tt>
|
||||
<a name="Visitor.generic_visit"></a><div id="Visitor.generic_visit-def"><a name="L32"></a><tt class="py-lineno">32</tt> <a class="py-toggle" href="#" id="Visitor.generic_visit-toggle" onclick="return toggle('Visitor.generic_visit');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.behavioral.visitor.Visitor-class.html#generic_visit">generic_visit</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">node</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kwargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Visitor.generic_visit-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Visitor.generic_visit-expanded"><a name="L33"></a><tt class="py-lineno">33</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L34"></a><tt class="py-lineno">34</tt> <tt class="py-line"><tt class="py-docstring"> The method to call if no methods were found for a visiting object.</tt> </tt>
|
||||
<a name="L35"></a><tt class="py-lineno">35</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L36"></a><tt class="py-lineno">36</tt> <tt class="py-line"><tt class="py-docstring"> @param node: An object to call a visitor method with.</tt> </tt>
|
||||
<a name="L37"></a><tt class="py-lineno">37</tt> <tt class="py-line"><tt class="py-docstring"> @param args: Arguments to go with the visitor method call.</tt> </tt>
|
||||
<a name="L38"></a><tt class="py-lineno">38</tt> <tt class="py-line"><tt class="py-docstring"> @param kwargs: Keyword arguments to go with the visitor method call.</tt> </tt>
|
||||
<a name="L39"></a><tt class="py-lineno">39</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
</div></div><a name="L40"></a><tt class="py-lineno">40</tt> <tt class="py-line"> </tt>
|
||||
<a name="Visitee"></a><div id="Visitee-def"><a name="L41"></a><tt class="py-lineno">41</tt> <tt class="py-line"> </tt>
|
||||
<a name="L42"></a><tt class="py-lineno">42</tt> <a class="py-toggle" href="#" id="Visitee-toggle" onclick="return toggle('Visitee');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pypat.behavioral.visitor.Visitee-class.html">Visitee</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Visitee-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="Visitee-expanded"><a name="L43"></a><tt class="py-lineno">43</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L44"></a><tt class="py-lineno">44</tt> <tt class="py-line"><tt class="py-docstring"> A base class for objects that wish to be able to be visited by a Visitor class.</tt> </tt>
|
||||
<a name="L45"></a><tt class="py-lineno">45</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L46"></a><tt class="py-lineno">46</tt> <tt class="py-line"><tt class="py-docstring"> - External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}</tt> </tt>
|
||||
<a name="L47"></a><tt class="py-lineno">47</tt> <tt class="py-line"><tt class="py-docstring"> - External Visitor Design Pattern documentation: U{https://en.wikipedia.org/wiki/Visitor_pattern}</tt> </tt>
|
||||
<a name="L48"></a><tt class="py-lineno">48</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="Visitee.accept"></a><div id="Visitee.accept-def"><a name="L49"></a><tt class="py-lineno">49</tt> <a class="py-toggle" href="#" id="Visitee.accept-toggle" onclick="return toggle('Visitee.accept');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.behavioral.visitor.Visitee-class.html#accept">accept</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">visitor</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kwargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Visitee.accept-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Visitee.accept-expanded"><a name="L50"></a><tt class="py-lineno">50</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L51"></a><tt class="py-lineno">51</tt> <tt class="py-line"><tt class="py-docstring"> Have a visitor visit this class instance.</tt> </tt>
|
||||
<a name="L52"></a><tt class="py-lineno">52</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L53"></a><tt class="py-lineno">53</tt> <tt class="py-line"><tt class="py-docstring"> @param visitor: The visitor to visit.</tt> </tt>
|
||||
<a name="L54"></a><tt class="py-lineno">54</tt> <tt class="py-line"><tt class="py-docstring"> @type visitor: Visitor</tt> </tt>
|
||||
<a name="L55"></a><tt class="py-lineno">55</tt> <tt class="py-line"><tt class="py-docstring"> @param args: Any args to send with the visit.</tt> </tt>
|
||||
<a name="L56"></a><tt class="py-lineno">56</tt> <tt class="py-line"><tt class="py-docstring"> @param kwargs: Any kwargs to send with the visit.</tt> </tt>
|
||||
<a name="L57"></a><tt class="py-lineno">57</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L58"></a><tt class="py-lineno">58</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt id="link-1" class="py-name" targets="Module pypat.behavioral.visitor=pypat.behavioral.visitor-module.html"><a title="pypat.behavioral.visitor" class="py-name" href="#" onclick="return doclink('link-1', 'visitor', 'link-1');">visitor</a></tt><tt class="py-op">.</tt><tt id="link-2" class="py-name" targets="Method pypat.behavioral.visitor.Visitor.visit()=pypat.behavioral.visitor.Visitor-class.html#visit"><a title="pypat.behavioral.visitor.Visitor.visit" class="py-name" href="#" onclick="return doclink('link-2', 'visit', 'link-2');">visit</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-name">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">kwargs</tt><tt class="py-op">)</tt> </tt>
|
||||
</div></div><a name="L59"></a><tt class="py-lineno">59</tt> <tt class="py-line"> </tt><script type="text/javascript">
|
||||
<!--
|
||||
expandto(location.href);
|
||||
// -->
|
||||
</script>
|
||||
</pre>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
251
html/pypat.behavioral.visitor.Visitee-class.html
vendored
Normal file
251
html/pypat.behavioral.visitor.Visitee-class.html
vendored
Normal file
@@ -0,0 +1,251 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.behavioral.visitor.Visitee</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.behavioral-module.html">Package behavioral</a> ::
|
||||
<a href="pypat.behavioral.visitor-module.html">Module visitor</a> ::
|
||||
Class Visitee
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.behavioral.visitor.Visitee-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Class Visitee</h1><p class="nomargin-top"><span class="codelink"><a href="pypat.behavioral.visitor-pysrc.html#Visitee">source code</a></span></p>
|
||||
<pre class="base-tree">
|
||||
object --+
|
||||
|
|
||||
<strong class="uidshort">Visitee</strong>
|
||||
</pre>
|
||||
|
||||
<hr />
|
||||
<pre class="literalblock">
|
||||
|
||||
A base class for objects that wish to be able to be visited by a Visitor class.
|
||||
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
||||
- External Visitor Design Pattern documentation: U{https://en.wikipedia.org/wiki/Visitor_pattern}
|
||||
|
||||
</pre>
|
||||
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Instance Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-InstanceMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.behavioral.visitor.Visitee-class.html#accept" class="summary-sig-name">accept</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">visitor</span>,
|
||||
<span class="summary-sig-arg">*args</span>,
|
||||
<span class="summary-sig-arg">**kwargs</span>)</span><br />
|
||||
Have a visitor visit this class instance.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.behavioral.visitor-pysrc.html#Visitee.accept">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__delattr__</code>,
|
||||
<code>__format__</code>,
|
||||
<code>__getattribute__</code>,
|
||||
<code>__hash__</code>,
|
||||
<code>__init__</code>,
|
||||
<code>__new__</code>,
|
||||
<code>__reduce__</code>,
|
||||
<code>__reduce_ex__</code>,
|
||||
<code>__repr__</code>,
|
||||
<code>__setattr__</code>,
|
||||
<code>__sizeof__</code>,
|
||||
<code>__str__</code>,
|
||||
<code>__subclasshook__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== PROPERTIES ==================== -->
|
||||
<a name="section-Properties"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Properties</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Properties"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__class__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== METHOD DETAILS ==================== -->
|
||||
<a name="section-MethodDetails"></a>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Method Details</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-MethodDetails"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="accept"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">accept</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">visitor</span>,
|
||||
<span class="sig-arg">*args</span>,
|
||||
<span class="sig-arg">**kwargs</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.behavioral.visitor-pysrc.html#Visitee.accept">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Have a visitor visit this class instance.</p>
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>visitor</code></strong> (Visitor) - The visitor to visit.</li>
|
||||
<li><strong class="pname"><code>args</code></strong> - Any args to send with the visit.</li>
|
||||
<li><strong class="pname"><code>kwargs</code></strong> - Any kwargs to send with the visit.</li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
255
html/pypat.behavioral.visitor.Visitor-class.html
vendored
Normal file
255
html/pypat.behavioral.visitor.Visitor-class.html
vendored
Normal file
@@ -0,0 +1,255 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.behavioral.visitor.Visitor</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.behavioral-module.html">Package behavioral</a> ::
|
||||
<a href="pypat.behavioral.visitor-module.html">Module visitor</a> ::
|
||||
Class Visitor
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.behavioral.visitor.Visitor-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Class Visitor</h1><p class="nomargin-top"><span class="codelink"><a href="pypat.behavioral.visitor-pysrc.html#Visitor">source code</a></span></p>
|
||||
<pre class="literalblock">
|
||||
|
||||
Abstract Visitor class as part of the Visitor Design Pattern.
|
||||
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
||||
- External Visitor Design Pattern documentation: U{https://en.wikipedia.org/wiki/Visitor_pattern}
|
||||
|
||||
</pre>
|
||||
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Instance Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-InstanceMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.behavioral.visitor.Visitor-class.html#visit" class="summary-sig-name">visit</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">node</span>,
|
||||
<span class="summary-sig-arg">*args</span>,
|
||||
<span class="summary-sig-arg">**kwargs</span>)</span><br />
|
||||
Visit the visitor with some object.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.behavioral.visitor-pysrc.html#Visitor.visit">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.behavioral.visitor.Visitor-class.html#generic_visit" class="summary-sig-name">generic_visit</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">node</span>,
|
||||
<span class="summary-sig-arg">*args</span>,
|
||||
<span class="summary-sig-arg">**kwargs</span>)</span><br />
|
||||
The method to call if no methods were found for a visiting object.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.behavioral.visitor-pysrc.html#Visitor.generic_visit">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== METHOD DETAILS ==================== -->
|
||||
<a name="section-MethodDetails"></a>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Method Details</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-MethodDetails"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="visit"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">visit</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">node</span>,
|
||||
<span class="sig-arg">*args</span>,
|
||||
<span class="sig-arg">**kwargs</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.behavioral.visitor-pysrc.html#Visitor.visit">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Visit the visitor with some object.</p>
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>node</code></strong> - An object to call a visitor method with.</li>
|
||||
<li><strong class="pname"><code>args</code></strong> - Arguments to go with the visitor method call.</li>
|
||||
<li><strong class="pname"><code>kwargs</code></strong> - Keyword arguments to go with the visitor method call.</li>
|
||||
</ul></dd>
|
||||
<dt>Returns:</dt>
|
||||
<dd>The return value of the method that was called for visiting
|
||||
object.</dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="generic_visit"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">generic_visit</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">node</span>,
|
||||
<span class="sig-arg">*args</span>,
|
||||
<span class="sig-arg">**kwargs</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.behavioral.visitor-pysrc.html#Visitor.generic_visit">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>The method to call if no methods were found for a visiting object.</p>
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>node</code></strong> - An object to call a visitor method with.</li>
|
||||
<li><strong class="pname"><code>args</code></strong> - Arguments to go with the visitor method call.</li>
|
||||
<li><strong class="pname"><code>kwargs</code></strong> - Keyword arguments to go with the visitor method call.</li>
|
||||
</ul></dd>
|
||||
<dt>Decorators:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><code>@abstractmethod</code></li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
157
html/pypat.creational-module.html
vendored
Normal file
157
html/pypat.creational-module.html
vendored
Normal file
@@ -0,0 +1,157 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.creational</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
Package creational
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.creational-module.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== PACKAGE DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Package creational</h1><p class="nomargin-top"><span class="codelink"><a href="pypat.creational-pysrc.html">source code</a></span></p>
|
||||
<!-- ==================== SUBMODULES ==================== -->
|
||||
<a name="section-Submodules"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Submodules</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Submodules"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td class="summary">
|
||||
<ul class="nomargin">
|
||||
<li> <strong class="uidlink"><a href="pypat.creational.builder-module.html">pypat.creational.builder</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypat.creational.factory-module.html">pypat.creational.factory</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypat.creational.pool-module.html">pypat.creational.pool</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypat.creational.prototype-module.html">pypat.creational.prototype</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypat.creational.singleton-module.html">pypat.creational.singleton</a></strong> </li>
|
||||
</ul></td></tr>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
<!-- ==================== VARIABLES ==================== -->
|
||||
<a name="section-Variables"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Variables</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Variables"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="__package__"></a><span class="summary-name">__package__</span> = <code title="None">None</code>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
112
html/pypat.creational-pysrc.html
vendored
Normal file
112
html/pypat.creational-pysrc.html
vendored
Normal file
@@ -0,0 +1,112 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.creational</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
Package creational
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.creational-pysrc.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h1 class="epydoc">Source Code for <a href="pypat.creational-module.html">Package pypat.creational</a></h1>
|
||||
<pre class="py-src">
|
||||
<a name="L1"></a><tt class="py-lineno">1</tt> <tt class="py-line"> </tt>
|
||||
<a name="L2"></a><tt class="py-lineno">2</tt> <tt class="py-line"> </tt><script type="text/javascript">
|
||||
<!--
|
||||
expandto(location.href);
|
||||
// -->
|
||||
</script>
|
||||
</pre>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:56 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
139
html/pypat.creational.builder-module.html
vendored
Normal file
139
html/pypat.creational.builder-module.html
vendored
Normal file
@@ -0,0 +1,139 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.creational.builder</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.creational-module.html">Package creational</a> ::
|
||||
Module builder
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.creational.builder-module.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== MODULE DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Module builder</h1><p class="nomargin-top"><span class="codelink"><a href="pypat.creational.builder-pysrc.html">source code</a></span></p>
|
||||
<!-- ==================== CLASSES ==================== -->
|
||||
<a name="section-Classes"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Classes</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Classes"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="pypat.creational.builder.Director-class.html" class="summary-name">Director</a><br />
|
||||
Abstract director class, responsible for using a builder to fully construct an object.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="pypat.creational.builder.Builder-class.html" class="summary-name">Builder</a><br />
|
||||
Abstract builder class, responsible for constructing various pieces of an object.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
191
html/pypat.creational.builder-pysrc.html
vendored
Normal file
191
html/pypat.creational.builder-pysrc.html
vendored
Normal file
@@ -0,0 +1,191 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.creational.builder</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.creational-module.html">Package creational</a> ::
|
||||
Module builder
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.creational.builder-pysrc.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h1 class="epydoc">Source Code for <a href="pypat.creational.builder-module.html">Module pypat.creational.builder</a></h1>
|
||||
<pre class="py-src">
|
||||
<a name="L1"></a><tt class="py-lineno"> 1</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">abc</tt> <tt class="py-keyword">import</tt> <tt class="py-name">ABCMeta</tt><tt class="py-op">,</tt> <tt class="py-name">abstractmethod</tt> </tt>
|
||||
<a name="Director"></a><div id="Director-def"><a name="L2"></a><tt class="py-lineno"> 2</tt> <tt class="py-line"> </tt>
|
||||
<a name="L3"></a><tt class="py-lineno"> 3</tt> <tt class="py-line"> </tt>
|
||||
<a name="L4"></a><tt class="py-lineno"> 4</tt> <a class="py-toggle" href="#" id="Director-toggle" onclick="return toggle('Director');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pypat.creational.builder.Director-class.html">Director</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">,</tt> <tt class="py-base-class">metaclass</tt><tt class="py-op">=</tt><tt class="py-base-class">ABCMeta</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Director-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="Director-expanded"><a name="L5"></a><tt class="py-lineno"> 5</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L6"></a><tt class="py-lineno"> 6</tt> <tt class="py-line"><tt class="py-docstring"> Abstract director class, responsible for using a builder to fully construct an object.</tt> </tt>
|
||||
<a name="L7"></a><tt class="py-lineno"> 7</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L8"></a><tt class="py-lineno"> 8</tt> <tt class="py-line"><tt class="py-docstring"> - External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Creational-Pattern-Usage}</tt> </tt>
|
||||
<a name="L9"></a><tt class="py-lineno"> 9</tt> <tt class="py-line"><tt class="py-docstring"> - External Builder Pattern documentation: U{https://en.wikipedia.org/wiki/Builder_pattern}</tt> </tt>
|
||||
<a name="L10"></a><tt class="py-lineno">10</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L11"></a><tt class="py-lineno">11</tt> <tt class="py-line"> </tt>
|
||||
<a name="Director.__init__"></a><div id="Director.__init__-def"><a name="L12"></a><tt class="py-lineno">12</tt> <a class="py-toggle" href="#" id="Director.__init__-toggle" onclick="return toggle('Director.__init__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.creational.builder.Director-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Director.__init__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Director.__init__-expanded"><a name="L13"></a><tt class="py-lineno">13</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L14"></a><tt class="py-lineno">14</tt> <tt class="py-line"><tt class="py-docstring"> Initialize a new Director.</tt> </tt>
|
||||
<a name="L15"></a><tt class="py-lineno">15</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L16"></a><tt class="py-lineno">16</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-0" class="py-name" targets="Module pypat.creational.builder=pypat.creational.builder-module.html"><a title="pypat.creational.builder" class="py-name" href="#" onclick="return doclink('link-0', 'builder', 'link-0');">builder</a></tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
|
||||
</div><a name="L17"></a><tt class="py-lineno">17</tt> <tt class="py-line"> </tt>
|
||||
<a name="L18"></a><tt class="py-lineno">18</tt> <tt class="py-line"> <tt class="py-decorator">@</tt><tt class="py-decorator">abstractmethod</tt> </tt>
|
||||
<a name="Director.construct"></a><div id="Director.construct-def"><a name="L19"></a><tt class="py-lineno">19</tt> <a class="py-toggle" href="#" id="Director.construct-toggle" onclick="return toggle('Director.construct');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.creational.builder.Director-class.html#construct">construct</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Director.construct-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Director.construct-expanded"><a name="L20"></a><tt class="py-lineno">20</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L21"></a><tt class="py-lineno">21</tt> <tt class="py-line"><tt class="py-docstring"> Abstract method for fully constructing an object.</tt> </tt>
|
||||
<a name="L22"></a><tt class="py-lineno">22</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L23"></a><tt class="py-lineno">23</tt> <tt class="py-line"><tt class="py-docstring"> Concrete implementations should override this and use a builder to construct the object.</tt> </tt>
|
||||
<a name="L24"></a><tt class="py-lineno">24</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L25"></a><tt class="py-lineno">25</tt> <tt class="py-line"><tt class="py-docstring"> @raise NotImplementedError: If this method is not overridden.</tt> </tt>
|
||||
<a name="L26"></a><tt class="py-lineno">26</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L27"></a><tt class="py-lineno">27</tt> <tt class="py-line"> <tt class="py-keyword">pass</tt> </tt>
|
||||
</div><a name="L28"></a><tt class="py-lineno">28</tt> <tt class="py-line"> </tt>
|
||||
<a name="Director.get_constructed_object"></a><div id="Director.get_constructed_object-def"><a name="L29"></a><tt class="py-lineno">29</tt> <a class="py-toggle" href="#" id="Director.get_constructed_object-toggle" onclick="return toggle('Director.get_constructed_object');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.creational.builder.Director-class.html#get_constructed_object">get_constructed_object</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Director.get_constructed_object-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Director.get_constructed_object-expanded"><a name="L30"></a><tt class="py-lineno">30</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L31"></a><tt class="py-lineno">31</tt> <tt class="py-line"><tt class="py-docstring"> Get the object this director is responsible for constructing.</tt> </tt>
|
||||
<a name="L32"></a><tt class="py-lineno">32</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L33"></a><tt class="py-lineno">33</tt> <tt class="py-line"><tt class="py-docstring"> @return: The object that this director is responsible for constructing.</tt> </tt>
|
||||
<a name="L34"></a><tt class="py-lineno">34</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L35"></a><tt class="py-lineno">35</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-1" class="py-name"><a title="pypat.creational.builder" class="py-name" href="#" onclick="return doclink('link-1', 'builder', 'link-0');">builder</a></tt><tt class="py-op">.</tt><tt class="py-name">constructed_object</tt> </tt>
|
||||
</div></div><a name="L36"></a><tt class="py-lineno">36</tt> <tt class="py-line"> </tt>
|
||||
<a name="Builder"></a><div id="Builder-def"><a name="L37"></a><tt class="py-lineno">37</tt> <tt class="py-line"> </tt>
|
||||
<a name="L38"></a><tt class="py-lineno">38</tt> <a class="py-toggle" href="#" id="Builder-toggle" onclick="return toggle('Builder');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pypat.creational.builder.Builder-class.html">Builder</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">,</tt> <tt class="py-base-class">metaclass</tt><tt class="py-op">=</tt><tt class="py-base-class">ABCMeta</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Builder-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="Builder-expanded"><a name="L39"></a><tt class="py-lineno">39</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L40"></a><tt class="py-lineno">40</tt> <tt class="py-line"><tt class="py-docstring"> Abstract builder class, responsible for constructing various pieces of an object.</tt> </tt>
|
||||
<a name="L41"></a><tt class="py-lineno">41</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L42"></a><tt class="py-lineno">42</tt> <tt class="py-line"><tt class="py-docstring"> - External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Creational-Pattern-Usage}</tt> </tt>
|
||||
<a name="L43"></a><tt class="py-lineno">43</tt> <tt class="py-line"><tt class="py-docstring"> - External Builder Pattern documentation: U{https://en.wikipedia.org/wiki/Builder_pattern}</tt> </tt>
|
||||
<a name="L44"></a><tt class="py-lineno">44</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L45"></a><tt class="py-lineno">45</tt> <tt class="py-line"> </tt>
|
||||
<a name="Builder.__init__"></a><div id="Builder.__init__-def"><a name="L46"></a><tt class="py-lineno">46</tt> <a class="py-toggle" href="#" id="Builder.__init__-toggle" onclick="return toggle('Builder.__init__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.creational.builder.Builder-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">constructed_object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Builder.__init__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Builder.__init__-expanded"><a name="L47"></a><tt class="py-lineno">47</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L48"></a><tt class="py-lineno">48</tt> <tt class="py-line"><tt class="py-docstring"> Initialize a new Builder.</tt> </tt>
|
||||
<a name="L49"></a><tt class="py-lineno">49</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L50"></a><tt class="py-lineno">50</tt> <tt class="py-line"><tt class="py-docstring"> Concrete Builders should call this method from within their own __init__ method.</tt> </tt>
|
||||
<a name="L51"></a><tt class="py-lineno">51</tt> <tt class="py-line"><tt class="py-docstring"> The concrete __init__ method should also register all build options to build methods,</tt> </tt>
|
||||
<a name="L52"></a><tt class="py-lineno">52</tt> <tt class="py-line"><tt class="py-docstring"> by using the _register method.</tt> </tt>
|
||||
<a name="L53"></a><tt class="py-lineno">53</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L54"></a><tt class="py-lineno">54</tt> <tt class="py-line"><tt class="py-docstring"> @param constructed_object: An instance of an object this builder is responsible for.</tt> </tt>
|
||||
<a name="L55"></a><tt class="py-lineno">55</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L56"></a><tt class="py-lineno">56</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">constructed_object</tt> <tt class="py-op">=</tt> <tt class="py-name">constructed_object</tt> </tt>
|
||||
<a name="L57"></a><tt class="py-lineno">57</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">build_methods</tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
</div><a name="L58"></a><tt class="py-lineno">58</tt> <tt class="py-line"> </tt>
|
||||
<a name="Builder.build"></a><div id="Builder.build-def"><a name="L59"></a><tt class="py-lineno">59</tt> <a class="py-toggle" href="#" id="Builder.build-toggle" onclick="return toggle('Builder.build');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.creational.builder.Builder-class.html#build">build</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">build_option</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kwargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Builder.build-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Builder.build-expanded"><a name="L60"></a><tt class="py-lineno">60</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L61"></a><tt class="py-lineno">61</tt> <tt class="py-line"><tt class="py-docstring"> Build a piece of the constructed object.</tt> </tt>
|
||||
<a name="L62"></a><tt class="py-lineno">62</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L63"></a><tt class="py-lineno">63</tt> <tt class="py-line"><tt class="py-docstring"> @param build_option: The part of the object to build. All build options should have been registered in __init__.</tt> </tt>
|
||||
<a name="L64"></a><tt class="py-lineno">64</tt> <tt class="py-line"><tt class="py-docstring"> @type build_option: str</tt> </tt>
|
||||
<a name="L65"></a><tt class="py-lineno">65</tt> <tt class="py-line"><tt class="py-docstring"> @param kwargs: Additional arguments for building.</tt> </tt>
|
||||
<a name="L66"></a><tt class="py-lineno">66</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L67"></a><tt class="py-lineno">67</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">build_methods</tt><tt class="py-op">[</tt><tt class="py-name">build_option</tt><tt class="py-op">]</tt><tt class="py-op">(</tt><tt class="py-op">**</tt><tt class="py-name">kwargs</tt><tt class="py-op">)</tt> </tt>
|
||||
</div><a name="L68"></a><tt class="py-lineno">68</tt> <tt class="py-line"> </tt>
|
||||
<a name="Builder._register"></a><div id="Builder._register-def"><a name="L69"></a><tt class="py-lineno">69</tt> <a class="py-toggle" href="#" id="Builder._register-toggle" onclick="return toggle('Builder._register');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.creational.builder.Builder-class.html#_register">_register</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">build_option</tt><tt class="py-op">,</tt> <tt class="py-param">build_method</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Builder._register-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Builder._register-expanded"><a name="L70"></a><tt class="py-lineno">70</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L71"></a><tt class="py-lineno">71</tt> <tt class="py-line"><tt class="py-docstring"> Register a build option to a build method.</tt> </tt>
|
||||
<a name="L72"></a><tt class="py-lineno">72</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L73"></a><tt class="py-lineno">73</tt> <tt class="py-line"><tt class="py-docstring"> All concrete builders should call this method in their constructor at least once.</tt> </tt>
|
||||
<a name="L74"></a><tt class="py-lineno">74</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L75"></a><tt class="py-lineno">75</tt> <tt class="py-line"><tt class="py-docstring"> @param build_option: A string representing the part of the object to build.</tt> </tt>
|
||||
<a name="L76"></a><tt class="py-lineno">76</tt> <tt class="py-line"><tt class="py-docstring"> @type build_option: str</tt> </tt>
|
||||
<a name="L77"></a><tt class="py-lineno">77</tt> <tt class="py-line"><tt class="py-docstring"> @param build_method: The method to call when given build option is selected.</tt> </tt>
|
||||
<a name="L78"></a><tt class="py-lineno">78</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L79"></a><tt class="py-lineno">79</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">build_methods</tt><tt class="py-op">[</tt><tt class="py-name">build_option</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">build_method</tt> </tt>
|
||||
</div></div><a name="L80"></a><tt class="py-lineno">80</tt> <tt class="py-line"> </tt><script type="text/javascript">
|
||||
<!--
|
||||
expandto(location.href);
|
||||
// -->
|
||||
</script>
|
||||
</pre>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
291
html/pypat.creational.builder.Builder-class.html
vendored
Normal file
291
html/pypat.creational.builder.Builder-class.html
vendored
Normal file
@@ -0,0 +1,291 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.creational.builder.Builder</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.creational-module.html">Package creational</a> ::
|
||||
<a href="pypat.creational.builder-module.html">Module builder</a> ::
|
||||
Class Builder
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.creational.builder.Builder-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Class Builder</h1><p class="nomargin-top"><span class="codelink"><a href="pypat.creational.builder-pysrc.html#Builder">source code</a></span></p>
|
||||
<pre class="literalblock">
|
||||
|
||||
Abstract builder class, responsible for constructing various pieces of an object.
|
||||
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Creational-Pattern-Usage}
|
||||
- External Builder Pattern documentation: U{https://en.wikipedia.org/wiki/Builder_pattern}
|
||||
|
||||
</pre>
|
||||
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Instance Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-InstanceMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.creational.builder.Builder-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">constructed_object</span>)</span><br />
|
||||
Initialize a new Builder.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.creational.builder-pysrc.html#Builder.__init__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.creational.builder.Builder-class.html#build" class="summary-sig-name">build</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">build_option</span>,
|
||||
<span class="summary-sig-arg">**kwargs</span>)</span><br />
|
||||
Build a piece of the constructed object.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.creational.builder-pysrc.html#Builder.build">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="private">
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.creational.builder.Builder-class.html#_register" class="summary-sig-name" onclick="show_private();">_register</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">build_option</span>,
|
||||
<span class="summary-sig-arg">build_method</span>)</span><br />
|
||||
Register a build option to a build method.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.creational.builder-pysrc.html#Builder._register">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== METHOD DETAILS ==================== -->
|
||||
<a name="section-MethodDetails"></a>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Method Details</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-MethodDetails"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="__init__"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">constructed_object</span>)</span>
|
||||
<br /><em class="fname">(Constructor)</em>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.creational.builder-pysrc.html#Builder.__init__">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Initialize a new Builder.</p>
|
||||
<p>Concrete Builders should call this method from within their own
|
||||
__init__ method. The concrete __init__ method should also register all
|
||||
build options to build methods, by using the _register method.</p>
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>constructed_object</code></strong> - An instance of an object this builder is responsible for.</li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="build"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">build</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">build_option</span>,
|
||||
<span class="sig-arg">**kwargs</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.creational.builder-pysrc.html#Builder.build">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Build a piece of the constructed object.</p>
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>build_option</code></strong> (str) - The part of the object to build. All build options should have
|
||||
been registered in __init__.</li>
|
||||
<li><strong class="pname"><code>kwargs</code></strong> - Additional arguments for building.</li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="_register"></a>
|
||||
<div class="private">
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">_register</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">build_option</span>,
|
||||
<span class="sig-arg">build_method</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.creational.builder-pysrc.html#Builder._register">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Register a build option to a build method.</p>
|
||||
<p>All concrete builders should call this method in their constructor at
|
||||
least once.</p>
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>build_option</code></strong> (str) - A string representing the part of the object to build.</li>
|
||||
<li><strong class="pname"><code>build_method</code></strong> - The method to call when given build option is selected.</li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
253
html/pypat.creational.builder.Director-class.html
vendored
Normal file
253
html/pypat.creational.builder.Director-class.html
vendored
Normal file
@@ -0,0 +1,253 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.creational.builder.Director</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.creational-module.html">Package creational</a> ::
|
||||
<a href="pypat.creational.builder-module.html">Module builder</a> ::
|
||||
Class Director
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.creational.builder.Director-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Class Director</h1><p class="nomargin-top"><span class="codelink"><a href="pypat.creational.builder-pysrc.html#Director">source code</a></span></p>
|
||||
<pre class="literalblock">
|
||||
|
||||
Abstract director class, responsible for using a builder to fully construct an object.
|
||||
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Creational-Pattern-Usage}
|
||||
- External Builder Pattern documentation: U{https://en.wikipedia.org/wiki/Builder_pattern}
|
||||
|
||||
</pre>
|
||||
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Instance Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-InstanceMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="__init__"></a><span class="summary-sig-name">__init__</span>(<span class="summary-sig-arg">self</span>)</span><br />
|
||||
Initialize a new Director.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.creational.builder-pysrc.html#Director.__init__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.creational.builder.Director-class.html#construct" class="summary-sig-name">construct</a>(<span class="summary-sig-arg">self</span>)</span><br />
|
||||
Abstract method for fully constructing an object.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.creational.builder-pysrc.html#Director.construct">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.creational.builder.Director-class.html#get_constructed_object" class="summary-sig-name">get_constructed_object</a>(<span class="summary-sig-arg">self</span>)</span><br />
|
||||
Get the object this director is responsible for constructing.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.creational.builder-pysrc.html#Director.get_constructed_object">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== METHOD DETAILS ==================== -->
|
||||
<a name="section-MethodDetails"></a>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Method Details</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-MethodDetails"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="construct"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">construct</span>(<span class="sig-arg">self</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.creational.builder-pysrc.html#Director.construct">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Abstract method for fully constructing an object.</p>
|
||||
<p>Concrete implementations should override this and use a builder to
|
||||
construct the object.</p>
|
||||
<dl class="fields">
|
||||
<dt>Decorators:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><code>@abstractmethod</code></li>
|
||||
</ul></dd>
|
||||
<dt>Raises:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><code><strong class='fraise'>NotImplementedError</strong></code> - If this method is not overridden.</li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="get_constructed_object"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">get_constructed_object</span>(<span class="sig-arg">self</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.creational.builder-pysrc.html#Director.get_constructed_object">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Get the object this director is responsible for constructing.</p>
|
||||
<dl class="fields">
|
||||
<dt>Returns:</dt>
|
||||
<dd>The object that this director is responsible for constructing.</dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
139
html/pypat.creational.factory-module.html
vendored
Normal file
139
html/pypat.creational.factory-module.html
vendored
Normal file
@@ -0,0 +1,139 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.creational.factory</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.creational-module.html">Package creational</a> ::
|
||||
Module factory
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.creational.factory-module.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== MODULE DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Module factory</h1><p class="nomargin-top"><span class="codelink"><a href="pypat.creational.factory-pysrc.html">source code</a></span></p>
|
||||
<!-- ==================== CLASSES ==================== -->
|
||||
<a name="section-Classes"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Classes</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Classes"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="pypat.creational.factory.Factory-class.html" class="summary-name">Factory</a><br />
|
||||
Factory Interface.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="pypat.creational.factory.AbstractFactory-class.html" class="summary-name">AbstractFactory</a><br />
|
||||
Abstract Factory Class as part of the AbstractFactory design pattern.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
172
html/pypat.creational.factory-pysrc.html
vendored
Normal file
172
html/pypat.creational.factory-pysrc.html
vendored
Normal file
@@ -0,0 +1,172 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.creational.factory</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.creational-module.html">Package creational</a> ::
|
||||
Module factory
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.creational.factory-pysrc.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h1 class="epydoc">Source Code for <a href="pypat.creational.factory-module.html">Module pypat.creational.factory</a></h1>
|
||||
<pre class="py-src">
|
||||
<a name="L1"></a><tt class="py-lineno"> 1</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">abc</tt> <tt class="py-keyword">import</tt> <tt class="py-name">abstractmethod</tt><tt class="py-op">,</tt> <tt class="py-name">ABCMeta</tt> </tt>
|
||||
<a name="Factory"></a><div id="Factory-def"><a name="L2"></a><tt class="py-lineno"> 2</tt> <tt class="py-line"> </tt>
|
||||
<a name="L3"></a><tt class="py-lineno"> 3</tt> <tt class="py-line"> </tt>
|
||||
<a name="L4"></a><tt class="py-lineno"> 4</tt> <a class="py-toggle" href="#" id="Factory-toggle" onclick="return toggle('Factory');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pypat.creational.factory.Factory-class.html">Factory</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">,</tt> <tt class="py-base-class">metaclass</tt><tt class="py-op">=</tt><tt class="py-base-class">ABCMeta</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Factory-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="Factory-expanded"><a name="L5"></a><tt class="py-lineno"> 5</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L6"></a><tt class="py-lineno"> 6</tt> <tt class="py-line"><tt class="py-docstring"> Factory Interface.</tt> </tt>
|
||||
<a name="L7"></a><tt class="py-lineno"> 7</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L8"></a><tt class="py-lineno"> 8</tt> <tt class="py-line"><tt class="py-docstring"> All Factories should inherit this class and overwrite the create method.</tt> </tt>
|
||||
<a name="L9"></a><tt class="py-lineno"> 9</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L10"></a><tt class="py-lineno">10</tt> <tt class="py-line"><tt class="py-docstring"> - External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Creational-Pattern-Usage}</tt> </tt>
|
||||
<a name="L11"></a><tt class="py-lineno">11</tt> <tt class="py-line"><tt class="py-docstring"> - External Factory Pattern documentation: U{https://en.wikipedia.org/wiki/Factory_method_pattern}</tt> </tt>
|
||||
<a name="L12"></a><tt class="py-lineno">12</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L13"></a><tt class="py-lineno">13</tt> <tt class="py-line"> <tt class="py-decorator">@</tt><tt class="py-decorator">abstractmethod</tt> </tt>
|
||||
<a name="Factory.create"></a><div id="Factory.create-def"><a name="L14"></a><tt class="py-lineno">14</tt> <a class="py-toggle" href="#" id="Factory.create-toggle" onclick="return toggle('Factory.create');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.creational.factory.Factory-class.html#create">create</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kwargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Factory.create-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Factory.create-expanded"><a name="L15"></a><tt class="py-lineno">15</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L16"></a><tt class="py-lineno">16</tt> <tt class="py-line"><tt class="py-docstring"> Abstract create method.</tt> </tt>
|
||||
<a name="L17"></a><tt class="py-lineno">17</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L18"></a><tt class="py-lineno">18</tt> <tt class="py-line"><tt class="py-docstring"> Concrete implementations should return a new instance of the object the factory class is responsible for.</tt> </tt>
|
||||
<a name="L19"></a><tt class="py-lineno">19</tt> <tt class="py-line"><tt class="py-docstring"> @param kwargs: Arguments for object creation.</tt> </tt>
|
||||
<a name="L20"></a><tt class="py-lineno">20</tt> <tt class="py-line"><tt class="py-docstring"> @return: A new instance of the object the factory is responsible for.</tt> </tt>
|
||||
<a name="L21"></a><tt class="py-lineno">21</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L22"></a><tt class="py-lineno">22</tt> <tt class="py-line"> <tt class="py-keyword">pass</tt> </tt>
|
||||
</div></div><a name="L23"></a><tt class="py-lineno">23</tt> <tt class="py-line"> </tt>
|
||||
<a name="AbstractFactory"></a><div id="AbstractFactory-def"><a name="L24"></a><tt class="py-lineno">24</tt> <tt class="py-line"> </tt>
|
||||
<a name="L25"></a><tt class="py-lineno">25</tt> <a class="py-toggle" href="#" id="AbstractFactory-toggle" onclick="return toggle('AbstractFactory');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pypat.creational.factory.AbstractFactory-class.html">AbstractFactory</a><tt class="py-op">(</tt><tt class="py-base-class">Factory</tt><tt class="py-op">,</tt> <tt class="py-base-class">metaclass</tt><tt class="py-op">=</tt><tt class="py-base-class">ABCMeta</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="AbstractFactory-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="AbstractFactory-expanded"><a name="L26"></a><tt class="py-lineno">26</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L27"></a><tt class="py-lineno">27</tt> <tt class="py-line"><tt class="py-docstring"> Abstract Factory Class as part of the AbstractFactory design pattern.</tt> </tt>
|
||||
<a name="L28"></a><tt class="py-lineno">28</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L29"></a><tt class="py-lineno">29</tt> <tt class="py-line"><tt class="py-docstring"> - External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Creational-Pattern-Usage}</tt> </tt>
|
||||
<a name="L30"></a><tt class="py-lineno">30</tt> <tt class="py-line"><tt class="py-docstring"> - External Abstract Factory Pattern documentation: U{https://en.wikipedia.org/wiki/Abstract_factory_pattern}</tt> </tt>
|
||||
<a name="L31"></a><tt class="py-lineno">31</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="AbstractFactory.__init__"></a><div id="AbstractFactory.__init__-def"><a name="L32"></a><tt class="py-lineno">32</tt> <a class="py-toggle" href="#" id="AbstractFactory.__init__-toggle" onclick="return toggle('AbstractFactory.__init__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.creational.factory.AbstractFactory-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="AbstractFactory.__init__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="AbstractFactory.__init__-expanded"><a name="L33"></a><tt class="py-lineno">33</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L34"></a><tt class="py-lineno">34</tt> <tt class="py-line"><tt class="py-docstring"> Initialize the abstract factory.</tt> </tt>
|
||||
<a name="L35"></a><tt class="py-lineno">35</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L36"></a><tt class="py-lineno">36</tt> <tt class="py-line"><tt class="py-docstring"> Concrete implementations should call this from within their own __init__ method</tt> </tt>
|
||||
<a name="L37"></a><tt class="py-lineno">37</tt> <tt class="py-line"><tt class="py-docstring"> and register all their factories to keys using the register method.</tt> </tt>
|
||||
<a name="L38"></a><tt class="py-lineno">38</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L39"></a><tt class="py-lineno">39</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_factories</tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
</div><a name="L40"></a><tt class="py-lineno">40</tt> <tt class="py-line"> </tt>
|
||||
<a name="L41"></a><tt class="py-lineno">41</tt> <tt class="py-line"> <tt class="py-decorator">@</tt><tt class="py-decorator">abstractmethod</tt> </tt>
|
||||
<a name="AbstractFactory.create"></a><div id="AbstractFactory.create-def"><a name="L42"></a><tt class="py-lineno">42</tt> <a class="py-toggle" href="#" id="AbstractFactory.create-toggle" onclick="return toggle('AbstractFactory.create');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.creational.factory.AbstractFactory-class.html#create">create</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kwargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="AbstractFactory.create-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="AbstractFactory.create-expanded"><a name="L43"></a><tt class="py-lineno">43</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L44"></a><tt class="py-lineno">44</tt> <tt class="py-line"><tt class="py-docstring"> Abstract create method.</tt> </tt>
|
||||
<a name="L45"></a><tt class="py-lineno">45</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L46"></a><tt class="py-lineno">46</tt> <tt class="py-line"><tt class="py-docstring"> Concrete implementations should return a new instance of an object by calling the appropriate factory.</tt> </tt>
|
||||
<a name="L47"></a><tt class="py-lineno">47</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L48"></a><tt class="py-lineno">48</tt> <tt class="py-line"><tt class="py-docstring"> @param kwargs: Arguments for object creation.</tt> </tt>
|
||||
<a name="L49"></a><tt class="py-lineno">49</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L50"></a><tt class="py-lineno">50</tt> <tt class="py-line"> <tt class="py-keyword">pass</tt> </tt>
|
||||
</div><a name="L51"></a><tt class="py-lineno">51</tt> <tt class="py-line"> </tt>
|
||||
<a name="AbstractFactory._register"></a><div id="AbstractFactory._register-def"><a name="L52"></a><tt class="py-lineno">52</tt> <a class="py-toggle" href="#" id="AbstractFactory._register-toggle" onclick="return toggle('AbstractFactory._register');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.creational.factory.AbstractFactory-class.html#_register">_register</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">key</tt><tt class="py-op">,</tt> <tt class="py-param">factory</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="AbstractFactory._register-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="AbstractFactory._register-expanded"><a name="L53"></a><tt class="py-lineno">53</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L54"></a><tt class="py-lineno">54</tt> <tt class="py-line"><tt class="py-docstring"> Register a factory to a key.</tt> </tt>
|
||||
<a name="L55"></a><tt class="py-lineno">55</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L56"></a><tt class="py-lineno">56</tt> <tt class="py-line"><tt class="py-docstring"> @param key: Key for identifying which factory to use.</tt> </tt>
|
||||
<a name="L57"></a><tt class="py-lineno">57</tt> <tt class="py-line"><tt class="py-docstring"> @type key: str</tt> </tt>
|
||||
<a name="L58"></a><tt class="py-lineno">58</tt> <tt class="py-line"><tt class="py-docstring"> @param factory: The factory to register to the key.</tt> </tt>
|
||||
<a name="L59"></a><tt class="py-lineno">59</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L60"></a><tt class="py-lineno">60</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_factories</tt><tt class="py-op">[</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-0" class="py-name" targets="Module pypat.creational.factory=pypat.creational.factory-module.html"><a title="pypat.creational.factory" class="py-name" href="#" onclick="return doclink('link-0', 'factory', 'link-0');">factory</a></tt> </tt>
|
||||
</div></div><a name="L61"></a><tt class="py-lineno">61</tt> <tt class="py-line"> </tt><script type="text/javascript">
|
||||
<!--
|
||||
expandto(location.href);
|
||||
// -->
|
||||
</script>
|
||||
</pre>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:56 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
285
html/pypat.creational.factory.AbstractFactory-class.html
vendored
Normal file
285
html/pypat.creational.factory.AbstractFactory-class.html
vendored
Normal file
@@ -0,0 +1,285 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.creational.factory.AbstractFactory</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.creational-module.html">Package creational</a> ::
|
||||
<a href="pypat.creational.factory-module.html">Module factory</a> ::
|
||||
Class AbstractFactory
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.creational.factory.AbstractFactory-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Class AbstractFactory</h1><p class="nomargin-top"><span class="codelink"><a href="pypat.creational.factory-pysrc.html#AbstractFactory">source code</a></span></p>
|
||||
<pre class="literalblock">
|
||||
|
||||
Abstract Factory Class as part of the AbstractFactory design pattern.
|
||||
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Creational-Pattern-Usage}
|
||||
- External Abstract Factory Pattern documentation: U{https://en.wikipedia.org/wiki/Abstract_factory_pattern}
|
||||
|
||||
</pre>
|
||||
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Instance Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-InstanceMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.creational.factory.AbstractFactory-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>)</span><br />
|
||||
Initialize the abstract factory.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.creational.factory-pysrc.html#AbstractFactory.__init__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.creational.factory.AbstractFactory-class.html#create" class="summary-sig-name">create</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">**kwargs</span>)</span><br />
|
||||
Abstract create method.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.creational.factory-pysrc.html#AbstractFactory.create">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="private">
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.creational.factory.AbstractFactory-class.html#_register" class="summary-sig-name" onclick="show_private();">_register</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">key</span>,
|
||||
<span class="summary-sig-arg">factory</span>)</span><br />
|
||||
Register a factory to a key.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.creational.factory-pysrc.html#AbstractFactory._register">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== METHOD DETAILS ==================== -->
|
||||
<a name="section-MethodDetails"></a>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Method Details</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-MethodDetails"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="__init__"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>)</span>
|
||||
<br /><em class="fname">(Constructor)</em>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.creational.factory-pysrc.html#AbstractFactory.__init__">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Initialize the abstract factory.</p>
|
||||
<p>Concrete implementations should call this from within their own
|
||||
__init__ method and register all their factories to keys using the
|
||||
register method.</p>
|
||||
<dl class="fields">
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="create"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">create</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">**kwargs</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.creational.factory-pysrc.html#AbstractFactory.create">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Abstract create method.</p>
|
||||
<p>Concrete implementations should return a new instance of an object by
|
||||
calling the appropriate factory.</p>
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>kwargs</code></strong> - Arguments for object creation.</li>
|
||||
</ul></dd>
|
||||
<dt>Decorators:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><code>@abstractmethod</code></li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="_register"></a>
|
||||
<div class="private">
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">_register</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">key</span>,
|
||||
<span class="sig-arg">factory</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.creational.factory-pysrc.html#AbstractFactory._register">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Register a factory to a key.</p>
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>key</code></strong> (str) - Key for identifying which factory to use.</li>
|
||||
<li><strong class="pname"><code>factory</code></strong> - The factory to register to the key.</li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
204
html/pypat.creational.factory.Factory-class.html
vendored
Normal file
204
html/pypat.creational.factory.Factory-class.html
vendored
Normal file
@@ -0,0 +1,204 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.creational.factory.Factory</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.creational-module.html">Package creational</a> ::
|
||||
<a href="pypat.creational.factory-module.html">Module factory</a> ::
|
||||
Class Factory
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.creational.factory.Factory-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Class Factory</h1><p class="nomargin-top"><span class="codelink"><a href="pypat.creational.factory-pysrc.html#Factory">source code</a></span></p>
|
||||
<pre class="literalblock">
|
||||
|
||||
Factory Interface.
|
||||
|
||||
All Factories should inherit this class and overwrite the create method.
|
||||
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Creational-Pattern-Usage}
|
||||
- External Factory Pattern documentation: U{https://en.wikipedia.org/wiki/Factory_method_pattern}
|
||||
|
||||
</pre>
|
||||
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Instance Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-InstanceMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.creational.factory.Factory-class.html#create" class="summary-sig-name">create</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">**kwargs</span>)</span><br />
|
||||
Abstract create method.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.creational.factory-pysrc.html#Factory.create">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== METHOD DETAILS ==================== -->
|
||||
<a name="section-MethodDetails"></a>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Method Details</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-MethodDetails"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="create"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">create</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">**kwargs</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.creational.factory-pysrc.html#Factory.create">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Abstract create method.</p>
|
||||
<p>Concrete implementations should return a new instance of the object
|
||||
the factory class is responsible for.</p>
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>kwargs</code></strong> - Arguments for object creation.</li>
|
||||
</ul></dd>
|
||||
<dt>Returns:</dt>
|
||||
<dd>A new instance of the object the factory is responsible for.</dd>
|
||||
<dt>Decorators:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><code>@abstractmethod</code></li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
139
html/pypat.creational.pool-module.html
vendored
Normal file
139
html/pypat.creational.pool-module.html
vendored
Normal file
@@ -0,0 +1,139 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.creational.pool</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.creational-module.html">Package creational</a> ::
|
||||
Module pool
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.creational.pool-module.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== MODULE DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Module pool</h1><p class="nomargin-top"><span class="codelink"><a href="pypat.creational.pool-pysrc.html">source code</a></span></p>
|
||||
<!-- ==================== CLASSES ==================== -->
|
||||
<a name="section-Classes"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Classes</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Classes"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="pypat.creational.pool.Reusable-class.html" class="summary-name">Reusable</a><br />
|
||||
An abstract reusable class.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="pypat.creational.pool.Pool-class.html" class="summary-name">Pool</a><br />
|
||||
An Object Pool design pattern implementation.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
187
html/pypat.creational.pool-pysrc.html
vendored
Normal file
187
html/pypat.creational.pool-pysrc.html
vendored
Normal file
@@ -0,0 +1,187 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.creational.pool</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.creational-module.html">Package creational</a> ::
|
||||
Module pool
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.creational.pool-pysrc.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h1 class="epydoc">Source Code for <a href="pypat.creational.pool-module.html">Module pypat.creational.pool</a></h1>
|
||||
<pre class="py-src">
|
||||
<a name="L1"></a><tt class="py-lineno"> 1</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">abc</tt> <tt class="py-keyword">import</tt> <tt class="py-name">ABCMeta</tt> </tt>
|
||||
<a name="L2"></a><tt class="py-lineno"> 2</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">copy</tt> <tt class="py-keyword">import</tt> <tt class="py-name">deepcopy</tt> </tt>
|
||||
<a name="L3"></a><tt class="py-lineno"> 3</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-0" class="py-name" targets="Package pypat=pypat-module.html"><a title="pypat" class="py-name" href="#" onclick="return doclink('link-0', 'pypat', 'link-0');">pypat</a></tt><tt class="py-op">.</tt><tt id="link-1" class="py-name" targets="Package pypat.behavioral=pypat.behavioral-module.html"><a title="pypat.behavioral" class="py-name" href="#" onclick="return doclink('link-1', 'behavioral', 'link-1');">behavioral</a></tt><tt class="py-op">.</tt><tt id="link-2" class="py-name" targets="Module pypat.behavioral.memento=pypat.behavioral.memento-module.html"><a title="pypat.behavioral.memento" class="py-name" href="#" onclick="return doclink('link-2', 'memento', 'link-2');">memento</a></tt> <tt class="py-keyword">import</tt> <tt id="link-3" class="py-name" targets="Class pypat.behavioral.memento.Originator=pypat.behavioral.memento.Originator-class.html"><a title="pypat.behavioral.memento.Originator" class="py-name" href="#" onclick="return doclink('link-3', 'Originator', 'link-3');">Originator</a></tt> </tt>
|
||||
<a name="L4"></a><tt class="py-lineno"> 4</tt> <tt class="py-line"> </tt>
|
||||
<a name="L5"></a><tt class="py-lineno"> 5</tt> <tt class="py-line"> </tt>
|
||||
<a name="Reusable"></a><div id="Reusable-def"><a name="L6"></a><tt class="py-lineno"> 6</tt> <a class="py-toggle" href="#" id="Reusable-toggle" onclick="return toggle('Reusable');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pypat.creational.pool.Reusable-class.html">Reusable</a><tt class="py-op">(</tt><tt class="py-base-class">Originator</tt><tt class="py-op">,</tt> <tt class="py-base-class">metaclass</tt><tt class="py-op">=</tt><tt class="py-base-class">ABCMeta</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Reusable-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="Reusable-expanded"><a name="L7"></a><tt class="py-lineno"> 7</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L8"></a><tt class="py-lineno"> 8</tt> <tt class="py-line"><tt class="py-docstring"> An abstract reusable class.</tt> </tt>
|
||||
<a name="L9"></a><tt class="py-lineno"> 9</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L10"></a><tt class="py-lineno">10</tt> <tt class="py-line"><tt class="py-docstring"> - External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Creational-Pattern-Usage}</tt> </tt>
|
||||
<a name="L11"></a><tt class="py-lineno">11</tt> <tt class="py-line"><tt class="py-docstring"> - External Object Pool Pattern documentation: U{https://en.wikipedia.org/wiki/Object_pool_pattern}</tt> </tt>
|
||||
<a name="L12"></a><tt class="py-lineno">12</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="Reusable.__init__"></a><div id="Reusable.__init__-def"><a name="L13"></a><tt class="py-lineno">13</tt> <a class="py-toggle" href="#" id="Reusable.__init__-toggle" onclick="return toggle('Reusable.__init__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.creational.pool.Reusable-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Reusable.__init__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Reusable.__init__-expanded"><a name="L14"></a><tt class="py-lineno">14</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L15"></a><tt class="py-lineno">15</tt> <tt class="py-line"><tt class="py-docstring"> Initialize a new Reusable instance.</tt> </tt>
|
||||
<a name="L16"></a><tt class="py-lineno">16</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L17"></a><tt class="py-lineno">17</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-4" class="py-name"><a title="pypat.behavioral.memento" class="py-name" href="#" onclick="return doclink('link-4', 'memento', 'link-2');">memento</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-5" class="py-name" targets="Method pypat.behavioral.memento.Originator.commit()=pypat.behavioral.memento.Originator-class.html#commit"><a title="pypat.behavioral.memento.Originator.commit" class="py-name" href="#" onclick="return doclink('link-5', 'commit', 'link-5');">commit</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
</div><a name="L18"></a><tt class="py-lineno">18</tt> <tt class="py-line"> </tt>
|
||||
<a name="Reusable.reset"></a><div id="Reusable.reset-def"><a name="L19"></a><tt class="py-lineno">19</tt> <a class="py-toggle" href="#" id="Reusable.reset-toggle" onclick="return toggle('Reusable.reset');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.creational.pool.Reusable-class.html#reset">reset</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Reusable.reset-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Reusable.reset-expanded"><a name="L20"></a><tt class="py-lineno">20</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L21"></a><tt class="py-lineno">21</tt> <tt class="py-line"><tt class="py-docstring"> Reset this objects state to the state that it was created with.</tt> </tt>
|
||||
<a name="L22"></a><tt class="py-lineno">22</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L23"></a><tt class="py-lineno">23</tt> <tt class="py-line"> <tt id="link-6" class="py-name"><a title="pypat.behavioral.memento" class="py-name" href="#" onclick="return doclink('link-6', 'memento', 'link-2');">memento</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-7" class="py-name"><a title="pypat.behavioral.memento" class="py-name" href="#" onclick="return doclink('link-7', 'memento', 'link-2');">memento</a></tt> </tt>
|
||||
<a name="L24"></a><tt class="py-lineno">24</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-8" class="py-name" targets="Method pypat.behavioral.memento.Originator.rollback()=pypat.behavioral.memento.Originator-class.html#rollback"><a title="pypat.behavioral.memento.Originator.rollback" class="py-name" href="#" onclick="return doclink('link-8', 'rollback', 'link-8');">rollback</a></tt><tt class="py-op">(</tt><tt class="py-name">deepcopy</tt><tt class="py-op">(</tt><tt id="link-9" class="py-name"><a title="pypat.behavioral.memento" class="py-name" href="#" onclick="return doclink('link-9', 'memento', 'link-2');">memento</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L25"></a><tt class="py-lineno">25</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-10" class="py-name"><a title="pypat.behavioral.memento" class="py-name" href="#" onclick="return doclink('link-10', 'memento', 'link-2');">memento</a></tt> <tt class="py-op">=</tt> <tt id="link-11" class="py-name"><a title="pypat.behavioral.memento" class="py-name" href="#" onclick="return doclink('link-11', 'memento', 'link-2');">memento</a></tt> </tt>
|
||||
</div></div><a name="L26"></a><tt class="py-lineno">26</tt> <tt class="py-line"> </tt>
|
||||
<a name="L27"></a><tt class="py-lineno">27</tt> <tt class="py-line"> </tt>
|
||||
<a name="Pool"></a><div id="Pool-def"><a name="L28"></a><tt class="py-lineno">28</tt> <a class="py-toggle" href="#" id="Pool-toggle" onclick="return toggle('Pool');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pypat.creational.pool.Pool-class.html">Pool</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Pool-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="Pool-expanded"><a name="L29"></a><tt class="py-lineno">29</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L30"></a><tt class="py-lineno">30</tt> <tt class="py-line"><tt class="py-docstring"> An Object Pool design pattern implementation.</tt> </tt>
|
||||
<a name="L31"></a><tt class="py-lineno">31</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L32"></a><tt class="py-lineno">32</tt> <tt class="py-line"><tt class="py-docstring"> - External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Creational-Pattern-Usage}</tt> </tt>
|
||||
<a name="L33"></a><tt class="py-lineno">33</tt> <tt class="py-line"><tt class="py-docstring"> - External Object Pool Pattern documentation: U{https://en.wikipedia.org/wiki/Object_pool_pattern}</tt> </tt>
|
||||
<a name="L34"></a><tt class="py-lineno">34</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="Pool.__init__"></a><div id="Pool.__init__-def"><a name="L35"></a><tt class="py-lineno">35</tt> <a class="py-toggle" href="#" id="Pool.__init__-toggle" onclick="return toggle('Pool.__init__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.creational.pool.Pool-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">reusable_class</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kwargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Pool.__init__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Pool.__init__-expanded"><a name="L36"></a><tt class="py-lineno">36</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L37"></a><tt class="py-lineno">37</tt> <tt class="py-line"><tt class="py-docstring"> Initialize a new object pool instance.</tt> </tt>
|
||||
<a name="L38"></a><tt class="py-lineno">38</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L39"></a><tt class="py-lineno">39</tt> <tt class="py-line"><tt class="py-docstring"> @param reusable_class: The reusable class this object pool is responsible for.</tt> </tt>
|
||||
<a name="L40"></a><tt class="py-lineno">40</tt> <tt class="py-line"><tt class="py-docstring"> @param args: args for reusable object creation.</tt> </tt>
|
||||
<a name="L41"></a><tt class="py-lineno">41</tt> <tt class="py-line"><tt class="py-docstring"> @param kwargs: kwargs for reusable object creation.</tt> </tt>
|
||||
<a name="L42"></a><tt class="py-lineno">42</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L43"></a><tt class="py-lineno">43</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">reusables</tt> <tt class="py-op">=</tt> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L44"></a><tt class="py-lineno">44</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">reusable_class</tt> <tt class="py-op">=</tt> <tt class="py-name">reusable_class</tt> </tt>
|
||||
<a name="L45"></a><tt class="py-lineno">45</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">args</tt> <tt class="py-op">=</tt> <tt class="py-name">args</tt> </tt>
|
||||
<a name="L46"></a><tt class="py-lineno">46</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">kwargs</tt> <tt class="py-op">=</tt> <tt class="py-name">kwargs</tt> </tt>
|
||||
<a name="L47"></a><tt class="py-lineno">47</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">pool_size</tt> <tt class="py-op">=</tt> <tt class="py-number">2</tt> </tt>
|
||||
<a name="L48"></a><tt class="py-lineno">48</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-12" class="py-name" targets="Method pypat.creational.pool.Pool._expand()=pypat.creational.pool.Pool-class.html#_expand"><a title="pypat.creational.pool.Pool._expand" class="py-name" href="#" onclick="return doclink('link-12', '_expand', 'link-12');">_expand</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">pool_size</tt><tt class="py-op">)</tt> </tt>
|
||||
</div><a name="L49"></a><tt class="py-lineno">49</tt> <tt class="py-line"> </tt>
|
||||
<a name="Pool.acquire"></a><div id="Pool.acquire-def"><a name="L50"></a><tt class="py-lineno">50</tt> <a class="py-toggle" href="#" id="Pool.acquire-toggle" onclick="return toggle('Pool.acquire');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.creational.pool.Pool-class.html#acquire">acquire</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Pool.acquire-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Pool.acquire-expanded"><a name="L51"></a><tt class="py-lineno">51</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L52"></a><tt class="py-lineno">52</tt> <tt class="py-line"><tt class="py-docstring"> Acquire an object from the pool.</tt> </tt>
|
||||
<a name="L53"></a><tt class="py-lineno">53</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L54"></a><tt class="py-lineno">54</tt> <tt class="py-line"><tt class="py-docstring"> @return: An object from the pool.</tt> </tt>
|
||||
<a name="L55"></a><tt class="py-lineno">55</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L56"></a><tt class="py-lineno">56</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L57"></a><tt class="py-lineno">57</tt> <tt class="py-line"> <tt class="py-name">reusable</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">reusables</tt><tt class="py-op">.</tt><tt class="py-name">pop</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L58"></a><tt class="py-lineno">58</tt> <tt class="py-line"> <tt class="py-keyword">except</tt> <tt class="py-name">IndexError</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L59"></a><tt class="py-lineno">59</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-13" class="py-name"><a title="pypat.creational.pool.Pool._expand" class="py-name" href="#" onclick="return doclink('link-13', '_expand', 'link-12');">_expand</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">pool_size</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L60"></a><tt class="py-lineno">60</tt> <tt class="py-line"> <tt class="py-name">reusable</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">reusables</tt><tt class="py-op">.</tt><tt class="py-name">pop</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L61"></a><tt class="py-lineno">61</tt> <tt class="py-line"> </tt>
|
||||
<a name="L62"></a><tt class="py-lineno">62</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">reusable</tt> </tt>
|
||||
</div><a name="L63"></a><tt class="py-lineno">63</tt> <tt class="py-line"> </tt>
|
||||
<a name="Pool.release"></a><div id="Pool.release-def"><a name="L64"></a><tt class="py-lineno">64</tt> <a class="py-toggle" href="#" id="Pool.release-toggle" onclick="return toggle('Pool.release');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.creational.pool.Pool-class.html#release">release</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">reusable</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Pool.release-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Pool.release-expanded"><a name="L65"></a><tt class="py-lineno">65</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L66"></a><tt class="py-lineno">66</tt> <tt class="py-line"><tt class="py-docstring"> Release an object back into the pool.</tt> </tt>
|
||||
<a name="L67"></a><tt class="py-lineno">67</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L68"></a><tt class="py-lineno">68</tt> <tt class="py-line"><tt class="py-docstring"> @param reusable: The object to return to the pool.</tt> </tt>
|
||||
<a name="L69"></a><tt class="py-lineno">69</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L70"></a><tt class="py-lineno">70</tt> <tt class="py-line"> <tt class="py-name">reusable</tt><tt class="py-op">.</tt><tt id="link-14" class="py-name" targets="Method pypat.creational.pool.Reusable.reset()=pypat.creational.pool.Reusable-class.html#reset"><a title="pypat.creational.pool.Reusable.reset" class="py-name" href="#" onclick="return doclink('link-14', 'reset', 'link-14');">reset</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L71"></a><tt class="py-lineno">71</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">reusables</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">reusable</tt><tt class="py-op">)</tt> </tt>
|
||||
</div><a name="L72"></a><tt class="py-lineno">72</tt> <tt class="py-line"> </tt>
|
||||
<a name="Pool._expand"></a><div id="Pool._expand-def"><a name="L73"></a><tt class="py-lineno">73</tt> <a class="py-toggle" href="#" id="Pool._expand-toggle" onclick="return toggle('Pool._expand');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.creational.pool.Pool-class.html#_expand">_expand</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">size</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Pool._expand-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Pool._expand-expanded"><a name="L74"></a><tt class="py-lineno">74</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">i</tt> <tt class="py-keyword">in</tt> <tt class="py-name">range</tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-name">size</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L75"></a><tt class="py-lineno">75</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">reusables</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">reusable_class</tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">kwargs</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
|
||||
</div></div><a name="L76"></a><tt class="py-lineno">76</tt> <tt class="py-line"> </tt><script type="text/javascript">
|
||||
<!--
|
||||
expandto(location.href);
|
||||
// -->
|
||||
</script>
|
||||
</pre>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
351
html/pypat.creational.pool.Pool-class.html
vendored
Normal file
351
html/pypat.creational.pool.Pool-class.html
vendored
Normal file
@@ -0,0 +1,351 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.creational.pool.Pool</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.creational-module.html">Package creational</a> ::
|
||||
<a href="pypat.creational.pool-module.html">Module pool</a> ::
|
||||
Class Pool
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.creational.pool.Pool-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Class Pool</h1><p class="nomargin-top"><span class="codelink"><a href="pypat.creational.pool-pysrc.html#Pool">source code</a></span></p>
|
||||
<pre class="base-tree">
|
||||
object --+
|
||||
|
|
||||
<strong class="uidshort">Pool</strong>
|
||||
</pre>
|
||||
|
||||
<hr />
|
||||
<pre class="literalblock">
|
||||
|
||||
An Object Pool design pattern implementation.
|
||||
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Creational-Pattern-Usage}
|
||||
- External Object Pool Pattern documentation: U{https://en.wikipedia.org/wiki/Object_pool_pattern}
|
||||
|
||||
</pre>
|
||||
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Instance Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-InstanceMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.creational.pool.Pool-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">reusable_class</span>,
|
||||
<span class="summary-sig-arg">*args</span>,
|
||||
<span class="summary-sig-arg">**kwargs</span>)</span><br />
|
||||
Initialize a new object pool instance.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.creational.pool-pysrc.html#Pool.__init__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.creational.pool.Pool-class.html#acquire" class="summary-sig-name">acquire</a>(<span class="summary-sig-arg">self</span>)</span><br />
|
||||
Acquire an object from the pool.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.creational.pool-pysrc.html#Pool.acquire">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.creational.pool.Pool-class.html#release" class="summary-sig-name">release</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">reusable</span>)</span><br />
|
||||
Release an object back into the pool.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.creational.pool-pysrc.html#Pool.release">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="private">
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="_expand"></a><span class="summary-sig-name">_expand</span>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">size</span>)</span></td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.creational.pool-pysrc.html#Pool._expand">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__delattr__</code>,
|
||||
<code>__format__</code>,
|
||||
<code>__getattribute__</code>,
|
||||
<code>__hash__</code>,
|
||||
<code>__new__</code>,
|
||||
<code>__reduce__</code>,
|
||||
<code>__reduce_ex__</code>,
|
||||
<code>__repr__</code>,
|
||||
<code>__setattr__</code>,
|
||||
<code>__sizeof__</code>,
|
||||
<code>__str__</code>,
|
||||
<code>__subclasshook__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== PROPERTIES ==================== -->
|
||||
<a name="section-Properties"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Properties</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Properties"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__class__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== METHOD DETAILS ==================== -->
|
||||
<a name="section-MethodDetails"></a>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Method Details</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-MethodDetails"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="__init__"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">reusable_class</span>,
|
||||
<span class="sig-arg">*args</span>,
|
||||
<span class="sig-arg">**kwargs</span>)</span>
|
||||
<br /><em class="fname">(Constructor)</em>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.creational.pool-pysrc.html#Pool.__init__">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Initialize a new object pool instance.</p>
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>reusable_class</code></strong> - The reusable class this object pool is responsible for.</li>
|
||||
<li><strong class="pname"><code>args</code></strong> - args for reusable object creation.</li>
|
||||
<li><strong class="pname"><code>kwargs</code></strong> - kwargs for reusable object creation.</li>
|
||||
</ul></dd>
|
||||
<dt>Overrides:
|
||||
object.__init__
|
||||
</dt>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="acquire"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">acquire</span>(<span class="sig-arg">self</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.creational.pool-pysrc.html#Pool.acquire">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Acquire an object from the pool.</p>
|
||||
<dl class="fields">
|
||||
<dt>Returns:</dt>
|
||||
<dd>An object from the pool.</dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="release"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">release</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">reusable</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.creational.pool-pysrc.html#Pool.release">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Release an object back into the pool.</p>
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>reusable</code></strong> - The object to return to the pool.</li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
167
html/pypat.creational.pool.Reusable-class.html
vendored
Normal file
167
html/pypat.creational.pool.Reusable-class.html
vendored
Normal file
@@ -0,0 +1,167 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.creational.pool.Reusable</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.creational-module.html">Package creational</a> ::
|
||||
<a href="pypat.creational.pool-module.html">Module pool</a> ::
|
||||
Class Reusable
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.creational.pool.Reusable-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Class Reusable</h1><p class="nomargin-top"><span class="codelink"><a href="pypat.creational.pool-pysrc.html#Reusable">source code</a></span></p>
|
||||
<pre class="literalblock">
|
||||
|
||||
An abstract reusable class.
|
||||
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Creational-Pattern-Usage}
|
||||
- External Object Pool Pattern documentation: U{https://en.wikipedia.org/wiki/Object_pool_pattern}
|
||||
|
||||
</pre>
|
||||
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Instance Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-InstanceMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="__init__"></a><span class="summary-sig-name">__init__</span>(<span class="summary-sig-arg">self</span>)</span><br />
|
||||
Initialize a new Reusable instance.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.creational.pool-pysrc.html#Reusable.__init__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="reset"></a><span class="summary-sig-name">reset</span>(<span class="summary-sig-arg">self</span>)</span><br />
|
||||
Reset this objects state to the state that it was created with.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.creational.pool-pysrc.html#Reusable.reset">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
156
html/pypat.creational.prototype-module.html
vendored
Normal file
156
html/pypat.creational.prototype-module.html
vendored
Normal file
@@ -0,0 +1,156 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.creational.prototype</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.creational-module.html">Package creational</a> ::
|
||||
Module prototype
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.creational.prototype-module.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== MODULE DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Module prototype</h1><p class="nomargin-top"><span class="codelink"><a href="pypat.creational.prototype-pysrc.html">source code</a></span></p>
|
||||
<!-- ==================== CLASSES ==================== -->
|
||||
<a name="section-Classes"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Classes</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Classes"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="pypat.creational.prototype.Prototype-class.html" class="summary-name">Prototype</a><br />
|
||||
Prototype design pattern abstract class.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== VARIABLES ==================== -->
|
||||
<a name="section-Variables"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Variables</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Variables"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="__package__"></a><span class="summary-name">__package__</span> = <code title="'pypat.creational'"><code class="variable-quote">'</code><code class="variable-string">pypat.creational</code><code class="variable-quote">'</code></code>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
138
html/pypat.creational.prototype-pysrc.html
vendored
Normal file
138
html/pypat.creational.prototype-pysrc.html
vendored
Normal file
@@ -0,0 +1,138 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.creational.prototype</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.creational-module.html">Package creational</a> ::
|
||||
Module prototype
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.creational.prototype-pysrc.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h1 class="epydoc">Source Code for <a href="pypat.creational.prototype-module.html">Module pypat.creational.prototype</a></h1>
|
||||
<pre class="py-src">
|
||||
<a name="L1"></a><tt class="py-lineno"> 1</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">copy</tt> <tt class="py-keyword">import</tt> <tt class="py-name">deepcopy</tt> </tt>
|
||||
<a name="L2"></a><tt class="py-lineno"> 2</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">types</tt> <tt class="py-keyword">import</tt> <tt class="py-name">MethodType</tt> </tt>
|
||||
<a name="L3"></a><tt class="py-lineno"> 3</tt> <tt class="py-line"> </tt>
|
||||
<a name="L4"></a><tt class="py-lineno"> 4</tt> <tt class="py-line"> </tt>
|
||||
<a name="Prototype"></a><div id="Prototype-def"><a name="L5"></a><tt class="py-lineno"> 5</tt> <a class="py-toggle" href="#" id="Prototype-toggle" onclick="return toggle('Prototype');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pypat.creational.prototype.Prototype-class.html">Prototype</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Prototype-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="Prototype-expanded"><a name="L6"></a><tt class="py-lineno"> 6</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L7"></a><tt class="py-lineno"> 7</tt> <tt class="py-line"><tt class="py-docstring"> Prototype design pattern abstract class.</tt> </tt>
|
||||
<a name="L8"></a><tt class="py-lineno"> 8</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L9"></a><tt class="py-lineno"> 9</tt> <tt class="py-line"><tt class="py-docstring"> - External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Creational-Pattern-Usage}</tt> </tt>
|
||||
<a name="L10"></a><tt class="py-lineno">10</tt> <tt class="py-line"><tt class="py-docstring"> - External Prototype Pattern documentation: U{https://en.wikipedia.org/wiki/Prototype_pattern}</tt> </tt>
|
||||
<a name="L11"></a><tt class="py-lineno">11</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="Prototype.prototype"></a><div id="Prototype.prototype-def"><a name="L12"></a><tt class="py-lineno">12</tt> <a class="py-toggle" href="#" id="Prototype.prototype-toggle" onclick="return toggle('Prototype.prototype');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.creational.prototype.Prototype-class.html#prototype">prototype</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">attributes</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Prototype.prototype-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Prototype.prototype-expanded"><a name="L13"></a><tt class="py-lineno">13</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L14"></a><tt class="py-lineno">14</tt> <tt class="py-line"><tt class="py-docstring"> Copy the prototype this object and optionally update attributes.</tt> </tt>
|
||||
<a name="L15"></a><tt class="py-lineno">15</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L16"></a><tt class="py-lineno">16</tt> <tt class="py-line"><tt class="py-docstring"> @param attributes: Keyword arguments of any attributes you wish to update.</tt> </tt>
|
||||
<a name="L17"></a><tt class="py-lineno">17</tt> <tt class="py-line"><tt class="py-docstring"> @return: A copy of this object with the updated attributes.</tt> </tt>
|
||||
<a name="L18"></a><tt class="py-lineno">18</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L19"></a><tt class="py-lineno">19</tt> <tt class="py-line"> <tt class="py-name">obj</tt> <tt class="py-op">=</tt> <tt class="py-name">deepcopy</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L20"></a><tt class="py-lineno">20</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">attribute</tt> <tt class="py-keyword">in</tt> <tt class="py-name">attributes</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L21"></a><tt class="py-lineno">21</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">callable</tt><tt class="py-op">(</tt><tt class="py-name">attributes</tt><tt class="py-op">[</tt><tt class="py-name">attribute</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L22"></a><tt class="py-lineno">22</tt> <tt class="py-line"> <tt class="py-name">setattr</tt><tt class="py-op">(</tt><tt class="py-name">obj</tt><tt class="py-op">,</tt> <tt class="py-name">attribute</tt><tt class="py-op">,</tt> <tt class="py-name">MethodType</tt><tt class="py-op">(</tt><tt class="py-name">attributes</tt><tt class="py-op">[</tt><tt class="py-name">attribute</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">obj</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L23"></a><tt class="py-lineno">23</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L24"></a><tt class="py-lineno">24</tt> <tt class="py-line"> <tt class="py-name">setattr</tt><tt class="py-op">(</tt><tt class="py-name">obj</tt><tt class="py-op">,</tt> <tt class="py-name">attribute</tt><tt class="py-op">,</tt> <tt class="py-name">attributes</tt><tt class="py-op">[</tt><tt class="py-name">attribute</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L25"></a><tt class="py-lineno">25</tt> <tt class="py-line"> </tt>
|
||||
<a name="L26"></a><tt class="py-lineno">26</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">obj</tt> </tt>
|
||||
</div></div><a name="L27"></a><tt class="py-lineno">27</tt> <tt class="py-line"> </tt><script type="text/javascript">
|
||||
<!--
|
||||
expandto(location.href);
|
||||
// -->
|
||||
</script>
|
||||
</pre>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
247
html/pypat.creational.prototype.Prototype-class.html
vendored
Normal file
247
html/pypat.creational.prototype.Prototype-class.html
vendored
Normal file
@@ -0,0 +1,247 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.creational.prototype.Prototype</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.creational-module.html">Package creational</a> ::
|
||||
<a href="pypat.creational.prototype-module.html">Module prototype</a> ::
|
||||
Class Prototype
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.creational.prototype.Prototype-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Class Prototype</h1><p class="nomargin-top"><span class="codelink"><a href="pypat.creational.prototype-pysrc.html#Prototype">source code</a></span></p>
|
||||
<pre class="base-tree">
|
||||
object --+
|
||||
|
|
||||
<strong class="uidshort">Prototype</strong>
|
||||
</pre>
|
||||
|
||||
<hr />
|
||||
<pre class="literalblock">
|
||||
|
||||
Prototype design pattern abstract class.
|
||||
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Creational-Pattern-Usage}
|
||||
- External Prototype Pattern documentation: U{https://en.wikipedia.org/wiki/Prototype_pattern}
|
||||
|
||||
</pre>
|
||||
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Instance Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-InstanceMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.creational.prototype.Prototype-class.html#prototype" class="summary-sig-name">prototype</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">**attributes</span>)</span><br />
|
||||
Copy the prototype this object and optionally update attributes.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.creational.prototype-pysrc.html#Prototype.prototype">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__delattr__</code>,
|
||||
<code>__format__</code>,
|
||||
<code>__getattribute__</code>,
|
||||
<code>__hash__</code>,
|
||||
<code>__init__</code>,
|
||||
<code>__new__</code>,
|
||||
<code>__reduce__</code>,
|
||||
<code>__reduce_ex__</code>,
|
||||
<code>__repr__</code>,
|
||||
<code>__setattr__</code>,
|
||||
<code>__sizeof__</code>,
|
||||
<code>__str__</code>,
|
||||
<code>__subclasshook__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== PROPERTIES ==================== -->
|
||||
<a name="section-Properties"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Properties</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Properties"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__class__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== METHOD DETAILS ==================== -->
|
||||
<a name="section-MethodDetails"></a>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Method Details</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-MethodDetails"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="prototype"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">prototype</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">**attributes</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.creational.prototype-pysrc.html#Prototype.prototype">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Copy the prototype this object and optionally update attributes.</p>
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>attributes</code></strong> - Keyword arguments of any attributes you wish to update.</li>
|
||||
</ul></dd>
|
||||
<dt>Returns:</dt>
|
||||
<dd>A copy of this object with the updated attributes.</dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
156
html/pypat.creational.singleton-module.html
vendored
Normal file
156
html/pypat.creational.singleton-module.html
vendored
Normal file
@@ -0,0 +1,156 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.creational.singleton</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.creational-module.html">Package creational</a> ::
|
||||
Module singleton
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.creational.singleton-module.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== MODULE DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Module singleton</h1><p class="nomargin-top"><span class="codelink"><a href="pypat.creational.singleton-pysrc.html">source code</a></span></p>
|
||||
<!-- ==================== CLASSES ==================== -->
|
||||
<a name="section-Classes"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Classes</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Classes"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="pypat.creational.singleton.Singleton-class.html" class="summary-name">Singleton</a><br />
|
||||
Singleton Metaclass.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== VARIABLES ==================== -->
|
||||
<a name="section-Variables"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Variables</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Variables"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="__package__"></a><span class="summary-name">__package__</span> = <code title="None">None</code>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
136
html/pypat.creational.singleton-pysrc.html
vendored
Normal file
136
html/pypat.creational.singleton-pysrc.html
vendored
Normal file
@@ -0,0 +1,136 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.creational.singleton</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.creational-module.html">Package creational</a> ::
|
||||
Module singleton
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.creational.singleton-pysrc.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h1 class="epydoc">Source Code for <a href="pypat.creational.singleton-module.html">Module pypat.creational.singleton</a></h1>
|
||||
<pre class="py-src">
|
||||
<a name="Singleton"></a><div id="Singleton-def"><a name="L1"></a><tt class="py-lineno"> 1</tt> <a class="py-toggle" href="#" id="Singleton-toggle" onclick="return toggle('Singleton');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pypat.creational.singleton.Singleton-class.html">Singleton</a><tt class="py-op">(</tt><tt class="py-base-class">type</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Singleton-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="Singleton-expanded"><a name="L2"></a><tt class="py-lineno"> 2</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L3"></a><tt class="py-lineno"> 3</tt> <tt class="py-line"><tt class="py-docstring"> Singleton Metaclass.</tt> </tt>
|
||||
<a name="L4"></a><tt class="py-lineno"> 4</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L5"></a><tt class="py-lineno"> 5</tt> <tt class="py-line"><tt class="py-docstring"> Enforces any object using this metaclass to only create a single instance.</tt> </tt>
|
||||
<a name="L6"></a><tt class="py-lineno"> 6</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L7"></a><tt class="py-lineno"> 7</tt> <tt class="py-line"><tt class="py-docstring"> - External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Creational-Pattern-Usage}</tt> </tt>
|
||||
<a name="L8"></a><tt class="py-lineno"> 8</tt> <tt class="py-line"><tt class="py-docstring"> - External Singleton Pattern documentation: U{https://en.wikipedia.org/wiki/Singleton_pattern}</tt> </tt>
|
||||
<a name="L9"></a><tt class="py-lineno"> 9</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L10"></a><tt class="py-lineno">10</tt> <tt class="py-line"> <tt id="link-0" class="py-name" targets="Variable pypat.creational.singleton.Singleton.__instance=pypat.creational.singleton.Singleton-class.html#__instance"><a title="pypat.creational.singleton.Singleton.__instance" class="py-name" href="#" onclick="return doclink('link-0', '__instance', 'link-0');">__instance</a></tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
|
||||
<a name="L11"></a><tt class="py-lineno">11</tt> <tt class="py-line"> </tt>
|
||||
<a name="Singleton.__call__"></a><div id="Singleton.__call__-def"><a name="L12"></a><tt class="py-lineno">12</tt> <a class="py-toggle" href="#" id="Singleton.__call__-toggle" onclick="return toggle('Singleton.__call__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.creational.singleton.Singleton-class.html#__call__">__call__</a><tt class="py-op">(</tt><tt class="py-param">cls</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kwargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Singleton.__call__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Singleton.__call__-expanded"><a name="L13"></a><tt class="py-lineno">13</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L14"></a><tt class="py-lineno">14</tt> <tt class="py-line"><tt class="py-docstring"> Override the __call__ method to make sure only one instance is created.</tt> </tt>
|
||||
<a name="L15"></a><tt class="py-lineno">15</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L16"></a><tt class="py-lineno">16</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">cls</tt><tt class="py-op">.</tt><tt id="link-1" class="py-name"><a title="pypat.creational.singleton.Singleton.__instance" class="py-name" href="#" onclick="return doclink('link-1', '__instance', 'link-0');">__instance</a></tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L17"></a><tt class="py-lineno">17</tt> <tt class="py-line"> <tt class="py-name">cls</tt><tt class="py-op">.</tt><tt id="link-2" class="py-name"><a title="pypat.creational.singleton.Singleton.__instance" class="py-name" href="#" onclick="return doclink('link-2', '__instance', 'link-0');">__instance</a></tt> <tt class="py-op">=</tt> <tt class="py-name">type</tt><tt class="py-op">.</tt><tt id="link-3" class="py-name" targets="Method pypat.behavioral.null.Null.__call__()=pypat.behavioral.null.Null-class.html#__call__,Method pypat.creational.singleton.Singleton.__call__()=pypat.creational.singleton.Singleton-class.html#__call__,Method pypat.structural.decorator.CallWrapper.__call__()=pypat.structural.decorator.CallWrapper-class.html#__call__,Method pypat.structural.decorator.Decorator.__call__()=pypat.structural.decorator.Decorator-class.html#__call__,Method pypat.structural.decorator.DecoratorComplex.__call__()=pypat.structural.decorator.DecoratorComplex-class.html#__call__,Method pypat.structural.flyweight.FlyweightMeta.__call__()=pypat.structural.flyweight.FlyweightMeta-class.html#__call__"><a title="pypat.behavioral.null.Null.__call__
|
||||
pypat.creational.singleton.Singleton.__call__
|
||||
pypat.structural.decorator.CallWrapper.__call__
|
||||
pypat.structural.decorator.Decorator.__call__
|
||||
pypat.structural.decorator.DecoratorComplex.__call__
|
||||
pypat.structural.flyweight.FlyweightMeta.__call__" class="py-name" href="#" onclick="return doclink('link-3', '__call__', 'link-3');">__call__</a></tt><tt class="py-op">(</tt><tt class="py-name">cls</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-name">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">kwargs</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L18"></a><tt class="py-lineno">18</tt> <tt class="py-line"> </tt>
|
||||
<a name="L19"></a><tt class="py-lineno">19</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">cls</tt><tt class="py-op">.</tt><tt id="link-4" class="py-name"><a title="pypat.creational.singleton.Singleton.__instance" class="py-name" href="#" onclick="return doclink('link-4', '__instance', 'link-0');">__instance</a></tt> </tt>
|
||||
</div></div><a name="L20"></a><tt class="py-lineno">20</tt> <tt class="py-line"> </tt><script type="text/javascript">
|
||||
<!--
|
||||
expandto(location.href);
|
||||
// -->
|
||||
</script>
|
||||
</pre>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
302
html/pypat.creational.singleton.Singleton-class.html
vendored
Normal file
302
html/pypat.creational.singleton.Singleton-class.html
vendored
Normal file
@@ -0,0 +1,302 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.creational.singleton.Singleton</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.creational-module.html">Package creational</a> ::
|
||||
<a href="pypat.creational.singleton-module.html">Module singleton</a> ::
|
||||
Class Singleton
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.creational.singleton.Singleton-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== TYPE DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Type Singleton</h1><p class="nomargin-top"><span class="codelink"><a href="pypat.creational.singleton-pysrc.html#Singleton">source code</a></span></p>
|
||||
<pre class="base-tree">
|
||||
object --+
|
||||
|
|
||||
type --+
|
||||
|
|
||||
<strong class="uidshort">Singleton</strong>
|
||||
</pre>
|
||||
|
||||
<hr />
|
||||
<pre class="literalblock">
|
||||
|
||||
Singleton Metaclass.
|
||||
|
||||
Enforces any object using this metaclass to only create a single instance.
|
||||
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Creational-Pattern-Usage}
|
||||
- External Singleton Pattern documentation: U{https://en.wikipedia.org/wiki/Singleton_pattern}
|
||||
|
||||
</pre>
|
||||
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Instance Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-InstanceMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.creational.singleton.Singleton-class.html#__call__" class="summary-sig-name">__call__</a>(<span class="summary-sig-arg">cls</span>,
|
||||
<span class="summary-sig-arg">*args</span>,
|
||||
<span class="summary-sig-arg">**kwargs</span>)</span><br />
|
||||
Override the __call__ method to make sure only one instance is
|
||||
created.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.creational.singleton-pysrc.html#Singleton.__call__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>type</code></b>:
|
||||
<code>__delattr__</code>,
|
||||
<code>__eq__</code>,
|
||||
<code>__ge__</code>,
|
||||
<code>__getattribute__</code>,
|
||||
<code>__gt__</code>,
|
||||
<code>__hash__</code>,
|
||||
<code>__init__</code>,
|
||||
<code>__instancecheck__</code>,
|
||||
<code>__le__</code>,
|
||||
<code>__lt__</code>,
|
||||
<code>__ne__</code>,
|
||||
<code>__new__</code>,
|
||||
<code>__repr__</code>,
|
||||
<code>__setattr__</code>,
|
||||
<code>__subclasscheck__</code>,
|
||||
<code>__subclasses__</code>,
|
||||
<code>mro</code>
|
||||
</p>
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__format__</code>,
|
||||
<code>__reduce__</code>,
|
||||
<code>__reduce_ex__</code>,
|
||||
<code>__sizeof__</code>,
|
||||
<code>__str__</code>,
|
||||
<code>__subclasshook__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS VARIABLES ==================== -->
|
||||
<a name="section-ClassVariables"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Class Variables</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-ClassVariables"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="private">
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="__instance"></a><span class="summary-name">__instance</span> = <code title="None">None</code>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== PROPERTIES ==================== -->
|
||||
<a name="section-Properties"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Properties</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Properties"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>type</code></b>:
|
||||
<code>__abstractmethods__</code>,
|
||||
<code>__base__</code>,
|
||||
<code>__bases__</code>,
|
||||
<code>__basicsize__</code>,
|
||||
<code>__dictoffset__</code>,
|
||||
<code>__flags__</code>,
|
||||
<code>__itemsize__</code>,
|
||||
<code>__mro__</code>,
|
||||
<code>__name__</code>,
|
||||
<code>__weakrefoffset__</code>
|
||||
</p>
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__class__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== METHOD DETAILS ==================== -->
|
||||
<a name="section-MethodDetails"></a>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Method Details</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-MethodDetails"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="__call__"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">__call__</span>(<span class="sig-arg">cls</span>,
|
||||
<span class="sig-arg">*args</span>,
|
||||
<span class="sig-arg">**kwargs</span>)</span>
|
||||
<br /><em class="fname">(Call operator)</em>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.creational.singleton-pysrc.html#Singleton.__call__">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Override the __call__ method to make sure only one instance is
|
||||
created.</p>
|
||||
<dl class="fields">
|
||||
<dt>Overrides:
|
||||
type.__call__
|
||||
</dt>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
156
html/pypat.structural-module.html
vendored
Normal file
156
html/pypat.structural-module.html
vendored
Normal file
@@ -0,0 +1,156 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.structural</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
Package structural
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.structural-module.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== PACKAGE DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Package structural</h1><p class="nomargin-top"><span class="codelink"><a href="pypat.structural-pysrc.html">source code</a></span></p>
|
||||
<!-- ==================== SUBMODULES ==================== -->
|
||||
<a name="section-Submodules"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Submodules</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Submodules"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td class="summary">
|
||||
<ul class="nomargin">
|
||||
<li> <strong class="uidlink"><a href="pypat.structural.adapter-module.html">pypat.structural.adapter</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypat.structural.composite-module.html">pypat.structural.composite</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypat.structural.decorator-module.html">pypat.structural.decorator</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypat.structural.flyweight-module.html">pypat.structural.flyweight</a></strong> </li>
|
||||
</ul></td></tr>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
<!-- ==================== VARIABLES ==================== -->
|
||||
<a name="section-Variables"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Variables</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Variables"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="__package__"></a><span class="summary-name">__package__</span> = <code title="None">None</code>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
112
html/pypat.structural-pysrc.html
vendored
Normal file
112
html/pypat.structural-pysrc.html
vendored
Normal file
@@ -0,0 +1,112 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.structural</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
Package structural
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.structural-pysrc.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h1 class="epydoc">Source Code for <a href="pypat.structural-module.html">Package pypat.structural</a></h1>
|
||||
<pre class="py-src">
|
||||
<a name="L1"></a><tt class="py-lineno">1</tt> <tt class="py-line"> </tt>
|
||||
<a name="L2"></a><tt class="py-lineno">2</tt> <tt class="py-line"> </tt><script type="text/javascript">
|
||||
<!--
|
||||
expandto(location.href);
|
||||
// -->
|
||||
</script>
|
||||
</pre>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
156
html/pypat.structural.adapter-module.html
vendored
Normal file
156
html/pypat.structural.adapter-module.html
vendored
Normal file
@@ -0,0 +1,156 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.structural.adapter</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.structural-module.html">Package structural</a> ::
|
||||
Module adapter
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.structural.adapter-module.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== MODULE DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Module adapter</h1><p class="nomargin-top"><span class="codelink"><a href="pypat.structural.adapter-pysrc.html">source code</a></span></p>
|
||||
<!-- ==================== CLASSES ==================== -->
|
||||
<a name="section-Classes"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Classes</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Classes"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="pypat.structural.adapter.Adapter-class.html" class="summary-name">Adapter</a><br />
|
||||
Adapter class as part of the Adapter design pattern.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== VARIABLES ==================== -->
|
||||
<a name="section-Variables"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Variables</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Variables"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="__package__"></a><span class="summary-name">__package__</span> = <code title="None">None</code>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
145
html/pypat.structural.adapter-pysrc.html
vendored
Normal file
145
html/pypat.structural.adapter-pysrc.html
vendored
Normal file
@@ -0,0 +1,145 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.structural.adapter</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.structural-module.html">Package structural</a> ::
|
||||
Module adapter
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.structural.adapter-pysrc.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h1 class="epydoc">Source Code for <a href="pypat.structural.adapter-module.html">Module pypat.structural.adapter</a></h1>
|
||||
<pre class="py-src">
|
||||
<a name="Adapter"></a><div id="Adapter-def"><a name="L1"></a><tt class="py-lineno"> 1</tt> <a class="py-toggle" href="#" id="Adapter-toggle" onclick="return toggle('Adapter');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pypat.structural.adapter.Adapter-class.html">Adapter</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Adapter-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="Adapter-expanded"><a name="L2"></a><tt class="py-lineno"> 2</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L3"></a><tt class="py-lineno"> 3</tt> <tt class="py-line"><tt class="py-docstring"> Adapter class as part of the Adapter design pattern.</tt> </tt>
|
||||
<a name="L4"></a><tt class="py-lineno"> 4</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L5"></a><tt class="py-lineno"> 5</tt> <tt class="py-line"><tt class="py-docstring"> - External Usage Documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Structural-Pattern-Usage}</tt> </tt>
|
||||
<a name="L6"></a><tt class="py-lineno"> 6</tt> <tt class="py-line"><tt class="py-docstring"> - External Adapter Pattern Documentation: U{https://en.wikipedia.org/wiki/Adapter_pattern}</tt> </tt>
|
||||
<a name="L7"></a><tt class="py-lineno"> 7</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="Adapter.__init__"></a><div id="Adapter.__init__-def"><a name="L8"></a><tt class="py-lineno"> 8</tt> <a class="py-toggle" href="#" id="Adapter.__init__-toggle" onclick="return toggle('Adapter.__init__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.structural.adapter.Adapter-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">adaptee</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">adapted_methods</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Adapter.__init__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Adapter.__init__-expanded"><a name="L9"></a><tt class="py-lineno"> 9</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L10"></a><tt class="py-lineno">10</tt> <tt class="py-line"><tt class="py-docstring"> Initialize a new adapter instance.</tt> </tt>
|
||||
<a name="L11"></a><tt class="py-lineno">11</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L12"></a><tt class="py-lineno">12</tt> <tt class="py-line"><tt class="py-docstring"> @param adaptee: The object to adapt to a new interface.</tt> </tt>
|
||||
<a name="L13"></a><tt class="py-lineno">13</tt> <tt class="py-line"><tt class="py-docstring"> @type adaptee: Object</tt> </tt>
|
||||
<a name="L14"></a><tt class="py-lineno">14</tt> <tt class="py-line"><tt class="py-docstring"> @param adapted_methods: A dictionary of methods to adapt.</tt> </tt>
|
||||
<a name="L15"></a><tt class="py-lineno">15</tt> <tt class="py-line"><tt class="py-docstring"> @type adapted_methods: dict</tt> </tt>
|
||||
<a name="L16"></a><tt class="py-lineno">16</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L17"></a><tt class="py-lineno">17</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__adaptee</tt> <tt class="py-op">=</tt> <tt class="py-name">adaptee</tt> </tt>
|
||||
<a name="L18"></a><tt class="py-lineno">18</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__dict__</tt><tt class="py-op">.</tt><tt id="link-0" class="py-name" targets="Method pypat.behavioral.observer.Observer.update()=pypat.behavioral.observer.Observer-class.html#update"><a title="pypat.behavioral.observer.Observer.update" class="py-name" href="#" onclick="return doclink('link-0', 'update', 'link-0');">update</a></tt><tt class="py-op">(</tt><tt class="py-op">{</tt><tt class="py-name">k</tt><tt class="py-op">:</tt> <tt class="py-name">v</tt> <tt class="py-keyword">for</tt> <tt class="py-name">k</tt><tt class="py-op">,</tt> <tt class="py-name">v</tt> <tt class="py-keyword">in</tt> <tt class="py-name">adapted_methods</tt><tt class="py-op">.</tt><tt class="py-name">items</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-keyword">if</tt> <tt class="py-name">callable</tt><tt class="py-op">(</tt><tt class="py-name">v</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> </tt>
|
||||
<a name="L19"></a><tt class="py-lineno">19</tt> <tt class="py-line"> <tt class="py-name">getattr</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__adaptee</tt><tt class="py-op">,</tt> <tt class="py-name">v</tt><tt class="py-op">.</tt><tt class="py-name">__name__</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">}</tt><tt class="py-op">)</tt> </tt>
|
||||
</div><a name="L20"></a><tt class="py-lineno">20</tt> <tt class="py-line"> </tt>
|
||||
<a name="Adapter.__getattr__"></a><div id="Adapter.__getattr__-def"><a name="L21"></a><tt class="py-lineno">21</tt> <a class="py-toggle" href="#" id="Adapter.__getattr__-toggle" onclick="return toggle('Adapter.__getattr__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.structural.adapter.Adapter-class.html#__getattr__">__getattr__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">attr</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Adapter.__getattr__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Adapter.__getattr__-expanded"><a name="L22"></a><tt class="py-lineno">22</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L23"></a><tt class="py-lineno">23</tt> <tt class="py-line"><tt class="py-docstring"> All non-adapted calls are passed to the adaptee.</tt> </tt>
|
||||
<a name="L24"></a><tt class="py-lineno">24</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L25"></a><tt class="py-lineno">25</tt> <tt class="py-line"><tt class="py-docstring"> @param attr: The attribute to get from the adaptee.</tt> </tt>
|
||||
<a name="L26"></a><tt class="py-lineno">26</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L27"></a><tt class="py-lineno">27</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">getattr</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__adaptee</tt><tt class="py-op">,</tt> <tt class="py-name">attr</tt><tt class="py-op">)</tt> </tt>
|
||||
</div><a name="L28"></a><tt class="py-lineno">28</tt> <tt class="py-line"> </tt>
|
||||
<a name="Adapter.original_dict"></a><div id="Adapter.original_dict-def"><a name="L29"></a><tt class="py-lineno">29</tt> <a class="py-toggle" href="#" id="Adapter.original_dict-toggle" onclick="return toggle('Adapter.original_dict');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.structural.adapter.Adapter-class.html#original_dict">original_dict</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Adapter.original_dict-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Adapter.original_dict-expanded"><a name="L30"></a><tt class="py-lineno">30</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L31"></a><tt class="py-lineno">31</tt> <tt class="py-line"><tt class="py-docstring"> Get the adaptee's __dict__</tt> </tt>
|
||||
<a name="L32"></a><tt class="py-lineno">32</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L33"></a><tt class="py-lineno">33</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__adaptee</tt><tt class="py-op">.</tt><tt class="py-name">__dict__</tt> </tt>
|
||||
</div></div><a name="L34"></a><tt class="py-lineno">34</tt> <tt class="py-line"> </tt><script type="text/javascript">
|
||||
<!--
|
||||
expandto(location.href);
|
||||
// -->
|
||||
</script>
|
||||
</pre>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:56 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
311
html/pypat.structural.adapter.Adapter-class.html
vendored
Normal file
311
html/pypat.structural.adapter.Adapter-class.html
vendored
Normal file
@@ -0,0 +1,311 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.structural.adapter.Adapter</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.structural-module.html">Package structural</a> ::
|
||||
<a href="pypat.structural.adapter-module.html">Module adapter</a> ::
|
||||
Class Adapter
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.structural.adapter.Adapter-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Class Adapter</h1><p class="nomargin-top"><span class="codelink"><a href="pypat.structural.adapter-pysrc.html#Adapter">source code</a></span></p>
|
||||
<pre class="base-tree">
|
||||
object --+
|
||||
|
|
||||
<strong class="uidshort">Adapter</strong>
|
||||
</pre>
|
||||
|
||||
<hr />
|
||||
<pre class="literalblock">
|
||||
|
||||
Adapter class as part of the Adapter design pattern.
|
||||
|
||||
- External Usage Documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Structural-Pattern-Usage}
|
||||
- External Adapter Pattern Documentation: U{https://en.wikipedia.org/wiki/Adapter_pattern}
|
||||
|
||||
</pre>
|
||||
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Instance Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-InstanceMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.structural.adapter.Adapter-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">adaptee</span>,
|
||||
<span class="summary-sig-arg">**adapted_methods</span>)</span><br />
|
||||
Initialize a new adapter instance.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.structural.adapter-pysrc.html#Adapter.__init__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.structural.adapter.Adapter-class.html#__getattr__" class="summary-sig-name">__getattr__</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">attr</span>)</span><br />
|
||||
All non-adapted calls are passed to the adaptee.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.structural.adapter-pysrc.html#Adapter.__getattr__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="original_dict"></a><span class="summary-sig-name">original_dict</span>(<span class="summary-sig-arg">self</span>)</span><br />
|
||||
Get the adaptee's __dict__</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.structural.adapter-pysrc.html#Adapter.original_dict">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__delattr__</code>,
|
||||
<code>__format__</code>,
|
||||
<code>__getattribute__</code>,
|
||||
<code>__hash__</code>,
|
||||
<code>__new__</code>,
|
||||
<code>__reduce__</code>,
|
||||
<code>__reduce_ex__</code>,
|
||||
<code>__repr__</code>,
|
||||
<code>__setattr__</code>,
|
||||
<code>__sizeof__</code>,
|
||||
<code>__str__</code>,
|
||||
<code>__subclasshook__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== PROPERTIES ==================== -->
|
||||
<a name="section-Properties"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Properties</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Properties"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__class__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== METHOD DETAILS ==================== -->
|
||||
<a name="section-MethodDetails"></a>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Method Details</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-MethodDetails"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="__init__"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">adaptee</span>,
|
||||
<span class="sig-arg">**adapted_methods</span>)</span>
|
||||
<br /><em class="fname">(Constructor)</em>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.structural.adapter-pysrc.html#Adapter.__init__">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Initialize a new adapter instance.</p>
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>adaptee</code></strong> (Object) - The object to adapt to a new interface.</li>
|
||||
<li><strong class="pname"><code>adapted_methods</code></strong> (dict) - A dictionary of methods to adapt.</li>
|
||||
</ul></dd>
|
||||
<dt>Overrides:
|
||||
object.__init__
|
||||
</dt>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="__getattr__"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">__getattr__</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">attr</span>)</span>
|
||||
<br /><em class="fname">(Qualification operator)</em>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.structural.adapter-pysrc.html#Adapter.__getattr__">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>All non-adapted calls are passed to the adaptee.</p>
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>attr</code></strong> - The attribute to get from the adaptee.</li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
156
html/pypat.structural.composite-module.html
vendored
Normal file
156
html/pypat.structural.composite-module.html
vendored
Normal file
@@ -0,0 +1,156 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.structural.composite</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.structural-module.html">Package structural</a> ::
|
||||
Module composite
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.structural.composite-module.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== MODULE DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Module composite</h1><p class="nomargin-top"><span class="codelink"><a href="pypat.structural.composite-pysrc.html">source code</a></span></p>
|
||||
<!-- ==================== CLASSES ==================== -->
|
||||
<a name="section-Classes"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Classes</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Classes"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="pypat.structural.composite.Composite-class.html" class="summary-name">Composite</a><br />
|
||||
Composite class as part of the Composite pattern.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== VARIABLES ==================== -->
|
||||
<a name="section-Variables"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Variables</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Variables"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="__package__"></a><span class="summary-name">__package__</span> = <code title="None">None</code>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
185
html/pypat.structural.composite-pysrc.html
vendored
Normal file
185
html/pypat.structural.composite-pysrc.html
vendored
Normal file
@@ -0,0 +1,185 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.structural.composite</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.structural-module.html">Package structural</a> ::
|
||||
Module composite
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.structural.composite-pysrc.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h1 class="epydoc">Source Code for <a href="pypat.structural.composite-module.html">Module pypat.structural.composite</a></h1>
|
||||
<pre class="py-src">
|
||||
<a name="Composite"></a><div id="Composite-def"><a name="L1"></a><tt class="py-lineno"> 1</tt> <a class="py-toggle" href="#" id="Composite-toggle" onclick="return toggle('Composite');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pypat.structural.composite.Composite-class.html">Composite</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Composite-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="Composite-expanded"><a name="L2"></a><tt class="py-lineno"> 2</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L3"></a><tt class="py-lineno"> 3</tt> <tt class="py-line"><tt class="py-docstring"> Composite class as part of the Composite pattern.</tt> </tt>
|
||||
<a name="L4"></a><tt class="py-lineno"> 4</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L5"></a><tt class="py-lineno"> 5</tt> <tt class="py-line"><tt class="py-docstring"> - External Usage Documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Structural-Pattern-Usage}</tt> </tt>
|
||||
<a name="L6"></a><tt class="py-lineno"> 6</tt> <tt class="py-line"><tt class="py-docstring"> - External Composite Pattern documentation: U{https://en.wikipedia.org/wiki/Composite_pattern}</tt> </tt>
|
||||
<a name="L7"></a><tt class="py-lineno"> 7</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="Composite.__init__"></a><div id="Composite.__init__-def"><a name="L8"></a><tt class="py-lineno"> 8</tt> <a class="py-toggle" href="#" id="Composite.__init__-toggle" onclick="return toggle('Composite.__init__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.structural.composite.Composite-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">interface</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Composite.__init__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Composite.__init__-expanded"><a name="L9"></a><tt class="py-lineno"> 9</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L10"></a><tt class="py-lineno">10</tt> <tt class="py-line"><tt class="py-docstring"> Initialize a new Composite instance.</tt> </tt>
|
||||
<a name="L11"></a><tt class="py-lineno">11</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L12"></a><tt class="py-lineno">12</tt> <tt class="py-line"><tt class="py-docstring"> @param interface: The interface the all child components must adhere to when added to this composite.</tt> </tt>
|
||||
<a name="L13"></a><tt class="py-lineno">13</tt> <tt class="py-line"><tt class="py-docstring"> @type interface: class</tt> </tt>
|
||||
<a name="L14"></a><tt class="py-lineno">14</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L15"></a><tt class="py-lineno">15</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">components</tt> <tt class="py-op">=</tt> <tt class="py-name">set</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L16"></a><tt class="py-lineno">16</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">interface</tt> <tt class="py-op">=</tt> <tt class="py-name">interface</tt> </tt>
|
||||
</div><a name="L17"></a><tt class="py-lineno">17</tt> <tt class="py-line"> </tt>
|
||||
<a name="Composite.add_component"></a><div id="Composite.add_component-def"><a name="L18"></a><tt class="py-lineno">18</tt> <a class="py-toggle" href="#" id="Composite.add_component-toggle" onclick="return toggle('Composite.add_component');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.structural.composite.Composite-class.html#add_component">add_component</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">component</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Composite.add_component-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Composite.add_component-expanded"><a name="L19"></a><tt class="py-lineno">19</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L20"></a><tt class="py-lineno">20</tt> <tt class="py-line"><tt class="py-docstring"> Add a component to this composite.</tt> </tt>
|
||||
<a name="L21"></a><tt class="py-lineno">21</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L22"></a><tt class="py-lineno">22</tt> <tt class="py-line"><tt class="py-docstring"> @param component: The component to add to this Composite</tt> </tt>
|
||||
<a name="L23"></a><tt class="py-lineno">23</tt> <tt class="py-line"><tt class="py-docstring"> @raise AttributeError: If the component does not adhere to this Composites interface.</tt> </tt>
|
||||
<a name="L24"></a><tt class="py-lineno">24</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L25"></a><tt class="py-lineno">25</tt> <tt class="py-line"> <tt class="py-name">valid</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
|
||||
<a name="L26"></a><tt class="py-lineno">26</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L27"></a><tt class="py-lineno">27</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">component</tt><tt class="py-op">.</tt><tt class="py-name">interface</tt> <tt class="py-op">==</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">interface</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L28"></a><tt class="py-lineno">28</tt> <tt class="py-line"> <tt class="py-name">valid</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
|
||||
<a name="L29"></a><tt class="py-lineno">29</tt> <tt class="py-line"> <tt class="py-keyword">except</tt> <tt class="py-name">AttributeError</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L30"></a><tt class="py-lineno">30</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">interface</tt> <tt class="py-keyword">in</tt> <tt class="py-name">component</tt><tt class="py-op">.</tt><tt class="py-name">__class__</tt><tt class="py-op">.</tt><tt class="py-name">__mro__</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L31"></a><tt class="py-lineno">31</tt> <tt class="py-line"> <tt class="py-name">valid</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
|
||||
<a name="L32"></a><tt class="py-lineno">32</tt> <tt class="py-line"> <tt class="py-keyword">finally</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L33"></a><tt class="py-lineno">33</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">valid</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L34"></a><tt class="py-lineno">34</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">components</tt><tt class="py-op">.</tt><tt class="py-name">add</tt><tt class="py-op">(</tt><tt class="py-name">component</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L35"></a><tt class="py-lineno">35</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L36"></a><tt class="py-lineno">36</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">AttributeError</tt><tt class="py-op">(</tt><tt class="py-string">'Component {0} does not follow this composites interface {1}'</tt><tt class="py-op">.</tt><tt class="py-name">format</tt><tt class="py-op">(</tt> </tt>
|
||||
<a name="L37"></a><tt class="py-lineno">37</tt> <tt class="py-line"> <tt class="py-name">component</tt><tt class="py-op">.</tt><tt class="py-name">__class__</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">interface</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
|
||||
</div><a name="L38"></a><tt class="py-lineno">38</tt> <tt class="py-line"> </tt>
|
||||
<a name="Composite.remove_component"></a><div id="Composite.remove_component-def"><a name="L39"></a><tt class="py-lineno">39</tt> <a class="py-toggle" href="#" id="Composite.remove_component-toggle" onclick="return toggle('Composite.remove_component');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.structural.composite.Composite-class.html#remove_component">remove_component</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">component</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Composite.remove_component-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Composite.remove_component-expanded"><a name="L40"></a><tt class="py-lineno">40</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L41"></a><tt class="py-lineno">41</tt> <tt class="py-line"><tt class="py-docstring"> Remove a component from this composite.</tt> </tt>
|
||||
<a name="L42"></a><tt class="py-lineno">42</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L43"></a><tt class="py-lineno">43</tt> <tt class="py-line"><tt class="py-docstring"> @param component: The component to remove from this Composite.</tt> </tt>
|
||||
<a name="L44"></a><tt class="py-lineno">44</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L45"></a><tt class="py-lineno">45</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L46"></a><tt class="py-lineno">46</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">components</tt><tt class="py-op">.</tt><tt class="py-name">remove</tt><tt class="py-op">(</tt><tt class="py-name">component</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L47"></a><tt class="py-lineno">47</tt> <tt class="py-line"> <tt class="py-keyword">except</tt> <tt class="py-name">KeyError</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L48"></a><tt class="py-lineno">48</tt> <tt class="py-line"> <tt class="py-keyword">pass</tt> </tt>
|
||||
</div><a name="L49"></a><tt class="py-lineno">49</tt> <tt class="py-line"> </tt>
|
||||
<a name="Composite._delegate"></a><div id="Composite._delegate-def"><a name="L50"></a><tt class="py-lineno">50</tt> <a class="py-toggle" href="#" id="Composite._delegate-toggle" onclick="return toggle('Composite._delegate');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.structural.composite.Composite-class.html#_delegate">_delegate</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">func_name</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Composite._delegate-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Composite._delegate-expanded"><a name="L51"></a><tt class="py-lineno">51</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L52"></a><tt class="py-lineno">52</tt> <tt class="py-line"><tt class="py-docstring"> Apply a function to all child components by function name.</tt> </tt>
|
||||
<a name="L53"></a><tt class="py-lineno">53</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L54"></a><tt class="py-lineno">54</tt> <tt class="py-line"><tt class="py-docstring"> @param func_name: The name of the function to call with all child components.</tt> </tt>
|
||||
<a name="L55"></a><tt class="py-lineno">55</tt> <tt class="py-line"><tt class="py-docstring"> @type func_name: str</tt> </tt>
|
||||
<a name="L56"></a><tt class="py-lineno">56</tt> <tt class="py-line"><tt class="py-docstring"> @raise AttributeError: If a child component does not have a callable function with the given name.</tt> </tt>
|
||||
<a name="L57"></a><tt class="py-lineno">57</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L58"></a><tt class="py-lineno">58</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">component</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">components</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L59"></a><tt class="py-lineno">59</tt> <tt class="py-line"> <tt class="py-name">attribute</tt> <tt class="py-op">=</tt> <tt class="py-name">getattr</tt><tt class="py-op">(</tt><tt class="py-name">component</tt><tt class="py-op">,</tt> <tt class="py-name">func_name</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L60"></a><tt class="py-lineno">60</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">callable</tt><tt class="py-op">(</tt><tt class="py-name">attribute</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L61"></a><tt class="py-lineno">61</tt> <tt class="py-line"> <tt class="py-name">attribute</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L62"></a><tt class="py-lineno">62</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L63"></a><tt class="py-lineno">63</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">AttributeError</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
</div><a name="L64"></a><tt class="py-lineno">64</tt> <tt class="py-line"> </tt>
|
||||
<a name="Composite.__getattr__"></a><div id="Composite.__getattr__-def"><a name="L65"></a><tt class="py-lineno">65</tt> <a class="py-toggle" href="#" id="Composite.__getattr__-toggle" onclick="return toggle('Composite.__getattr__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.structural.composite.Composite-class.html#__getattr__">__getattr__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">item</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Composite.__getattr__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Composite.__getattr__-expanded"><a name="L66"></a><tt class="py-lineno">66</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L67"></a><tt class="py-lineno">67</tt> <tt class="py-line"><tt class="py-docstring"> Override getattr to delegate all function calls to children.</tt> </tt>
|
||||
<a name="L68"></a><tt class="py-lineno">68</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L69"></a><tt class="py-lineno">69</tt> <tt class="py-line"><tt class="py-docstring"> @param item: The function to call with this composites children components.</tt> </tt>
|
||||
<a name="L70"></a><tt class="py-lineno">70</tt> <tt class="py-line"><tt class="py-docstring"> @type item: str</tt> </tt>
|
||||
<a name="L71"></a><tt class="py-lineno">71</tt> <tt class="py-line"><tt class="py-docstring"> @return: A function that when called will call all child functions with the given function name.</tt> </tt>
|
||||
<a name="L72"></a><tt class="py-lineno">72</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L73"></a><tt class="py-lineno">73</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-keyword">lambda</tt><tt class="py-op">:</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-0" class="py-name" targets="Method pypat.structural.composite.Composite._delegate()=pypat.structural.composite.Composite-class.html#_delegate"><a title="pypat.structural.composite.Composite._delegate" class="py-name" href="#" onclick="return doclink('link-0', '_delegate', 'link-0');">_delegate</a></tt><tt class="py-op">(</tt><tt class="py-name">item</tt><tt class="py-op">)</tt> </tt>
|
||||
</div></div><a name="L74"></a><tt class="py-lineno">74</tt> <tt class="py-line"> </tt><script type="text/javascript">
|
||||
<!--
|
||||
expandto(location.href);
|
||||
// -->
|
||||
</script>
|
||||
</pre>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
430
html/pypat.structural.composite.Composite-class.html
vendored
Normal file
430
html/pypat.structural.composite.Composite-class.html
vendored
Normal file
@@ -0,0 +1,430 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.structural.composite.Composite</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.structural-module.html">Package structural</a> ::
|
||||
<a href="pypat.structural.composite-module.html">Module composite</a> ::
|
||||
Class Composite
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.structural.composite.Composite-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Class Composite</h1><p class="nomargin-top"><span class="codelink"><a href="pypat.structural.composite-pysrc.html#Composite">source code</a></span></p>
|
||||
<pre class="base-tree">
|
||||
object --+
|
||||
|
|
||||
<strong class="uidshort">Composite</strong>
|
||||
</pre>
|
||||
|
||||
<hr />
|
||||
<pre class="literalblock">
|
||||
|
||||
Composite class as part of the Composite pattern.
|
||||
|
||||
- External Usage Documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Structural-Pattern-Usage}
|
||||
- External Composite Pattern documentation: U{https://en.wikipedia.org/wiki/Composite_pattern}
|
||||
|
||||
</pre>
|
||||
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Instance Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-InstanceMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.structural.composite.Composite-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">interface</span>)</span><br />
|
||||
Initialize a new Composite instance.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.structural.composite-pysrc.html#Composite.__init__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.structural.composite.Composite-class.html#add_component" class="summary-sig-name">add_component</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">component</span>)</span><br />
|
||||
Add a component to this composite.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.structural.composite-pysrc.html#Composite.add_component">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.structural.composite.Composite-class.html#remove_component" class="summary-sig-name">remove_component</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">component</span>)</span><br />
|
||||
Remove a component from this composite.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.structural.composite-pysrc.html#Composite.remove_component">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="private">
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.structural.composite.Composite-class.html#_delegate" class="summary-sig-name" onclick="show_private();">_delegate</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">func_name</span>)</span><br />
|
||||
Apply a function to all child components by function name.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.structural.composite-pysrc.html#Composite._delegate">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.structural.composite.Composite-class.html#__getattr__" class="summary-sig-name">__getattr__</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">item</span>)</span><br />
|
||||
Override getattr to delegate all function calls to children.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.structural.composite-pysrc.html#Composite.__getattr__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__delattr__</code>,
|
||||
<code>__format__</code>,
|
||||
<code>__getattribute__</code>,
|
||||
<code>__hash__</code>,
|
||||
<code>__new__</code>,
|
||||
<code>__reduce__</code>,
|
||||
<code>__reduce_ex__</code>,
|
||||
<code>__repr__</code>,
|
||||
<code>__setattr__</code>,
|
||||
<code>__sizeof__</code>,
|
||||
<code>__str__</code>,
|
||||
<code>__subclasshook__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== PROPERTIES ==================== -->
|
||||
<a name="section-Properties"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Properties</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Properties"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__class__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== METHOD DETAILS ==================== -->
|
||||
<a name="section-MethodDetails"></a>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Method Details</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-MethodDetails"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="__init__"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">interface</span>)</span>
|
||||
<br /><em class="fname">(Constructor)</em>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.structural.composite-pysrc.html#Composite.__init__">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Initialize a new Composite instance.</p>
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>interface</code></strong> (class) - The interface the all child components must adhere to when added
|
||||
to this composite.</li>
|
||||
</ul></dd>
|
||||
<dt>Overrides:
|
||||
object.__init__
|
||||
</dt>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="add_component"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">add_component</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">component</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.structural.composite-pysrc.html#Composite.add_component">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Add a component to this composite.</p>
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>component</code></strong> - The component to add to this Composite</li>
|
||||
</ul></dd>
|
||||
<dt>Raises:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><code><strong class='fraise'>AttributeError</strong></code> - If the component does not adhere to this Composites interface.</li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="remove_component"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">remove_component</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">component</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.structural.composite-pysrc.html#Composite.remove_component">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Remove a component from this composite.</p>
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>component</code></strong> - The component to remove from this Composite.</li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="_delegate"></a>
|
||||
<div class="private">
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">_delegate</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">func_name</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.structural.composite-pysrc.html#Composite._delegate">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Apply a function to all child components by function name.</p>
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>func_name</code></strong> (str) - The name of the function to call with all child components.</li>
|
||||
</ul></dd>
|
||||
<dt>Raises:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><code><strong class='fraise'>AttributeError</strong></code> - If a child component does not have a callable function with the
|
||||
given name.</li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="__getattr__"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">__getattr__</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">item</span>)</span>
|
||||
<br /><em class="fname">(Qualification operator)</em>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.structural.composite-pysrc.html#Composite.__getattr__">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Override getattr to delegate all function calls to children.</p>
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>item</code></strong> (str) - The function to call with this composites children components.</li>
|
||||
</ul></dd>
|
||||
<dt>Returns:</dt>
|
||||
<dd>A function that when called will call all child functions with
|
||||
the given function name.</dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
155
html/pypat.structural.decorator-module.html
vendored
Normal file
155
html/pypat.structural.decorator-module.html
vendored
Normal file
@@ -0,0 +1,155 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.structural.decorator</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.structural-module.html">Package structural</a> ::
|
||||
Module decorator
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.structural.decorator-module.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== MODULE DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Module decorator</h1><p class="nomargin-top"><span class="codelink"><a href="pypat.structural.decorator-pysrc.html">source code</a></span></p>
|
||||
<!-- ==================== CLASSES ==================== -->
|
||||
<a name="section-Classes"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Classes</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Classes"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="pypat.structural.decorator.Decorator-class.html" class="summary-name">Decorator</a><br />
|
||||
Base Decorator class that all decorator classes inherit from.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="pypat.structural.decorator.DecoratorSimple-class.html" class="summary-name">DecoratorSimple</a><br />
|
||||
A Base Decorator class for decorators with no arguments.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="pypat.structural.decorator.DecoratorComplex-class.html" class="summary-name">DecoratorComplex</a><br />
|
||||
A Base Decorator class for decorators with arguments.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="pypat.structural.decorator.CallWrapper-class.html" class="summary-name">CallWrapper</a><br />
|
||||
A Decorator for wrapping DecoratorComplex __call__ methods.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
203
html/pypat.structural.decorator-pysrc.html
vendored
Normal file
203
html/pypat.structural.decorator-pysrc.html
vendored
Normal file
@@ -0,0 +1,203 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.structural.decorator</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.structural-module.html">Package structural</a> ::
|
||||
Module decorator
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.structural.decorator-pysrc.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h1 class="epydoc">Source Code for <a href="pypat.structural.decorator-module.html">Module pypat.structural.decorator</a></h1>
|
||||
<pre class="py-src">
|
||||
<a name="L1"></a><tt class="py-lineno"> 1</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">functools</tt> <tt class="py-keyword">import</tt> <tt class="py-name">partial</tt> </tt>
|
||||
<a name="L2"></a><tt class="py-lineno"> 2</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">abc</tt> <tt class="py-keyword">import</tt> <tt class="py-name">ABCMeta</tt><tt class="py-op">,</tt> <tt class="py-name">abstractmethod</tt> </tt>
|
||||
<a name="Decorator"></a><div id="Decorator-def"><a name="L3"></a><tt class="py-lineno"> 3</tt> <tt class="py-line"> </tt>
|
||||
<a name="L4"></a><tt class="py-lineno"> 4</tt> <tt class="py-line"> </tt>
|
||||
<a name="L5"></a><tt class="py-lineno"> 5</tt> <a class="py-toggle" href="#" id="Decorator-toggle" onclick="return toggle('Decorator');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pypat.structural.decorator.Decorator-class.html">Decorator</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">,</tt> <tt class="py-base-class">metaclass</tt><tt class="py-op">=</tt><tt class="py-base-class">ABCMeta</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Decorator-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="Decorator-expanded"><a name="L6"></a><tt class="py-lineno"> 6</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L7"></a><tt class="py-lineno"> 7</tt> <tt class="py-line"><tt class="py-docstring"> Base Decorator class that all decorator classes inherit from.</tt> </tt>
|
||||
<a name="L8"></a><tt class="py-lineno"> 8</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L9"></a><tt class="py-lineno"> 9</tt> <tt class="py-line"><tt class="py-docstring"> - External Usage Documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Structural-Pattern-Usage}</tt> </tt>
|
||||
<a name="L10"></a><tt class="py-lineno">10</tt> <tt class="py-line"><tt class="py-docstring"> - External Decorator Pattern documentation: U{https://en.wikipedia.org/wiki/Decorator_pattern}</tt> </tt>
|
||||
<a name="L11"></a><tt class="py-lineno">11</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="Decorator.__get__"></a><div id="Decorator.__get__-def"><a name="L12"></a><tt class="py-lineno">12</tt> <a class="py-toggle" href="#" id="Decorator.__get__-toggle" onclick="return toggle('Decorator.__get__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.structural.decorator.Decorator-class.html#__get__">__get__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">instance</tt><tt class="py-op">,</tt> <tt class="py-param">owner</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Decorator.__get__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Decorator.__get__-expanded"><a name="L13"></a><tt class="py-lineno">13</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L14"></a><tt class="py-lineno">14</tt> <tt class="py-line"><tt class="py-docstring"> Override __get__ in order to get the instance of a bound of method call.</tt> </tt>
|
||||
<a name="L15"></a><tt class="py-lineno">15</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L16"></a><tt class="py-lineno">16</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">partial</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-0" class="py-name" targets="Method pypat.behavioral.null.Null.__call__()=pypat.behavioral.null.Null-class.html#__call__,Method pypat.creational.singleton.Singleton.__call__()=pypat.creational.singleton.Singleton-class.html#__call__,Method pypat.structural.decorator.CallWrapper.__call__()=pypat.structural.decorator.CallWrapper-class.html#__call__,Method pypat.structural.decorator.Decorator.__call__()=pypat.structural.decorator.Decorator-class.html#__call__,Method pypat.structural.decorator.DecoratorComplex.__call__()=pypat.structural.decorator.DecoratorComplex-class.html#__call__,Method pypat.structural.flyweight.FlyweightMeta.__call__()=pypat.structural.flyweight.FlyweightMeta-class.html#__call__"><a title="pypat.behavioral.null.Null.__call__
|
||||
pypat.creational.singleton.Singleton.__call__
|
||||
pypat.structural.decorator.CallWrapper.__call__
|
||||
pypat.structural.decorator.Decorator.__call__
|
||||
pypat.structural.decorator.DecoratorComplex.__call__
|
||||
pypat.structural.flyweight.FlyweightMeta.__call__" class="py-name" href="#" onclick="return doclink('link-0', '__call__', 'link-0');">__call__</a></tt><tt class="py-op">,</tt> <tt class="py-name">instance</tt><tt class="py-op">)</tt> </tt>
|
||||
</div><a name="L17"></a><tt class="py-lineno">17</tt> <tt class="py-line"> </tt>
|
||||
<a name="L18"></a><tt class="py-lineno">18</tt> <tt class="py-line"> <tt class="py-decorator">@</tt><tt class="py-decorator">abstractmethod</tt> </tt>
|
||||
<a name="Decorator.__call__"></a><div id="Decorator.__call__-def"><a name="L19"></a><tt class="py-lineno">19</tt> <a class="py-toggle" href="#" id="Decorator.__call__-toggle" onclick="return toggle('Decorator.__call__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.structural.decorator.Decorator-class.html#__call__">__call__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kwargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="Decorator.__call__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Decorator.__call__-expanded"><a name="L20"></a><tt class="py-lineno">20</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L21"></a><tt class="py-lineno">21</tt> <tt class="py-line"><tt class="py-docstring"> All decorators must implement a __call__ method.</tt> </tt>
|
||||
<a name="L22"></a><tt class="py-lineno">22</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L23"></a><tt class="py-lineno">23</tt> <tt class="py-line"> <tt class="py-keyword">pass</tt> </tt>
|
||||
</div></div><a name="L24"></a><tt class="py-lineno">24</tt> <tt class="py-line"> </tt>
|
||||
<a name="DecoratorSimple"></a><div id="DecoratorSimple-def"><a name="L25"></a><tt class="py-lineno">25</tt> <tt class="py-line"> </tt>
|
||||
<a name="L26"></a><tt class="py-lineno">26</tt> <a class="py-toggle" href="#" id="DecoratorSimple-toggle" onclick="return toggle('DecoratorSimple');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pypat.structural.decorator.DecoratorSimple-class.html">DecoratorSimple</a><tt class="py-op">(</tt><tt class="py-base-class">Decorator</tt><tt class="py-op">,</tt> <tt class="py-base-class">metaclass</tt><tt class="py-op">=</tt><tt class="py-base-class">ABCMeta</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="DecoratorSimple-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="DecoratorSimple-expanded"><a name="L27"></a><tt class="py-lineno">27</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L28"></a><tt class="py-lineno">28</tt> <tt class="py-line"><tt class="py-docstring"> A Base Decorator class for decorators with no arguments.</tt> </tt>
|
||||
<a name="L29"></a><tt class="py-lineno">29</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L30"></a><tt class="py-lineno">30</tt> <tt class="py-line"><tt class="py-docstring"> - External Usage Documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Structural-Pattern-Usage}</tt> </tt>
|
||||
<a name="L31"></a><tt class="py-lineno">31</tt> <tt class="py-line"><tt class="py-docstring"> - External Decorator Pattern documentation: U{https://en.wikipedia.org/wiki/Decorator_pattern}</tt> </tt>
|
||||
<a name="L32"></a><tt class="py-lineno">32</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="DecoratorSimple.__init__"></a><div id="DecoratorSimple.__init__-def"><a name="L33"></a><tt class="py-lineno">33</tt> <a class="py-toggle" href="#" id="DecoratorSimple.__init__-toggle" onclick="return toggle('DecoratorSimple.__init__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.structural.decorator.DecoratorSimple-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">func</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="DecoratorSimple.__init__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="DecoratorSimple.__init__-expanded"><a name="L34"></a><tt class="py-lineno">34</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L35"></a><tt class="py-lineno">35</tt> <tt class="py-line"><tt class="py-docstring"> Initialize a new DecoratorSimple instance.</tt> </tt>
|
||||
<a name="L36"></a><tt class="py-lineno">36</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L37"></a><tt class="py-lineno">37</tt> <tt class="py-line"><tt class="py-docstring"> @param func: The function being decorated.</tt> </tt>
|
||||
<a name="L38"></a><tt class="py-lineno">38</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L39"></a><tt class="py-lineno">39</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">func</tt> <tt class="py-op">=</tt> <tt class="py-name">func</tt> </tt>
|
||||
</div></div><a name="L40"></a><tt class="py-lineno">40</tt> <tt class="py-line"> </tt>
|
||||
<a name="DecoratorComplex"></a><div id="DecoratorComplex-def"><a name="L41"></a><tt class="py-lineno">41</tt> <tt class="py-line"> </tt>
|
||||
<a name="L42"></a><tt class="py-lineno">42</tt> <a class="py-toggle" href="#" id="DecoratorComplex-toggle" onclick="return toggle('DecoratorComplex');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pypat.structural.decorator.DecoratorComplex-class.html">DecoratorComplex</a><tt class="py-op">(</tt><tt class="py-base-class">Decorator</tt><tt class="py-op">,</tt> <tt class="py-base-class">metaclass</tt><tt class="py-op">=</tt><tt class="py-base-class">ABCMeta</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="DecoratorComplex-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="DecoratorComplex-expanded"><a name="L43"></a><tt class="py-lineno">43</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L44"></a><tt class="py-lineno">44</tt> <tt class="py-line"><tt class="py-docstring"> A Base Decorator class for decorators with arguments.</tt> </tt>
|
||||
<a name="L45"></a><tt class="py-lineno">45</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L46"></a><tt class="py-lineno">46</tt> <tt class="py-line"><tt class="py-docstring"> - External Usage Documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Structural-Pattern-Usage}</tt> </tt>
|
||||
<a name="L47"></a><tt class="py-lineno">47</tt> <tt class="py-line"><tt class="py-docstring"> - External Decorator Pattern documentation: U{https://en.wikipedia.org/wiki/Decorator_pattern}</tt> </tt>
|
||||
<a name="L48"></a><tt class="py-lineno">48</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L49"></a><tt class="py-lineno">49</tt> <tt class="py-line"> <tt class="py-decorator">@</tt><tt class="py-decorator">abstractmethod</tt> </tt>
|
||||
<a name="DecoratorComplex.__init__"></a><div id="DecoratorComplex.__init__-def"><a name="L50"></a><tt class="py-lineno">50</tt> <a class="py-toggle" href="#" id="DecoratorComplex.__init__-toggle" onclick="return toggle('DecoratorComplex.__init__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.structural.decorator.DecoratorComplex-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kwargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="DecoratorComplex.__init__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="DecoratorComplex.__init__-expanded"><a name="L51"></a><tt class="py-lineno">51</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L52"></a><tt class="py-lineno">52</tt> <tt class="py-line"><tt class="py-docstring"> Initialize a new DecoratorComplex instance.</tt> </tt>
|
||||
<a name="L53"></a><tt class="py-lineno">53</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L54"></a><tt class="py-lineno">54</tt> <tt class="py-line"><tt class="py-docstring"> @param args: Args for the decorator.</tt> </tt>
|
||||
<a name="L55"></a><tt class="py-lineno">55</tt> <tt class="py-line"><tt class="py-docstring"> @param kwargs: Keyword args for the decorator.</tt> </tt>
|
||||
<a name="L56"></a><tt class="py-lineno">56</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L57"></a><tt class="py-lineno">57</tt> <tt class="py-line"> <tt class="py-keyword">pass</tt> </tt>
|
||||
</div><a name="L58"></a><tt class="py-lineno">58</tt> <tt class="py-line"> </tt>
|
||||
<a name="L59"></a><tt class="py-lineno">59</tt> <tt class="py-line"> <tt class="py-decorator">@</tt><tt class="py-decorator">abstractmethod</tt> </tt>
|
||||
<a name="DecoratorComplex.__call__"></a><div id="DecoratorComplex.__call__-def"><a name="L60"></a><tt class="py-lineno">60</tt> <a class="py-toggle" href="#" id="DecoratorComplex.__call__-toggle" onclick="return toggle('DecoratorComplex.__call__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.structural.decorator.DecoratorComplex-class.html#__call__">__call__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">func</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kwargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="DecoratorComplex.__call__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="DecoratorComplex.__call__-expanded"><a name="L61"></a><tt class="py-lineno">61</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L62"></a><tt class="py-lineno">62</tt> <tt class="py-line"><tt class="py-docstring"> Concrete DecoratorComplex instances must override the __call__ method.</tt> </tt>
|
||||
<a name="L63"></a><tt class="py-lineno">63</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L64"></a><tt class="py-lineno">64</tt> <tt class="py-line"><tt class="py-docstring"> @param func: The function being decorated.</tt> </tt>
|
||||
<a name="L65"></a><tt class="py-lineno">65</tt> <tt class="py-line"><tt class="py-docstring"> @param args: Arguments for the decorated function.</tt> </tt>
|
||||
<a name="L66"></a><tt class="py-lineno">66</tt> <tt class="py-line"><tt class="py-docstring"> @param kwargs: Keyword arguments for the decorated function.</tt> </tt>
|
||||
<a name="L67"></a><tt class="py-lineno">67</tt> <tt class="py-line"><tt class="py-docstring"> @return:</tt> </tt>
|
||||
<a name="L68"></a><tt class="py-lineno">68</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L69"></a><tt class="py-lineno">69</tt> <tt class="py-line"> <tt class="py-keyword">pass</tt> </tt>
|
||||
</div></div><a name="L70"></a><tt class="py-lineno">70</tt> <tt class="py-line"> </tt>
|
||||
<a name="CallWrapper"></a><div id="CallWrapper-def"><a name="L71"></a><tt class="py-lineno">71</tt> <tt class="py-line"> </tt>
|
||||
<a name="L72"></a><tt class="py-lineno">72</tt> <a class="py-toggle" href="#" id="CallWrapper-toggle" onclick="return toggle('CallWrapper');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pypat.structural.decorator.CallWrapper-class.html">CallWrapper</a><tt class="py-op">(</tt><tt class="py-base-class">DecoratorSimple</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="CallWrapper-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="CallWrapper-expanded"><a name="L73"></a><tt class="py-lineno">73</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L74"></a><tt class="py-lineno">74</tt> <tt class="py-line"><tt class="py-docstring"> A Decorator for wrapping DecoratorComplex __call__ methods.</tt> </tt>
|
||||
<a name="L75"></a><tt class="py-lineno">75</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L76"></a><tt class="py-lineno">76</tt> <tt class="py-line"><tt class="py-docstring"> - External Usage Documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Structural-Pattern-Usage}</tt> </tt>
|
||||
<a name="L77"></a><tt class="py-lineno">77</tt> <tt class="py-line"><tt class="py-docstring"> - External Decorator Pattern documentation: U{https://en.wikipedia.org/wiki/Decorator_pattern}</tt> </tt>
|
||||
<a name="L78"></a><tt class="py-lineno">78</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="CallWrapper.__call__"></a><div id="CallWrapper.__call__-def"><a name="L79"></a><tt class="py-lineno">79</tt> <a class="py-toggle" href="#" id="CallWrapper.__call__-toggle" onclick="return toggle('CallWrapper.__call__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.structural.decorator.CallWrapper-class.html#__call__">__call__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">instance</tt><tt class="py-op">,</tt> <tt class="py-param">func</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="CallWrapper.__call__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="CallWrapper.__call__-expanded"><a name="L80"></a><tt class="py-lineno">80</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L81"></a><tt class="py-lineno">81</tt> <tt class="py-line"><tt class="py-docstring"> Wrap a concrete DecoratorComplex __call__ method.</tt> </tt>
|
||||
<a name="L82"></a><tt class="py-lineno">82</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L83"></a><tt class="py-lineno">83</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">wrapped</tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-param">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kwargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L84"></a><tt class="py-lineno">84</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">func</tt><tt class="py-op">(</tt><tt class="py-name">instance</tt><tt class="py-op">,</tt> <tt class="py-name">func</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-name">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">kwargs</tt><tt class="py-op">)</tt> </tt>
|
||||
</div><a name="L85"></a><tt class="py-lineno">85</tt> <tt class="py-line"> </tt>
|
||||
<a name="L86"></a><tt class="py-lineno">86</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">wrapped</tt> </tt>
|
||||
</div></div><a name="L87"></a><tt class="py-lineno">87</tt> <tt class="py-line"> </tt><script type="text/javascript">
|
||||
<!--
|
||||
expandto(location.href);
|
||||
// -->
|
||||
</script>
|
||||
</pre>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
166
html/pypat.structural.decorator.CallWrapper-class.html
vendored
Normal file
166
html/pypat.structural.decorator.CallWrapper-class.html
vendored
Normal file
@@ -0,0 +1,166 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.structural.decorator.CallWrapper</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.structural-module.html">Package structural</a> ::
|
||||
<a href="pypat.structural.decorator-module.html">Module decorator</a> ::
|
||||
Class CallWrapper
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.structural.decorator.CallWrapper-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Class CallWrapper</h1><p class="nomargin-top"><span class="codelink"><a href="pypat.structural.decorator-pysrc.html#CallWrapper">source code</a></span></p>
|
||||
<pre class="base-tree">
|
||||
<a href="pypat.structural.decorator.DecoratorSimple-class.html">DecoratorSimple</a> --+
|
||||
|
|
||||
<strong class="uidshort">CallWrapper</strong>
|
||||
</pre>
|
||||
|
||||
<hr />
|
||||
<pre class="literalblock">
|
||||
|
||||
A Decorator for wrapping DecoratorComplex __call__ methods.
|
||||
|
||||
- External Usage Documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Structural-Pattern-Usage}
|
||||
- External Decorator Pattern documentation: U{https://en.wikipedia.org/wiki/Decorator_pattern}
|
||||
|
||||
</pre>
|
||||
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Instance Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-InstanceMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="__call__"></a><span class="summary-sig-name">__call__</span>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">instance</span>,
|
||||
<span class="summary-sig-arg">func</span>)</span><br />
|
||||
Wrap a concrete DecoratorComplex __call__ method.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.structural.decorator-pysrc.html#CallWrapper.__call__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="pypat.structural.decorator.DecoratorSimple-class.html">DecoratorSimple</a></code></b>:
|
||||
<code><a href="pypat.structural.decorator.DecoratorSimple-class.html#__init__">__init__</a></code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
217
html/pypat.structural.decorator.Decorator-class.html
vendored
Normal file
217
html/pypat.structural.decorator.Decorator-class.html
vendored
Normal file
@@ -0,0 +1,217 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.structural.decorator.Decorator</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.structural-module.html">Package structural</a> ::
|
||||
<a href="pypat.structural.decorator-module.html">Module decorator</a> ::
|
||||
Class Decorator
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.structural.decorator.Decorator-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Class Decorator</h1><p class="nomargin-top"><span class="codelink"><a href="pypat.structural.decorator-pysrc.html#Decorator">source code</a></span></p>
|
||||
<pre class="literalblock">
|
||||
|
||||
Base Decorator class that all decorator classes inherit from.
|
||||
|
||||
- External Usage Documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Structural-Pattern-Usage}
|
||||
- External Decorator Pattern documentation: U{https://en.wikipedia.org/wiki/Decorator_pattern}
|
||||
|
||||
</pre>
|
||||
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Instance Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-InstanceMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="__get__"></a><span class="summary-sig-name">__get__</span>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">instance</span>,
|
||||
<span class="summary-sig-arg">owner</span>)</span><br />
|
||||
Override __get__ in order to get the instance of a bound of method
|
||||
call.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.structural.decorator-pysrc.html#Decorator.__get__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.structural.decorator.Decorator-class.html#__call__" class="summary-sig-name">__call__</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">*args</span>,
|
||||
<span class="summary-sig-arg">**kwargs</span>)</span><br />
|
||||
All decorators must implement a __call__ method.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.structural.decorator-pysrc.html#Decorator.__call__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== METHOD DETAILS ==================== -->
|
||||
<a name="section-MethodDetails"></a>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Method Details</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-MethodDetails"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="__call__"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">__call__</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">*args</span>,
|
||||
<span class="sig-arg">**kwargs</span>)</span>
|
||||
<br /><em class="fname">(Call operator)</em>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.structural.decorator-pysrc.html#Decorator.__call__">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>All decorators must implement a __call__ method.</p>
|
||||
<dl class="fields">
|
||||
<dt>Decorators:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><code>@abstractmethod</code></li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
257
html/pypat.structural.decorator.DecoratorComplex-class.html
vendored
Normal file
257
html/pypat.structural.decorator.DecoratorComplex-class.html
vendored
Normal file
@@ -0,0 +1,257 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.structural.decorator.DecoratorComplex</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.structural-module.html">Package structural</a> ::
|
||||
<a href="pypat.structural.decorator-module.html">Module decorator</a> ::
|
||||
Class DecoratorComplex
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.structural.decorator.DecoratorComplex-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Class DecoratorComplex</h1><p class="nomargin-top"><span class="codelink"><a href="pypat.structural.decorator-pysrc.html#DecoratorComplex">source code</a></span></p>
|
||||
<pre class="literalblock">
|
||||
|
||||
A Base Decorator class for decorators with arguments.
|
||||
|
||||
- External Usage Documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Structural-Pattern-Usage}
|
||||
- External Decorator Pattern documentation: U{https://en.wikipedia.org/wiki/Decorator_pattern}
|
||||
|
||||
</pre>
|
||||
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Instance Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-InstanceMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.structural.decorator.DecoratorComplex-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">*args</span>,
|
||||
<span class="summary-sig-arg">**kwargs</span>)</span><br />
|
||||
Initialize a new DecoratorComplex instance.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.structural.decorator-pysrc.html#DecoratorComplex.__init__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.structural.decorator.DecoratorComplex-class.html#__call__" class="summary-sig-name">__call__</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">func</span>,
|
||||
<span class="summary-sig-arg">*args</span>,
|
||||
<span class="summary-sig-arg">**kwargs</span>)</span><br />
|
||||
Concrete DecoratorComplex instances must override the __call__
|
||||
method.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.structural.decorator-pysrc.html#DecoratorComplex.__call__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== METHOD DETAILS ==================== -->
|
||||
<a name="section-MethodDetails"></a>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Method Details</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-MethodDetails"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="__init__"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">*args</span>,
|
||||
<span class="sig-arg">**kwargs</span>)</span>
|
||||
<br /><em class="fname">(Constructor)</em>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.structural.decorator-pysrc.html#DecoratorComplex.__init__">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Initialize a new DecoratorComplex instance.</p>
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>args</code></strong> - Args for the decorator.</li>
|
||||
<li><strong class="pname"><code>kwargs</code></strong> - Keyword args for the decorator.</li>
|
||||
</ul></dd>
|
||||
<dt>Decorators:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><code>@abstractmethod</code></li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="__call__"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">__call__</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">func</span>,
|
||||
<span class="sig-arg">*args</span>,
|
||||
<span class="sig-arg">**kwargs</span>)</span>
|
||||
<br /><em class="fname">(Call operator)</em>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.structural.decorator-pysrc.html#DecoratorComplex.__call__">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Concrete DecoratorComplex instances must override the __call__
|
||||
method.</p>
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>func</code></strong> - The function being decorated.</li>
|
||||
<li><strong class="pname"><code>args</code></strong> - Arguments for the decorated function.</li>
|
||||
<li><strong class="pname"><code>kwargs</code></strong> - Keyword arguments for the decorated function.</li>
|
||||
</ul></dd>
|
||||
<dt>Decorators:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><code>@abstractmethod</code></li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
195
html/pypat.structural.decorator.DecoratorSimple-class.html
vendored
Normal file
195
html/pypat.structural.decorator.DecoratorSimple-class.html
vendored
Normal file
@@ -0,0 +1,195 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.structural.decorator.DecoratorSimple</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.structural-module.html">Package structural</a> ::
|
||||
<a href="pypat.structural.decorator-module.html">Module decorator</a> ::
|
||||
Class DecoratorSimple
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.structural.decorator.DecoratorSimple-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Class DecoratorSimple</h1><p class="nomargin-top"><span class="codelink"><a href="pypat.structural.decorator-pysrc.html#DecoratorSimple">source code</a></span></p>
|
||||
<pre class="literalblock">
|
||||
|
||||
A Base Decorator class for decorators with no arguments.
|
||||
|
||||
- External Usage Documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Structural-Pattern-Usage}
|
||||
- External Decorator Pattern documentation: U{https://en.wikipedia.org/wiki/Decorator_pattern}
|
||||
|
||||
</pre>
|
||||
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Instance Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-InstanceMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.structural.decorator.DecoratorSimple-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">func</span>)</span><br />
|
||||
Initialize a new DecoratorSimple instance.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.structural.decorator-pysrc.html#DecoratorSimple.__init__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== METHOD DETAILS ==================== -->
|
||||
<a name="section-MethodDetails"></a>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Method Details</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-MethodDetails"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="__init__"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">func</span>)</span>
|
||||
<br /><em class="fname">(Constructor)</em>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.structural.decorator-pysrc.html#DecoratorSimple.__init__">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Initialize a new DecoratorSimple instance.</p>
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>func</code></strong> - The function being decorated.</li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
156
html/pypat.structural.flyweight-module.html
vendored
Normal file
156
html/pypat.structural.flyweight-module.html
vendored
Normal file
@@ -0,0 +1,156 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.structural.flyweight</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.structural-module.html">Package structural</a> ::
|
||||
Module flyweight
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.structural.flyweight-module.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== MODULE DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Module flyweight</h1><p class="nomargin-top"><span class="codelink"><a href="pypat.structural.flyweight-pysrc.html">source code</a></span></p>
|
||||
<!-- ==================== CLASSES ==================== -->
|
||||
<a name="section-Classes"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Classes</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Classes"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="pypat.structural.flyweight.FlyweightMeta-class.html" class="summary-name">FlyweightMeta</a><br />
|
||||
Flyweight meta class as part of the Flyweight design pattern.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== VARIABLES ==================== -->
|
||||
<a name="section-Variables"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Variables</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Variables"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="__package__"></a><span class="summary-name">__package__</span> = <code title="None">None</code>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
165
html/pypat.structural.flyweight-pysrc.html
vendored
Normal file
165
html/pypat.structural.flyweight-pysrc.html
vendored
Normal file
@@ -0,0 +1,165 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.structural.flyweight</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.structural-module.html">Package structural</a> ::
|
||||
Module flyweight
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.structural.flyweight-pysrc.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h1 class="epydoc">Source Code for <a href="pypat.structural.flyweight-module.html">Module pypat.structural.flyweight</a></h1>
|
||||
<pre class="py-src">
|
||||
<a name="FlyweightMeta"></a><div id="FlyweightMeta-def"><a name="L1"></a><tt class="py-lineno"> 1</tt> <a class="py-toggle" href="#" id="FlyweightMeta-toggle" onclick="return toggle('FlyweightMeta');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pypat.structural.flyweight.FlyweightMeta-class.html">FlyweightMeta</a><tt class="py-op">(</tt><tt class="py-base-class">type</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="FlyweightMeta-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="FlyweightMeta-expanded"><a name="L2"></a><tt class="py-lineno"> 2</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L3"></a><tt class="py-lineno"> 3</tt> <tt class="py-line"><tt class="py-docstring"> Flyweight meta class as part of the Flyweight design pattern.</tt> </tt>
|
||||
<a name="L4"></a><tt class="py-lineno"> 4</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L5"></a><tt class="py-lineno"> 5</tt> <tt class="py-line"><tt class="py-docstring"> - External Usage Documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Structural-Pattern-Usage}</tt> </tt>
|
||||
<a name="L6"></a><tt class="py-lineno"> 6</tt> <tt class="py-line"><tt class="py-docstring"> - External Flyweight Pattern documentation: U{https://en.wikipedia.org/wiki/Flyweight_pattern}</tt> </tt>
|
||||
<a name="L7"></a><tt class="py-lineno"> 7</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="FlyweightMeta.__new__"></a><div id="FlyweightMeta.__new__-def"><a name="L8"></a><tt class="py-lineno"> 8</tt> <a class="py-toggle" href="#" id="FlyweightMeta.__new__-toggle" onclick="return toggle('FlyweightMeta.__new__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.structural.flyweight.FlyweightMeta-class.html#__new__">__new__</a><tt class="py-op">(</tt><tt class="py-param">mcs</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">,</tt> <tt class="py-param">bases</tt><tt class="py-op">,</tt> <tt class="py-param">attrs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="FlyweightMeta.__new__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="FlyweightMeta.__new__-expanded"><a name="L9"></a><tt class="py-lineno"> 9</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L10"></a><tt class="py-lineno">10</tt> <tt class="py-line"><tt class="py-docstring"> Override class construction to add 'pool' attribute to classes dict.</tt> </tt>
|
||||
<a name="L11"></a><tt class="py-lineno">11</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L12"></a><tt class="py-lineno">12</tt> <tt class="py-line"><tt class="py-docstring"> @param name: The name of the class.</tt> </tt>
|
||||
<a name="L13"></a><tt class="py-lineno">13</tt> <tt class="py-line"><tt class="py-docstring"> @param bases: Base classes of the class.</tt> </tt>
|
||||
<a name="L14"></a><tt class="py-lineno">14</tt> <tt class="py-line"><tt class="py-docstring"> @param attrs: Attributes of the class.</tt> </tt>
|
||||
<a name="L15"></a><tt class="py-lineno">15</tt> <tt class="py-line"><tt class="py-docstring"> @return: A new Class.</tt> </tt>
|
||||
<a name="L16"></a><tt class="py-lineno">16</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L17"></a><tt class="py-lineno">17</tt> <tt class="py-line"> <tt class="py-name">attrs</tt><tt class="py-op">[</tt><tt class="py-string">'pool'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L18"></a><tt class="py-lineno">18</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">super</tt><tt class="py-op">(</tt><tt id="link-0" class="py-name" targets="Class pypat.structural.flyweight.FlyweightMeta=pypat.structural.flyweight.FlyweightMeta-class.html"><a title="pypat.structural.flyweight.FlyweightMeta" class="py-name" href="#" onclick="return doclink('link-0', 'FlyweightMeta', 'link-0');">FlyweightMeta</a></tt><tt class="py-op">,</tt> <tt class="py-name">mcs</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-1" class="py-name" targets="Static Method pypat.structural.flyweight.FlyweightMeta.__new__()=pypat.structural.flyweight.FlyweightMeta-class.html#__new__"><a title="pypat.structural.flyweight.FlyweightMeta.__new__" class="py-name" href="#" onclick="return doclink('link-1', '__new__', 'link-1');">__new__</a></tt><tt class="py-op">(</tt><tt class="py-name">mcs</tt><tt class="py-op">,</tt> <tt class="py-name">name</tt><tt class="py-op">,</tt> <tt class="py-name">bases</tt><tt class="py-op">,</tt> <tt class="py-name">attrs</tt><tt class="py-op">)</tt> </tt>
|
||||
</div><a name="L19"></a><tt class="py-lineno">19</tt> <tt class="py-line"> </tt>
|
||||
<a name="L20"></a><tt class="py-lineno">20</tt> <tt class="py-line"> <tt class="py-decorator">@</tt><tt class="py-decorator">staticmethod</tt> </tt>
|
||||
<a name="FlyweightMeta._serialize"></a><div id="FlyweightMeta._serialize-def"><a name="L21"></a><tt class="py-lineno">21</tt> <a class="py-toggle" href="#" id="FlyweightMeta._serialize-toggle" onclick="return toggle('FlyweightMeta._serialize');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.structural.flyweight.FlyweightMeta-class.html#_serialize">_serialize</a><tt class="py-op">(</tt><tt class="py-param">cls</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kwargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="FlyweightMeta._serialize-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="FlyweightMeta._serialize-expanded"><a name="L22"></a><tt class="py-lineno">22</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L23"></a><tt class="py-lineno">23</tt> <tt class="py-line"><tt class="py-docstring"> Serialize arguments to a string representation.</tt> </tt>
|
||||
<a name="L24"></a><tt class="py-lineno">24</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L25"></a><tt class="py-lineno">25</tt> <tt class="py-line"> <tt class="py-name">serialized_args</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">arg</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">arg</tt> <tt class="py-keyword">in</tt> <tt class="py-name">args</tt><tt class="py-op">]</tt> </tt>
|
||||
<a name="L26"></a><tt class="py-lineno">26</tt> <tt class="py-line"> <tt class="py-name">serialized_kwargs</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">kwargs</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">cls</tt><tt class="py-op">.</tt><tt class="py-name">__name__</tt><tt class="py-op">]</tt> </tt>
|
||||
<a name="L27"></a><tt class="py-lineno">27</tt> <tt class="py-line"> </tt>
|
||||
<a name="L28"></a><tt class="py-lineno">28</tt> <tt class="py-line"> <tt class="py-name">serialized_args</tt><tt class="py-op">.</tt><tt class="py-name">extend</tt><tt class="py-op">(</tt><tt class="py-name">serialized_kwargs</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L29"></a><tt class="py-lineno">29</tt> <tt class="py-line"> </tt>
|
||||
<a name="L30"></a><tt class="py-lineno">30</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-string">''</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-name">serialized_args</tt><tt class="py-op">)</tt> </tt>
|
||||
</div><a name="L31"></a><tt class="py-lineno">31</tt> <tt class="py-line"> </tt>
|
||||
<a name="FlyweightMeta.__call__"></a><div id="FlyweightMeta.__call__-def"><a name="L32"></a><tt class="py-lineno">32</tt> <a class="py-toggle" href="#" id="FlyweightMeta.__call__-toggle" onclick="return toggle('FlyweightMeta.__call__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="pypat.structural.flyweight.FlyweightMeta-class.html#__call__">__call__</a><tt class="py-op">(</tt><tt class="py-param">cls</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kwargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
|
||||
</div><div id="FlyweightMeta.__call__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="FlyweightMeta.__call__-expanded"><a name="L33"></a><tt class="py-lineno">33</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
|
||||
<a name="L34"></a><tt class="py-lineno">34</tt> <tt class="py-line"><tt class="py-docstring"> Override call to use objects from a pool if identical parameters are used for object creation.</tt> </tt>
|
||||
<a name="L35"></a><tt class="py-lineno">35</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
|
||||
<a name="L36"></a><tt class="py-lineno">36</tt> <tt class="py-line"><tt class="py-docstring"> @param args: Arguments for class instantiation.</tt> </tt>
|
||||
<a name="L37"></a><tt class="py-lineno">37</tt> <tt class="py-line"><tt class="py-docstring"> @param kwargs: Keyword arguments for class instantiation.</tt> </tt>
|
||||
<a name="L38"></a><tt class="py-lineno">38</tt> <tt class="py-line"><tt class="py-docstring"> @return: A new instance of the class.</tt> </tt>
|
||||
<a name="L39"></a><tt class="py-lineno">39</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
|
||||
<a name="L40"></a><tt class="py-lineno">40</tt> <tt class="py-line"> <tt class="py-name">key</tt> <tt class="py-op">=</tt> <tt id="link-2" class="py-name"><a title="pypat.structural.flyweight.FlyweightMeta" class="py-name" href="#" onclick="return doclink('link-2', 'FlyweightMeta', 'link-0');">FlyweightMeta</a></tt><tt class="py-op">.</tt><tt id="link-3" class="py-name" targets="Static Method pypat.structural.flyweight.FlyweightMeta._serialize()=pypat.structural.flyweight.FlyweightMeta-class.html#_serialize"><a title="pypat.structural.flyweight.FlyweightMeta._serialize" class="py-name" href="#" onclick="return doclink('link-3', '_serialize', 'link-3');">_serialize</a></tt><tt class="py-op">(</tt><tt class="py-name">cls</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-name">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">kwargs</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L41"></a><tt class="py-lineno">41</tt> <tt class="py-line"> <tt id="link-4" class="py-name" targets="Module pypat.creational.pool=pypat.creational.pool-module.html"><a title="pypat.creational.pool" class="py-name" href="#" onclick="return doclink('link-4', 'pool', 'link-4');">pool</a></tt> <tt class="py-op">=</tt> <tt class="py-name">getattr</tt><tt class="py-op">(</tt><tt class="py-name">cls</tt><tt class="py-op">,</tt> <tt class="py-string">'pool'</tt><tt class="py-op">,</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L42"></a><tt class="py-lineno">42</tt> <tt class="py-line"> </tt>
|
||||
<a name="L43"></a><tt class="py-lineno">43</tt> <tt class="py-line"> <tt class="py-name">instance</tt> <tt class="py-op">=</tt> <tt id="link-5" class="py-name"><a title="pypat.creational.pool" class="py-name" href="#" onclick="return doclink('link-5', 'pool', 'link-4');">pool</a></tt><tt class="py-op">.</tt><tt class="py-name">get</tt><tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L44"></a><tt class="py-lineno">44</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">instance</tt><tt class="py-op">:</tt> </tt>
|
||||
<a name="L45"></a><tt class="py-lineno">45</tt> <tt class="py-line"> <tt class="py-name">instance</tt> <tt class="py-op">=</tt> <tt class="py-name">super</tt><tt class="py-op">(</tt><tt id="link-6" class="py-name"><a title="pypat.structural.flyweight.FlyweightMeta" class="py-name" href="#" onclick="return doclink('link-6', 'FlyweightMeta', 'link-0');">FlyweightMeta</a></tt><tt class="py-op">,</tt> <tt class="py-name">cls</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-7" class="py-name" targets="Method pypat.behavioral.null.Null.__call__()=pypat.behavioral.null.Null-class.html#__call__,Method pypat.creational.singleton.Singleton.__call__()=pypat.creational.singleton.Singleton-class.html#__call__,Method pypat.structural.decorator.CallWrapper.__call__()=pypat.structural.decorator.CallWrapper-class.html#__call__,Method pypat.structural.decorator.Decorator.__call__()=pypat.structural.decorator.Decorator-class.html#__call__,Method pypat.structural.decorator.DecoratorComplex.__call__()=pypat.structural.decorator.DecoratorComplex-class.html#__call__,Method pypat.structural.flyweight.FlyweightMeta.__call__()=pypat.structural.flyweight.FlyweightMeta-class.html#__call__"><a title="pypat.behavioral.null.Null.__call__
|
||||
pypat.creational.singleton.Singleton.__call__
|
||||
pypat.structural.decorator.CallWrapper.__call__
|
||||
pypat.structural.decorator.Decorator.__call__
|
||||
pypat.structural.decorator.DecoratorComplex.__call__
|
||||
pypat.structural.flyweight.FlyweightMeta.__call__" class="py-name" href="#" onclick="return doclink('link-7', '__call__', 'link-7');">__call__</a></tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">args</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">kwargs</tt><tt class="py-op">)</tt> </tt>
|
||||
<a name="L46"></a><tt class="py-lineno">46</tt> <tt class="py-line"> <tt id="link-8" class="py-name"><a title="pypat.creational.pool" class="py-name" href="#" onclick="return doclink('link-8', 'pool', 'link-4');">pool</a></tt><tt class="py-op">[</tt><tt class="py-name">key</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">instance</tt> </tt>
|
||||
<a name="L47"></a><tt class="py-lineno">47</tt> <tt class="py-line"> </tt>
|
||||
<a name="L48"></a><tt class="py-lineno">48</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">instance</tt> </tt>
|
||||
</div></div><a name="L49"></a><tt class="py-lineno">49</tt> <tt class="py-line"> </tt><script type="text/javascript">
|
||||
<!--
|
||||
expandto(location.href);
|
||||
// -->
|
||||
</script>
|
||||
</pre>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:56 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
373
html/pypat.structural.flyweight.FlyweightMeta-class.html
vendored
Normal file
373
html/pypat.structural.flyweight.FlyweightMeta-class.html
vendored
Normal file
@@ -0,0 +1,373 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat.structural.flyweight.FlyweightMeta</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pypat-module.html">Package pypat</a> ::
|
||||
<a href="pypat.structural-module.html">Package structural</a> ::
|
||||
<a href="pypat.structural.flyweight-module.html">Module flyweight</a> ::
|
||||
Class FlyweightMeta
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span></td></tr>
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pypat.structural.flyweight.FlyweightMeta-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== TYPE DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Type FlyweightMeta</h1><p class="nomargin-top"><span class="codelink"><a href="pypat.structural.flyweight-pysrc.html#FlyweightMeta">source code</a></span></p>
|
||||
<pre class="base-tree">
|
||||
object --+
|
||||
|
|
||||
type --+
|
||||
|
|
||||
<strong class="uidshort">FlyweightMeta</strong>
|
||||
</pre>
|
||||
|
||||
<hr />
|
||||
<pre class="literalblock">
|
||||
|
||||
Flyweight meta class as part of the Flyweight design pattern.
|
||||
|
||||
- External Usage Documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Structural-Pattern-Usage}
|
||||
- External Flyweight Pattern documentation: U{https://en.wikipedia.org/wiki/Flyweight_pattern}
|
||||
|
||||
</pre>
|
||||
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Instance Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-InstanceMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.structural.flyweight.FlyweightMeta-class.html#__call__" class="summary-sig-name">__call__</a>(<span class="summary-sig-arg">cls</span>,
|
||||
<span class="summary-sig-arg">*args</span>,
|
||||
<span class="summary-sig-arg">**kwargs</span>)</span><br />
|
||||
Override call to use objects from a pool if identical parameters are
|
||||
used for object creation.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.structural.flyweight-pysrc.html#FlyweightMeta.__call__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>type</code></b>:
|
||||
<code>__delattr__</code>,
|
||||
<code>__eq__</code>,
|
||||
<code>__ge__</code>,
|
||||
<code>__getattribute__</code>,
|
||||
<code>__gt__</code>,
|
||||
<code>__hash__</code>,
|
||||
<code>__init__</code>,
|
||||
<code>__instancecheck__</code>,
|
||||
<code>__le__</code>,
|
||||
<code>__lt__</code>,
|
||||
<code>__ne__</code>,
|
||||
<code>__repr__</code>,
|
||||
<code>__setattr__</code>,
|
||||
<code>__subclasscheck__</code>,
|
||||
<code>__subclasses__</code>,
|
||||
<code>mro</code>
|
||||
</p>
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__format__</code>,
|
||||
<code>__reduce__</code>,
|
||||
<code>__reduce_ex__</code>,
|
||||
<code>__sizeof__</code>,
|
||||
<code>__str__</code>,
|
||||
<code>__subclasshook__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== STATIC METHODS ==================== -->
|
||||
<a name="section-StaticMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Static Methods</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-StaticMethods"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type">a new object with type S, a subtype of T</span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pypat.structural.flyweight.FlyweightMeta-class.html#__new__" class="summary-sig-name">__new__</a>(<span class="summary-sig-arg">mcs</span>,
|
||||
<span class="summary-sig-arg">name</span>,
|
||||
<span class="summary-sig-arg">bases</span>,
|
||||
<span class="summary-sig-arg">attrs</span>)</span><br />
|
||||
Override class construction to add 'pool' attribute to classes dict.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.structural.flyweight-pysrc.html#FlyweightMeta.__new__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="private">
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="_serialize"></a><span class="summary-sig-name">_serialize</span>(<span class="summary-sig-arg">cls</span>,
|
||||
<span class="summary-sig-arg">*args</span>,
|
||||
<span class="summary-sig-arg">**kwargs</span>)</span><br />
|
||||
Serialize arguments to a string representation.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pypat.structural.flyweight-pysrc.html#FlyweightMeta._serialize">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== PROPERTIES ==================== -->
|
||||
<a name="section-Properties"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Properties</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-Properties"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="summary">
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>type</code></b>:
|
||||
<code>__abstractmethods__</code>,
|
||||
<code>__base__</code>,
|
||||
<code>__bases__</code>,
|
||||
<code>__basicsize__</code>,
|
||||
<code>__dictoffset__</code>,
|
||||
<code>__flags__</code>,
|
||||
<code>__itemsize__</code>,
|
||||
<code>__mro__</code>,
|
||||
<code>__name__</code>,
|
||||
<code>__weakrefoffset__</code>
|
||||
</p>
|
||||
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
|
||||
<code>__class__</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== METHOD DETAILS ==================== -->
|
||||
<a name="section-MethodDetails"></a>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td colspan="2" class="table-header">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="table-header">Method Details</span></td>
|
||||
<td align="right" valign="top"
|
||||
><span class="options">[<a href="#section-MethodDetails"
|
||||
class="privatelink" onclick="toggle_private();"
|
||||
>hide private</a>]</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="__new__"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">__new__</span>(<span class="sig-arg">mcs</span>,
|
||||
<span class="sig-arg">name</span>,
|
||||
<span class="sig-arg">bases</span>,
|
||||
<span class="sig-arg">attrs</span>)</span>
|
||||
<br /><em class="fname">Static Method</em>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.structural.flyweight-pysrc.html#FlyweightMeta.__new__">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Override class construction to add 'pool' attribute to classes
|
||||
dict.</p>
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>name</code></strong> - The name of the class.</li>
|
||||
<li><strong class="pname"><code>bases</code></strong> - Base classes of the class.</li>
|
||||
<li><strong class="pname"><code>attrs</code></strong> - Attributes of the class.</li>
|
||||
</ul></dd>
|
||||
<dt>Returns: a new object with type S, a subtype of T</dt>
|
||||
<dd>A new Class.</dd>
|
||||
<dt>Overrides:
|
||||
object.__new__
|
||||
</dt>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="__call__"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">__call__</span>(<span class="sig-arg">cls</span>,
|
||||
<span class="sig-arg">*args</span>,
|
||||
<span class="sig-arg">**kwargs</span>)</span>
|
||||
<br /><em class="fname">(Call operator)</em>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pypat.structural.flyweight-pysrc.html#FlyweightMeta.__call__">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Override call to use objects from a pool if identical parameters are
|
||||
used for object creation.</p>
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>args</code></strong> - Arguments for class instantiation.</li>
|
||||
<li><strong class="pname"><code>kwargs</code></strong> - Keyword arguments for class instantiation.</li>
|
||||
</ul></dd>
|
||||
<dt>Returns:</dt>
|
||||
<dd>A new instance of the class.</dd>
|
||||
<dt>Overrides:
|
||||
type.__call__
|
||||
</dt>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<th class="navbar" width="100%"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 17:28:55 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
38
html/redirect.html
vendored
Normal file
38
html/redirect.html
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
<html><head><title>Epydoc Redirect Page</title>
|
||||
<meta http-equiv="cache-control" content="no-cache" />
|
||||
<meta http-equiv="expires" content="0" />
|
||||
<meta http-equiv="pragma" content="no-cache" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
var pages = ["pypat.structural.decorator.DecoratorComplex-c", "pypat.structural.decorator.DecoratorSimple-c", "pypat.creational.factory.AbstractFactory-c", "pypat.structural.flyweight.FlyweightMeta-c", "pypat.structural.decorator.CallWrapper-c", "pypat.behavioral.observer.Observable-c", "pypat.creational.prototype.Prototype-c", "pypat.creational.singleton.Singleton-c", "pypat.structural.composite.Composite-c", "pypat.structural.decorator.Decorator-c", "pypat.behavioral.memento.Originator-c", "pypat.behavioral.iterator.Iterable-c", "pypat.behavioral.iterator.Iterator-c", "pypat.behavioral.mediator.Mediator-c", "pypat.behavioral.observer.Observer-c", "pypat.behavioral.command.Receiver-c", "pypat.creational.builder.Director-c", "pypat.behavioral.chain.ChainLink-c", "pypat.behavioral.command.Command-c", "pypat.behavioral.command.Invoker-c", "pypat.behavioral.memento.Memento-c", "pypat.behavioral.visitor.Visitee-c", "pypat.behavioral.visitor.Visitor-c", "pypat.creational.builder.Builder-c", "pypat.creational.factory.Factory-c", "pypat.structural.adapter.Adapter-c", "pypat.creational.pool.Reusable-c", "pypat.behavioral.chain.Chain-c", "pypat.creational.prototype-m", "pypat.creational.singleton-m", "pypat.structural.composite-m", "pypat.structural.decorator-m", "pypat.structural.flyweight-m", "pypat.behavioral.null.Null-c", "pypat.creational.pool.Pool-c", "pypat.behavioral.iterator-m", "pypat.behavioral.mediator-m", "pypat.behavioral.observer-m", "pypat.behavioral.command-m", "pypat.behavioral.memento-m", "pypat.behavioral.visitor-m", "pypat.creational.builder-m", "pypat.creational.factory-m", "pypat.structural.adapter-m", "pypat.behavioral.chain-m", "pypat.behavioral.null-m", "pypat.creational.pool-m", "pypat.behavioral-m", "pypat.creational-m", "pypat.structural-m", "pypat-m"];
|
||||
var dottedName = get_anchor();
|
||||
if (dottedName) {
|
||||
var target = redirect_url(dottedName);
|
||||
if (target) window.location.replace(target);
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
|
||||
<h3>Epydoc Auto-redirect page</h3>
|
||||
|
||||
<p>When javascript is enabled, this page will redirect URLs of
|
||||
the form <tt>redirect.html#<i>dotted.name</i></tt> to the
|
||||
documentation for the object with the given fully-qualified
|
||||
dotted name.</p>
|
||||
<p><a id="message"> </a></p>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
if (dottedName) {
|
||||
var msg = document.getElementById("message");
|
||||
msg.innerHTML = "No documentation found for <tt>"+
|
||||
dottedName+"</tt>";
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
73
html/toc-everything.html
vendored
Normal file
73
html/toc-everything.html
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Everything</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<h1 class="toc">Everything</h1>
|
||||
<hr />
|
||||
<h2 class="toc">All Classes</h2>
|
||||
<a target="mainFrame" href="pypat.behavioral.chain.Chain-class.html"
|
||||
>pypat.behavioral.chain.Chain</a><br /> <a target="mainFrame" href="pypat.behavioral.chain.ChainLink-class.html"
|
||||
>pypat.behavioral.chain.ChainLink</a><br /> <a target="mainFrame" href="pypat.behavioral.command.Command-class.html"
|
||||
>pypat.behavioral.command.Command</a><br /> <a target="mainFrame" href="pypat.behavioral.command.Invoker-class.html"
|
||||
>pypat.behavioral.command.Invoker</a><br /> <a target="mainFrame" href="pypat.behavioral.command.Receiver-class.html"
|
||||
>pypat.behavioral.command.Receiver</a><br /> <a target="mainFrame" href="pypat.behavioral.iterator.Iterable-class.html"
|
||||
>pypat.behavioral.iterator.Iterable</a><br /> <a target="mainFrame" href="pypat.behavioral.iterator.Iterator-class.html"
|
||||
>pypat.behavioral.iterator.Iterator</a><br /> <a target="mainFrame" href="pypat.behavioral.mediator.Mediator-class.html"
|
||||
>pypat.behavioral.mediator.Mediator</a><br /> <a target="mainFrame" href="pypat.behavioral.memento.Memento-class.html"
|
||||
>pypat.behavioral.memento.Memento</a><br /> <a target="mainFrame" href="pypat.behavioral.memento.Originator-class.html"
|
||||
>pypat.behavioral.memento.Originator</a><br /> <a target="mainFrame" href="pypat.behavioral.null.Null-class.html"
|
||||
>pypat.behavioral.null.Null</a><br /> <a target="mainFrame" href="pypat.behavioral.observer.Observable-class.html"
|
||||
>pypat.behavioral.observer.Observable</a><br /> <a target="mainFrame" href="pypat.behavioral.observer.Observer-class.html"
|
||||
>pypat.behavioral.observer.Observer</a><br /> <a target="mainFrame" href="pypat.behavioral.visitor.Visitee-class.html"
|
||||
>pypat.behavioral.visitor.Visitee</a><br /> <a target="mainFrame" href="pypat.behavioral.visitor.Visitor-class.html"
|
||||
>pypat.behavioral.visitor.Visitor</a><br /> <a target="mainFrame" href="pypat.creational.builder.Builder-class.html"
|
||||
>pypat.creational.builder.Builder</a><br /> <a target="mainFrame" href="pypat.creational.builder.Director-class.html"
|
||||
>pypat.creational.builder.Director</a><br /> <a target="mainFrame" href="pypat.creational.factory.AbstractFactory-class.html"
|
||||
>pypat.creational.factory.AbstractFactory</a><br /> <a target="mainFrame" href="pypat.creational.factory.Factory-class.html"
|
||||
>pypat.creational.factory.Factory</a><br /> <a target="mainFrame" href="pypat.creational.pool.Pool-class.html"
|
||||
>pypat.creational.pool.Pool</a><br /> <a target="mainFrame" href="pypat.creational.pool.Reusable-class.html"
|
||||
>pypat.creational.pool.Reusable</a><br /> <a target="mainFrame" href="pypat.creational.prototype.Prototype-class.html"
|
||||
>pypat.creational.prototype.Prototype</a><br /> <a target="mainFrame" href="pypat.creational.singleton.Singleton-class.html"
|
||||
>pypat.creational.singleton.Singleton</a><br /> <a target="mainFrame" href="pypat.structural.adapter.Adapter-class.html"
|
||||
>pypat.structural.adapter.Adapter</a><br /> <a target="mainFrame" href="pypat.structural.composite.Composite-class.html"
|
||||
>pypat.structural.composite.Composite</a><br /> <a target="mainFrame" href="pypat.structural.decorator.CallWrapper-class.html"
|
||||
>pypat.structural.decorator.CallWrapper</a><br /> <a target="mainFrame" href="pypat.structural.decorator.Decorator-class.html"
|
||||
>pypat.structural.decorator.Decorator</a><br /> <a target="mainFrame" href="pypat.structural.decorator.DecoratorComplex-class.html"
|
||||
>pypat.structural.decorator.DecoratorComplex</a><br /> <a target="mainFrame" href="pypat.structural.decorator.DecoratorSimple-class.html"
|
||||
>pypat.structural.decorator.DecoratorSimple</a><br /> <a target="mainFrame" href="pypat.structural.flyweight.FlyweightMeta-class.html"
|
||||
>pypat.structural.flyweight.FlyweightMeta</a><br /> <h2 class="toc">All Variables</h2>
|
||||
<a target="mainFrame" href="pypat-module.html#__package__"
|
||||
>pypat.__package__</a><br /> <a target="mainFrame" href="pypat.behavioral-module.html#__package__"
|
||||
>pypat.behavioral.__package__</a><br /> <a target="mainFrame" href="pypat.behavioral.mediator-module.html#__package__"
|
||||
>pypat.behavioral.mediator.__package__</a><br /> <a target="mainFrame" href="pypat.behavioral.memento-module.html#__package__"
|
||||
>pypat.behavioral.memento.__package__</a><br /> <a target="mainFrame" href="pypat.behavioral.null-module.html#__package__"
|
||||
>pypat.behavioral.null.__package__</a><br /> <a target="mainFrame" href="pypat.creational-module.html#__package__"
|
||||
>pypat.creational.__package__</a><br /> <a target="mainFrame" href="pypat.creational.prototype-module.html#__package__"
|
||||
>pypat.creational.prototype.__package__</a><br /> <a target="mainFrame" href="pypat.creational.singleton-module.html#__package__"
|
||||
>pypat.creational.singleton.__package__</a><br /> <a target="mainFrame" href="pypat.structural-module.html#__package__"
|
||||
>pypat.structural.__package__</a><br /> <a target="mainFrame" href="pypat.structural.adapter-module.html#__package__"
|
||||
>pypat.structural.adapter.__package__</a><br /> <a target="mainFrame" href="pypat.structural.composite-module.html#__package__"
|
||||
>pypat.structural.composite.__package__</a><br /> <a target="mainFrame" href="pypat.structural.flyweight-module.html#__package__"
|
||||
>pypat.structural.flyweight.__package__</a><br /><hr />
|
||||
<span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
31
html/toc-pypat-module.html
vendored
Normal file
31
html/toc-pypat-module.html
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pypat</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<h1 class="toc">Module pypat</h1>
|
||||
<hr />
|
||||
<h2 class="toc">Variables</h2>
|
||||
<a target="mainFrame" href="pypat-module.html#__package__"
|
||||
>__package__</a><br /><hr />
|
||||
<span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
31
html/toc-pypat.behavioral-module.html
vendored
Normal file
31
html/toc-pypat.behavioral-module.html
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>behavioral</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<h1 class="toc">Module behavioral</h1>
|
||||
<hr />
|
||||
<h2 class="toc">Variables</h2>
|
||||
<a target="mainFrame" href="pypat.behavioral-module.html#__package__"
|
||||
>__package__</a><br /><hr />
|
||||
<span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
32
html/toc-pypat.behavioral.chain-module.html
vendored
Normal file
32
html/toc-pypat.behavioral.chain-module.html
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>chain</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<h1 class="toc">Module chain</h1>
|
||||
<hr />
|
||||
<h2 class="toc">Classes</h2>
|
||||
<a target="mainFrame" href="pypat.behavioral.chain.Chain-class.html"
|
||||
>Chain</a><br /> <a target="mainFrame" href="pypat.behavioral.chain.ChainLink-class.html"
|
||||
>ChainLink</a><br /><hr />
|
||||
<span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
33
html/toc-pypat.behavioral.command-module.html
vendored
Normal file
33
html/toc-pypat.behavioral.command-module.html
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>command</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<h1 class="toc">Module command</h1>
|
||||
<hr />
|
||||
<h2 class="toc">Classes</h2>
|
||||
<a target="mainFrame" href="pypat.behavioral.command.Command-class.html"
|
||||
>Command</a><br /> <a target="mainFrame" href="pypat.behavioral.command.Invoker-class.html"
|
||||
>Invoker</a><br /> <a target="mainFrame" href="pypat.behavioral.command.Receiver-class.html"
|
||||
>Receiver</a><br /><hr />
|
||||
<span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
32
html/toc-pypat.behavioral.iterator-module.html
vendored
Normal file
32
html/toc-pypat.behavioral.iterator-module.html
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>iterator</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<h1 class="toc">Module iterator</h1>
|
||||
<hr />
|
||||
<h2 class="toc">Classes</h2>
|
||||
<a target="mainFrame" href="pypat.behavioral.iterator.Iterable-class.html"
|
||||
>Iterable</a><br /> <a target="mainFrame" href="pypat.behavioral.iterator.Iterator-class.html"
|
||||
>Iterator</a><br /><hr />
|
||||
<span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
33
html/toc-pypat.behavioral.mediator-module.html
vendored
Normal file
33
html/toc-pypat.behavioral.mediator-module.html
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>mediator</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<h1 class="toc">Module mediator</h1>
|
||||
<hr />
|
||||
<h2 class="toc">Classes</h2>
|
||||
<a target="mainFrame" href="pypat.behavioral.mediator.Mediator-class.html"
|
||||
>Mediator</a><br /> <h2 class="toc">Variables</h2>
|
||||
<a target="mainFrame" href="pypat.behavioral.mediator-module.html#__package__"
|
||||
>__package__</a><br /><hr />
|
||||
<span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
34
html/toc-pypat.behavioral.memento-module.html
vendored
Normal file
34
html/toc-pypat.behavioral.memento-module.html
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>memento</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<h1 class="toc">Module memento</h1>
|
||||
<hr />
|
||||
<h2 class="toc">Classes</h2>
|
||||
<a target="mainFrame" href="pypat.behavioral.memento.Memento-class.html"
|
||||
>Memento</a><br /> <a target="mainFrame" href="pypat.behavioral.memento.Originator-class.html"
|
||||
>Originator</a><br /> <h2 class="toc">Variables</h2>
|
||||
<a target="mainFrame" href="pypat.behavioral.memento-module.html#__package__"
|
||||
>__package__</a><br /><hr />
|
||||
<span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
33
html/toc-pypat.behavioral.null-module.html
vendored
Normal file
33
html/toc-pypat.behavioral.null-module.html
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>null</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<h1 class="toc">Module null</h1>
|
||||
<hr />
|
||||
<h2 class="toc">Classes</h2>
|
||||
<a target="mainFrame" href="pypat.behavioral.null.Null-class.html"
|
||||
>Null</a><br /> <h2 class="toc">Variables</h2>
|
||||
<a target="mainFrame" href="pypat.behavioral.null-module.html#__package__"
|
||||
>__package__</a><br /><hr />
|
||||
<span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
32
html/toc-pypat.behavioral.observer-module.html
vendored
Normal file
32
html/toc-pypat.behavioral.observer-module.html
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>observer</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<h1 class="toc">Module observer</h1>
|
||||
<hr />
|
||||
<h2 class="toc">Classes</h2>
|
||||
<a target="mainFrame" href="pypat.behavioral.observer.Observable-class.html"
|
||||
>Observable</a><br /> <a target="mainFrame" href="pypat.behavioral.observer.Observer-class.html"
|
||||
>Observer</a><br /><hr />
|
||||
<span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
32
html/toc-pypat.behavioral.visitor-module.html
vendored
Normal file
32
html/toc-pypat.behavioral.visitor-module.html
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>visitor</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<h1 class="toc">Module visitor</h1>
|
||||
<hr />
|
||||
<h2 class="toc">Classes</h2>
|
||||
<a target="mainFrame" href="pypat.behavioral.visitor.Visitee-class.html"
|
||||
>Visitee</a><br /> <a target="mainFrame" href="pypat.behavioral.visitor.Visitor-class.html"
|
||||
>Visitor</a><br /><hr />
|
||||
<span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
31
html/toc-pypat.creational-module.html
vendored
Normal file
31
html/toc-pypat.creational-module.html
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>creational</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<h1 class="toc">Module creational</h1>
|
||||
<hr />
|
||||
<h2 class="toc">Variables</h2>
|
||||
<a target="mainFrame" href="pypat.creational-module.html#__package__"
|
||||
>__package__</a><br /><hr />
|
||||
<span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
32
html/toc-pypat.creational.builder-module.html
vendored
Normal file
32
html/toc-pypat.creational.builder-module.html
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>builder</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<h1 class="toc">Module builder</h1>
|
||||
<hr />
|
||||
<h2 class="toc">Classes</h2>
|
||||
<a target="mainFrame" href="pypat.creational.builder.Builder-class.html"
|
||||
>Builder</a><br /> <a target="mainFrame" href="pypat.creational.builder.Director-class.html"
|
||||
>Director</a><br /><hr />
|
||||
<span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
32
html/toc-pypat.creational.factory-module.html
vendored
Normal file
32
html/toc-pypat.creational.factory-module.html
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>factory</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<h1 class="toc">Module factory</h1>
|
||||
<hr />
|
||||
<h2 class="toc">Classes</h2>
|
||||
<a target="mainFrame" href="pypat.creational.factory.AbstractFactory-class.html"
|
||||
>AbstractFactory</a><br /> <a target="mainFrame" href="pypat.creational.factory.Factory-class.html"
|
||||
>Factory</a><br /><hr />
|
||||
<span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
32
html/toc-pypat.creational.pool-module.html
vendored
Normal file
32
html/toc-pypat.creational.pool-module.html
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pool</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<h1 class="toc">Module pool</h1>
|
||||
<hr />
|
||||
<h2 class="toc">Classes</h2>
|
||||
<a target="mainFrame" href="pypat.creational.pool.Pool-class.html"
|
||||
>Pool</a><br /> <a target="mainFrame" href="pypat.creational.pool.Reusable-class.html"
|
||||
>Reusable</a><br /><hr />
|
||||
<span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user