renamed package to pypattyrn
This commit is contained in:
2
.gitattributes
vendored
2
.gitattributes
vendored
@@ -1,2 +1,2 @@
|
||||
/html/* linguist-vendored
|
||||
/index.html
|
||||
/index.html linguist-vendored
|
||||
284
html/api-objects.txt
vendored
284
html/api-objects.txt
vendored
@@ -1,142 +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
|
||||
pypattyrn pypattyrn-module.html
|
||||
pypattyrn.__package__ pypattyrn-module.html#__package__
|
||||
pypattyrn.behavioral pypattyrn.behavioral-module.html
|
||||
pypattyrn.behavioral.__package__ pypattyrn.behavioral-module.html#__package__
|
||||
pypattyrn.behavioral.chain pypattyrn.behavioral.chain-module.html
|
||||
pypattyrn.behavioral.command pypattyrn.behavioral.command-module.html
|
||||
pypattyrn.behavioral.iterator pypattyrn.behavioral.iterator-module.html
|
||||
pypattyrn.behavioral.mediator pypattyrn.behavioral.mediator-module.html
|
||||
pypattyrn.behavioral.mediator.__package__ pypattyrn.behavioral.mediator-module.html#__package__
|
||||
pypattyrn.behavioral.memento pypattyrn.behavioral.memento-module.html
|
||||
pypattyrn.behavioral.memento.__package__ pypattyrn.behavioral.memento-module.html#__package__
|
||||
pypattyrn.behavioral.null pypattyrn.behavioral.null-module.html
|
||||
pypattyrn.behavioral.null.__package__ pypattyrn.behavioral.null-module.html#__package__
|
||||
pypattyrn.behavioral.observer pypattyrn.behavioral.observer-module.html
|
||||
pypattyrn.behavioral.visitor pypattyrn.behavioral.visitor-module.html
|
||||
pypattyrn.creational pypattyrn.creational-module.html
|
||||
pypattyrn.creational.__package__ pypattyrn.creational-module.html#__package__
|
||||
pypattyrn.creational.builder pypattyrn.creational.builder-module.html
|
||||
pypattyrn.creational.factory pypattyrn.creational.factory-module.html
|
||||
pypattyrn.creational.pool pypattyrn.creational.pool-module.html
|
||||
pypattyrn.creational.prototype pypattyrn.creational.prototype-module.html
|
||||
pypattyrn.creational.prototype.__package__ pypattyrn.creational.prototype-module.html#__package__
|
||||
pypattyrn.creational.singleton pypattyrn.creational.singleton-module.html
|
||||
pypattyrn.creational.singleton.__package__ pypattyrn.creational.singleton-module.html#__package__
|
||||
pypattyrn.structural pypattyrn.structural-module.html
|
||||
pypattyrn.structural.__package__ pypattyrn.structural-module.html#__package__
|
||||
pypattyrn.structural.adapter pypattyrn.structural.adapter-module.html
|
||||
pypattyrn.structural.adapter.__package__ pypattyrn.structural.adapter-module.html#__package__
|
||||
pypattyrn.structural.composite pypattyrn.structural.composite-module.html
|
||||
pypattyrn.structural.composite.__package__ pypattyrn.structural.composite-module.html#__package__
|
||||
pypattyrn.structural.decorator pypattyrn.structural.decorator-module.html
|
||||
pypattyrn.structural.flyweight pypattyrn.structural.flyweight-module.html
|
||||
pypattyrn.structural.flyweight.__package__ pypattyrn.structural.flyweight-module.html#__package__
|
||||
pypattyrn.behavioral.chain.Chain pypattyrn.behavioral.chain.Chain-class.html
|
||||
pypattyrn.behavioral.chain.Chain.fail pypattyrn.behavioral.chain.Chain-class.html#fail
|
||||
pypattyrn.behavioral.chain.Chain.handle pypattyrn.behavioral.chain.Chain-class.html#handle
|
||||
pypattyrn.behavioral.chain.Chain.__init__ pypattyrn.behavioral.chain.Chain-class.html#__init__
|
||||
pypattyrn.behavioral.chain.ChainLink pypattyrn.behavioral.chain.ChainLink-class.html
|
||||
pypattyrn.behavioral.chain.ChainLink.set_successor pypattyrn.behavioral.chain.ChainLink-class.html#set_successor
|
||||
pypattyrn.behavioral.chain.ChainLink.successor_handle pypattyrn.behavioral.chain.ChainLink-class.html#successor_handle
|
||||
pypattyrn.behavioral.chain.ChainLink.handle pypattyrn.behavioral.chain.ChainLink-class.html#handle
|
||||
pypattyrn.behavioral.chain.ChainLink.__init__ pypattyrn.behavioral.chain.ChainLink-class.html#__init__
|
||||
pypattyrn.behavioral.command.Command pypattyrn.behavioral.command.Command-class.html
|
||||
pypattyrn.behavioral.command.Command.execute pypattyrn.behavioral.command.Command-class.html#execute
|
||||
pypattyrn.behavioral.command.Command.unexecute pypattyrn.behavioral.command.Command-class.html#unexecute
|
||||
pypattyrn.behavioral.command.Command.__init__ pypattyrn.behavioral.command.Command-class.html#__init__
|
||||
pypattyrn.behavioral.command.Invoker pypattyrn.behavioral.command.Invoker-class.html
|
||||
pypattyrn.behavioral.command.Invoker.execute pypattyrn.behavioral.command.Invoker-class.html#execute
|
||||
pypattyrn.behavioral.command.Invoker.undo pypattyrn.behavioral.command.Invoker-class.html#undo
|
||||
pypattyrn.behavioral.command.Invoker.__init__ pypattyrn.behavioral.command.Invoker-class.html#__init__
|
||||
pypattyrn.behavioral.command.Receiver pypattyrn.behavioral.command.Receiver-class.html
|
||||
pypattyrn.behavioral.command.Receiver.action pypattyrn.behavioral.command.Receiver-class.html#action
|
||||
pypattyrn.behavioral.iterator.Iterable pypattyrn.behavioral.iterator.Iterable-class.html
|
||||
pypattyrn.behavioral.iterator.Iterable.__next__ pypattyrn.behavioral.iterator.Iterable-class.html#__next__
|
||||
pypattyrn.behavioral.iterator.Iterator pypattyrn.behavioral.iterator.Iterator-class.html
|
||||
pypattyrn.behavioral.iterator.Iterator.__next__ pypattyrn.behavioral.iterator.Iterator-class.html#__next__
|
||||
pypattyrn.behavioral.iterator.Iterator.__iter__ pypattyrn.behavioral.iterator.Iterator-class.html#__iter__
|
||||
pypattyrn.behavioral.iterator.Iterator.__init__ pypattyrn.behavioral.iterator.Iterator-class.html#__init__
|
||||
pypattyrn.behavioral.mediator.Mediator pypattyrn.behavioral.mediator.Mediator-class.html
|
||||
pypattyrn.behavioral.mediator.Mediator.disconnect pypattyrn.behavioral.mediator.Mediator-class.html#disconnect
|
||||
pypattyrn.behavioral.mediator.Mediator.signal pypattyrn.behavioral.mediator.Mediator-class.html#signal
|
||||
pypattyrn.behavioral.mediator.Mediator.connect pypattyrn.behavioral.mediator.Mediator-class.html#connect
|
||||
pypattyrn.behavioral.mediator.Mediator.__init__ pypattyrn.behavioral.mediator.Mediator-class.html#__init__
|
||||
pypattyrn.behavioral.memento.Memento pypattyrn.behavioral.memento.Memento-class.html
|
||||
pypattyrn.behavioral.memento.Memento.state pypattyrn.behavioral.memento.Memento-class.html#state
|
||||
pypattyrn.behavioral.memento.Memento.__init__ pypattyrn.behavioral.memento.Memento-class.html#__init__
|
||||
pypattyrn.behavioral.memento.Originator pypattyrn.behavioral.memento.Originator-class.html
|
||||
pypattyrn.behavioral.memento.Originator.rollback pypattyrn.behavioral.memento.Originator-class.html#rollback
|
||||
pypattyrn.behavioral.memento.Originator.commit pypattyrn.behavioral.memento.Originator-class.html#commit
|
||||
pypattyrn.behavioral.null.Null pypattyrn.behavioral.null.Null-class.html
|
||||
pypattyrn.behavioral.null.Null.__setattr__ pypattyrn.behavioral.null.Null-class.html#__setattr__
|
||||
pypattyrn.behavioral.null.Null.__str__ pypattyrn.behavioral.null.Null-class.html#__str__
|
||||
pypattyrn.behavioral.null.Null.__bool__ pypattyrn.behavioral.null.Null-class.html#__bool__
|
||||
pypattyrn.behavioral.null.Null.__getattr__ pypattyrn.behavioral.null.Null-class.html#__getattr__
|
||||
pypattyrn.behavioral.null.Null.__delattr__ pypattyrn.behavioral.null.Null-class.html#__delattr__
|
||||
pypattyrn.behavioral.null.Null.__repr__ pypattyrn.behavioral.null.Null-class.html#__repr__
|
||||
pypattyrn.behavioral.null.Null.__call__ pypattyrn.behavioral.null.Null-class.html#__call__
|
||||
pypattyrn.behavioral.null.Null.__init__ pypattyrn.behavioral.null.Null-class.html#__init__
|
||||
pypattyrn.behavioral.observer.Observable pypattyrn.behavioral.observer.Observable-class.html
|
||||
pypattyrn.behavioral.observer.Observable.attach pypattyrn.behavioral.observer.Observable-class.html#attach
|
||||
pypattyrn.behavioral.observer.Observable.notify pypattyrn.behavioral.observer.Observable-class.html#notify
|
||||
pypattyrn.behavioral.observer.Observable.detach pypattyrn.behavioral.observer.Observable-class.html#detach
|
||||
pypattyrn.behavioral.observer.Observable.__init__ pypattyrn.behavioral.observer.Observable-class.html#__init__
|
||||
pypattyrn.behavioral.observer.Observer pypattyrn.behavioral.observer.Observer-class.html
|
||||
pypattyrn.behavioral.observer.Observer.update pypattyrn.behavioral.observer.Observer-class.html#update
|
||||
pypattyrn.behavioral.visitor.Visitee pypattyrn.behavioral.visitor.Visitee-class.html
|
||||
pypattyrn.behavioral.visitor.Visitee.accept pypattyrn.behavioral.visitor.Visitee-class.html#accept
|
||||
pypattyrn.behavioral.visitor.Visitor pypattyrn.behavioral.visitor.Visitor-class.html
|
||||
pypattyrn.behavioral.visitor.Visitor.generic_visit pypattyrn.behavioral.visitor.Visitor-class.html#generic_visit
|
||||
pypattyrn.behavioral.visitor.Visitor.visit pypattyrn.behavioral.visitor.Visitor-class.html#visit
|
||||
pypattyrn.creational.builder.Builder pypattyrn.creational.builder.Builder-class.html
|
||||
pypattyrn.creational.builder.Builder._register pypattyrn.creational.builder.Builder-class.html#_register
|
||||
pypattyrn.creational.builder.Builder.build pypattyrn.creational.builder.Builder-class.html#build
|
||||
pypattyrn.creational.builder.Builder.__init__ pypattyrn.creational.builder.Builder-class.html#__init__
|
||||
pypattyrn.creational.builder.Director pypattyrn.creational.builder.Director-class.html
|
||||
pypattyrn.creational.builder.Director.get_constructed_object pypattyrn.creational.builder.Director-class.html#get_constructed_object
|
||||
pypattyrn.creational.builder.Director.construct pypattyrn.creational.builder.Director-class.html#construct
|
||||
pypattyrn.creational.builder.Director.__init__ pypattyrn.creational.builder.Director-class.html#__init__
|
||||
pypattyrn.creational.factory.AbstractFactory pypattyrn.creational.factory.AbstractFactory-class.html
|
||||
pypattyrn.creational.factory.AbstractFactory._register pypattyrn.creational.factory.AbstractFactory-class.html#_register
|
||||
pypattyrn.creational.factory.AbstractFactory.create pypattyrn.creational.factory.AbstractFactory-class.html#create
|
||||
pypattyrn.creational.factory.AbstractFactory.__init__ pypattyrn.creational.factory.AbstractFactory-class.html#__init__
|
||||
pypattyrn.creational.factory.Factory pypattyrn.creational.factory.Factory-class.html
|
||||
pypattyrn.creational.factory.Factory.create pypattyrn.creational.factory.Factory-class.html#create
|
||||
pypattyrn.creational.pool.Pool pypattyrn.creational.pool.Pool-class.html
|
||||
pypattyrn.creational.pool.Pool._expand pypattyrn.creational.pool.Pool-class.html#_expand
|
||||
pypattyrn.creational.pool.Pool.acquire pypattyrn.creational.pool.Pool-class.html#acquire
|
||||
pypattyrn.creational.pool.Pool.release pypattyrn.creational.pool.Pool-class.html#release
|
||||
pypattyrn.creational.pool.Pool.__init__ pypattyrn.creational.pool.Pool-class.html#__init__
|
||||
pypattyrn.creational.pool.Reusable pypattyrn.creational.pool.Reusable-class.html
|
||||
pypattyrn.creational.pool.Reusable.reset pypattyrn.creational.pool.Reusable-class.html#reset
|
||||
pypattyrn.creational.pool.Reusable.__init__ pypattyrn.creational.pool.Reusable-class.html#__init__
|
||||
pypattyrn.creational.prototype.Prototype pypattyrn.creational.prototype.Prototype-class.html
|
||||
pypattyrn.creational.prototype.Prototype.prototype pypattyrn.creational.prototype.Prototype-class.html#prototype
|
||||
pypattyrn.creational.singleton.Singleton pypattyrn.creational.singleton.Singleton-class.html
|
||||
pypattyrn.creational.singleton.Singleton.__call__ pypattyrn.creational.singleton.Singleton-class.html#__call__
|
||||
pypattyrn.creational.singleton.Singleton.__instance pypattyrn.creational.singleton.Singleton-class.html#__instance
|
||||
pypattyrn.structural.adapter.Adapter pypattyrn.structural.adapter.Adapter-class.html
|
||||
pypattyrn.structural.adapter.Adapter.__getattr__ pypattyrn.structural.adapter.Adapter-class.html#__getattr__
|
||||
pypattyrn.structural.adapter.Adapter.original_dict pypattyrn.structural.adapter.Adapter-class.html#original_dict
|
||||
pypattyrn.structural.adapter.Adapter.__init__ pypattyrn.structural.adapter.Adapter-class.html#__init__
|
||||
pypattyrn.structural.composite.Composite pypattyrn.structural.composite.Composite-class.html
|
||||
pypattyrn.structural.composite.Composite.add_component pypattyrn.structural.composite.Composite-class.html#add_component
|
||||
pypattyrn.structural.composite.Composite.__getattr__ pypattyrn.structural.composite.Composite-class.html#__getattr__
|
||||
pypattyrn.structural.composite.Composite._delegate pypattyrn.structural.composite.Composite-class.html#_delegate
|
||||
pypattyrn.structural.composite.Composite.remove_component pypattyrn.structural.composite.Composite-class.html#remove_component
|
||||
pypattyrn.structural.composite.Composite.__init__ pypattyrn.structural.composite.Composite-class.html#__init__
|
||||
pypattyrn.structural.decorator.CallWrapper pypattyrn.structural.decorator.CallWrapper-class.html
|
||||
pypattyrn.structural.decorator.CallWrapper.__call__ pypattyrn.structural.decorator.CallWrapper-class.html#__call__
|
||||
pypattyrn.structural.decorator.DecoratorSimple.__init__ pypattyrn.structural.decorator.DecoratorSimple-class.html#__init__
|
||||
pypattyrn.structural.decorator.Decorator pypattyrn.structural.decorator.Decorator-class.html
|
||||
pypattyrn.structural.decorator.Decorator.__call__ pypattyrn.structural.decorator.Decorator-class.html#__call__
|
||||
pypattyrn.structural.decorator.Decorator.__get__ pypattyrn.structural.decorator.Decorator-class.html#__get__
|
||||
pypattyrn.structural.decorator.DecoratorComplex pypattyrn.structural.decorator.DecoratorComplex-class.html
|
||||
pypattyrn.structural.decorator.DecoratorComplex.__call__ pypattyrn.structural.decorator.DecoratorComplex-class.html#__call__
|
||||
pypattyrn.structural.decorator.DecoratorComplex.__init__ pypattyrn.structural.decorator.DecoratorComplex-class.html#__init__
|
||||
pypattyrn.structural.decorator.DecoratorSimple pypattyrn.structural.decorator.DecoratorSimple-class.html
|
||||
pypattyrn.structural.decorator.DecoratorSimple.__init__ pypattyrn.structural.decorator.DecoratorSimple-class.html#__init__
|
||||
pypattyrn.structural.flyweight.FlyweightMeta pypattyrn.structural.flyweight.FlyweightMeta-class.html
|
||||
pypattyrn.structural.flyweight.FlyweightMeta.__new__ pypattyrn.structural.flyweight.FlyweightMeta-class.html#__new__
|
||||
pypattyrn.structural.flyweight.FlyweightMeta.__call__ pypattyrn.structural.flyweight.FlyweightMeta-class.html#__call__
|
||||
pypattyrn.structural.flyweight.FlyweightMeta._serialize pypattyrn.structural.flyweight.FlyweightMeta-class.html#_serialize
|
||||
|
||||
32
html/class-tree.html
vendored
32
html/class-tree.html
vendored
@@ -16,7 +16,7 @@
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
href="pypattyrn-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th bgcolor="#70b0f0" class="navbar-select"
|
||||
@@ -58,47 +58,47 @@
|
||||
<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>:
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.structural.adapter.Adapter-class.html">pypattyrn.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>:
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.structural.composite.Composite-class.html">pypattyrn.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>:
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.behavioral.iterator.Iterator-class.html">pypattyrn.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>:
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.behavioral.mediator.Mediator-class.html">pypattyrn.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>:
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.behavioral.memento.Memento-class.html">pypattyrn.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>:
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.behavioral.null.Null-class.html">pypattyrn.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>:
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.behavioral.observer.Observable-class.html">pypattyrn.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>:
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.behavioral.memento.Originator-class.html">pypattyrn.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>:
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.creational.pool.Pool-class.html">pypattyrn.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>:
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.creational.prototype.Prototype-class.html">pypattyrn.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>:
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.behavioral.visitor.Visitee-class.html">pypattyrn.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>:
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.structural.flyweight.FlyweightMeta-class.html">pypattyrn.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>:
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.creational.singleton.Singleton-class.html">pypattyrn.creational.singleton.Singleton</a></strong>:
|
||||
<em class="summary">Singleton Metaclass.</em>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -112,7 +112,7 @@
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
href="pypattyrn-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th bgcolor="#70b0f0" class="navbar-select"
|
||||
@@ -132,7 +132,7 @@
|
||||
<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
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 22:03:56 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
|
||||
2
html/frames.html
vendored
2
html/frames.html
vendored
@@ -12,6 +12,6 @@
|
||||
<frame src="toc-everything.html" name="moduleFrame"
|
||||
id="moduleFrame" />
|
||||
</frameset>
|
||||
<frame src="pypat-module.html" name="mainFrame" id="mainFrame" />
|
||||
<frame src="pypattyrn-module.html" name="mainFrame" id="mainFrame" />
|
||||
</frameset>
|
||||
</html>
|
||||
|
||||
6
html/help.html
vendored
6
html/help.html
vendored
@@ -16,7 +16,7 @@
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
href="pypattyrn-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
@@ -226,7 +226,7 @@ page was last updated. </p>
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
href="pypattyrn-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
@@ -246,7 +246,7 @@ page was last updated. </p>
|
||||
<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
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 22:03:56 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
|
||||
568
html/identifier-index.html
vendored
568
html/identifier-index.html
vendored
@@ -16,7 +16,7 @@
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
href="pypattyrn-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
@@ -88,26 +88,26 @@
|
||||
<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>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.creational.factory.AbstractFactory-class.html">AbstractFactory</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.creational.factory-module.html">pypattyrn.creational.factory</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral.command.Receiver-class.html#action">action()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral.command.Receiver-class.html">Receiver</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.structural.composite.Composite-class.html#add_component">add_component()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.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>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral.visitor.Visitee-class.html#accept">accept()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral.visitor.Visitee-class.html">Visitee</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.structural.adapter-module.html">adapter</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.structural-module.html">pypattyrn.structural</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral.observer.Observable-class.html#attach">attach()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.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"><a href="pypattyrn.creational.pool.Pool-class.html#acquire">acquire()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.creational.pool.Pool-class.html">Pool</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.structural.adapter.Adapter-class.html">Adapter</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.structural.adapter-module.html">pypattyrn.structural.adapter</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -116,17 +116,17 @@
|
||||
<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"><a href="pypattyrn.behavioral-module.html">behavioral</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn-module.html">pypattyrn</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.creational.builder-module.html">builder</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.creational-module.html">pypattyrn.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"><a href="pypattyrn.creational.builder.Builder-class.html#build">build()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.creational.builder.Builder-class.html">Builder</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.creational.builder.Builder-class.html">Builder</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.creational.builder-module.html">pypattyrn.creational.builder</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -135,42 +135,42 @@
|
||||
<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>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.structural.decorator.CallWrapper-class.html">CallWrapper</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.structural.decorator-module.html">pypattyrn.structural.decorator</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral.command.Command-class.html">Command</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral.command-module.html">pypattyrn.behavioral.command</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.creational.builder.Director-class.html#construct">construct()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.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>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral.chain-module.html">chain</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral-module.html">pypattyrn.behavioral</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral.memento.Originator-class.html#commit">commit()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral.memento.Originator-class.html">Originator</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.creational.factory.AbstractFactory-class.html#create">create()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.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>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral.chain.Chain-class.html">Chain</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral.chain-module.html">pypattyrn.behavioral.chain</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.structural.composite-module.html">composite</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.structural-module.html">pypattyrn.structural</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.creational.factory.Factory-class.html#create">create()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.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>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral.chain.ChainLink-class.html">ChainLink</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral.chain-module.html">pypattyrn.behavioral.chain</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.structural.composite.Composite-class.html">Composite</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.structural.composite-module.html">pypattyrn.structural.composite</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.creational-module.html">creational</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn-module.html">pypattyrn</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"><a href="pypattyrn.behavioral.command-module.html">command</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral-module.html">pypattyrn.behavioral</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral.mediator.Mediator-class.html#connect">connect()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral.mediator.Mediator-class.html">Mediator</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -179,25 +179,25 @@
|
||||
<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>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.structural.decorator-module.html">decorator</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.structural-module.html">pypattyrn.structural</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.structural.decorator.DecoratorSimple-class.html">DecoratorSimple</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.structural.decorator-module.html">pypattyrn.structural.decorator</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral.mediator.Mediator-class.html#disconnect">disconnect()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.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"><a href="pypattyrn.structural.decorator.Decorator-class.html">Decorator</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.structural.decorator-module.html">pypattyrn.structural.decorator</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral.observer.Observable-class.html#detach">detach()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.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"><a href="pypattyrn.structural.decorator.DecoratorComplex-class.html">DecoratorComplex</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.structural.decorator-module.html">pypattyrn.structural.decorator</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.creational.builder.Director-class.html">Director</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.creational.builder-module.html">pypattyrn.creational.builder</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -206,10 +206,10 @@
|
||||
<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"><a href="pypattyrn.behavioral.command.Command-class.html#execute">execute()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral.command.Command-class.html">Command</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral.command.Invoker-class.html#execute">execute()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.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>
|
||||
@@ -219,18 +219,18 @@
|
||||
<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>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.creational.factory-module.html">factory</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.creational-module.html">pypattyrn.creational</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral.chain.Chain-class.html#fail">fail()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral.chain.Chain-class.html">Chain</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.structural.flyweight.FlyweightMeta-class.html">FlyweightMeta</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.structural.flyweight-module.html">pypattyrn.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"><a href="pypattyrn.creational.factory.Factory-class.html">Factory</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.creational.factory-module.html">pypattyrn.creational.factory</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.structural.flyweight-module.html">flyweight</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.structural-module.html">pypattyrn.structural</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -239,10 +239,10 @@
|
||||
<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"><a href="pypattyrn.behavioral.visitor.Visitor-class.html#generic_visit">generic_visit()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral.visitor.Visitor-class.html">Visitor</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.creational.builder.Director-class.html#get_constructed_object">get_constructed_object()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.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>
|
||||
@@ -252,10 +252,10 @@
|
||||
<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"><a href="pypattyrn.behavioral.chain.Chain-class.html#handle">handle()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral.chain.Chain-class.html">Chain</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral.chain.ChainLink-class.html#handle">handle()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.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>
|
||||
@@ -265,17 +265,17 @@
|
||||
<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"><a href="pypattyrn.behavioral.command.Invoker-class.html">Invoker</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral.command-module.html">pypattyrn.behavioral.command</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral.iterator-module.html">iterator</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral-module.html">pypattyrn.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"><a href="pypattyrn.behavioral.iterator.Iterable-class.html">Iterable</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral.iterator-module.html">pypattyrn.behavioral.iterator</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral.iterator.Iterator-class.html">Iterator</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral.iterator-module.html">pypattyrn.behavioral.iterator</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -284,17 +284,17 @@
|
||||
<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"><a href="pypattyrn.behavioral.mediator-module.html">mediator</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral-module.html">pypattyrn.behavioral</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral.memento-module.html">memento</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral-module.html">pypattyrn.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"><a href="pypattyrn.behavioral.mediator.Mediator-class.html">Mediator</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral.mediator-module.html">pypattyrn.behavioral.mediator</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral.memento.Memento-class.html">Memento</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral.memento-module.html">pypattyrn.behavioral.memento</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -303,12 +303,12 @@
|
||||
<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>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral.observer.Observable-class.html#notify">notify()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral.observer.Observable-class.html">Observable</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral.null-module.html">null</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral-module.html">pypattyrn.behavioral</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral.null.Null-class.html">Null</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral.null-module.html">pypattyrn.behavioral.null</a>)</span></td>
|
||||
</tr>
|
||||
<tr><td class="link-index"> </td><td class="link-index"> </td><td class="link-index"> </td></tr>
|
||||
</table>
|
||||
@@ -317,18 +317,18 @@
|
||||
<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>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral.observer.Observable-class.html">Observable</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral.observer-module.html">pypattyrn.behavioral.observer</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral.observer.Observer-class.html">Observer</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral.observer-module.html">pypattyrn.behavioral.observer</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral.memento.Originator-class.html">Originator</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral.memento-module.html">pypattyrn.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"><a href="pypattyrn.behavioral.observer-module.html">observer</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral-module.html">pypattyrn.behavioral</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.structural.adapter.Adapter-class.html#original_dict">original_dict()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.structural.adapter.Adapter-class.html">Adapter</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -337,19 +337,19 @@
|
||||
<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>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.creational.pool-module.html">pool</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.creational-module.html">pypattyrn.creational</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.creational.prototype-module.html">prototype</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.creational-module.html">pypattyrn.creational</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.creational.prototype.Prototype-class.html#prototype">prototype()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.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>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.creational.pool.Pool-class.html">Pool</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.creational.pool-module.html">pypattyrn.creational.pool</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.creational.prototype.Prototype-class.html">Prototype</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.creational.prototype-module.html">pypattyrn.creational.prototype</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn-module.html">pypattyrn</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
@@ -357,20 +357,20 @@
|
||||
<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>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral.command.Receiver-class.html">Receiver</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral.command-module.html">pypattyrn.behavioral.command</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.structural.composite.Composite-class.html#remove_component">remove_component()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.structural.composite.Composite-class.html">Composite</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.creational.pool.Reusable-class.html">Reusable</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.creational.pool-module.html">pypattyrn.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>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.creational.pool.Pool-class.html#release">release()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.creational.pool.Pool-class.html">Pool</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.creational.pool.Reusable-class.html#reset">reset()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.creational.pool.Reusable-class.html">Reusable</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral.memento.Originator-class.html#rollback">rollback()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral.memento.Originator-class.html">Originator</a>)</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
@@ -378,25 +378,25 @@
|
||||
<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>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral.chain.ChainLink-class.html#set_successor">set_successor()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral.chain.ChainLink-class.html">ChainLink</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.creational.singleton.Singleton-class.html">Singleton</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.creational.singleton-module.html">pypattyrn.creational.singleton</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral.chain.ChainLink-class.html#successor_handle">successor_handle()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.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"><a href="pypattyrn.behavioral.mediator.Mediator-class.html#signal">signal()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral.mediator.Mediator-class.html">Mediator</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral.memento.Memento-class.html#state">state</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.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"><a href="pypattyrn.creational.singleton-module.html">singleton</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.creational-module.html">pypattyrn.creational</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.structural-module.html">structural</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn-module.html">pypattyrn</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -405,12 +405,12 @@
|
||||
<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>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral.command.Invoker-class.html#undo">undo()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral.command.Invoker-class.html">Invoker</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral.command.Command-class.html#unexecute">unexecute()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral.command.Command-class.html">Command</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral.observer.Observer-class.html#update">update()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.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>
|
||||
@@ -419,17 +419,17 @@
|
||||
<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"><a href="pypattyrn.behavioral.visitor.Visitor-class.html#visit">visit()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral.visitor.Visitor-class.html">Visitor</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral.visitor-module.html">visitor</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral-module.html">pypattyrn.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"><a href="pypattyrn.behavioral.visitor.Visitee-class.html">Visitee</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral.visitor-module.html">pypattyrn.behavioral.visitor</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral.visitor.Visitor-class.html">Visitor</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral.visitor-module.html">pypattyrn.behavioral.visitor</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -438,153 +438,153 @@
|
||||
<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>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral.null.Null-class.html#__bool__">__bool__()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral.null.Null-class.html">Null</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral.null.Null-class.html#__init__">__init__()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral.null.Null-class.html">Null</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral.memento-module.html#__package__">__package__</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral.memento-module.html">pypattyrn.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>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral.null.Null-class.html#__call__">__call__()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral.null.Null-class.html">Null</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral.observer.Observable-class.html#__init__">__init__()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral.observer.Observable-class.html">Observable</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral.null-module.html#__package__">__package__</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral.null-module.html">pypattyrn.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>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.creational.singleton.Singleton-class.html#__call__">__call__()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.creational.singleton.Singleton-class.html">Singleton</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.creational.builder.Builder-class.html#__init__">__init__()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.creational.builder.Builder-class.html">Builder</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.creational-module.html#__package__">__package__</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.creational-module.html">pypattyrn.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>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.structural.decorator.CallWrapper-class.html#__call__">__call__()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.structural.decorator.CallWrapper-class.html">CallWrapper</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.creational.builder.Director-class.html#__init__">__init__()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.creational.builder.Director-class.html">Director</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.creational.prototype-module.html#__package__">__package__</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.creational.prototype-module.html">pypattyrn.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>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.structural.decorator.Decorator-class.html#__call__">__call__()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.structural.decorator.Decorator-class.html">Decorator</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.creational.factory.AbstractFactory-class.html#__init__">__init__()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.creational.factory.AbstractFactory-class.html">AbstractFactory</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.creational.singleton-module.html#__package__">__package__</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.creational.singleton-module.html">pypattyrn.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>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.structural.decorator.DecoratorComplex-class.html#__call__">__call__()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.structural.decorator.DecoratorComplex-class.html">DecoratorComplex</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.creational.pool.Pool-class.html#__init__">__init__()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.creational.pool.Pool-class.html">Pool</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.structural-module.html#__package__">__package__</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.structural-module.html">pypattyrn.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>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.structural.flyweight.FlyweightMeta-class.html#__call__">__call__()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.structural.flyweight.FlyweightMeta-class.html">FlyweightMeta</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.creational.pool.Reusable-class.html#__init__">__init__()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.creational.pool.Reusable-class.html">Reusable</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.structural.adapter-module.html#__package__">__package__</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.structural.adapter-module.html">pypattyrn.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>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral.null.Null-class.html#__delattr__">__delattr__()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral.null.Null-class.html">Null</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.structural.adapter.Adapter-class.html#__init__">__init__()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.structural.adapter.Adapter-class.html">Adapter</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.structural.composite-module.html#__package__">__package__</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.structural.composite-module.html">pypattyrn.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>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.structural.decorator.Decorator-class.html#__get__">__get__()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.structural.decorator.Decorator-class.html">Decorator</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.structural.composite.Composite-class.html#__init__">__init__()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.structural.composite.Composite-class.html">Composite</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.structural.flyweight-module.html#__package__">__package__</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.structural.flyweight-module.html">pypattyrn.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>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral.null.Null-class.html#__getattr__">__getattr__()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral.null.Null-class.html">Null</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.structural.decorator.DecoratorComplex-class.html#__init__">__init__()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.structural.decorator.DecoratorComplex-class.html">DecoratorComplex</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral.null.Null-class.html#__repr__">__repr__()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.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>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.structural.adapter.Adapter-class.html#__getattr__">__getattr__()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.structural.adapter.Adapter-class.html">Adapter</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.structural.decorator.DecoratorSimple-class.html#__init__">__init__()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.structural.decorator.DecoratorSimple-class.html">DecoratorSimple</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral.null.Null-class.html#__setattr__">__setattr__()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.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>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.structural.composite.Composite-class.html#__getattr__">__getattr__()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.structural.composite.Composite-class.html">Composite</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.creational.singleton.Singleton-class.html#__instance">__instance</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.creational.singleton.Singleton-class.html">Singleton</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral.null.Null-class.html#__str__">__str__()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.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>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral.chain.Chain-class.html#__init__">__init__()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral.chain.Chain-class.html">Chain</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral.iterator.Iterator-class.html#__iter__">__iter__()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral.iterator.Iterator-class.html">Iterator</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.structural.composite.Composite-class.html#_delegate">_delegate()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.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>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral.chain.ChainLink-class.html#__init__">__init__()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral.chain.ChainLink-class.html">ChainLink</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.structural.flyweight.FlyweightMeta-class.html#__new__">__new__()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.structural.flyweight.FlyweightMeta-class.html">FlyweightMeta</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.creational.pool.Pool-class.html#_expand">_expand()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.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>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral.command.Command-class.html#__init__">__init__()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral.command.Command-class.html">Command</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral.iterator.Iterable-class.html#__next__">__next__()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral.iterator.Iterable-class.html">Iterable</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.creational.builder.Builder-class.html#_register">_register()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.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>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral.command.Invoker-class.html#__init__">__init__()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral.command.Invoker-class.html">Invoker</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral.iterator.Iterator-class.html#__next__">__next__()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral.iterator.Iterator-class.html">Iterator</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.creational.factory.AbstractFactory-class.html#_register">_register()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.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>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral.iterator.Iterator-class.html#__init__">__init__()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral.iterator.Iterator-class.html">Iterator</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn-module.html#__package__">__package__</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn-module.html">pypattyrn</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.structural.flyweight.FlyweightMeta-class.html#_serialize">_serialize()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.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"><a href="pypattyrn.behavioral.mediator.Mediator-class.html#__init__">__init__()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral.mediator.Mediator-class.html">Mediator</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral-module.html#__package__">__package__</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral-module.html">pypattyrn.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"><a href="pypattyrn.behavioral.memento.Memento-class.html#__init__">__init__()</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral.memento.Memento-class.html">Memento</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pypattyrn.behavioral.mediator-module.html#__package__">__package__</a><br />
|
||||
<span class="index-where">(in <a href="pypattyrn.behavioral.mediator-module.html">pypattyrn.behavioral.mediator</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -596,7 +596,7 @@
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
href="pypattyrn-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
@@ -616,7 +616,7 @@
|
||||
<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
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 22:03:56 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
|
||||
48
html/module-tree.html
vendored
48
html/module-tree.html
vendored
@@ -16,7 +16,7 @@
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
href="pypattyrn-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th bgcolor="#70b0f0" class="navbar-select"
|
||||
@@ -55,35 +55,35 @@
|
||||
</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>
|
||||
<li> <strong class="uidlink"><a href="pypattyrn-module.html">pypattyrn</a></strong>
|
||||
<ul>
|
||||
<li> <strong class="uidlink"><a href="pypat.behavioral-module.html">pypat.behavioral</a></strong>
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.behavioral-module.html">pypattyrn.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>
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.behavioral.chain-module.html">pypattyrn.behavioral.chain</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.behavioral.command-module.html">pypattyrn.behavioral.command</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.behavioral.iterator-module.html">pypattyrn.behavioral.iterator</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.behavioral.mediator-module.html">pypattyrn.behavioral.mediator</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.behavioral.memento-module.html">pypattyrn.behavioral.memento</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.behavioral.null-module.html">pypattyrn.behavioral.null</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.behavioral.observer-module.html">pypattyrn.behavioral.observer</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.behavioral.visitor-module.html">pypattyrn.behavioral.visitor</a></strong> </li>
|
||||
</ul>
|
||||
</li>
|
||||
<li> <strong class="uidlink"><a href="pypat.creational-module.html">pypat.creational</a></strong>
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.creational-module.html">pypattyrn.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>
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.creational.builder-module.html">pypattyrn.creational.builder</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.creational.factory-module.html">pypattyrn.creational.factory</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.creational.pool-module.html">pypattyrn.creational.pool</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.creational.prototype-module.html">pypattyrn.creational.prototype</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.creational.singleton-module.html">pypattyrn.creational.singleton</a></strong> </li>
|
||||
</ul>
|
||||
</li>
|
||||
<li> <strong class="uidlink"><a href="pypat.structural-module.html">pypat.structural</a></strong>
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.structural-module.html">pypattyrn.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>
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.structural.adapter-module.html">pypattyrn.structural.adapter</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.structural.composite-module.html">pypattyrn.structural.composite</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.structural.decorator-module.html">pypattyrn.structural.decorator</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.structural.flyweight-module.html">pypattyrn.structural.flyweight</a></strong> </li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -95,7 +95,7 @@
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pypat-module.html">Home</a> </th>
|
||||
href="pypattyrn-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th bgcolor="#70b0f0" class="navbar-select"
|
||||
@@ -115,7 +115,7 @@
|
||||
<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
|
||||
Generated by Epydoc 3.0.1 on Sat Sep 10 22:03:56 2016
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
|
||||
180
html/pypattyrn-module.html
vendored
Normal file
180
html/pypattyrn-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>pypattyrn</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 pypattyrn
|
||||
</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="pypattyrn-module.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== PACKAGE DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Package pypattyrn</h1><p class="nomargin-top"><span class="codelink"><a href="pypattyrn-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="pypattyrn.behavioral-module.html">pypattyrn.behavioral</a></strong>
|
||||
<ul>
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.behavioral.chain-module.html">pypattyrn.behavioral.chain</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.behavioral.command-module.html">pypattyrn.behavioral.command</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.behavioral.iterator-module.html">pypattyrn.behavioral.iterator</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.behavioral.mediator-module.html">pypattyrn.behavioral.mediator</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.behavioral.memento-module.html">pypattyrn.behavioral.memento</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.behavioral.null-module.html">pypattyrn.behavioral.null</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.behavioral.observer-module.html">pypattyrn.behavioral.observer</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.behavioral.visitor-module.html">pypattyrn.behavioral.visitor</a></strong> </li>
|
||||
</ul>
|
||||
</li>
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.creational-module.html">pypattyrn.creational</a></strong>
|
||||
<ul>
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.creational.builder-module.html">pypattyrn.creational.builder</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.creational.factory-module.html">pypattyrn.creational.factory</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.creational.pool-module.html">pypattyrn.creational.pool</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.creational.prototype-module.html">pypattyrn.creational.prototype</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.creational.singleton-module.html">pypattyrn.creational.singleton</a></strong> </li>
|
||||
</ul>
|
||||
</li>
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.structural-module.html">pypattyrn.structural</a></strong>
|
||||
<ul>
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.structural.adapter-module.html">pypattyrn.structural.adapter</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.structural.composite-module.html">pypattyrn.structural.composite</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.structural.decorator-module.html">pypattyrn.structural.decorator</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.structural.flyweight-module.html">pypattyrn.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 22:03: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>
|
||||
111
html/pypattyrn-pysrc.html
vendored
Normal file
111
html/pypattyrn-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>pypattyrn</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 pypattyrn
|
||||
</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="pypattyrn-pysrc.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h1 class="epydoc">Source Code for <a href="pypattyrn-module.html">Package pypattyrn</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 22:03:57 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/pypattyrn.behavioral-module.html
vendored
Normal file
160
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</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="pypattyrn.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="pypattyrn.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="pypattyrn.behavioral.chain-module.html">pypattyrn.behavioral.chain</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.behavioral.command-module.html">pypattyrn.behavioral.command</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.behavioral.iterator-module.html">pypattyrn.behavioral.iterator</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.behavioral.mediator-module.html">pypattyrn.behavioral.mediator</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.behavioral.memento-module.html">pypattyrn.behavioral.memento</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.behavioral.null-module.html">pypattyrn.behavioral.null</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.behavioral.observer-module.html">pypattyrn.behavioral.observer</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.behavioral.visitor-module.html">pypattyrn.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="pypattyrn-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 22:03: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>
|
||||
112
html/pypattyrn.behavioral-pysrc.html
vendored
Normal file
112
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</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="pypattyrn.behavioral-pysrc.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h1 class="epydoc">Source Code for <a href="pypattyrn.behavioral-module.html">Package pypattyrn.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="pypattyrn-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 22:03:57 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/pypattyrn.behavioral.chain-module.html
vendored
Normal file
139
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03: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>
|
||||
189
html/pypattyrn.behavioral.chain-pysrc.html
vendored
Normal file
189
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.behavioral.chain-pysrc.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h1 class="epydoc">Source Code for <a href="pypattyrn.behavioral.chain-module.html">Module pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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 pypattyrn.behavioral.chain.Chain.handle()=pypattyrn.behavioral.chain.Chain-class.html#handle,Method pypattyrn.behavioral.chain.ChainLink.handle()=pypattyrn.behavioral.chain.ChainLink-class.html#handle"><a title="pypattyrn.behavioral.chain.Chain.handle
|
||||
pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.behavioral.chain.Chain.handle
|
||||
pypattyrn.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 pypattyrn.behavioral.chain.Chain.fail()=pypattyrn.behavioral.chain.Chain-class.html#fail"><a title="pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03:57 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/pypattyrn.behavioral.chain.Chain-class.html
vendored
Normal file
277
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.behavioral-module.html">Package behavioral</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03: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>
|
||||
299
html/pypattyrn.behavioral.chain.ChainLink-class.html
vendored
Normal file
299
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.behavioral-module.html">Package behavioral</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03: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>
|
||||
147
html/pypattyrn.behavioral.command-module.html
vendored
Normal file
147
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03: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>
|
||||
203
html/pypattyrn.behavioral.command-pysrc.html
vendored
Normal file
203
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.behavioral.command-pysrc.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h1 class="epydoc">Source Code for <a href="pypattyrn.behavioral.command-module.html">Module pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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 pypattyrn.behavioral.command=pypattyrn.behavioral.command-module.html"><a title="pypattyrn.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="pypattyrn.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="pypattyrn.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 pypattyrn.behavioral.command.Command.execute()=pypattyrn.behavioral.command.Command-class.html#execute,Method pypattyrn.behavioral.command.Invoker.execute()=pypattyrn.behavioral.command.Invoker-class.html#execute"><a title="pypattyrn.behavioral.command.Command.execute
|
||||
pypattyrn.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="pypattyrn.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 pypattyrn.behavioral.command.Command.unexecute()=pypattyrn.behavioral.command.Command-class.html#unexecute"><a title="pypattyrn.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="pypattyrn-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 22:03:57 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/pypattyrn.behavioral.command.Command-class.html
vendored
Normal file
275
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.behavioral-module.html">Package behavioral</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03: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>
|
||||
254
html/pypattyrn.behavioral.command.Invoker-class.html
vendored
Normal file
254
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.behavioral-module.html">Package behavioral</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03: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>
|
||||
200
html/pypattyrn.behavioral.command.Receiver-class.html
vendored
Normal file
200
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.behavioral-module.html">Package behavioral</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03:57 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/pypattyrn.behavioral.iterator-module.html
vendored
Normal file
139
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03: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>
|
||||
152
html/pypattyrn.behavioral.iterator-pysrc.html
vendored
Normal file
152
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.behavioral.iterator-pysrc.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h1 class="epydoc">Source Code for <a href="pypattyrn.behavioral.iterator-module.html">Module pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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 pypattyrn.behavioral.iterator.Iterable.__next__()=pypattyrn.behavioral.iterator.Iterable-class.html#__next__,Method pypattyrn.behavioral.iterator.Iterator.__next__()=pypattyrn.behavioral.iterator.Iterator-class.html#__next__"><a title="pypattyrn.behavioral.iterator.Iterable.__next__
|
||||
pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03:57 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/pypattyrn.behavioral.iterator.Iterable-class.html
vendored
Normal file
194
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.behavioral-module.html">Package behavioral</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03:57 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/pypattyrn.behavioral.iterator.Iterator-class.html
vendored
Normal file
280
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.behavioral-module.html">Package behavioral</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03:57 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/pypattyrn.behavioral.mediator-module.html
vendored
Normal file
156
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="'pypattyrn.behavioral'"><code class="variable-quote">'</code><code class="variable-string">pypattyrn.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="pypattyrn-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 22:03: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>
|
||||
162
html/pypattyrn.behavioral.mediator-pysrc.html
vendored
Normal file
162
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.behavioral.mediator-pysrc.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h1 class="epydoc">Source Code for <a href="pypattyrn.behavioral.mediator-module.html">Module pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03:57 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/pypattyrn.behavioral.mediator.Mediator-class.html
vendored
Normal file
380
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.behavioral-module.html">Package behavioral</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03:57 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/pypattyrn.behavioral.memento-module.html
vendored
Normal file
164
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="'pypattyrn.behavioral'"><code class="variable-quote">'</code><code class="variable-string">pypattyrn.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="pypattyrn-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 22:03: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>
|
||||
159
html/pypattyrn.behavioral.memento-pysrc.html
vendored
Normal file
159
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.behavioral.memento-pysrc.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h1 class="epydoc">Source Code for <a href="pypattyrn.behavioral.memento-module.html">Module pypattyrn.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="pypattyrn.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="pypattyrn.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 pypattyrn.behavioral.memento.Memento.state=pypattyrn.behavioral.memento.Memento-class.html#state"><a title="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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 pypattyrn.behavioral.memento.Memento=pypattyrn.behavioral.memento.Memento-class.html"><a title="pypattyrn.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="pypattyrn.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 pypattyrn.behavioral.memento=pypattyrn.behavioral.memento-module.html"><a title="pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03:57 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/pypattyrn.behavioral.memento.Memento-class.html
vendored
Normal file
288
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.behavioral-module.html">Package behavioral</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03:57 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/pypattyrn.behavioral.memento.Originator-class.html
vendored
Normal file
283
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.behavioral-module.html">Package behavioral</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03:57 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/pypattyrn.behavioral.null-module.html
vendored
Normal file
156
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03: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>
|
||||
187
html/pypattyrn.behavioral.null-pysrc.html
vendored
Normal file
187
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.behavioral.null-pysrc.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h1 class="epydoc">Source Code for <a href="pypattyrn.behavioral.null-module.html">Module pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03:57 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/pypattyrn.behavioral.null.Null-class.html
vendored
Normal file
536
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.behavioral-module.html">Package behavioral</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03:57 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/pypattyrn.behavioral.observer-module.html
vendored
Normal file
139
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03: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>
|
||||
171
html/pypattyrn.behavioral.observer-pysrc.html
vendored
Normal file
171
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.behavioral.observer-pysrc.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h1 class="epydoc">Source Code for <a href="pypattyrn.behavioral.observer-module.html">Module pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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 pypattyrn.behavioral.observer=pypattyrn.behavioral.observer-module.html"><a title="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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 pypattyrn.behavioral.memento.Memento.state=pypattyrn.behavioral.memento.Memento-class.html#state"><a title="pypattyrn.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="pypattyrn.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 pypattyrn.behavioral.observer.Observer.update()=pypattyrn.behavioral.observer.Observer-class.html#update"><a title="pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03:57 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/pypattyrn.behavioral.observer.Observable-class.html
vendored
Normal file
343
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.behavioral-module.html">Package behavioral</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03:57 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/pypattyrn.behavioral.observer.Observer-class.html
vendored
Normal file
194
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.behavioral-module.html">Package behavioral</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03:57 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/pypattyrn.behavioral.visitor-module.html
vendored
Normal file
139
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03: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>
|
||||
170
html/pypattyrn.behavioral.visitor-pysrc.html
vendored
Normal file
170
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.behavioral.visitor-pysrc.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h1 class="epydoc">Source Code for <a href="pypattyrn.behavioral.visitor-module.html">Module pypattyrn.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="pypattyrn.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="pypattyrn.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 pypattyrn.behavioral.visitor.Visitor.generic_visit()=pypattyrn.behavioral.visitor.Visitor-class.html#generic_visit"><a title="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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 pypattyrn.behavioral.visitor=pypattyrn.behavioral.visitor-module.html"><a title="pypattyrn.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 pypattyrn.behavioral.visitor.Visitor.visit()=pypattyrn.behavioral.visitor.Visitor-class.html#visit"><a title="pypattyrn.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="pypattyrn-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 22:03:57 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/pypattyrn.behavioral.visitor.Visitee-class.html
vendored
Normal file
251
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.behavioral-module.html">Package behavioral</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03:57 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/pypattyrn.behavioral.visitor.Visitor-class.html
vendored
Normal file
255
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.behavioral-module.html">Package behavioral</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03:57 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/pypattyrn.creational-module.html
vendored
Normal file
157
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</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="pypattyrn.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="pypattyrn.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="pypattyrn.creational.builder-module.html">pypattyrn.creational.builder</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.creational.factory-module.html">pypattyrn.creational.factory</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.creational.pool-module.html">pypattyrn.creational.pool</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.creational.prototype-module.html">pypattyrn.creational.prototype</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.creational.singleton-module.html">pypattyrn.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="pypattyrn-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 22:03: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>
|
||||
112
html/pypattyrn.creational-pysrc.html
vendored
Normal file
112
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</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="pypattyrn.creational-pysrc.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h1 class="epydoc">Source Code for <a href="pypattyrn.creational-module.html">Package pypattyrn.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="pypattyrn-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 22:03:57 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/pypattyrn.creational.builder-module.html
vendored
Normal file
139
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03: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>
|
||||
191
html/pypattyrn.creational.builder-pysrc.html
vendored
Normal file
191
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.creational.builder-pysrc.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h1 class="epydoc">Source Code for <a href="pypattyrn.creational.builder-module.html">Module pypattyrn.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="pypattyrn.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="pypattyrn.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 pypattyrn.creational.builder=pypattyrn.creational.builder-module.html"><a title="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03:57 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/pypattyrn.creational.builder.Builder-class.html
vendored
Normal file
291
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.creational-module.html">Package creational</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03:57 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/pypattyrn.creational.builder.Director-class.html
vendored
Normal file
253
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.creational-module.html">Package creational</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03:57 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/pypattyrn.creational.factory-module.html
vendored
Normal file
139
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03: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>
|
||||
172
html/pypattyrn.creational.factory-pysrc.html
vendored
Normal file
172
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.creational.factory-pysrc.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h1 class="epydoc">Source Code for <a href="pypattyrn.creational.factory-module.html">Module pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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 pypattyrn.creational.factory=pypattyrn.creational.factory-module.html"><a title="pypattyrn.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="pypattyrn-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 22:03:57 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/pypattyrn.creational.factory.AbstractFactory-class.html
vendored
Normal file
285
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.creational-module.html">Package creational</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03:57 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/pypattyrn.creational.factory.Factory-class.html
vendored
Normal file
204
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.creational-module.html">Package creational</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03:57 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/pypattyrn.creational.pool-module.html
vendored
Normal file
139
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03: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>
|
||||
187
html/pypattyrn.creational.pool-pysrc.html
vendored
Normal file
187
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.creational.pool-pysrc.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h1 class="epydoc">Source Code for <a href="pypattyrn.creational.pool-module.html">Module pypattyrn.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 pypattyrn=pypattyrn-module.html"><a title="pypattyrn" class="py-name" href="#" onclick="return doclink('link-0', 'pypattyrn', 'link-0');">pypattyrn</a></tt><tt class="py-op">.</tt><tt id="link-1" class="py-name" targets="Package pypattyrn.behavioral=pypattyrn.behavioral-module.html"><a title="pypattyrn.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 pypattyrn.behavioral.memento=pypattyrn.behavioral.memento-module.html"><a title="pypattyrn.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 pypattyrn.behavioral.memento.Originator=pypattyrn.behavioral.memento.Originator-class.html"><a title="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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 pypattyrn.behavioral.memento.Originator.commit()=pypattyrn.behavioral.memento.Originator-class.html#commit"><a title="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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 pypattyrn.behavioral.memento.Originator.rollback()=pypattyrn.behavioral.memento.Originator-class.html#rollback"><a title="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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 pypattyrn.creational.pool.Pool._expand()=pypattyrn.creational.pool.Pool-class.html#_expand"><a title="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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 pypattyrn.creational.pool.Reusable.reset()=pypattyrn.creational.pool.Reusable-class.html#reset"><a title="pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03:57 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/pypattyrn.creational.pool.Pool-class.html
vendored
Normal file
351
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.creational-module.html">Package creational</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03:57 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/pypattyrn.creational.pool.Reusable-class.html
vendored
Normal file
167
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.creational-module.html">Package creational</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03:57 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/pypattyrn.creational.prototype-module.html
vendored
Normal file
156
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="'pypattyrn.creational'"><code class="variable-quote">'</code><code class="variable-string">pypattyrn.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="pypattyrn-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 22:03: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>
|
||||
138
html/pypattyrn.creational.prototype-pysrc.html
vendored
Normal file
138
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.creational.prototype-pysrc.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h1 class="epydoc">Source Code for <a href="pypattyrn.creational.prototype-module.html">Module pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03:57 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/pypattyrn.creational.prototype.Prototype-class.html
vendored
Normal file
247
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.creational-module.html">Package creational</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03:57 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/pypattyrn.creational.singleton-module.html
vendored
Normal file
156
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03: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>
|
||||
136
html/pypattyrn.creational.singleton-pysrc.html
vendored
Normal file
136
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.creational.singleton-pysrc.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h1 class="epydoc">Source Code for <a href="pypattyrn.creational.singleton-module.html">Module pypattyrn.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="pypattyrn.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 pypattyrn.creational.singleton.Singleton.__instance=pypattyrn.creational.singleton.Singleton-class.html#__instance"><a title="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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 pypattyrn.behavioral.null.Null.__call__()=pypattyrn.behavioral.null.Null-class.html#__call__,Method pypattyrn.creational.singleton.Singleton.__call__()=pypattyrn.creational.singleton.Singleton-class.html#__call__,Method pypattyrn.structural.decorator.CallWrapper.__call__()=pypattyrn.structural.decorator.CallWrapper-class.html#__call__,Method pypattyrn.structural.decorator.Decorator.__call__()=pypattyrn.structural.decorator.Decorator-class.html#__call__,Method pypattyrn.structural.decorator.DecoratorComplex.__call__()=pypattyrn.structural.decorator.DecoratorComplex-class.html#__call__,Method pypattyrn.structural.flyweight.FlyweightMeta.__call__()=pypattyrn.structural.flyweight.FlyweightMeta-class.html#__call__"><a title="pypattyrn.behavioral.null.Null.__call__
|
||||
pypattyrn.creational.singleton.Singleton.__call__
|
||||
pypattyrn.structural.decorator.CallWrapper.__call__
|
||||
pypattyrn.structural.decorator.Decorator.__call__
|
||||
pypattyrn.structural.decorator.DecoratorComplex.__call__
|
||||
pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03:57 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/pypattyrn.creational.singleton.Singleton-class.html
vendored
Normal file
302
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.creational-module.html">Package creational</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03:57 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/pypattyrn.structural-module.html
vendored
Normal file
156
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</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="pypattyrn.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="pypattyrn.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="pypattyrn.structural.adapter-module.html">pypattyrn.structural.adapter</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.structural.composite-module.html">pypattyrn.structural.composite</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.structural.decorator-module.html">pypattyrn.structural.decorator</a></strong> </li>
|
||||
<li> <strong class="uidlink"><a href="pypattyrn.structural.flyweight-module.html">pypattyrn.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="pypattyrn-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 22:03: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>
|
||||
112
html/pypattyrn.structural-pysrc.html
vendored
Normal file
112
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</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="pypattyrn.structural-pysrc.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h1 class="epydoc">Source Code for <a href="pypattyrn.structural-module.html">Package pypattyrn.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="pypattyrn-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 22:03:57 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/pypattyrn.structural.adapter-module.html
vendored
Normal file
156
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03: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>
|
||||
145
html/pypattyrn.structural.adapter-pysrc.html
vendored
Normal file
145
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.structural.adapter-pysrc.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h1 class="epydoc">Source Code for <a href="pypattyrn.structural.adapter-module.html">Module pypattyrn.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="pypattyrn.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="pypattyrn.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 pypattyrn.behavioral.observer.Observer.update()=pypattyrn.behavioral.observer.Observer-class.html#update"><a title="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03:57 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/pypattyrn.structural.adapter.Adapter-class.html
vendored
Normal file
311
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.structural-module.html">Package structural</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03:57 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/pypattyrn.structural.composite-module.html
vendored
Normal file
156
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03: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>
|
||||
185
html/pypattyrn.structural.composite-pysrc.html
vendored
Normal file
185
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.structural.composite-pysrc.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h1 class="epydoc">Source Code for <a href="pypattyrn.structural.composite-module.html">Module pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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 pypattyrn.structural.composite.Composite._delegate()=pypattyrn.structural.composite.Composite-class.html#_delegate"><a title="pypattyrn.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="pypattyrn-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 22:03:57 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/pypattyrn.structural.composite.Composite-class.html
vendored
Normal file
430
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.structural-module.html">Package structural</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03:57 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/pypattyrn.structural.decorator-module.html
vendored
Normal file
155
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03: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>
|
||||
203
html/pypattyrn.structural.decorator-pysrc.html
vendored
Normal file
203
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.structural.decorator-pysrc.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h1 class="epydoc">Source Code for <a href="pypattyrn.structural.decorator-module.html">Module pypattyrn.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="pypattyrn.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="pypattyrn.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 pypattyrn.behavioral.null.Null.__call__()=pypattyrn.behavioral.null.Null-class.html#__call__,Method pypattyrn.creational.singleton.Singleton.__call__()=pypattyrn.creational.singleton.Singleton-class.html#__call__,Method pypattyrn.structural.decorator.CallWrapper.__call__()=pypattyrn.structural.decorator.CallWrapper-class.html#__call__,Method pypattyrn.structural.decorator.Decorator.__call__()=pypattyrn.structural.decorator.Decorator-class.html#__call__,Method pypattyrn.structural.decorator.DecoratorComplex.__call__()=pypattyrn.structural.decorator.DecoratorComplex-class.html#__call__,Method pypattyrn.structural.flyweight.FlyweightMeta.__call__()=pypattyrn.structural.flyweight.FlyweightMeta-class.html#__call__"><a title="pypattyrn.behavioral.null.Null.__call__
|
||||
pypattyrn.creational.singleton.Singleton.__call__
|
||||
pypattyrn.structural.decorator.CallWrapper.__call__
|
||||
pypattyrn.structural.decorator.Decorator.__call__
|
||||
pypattyrn.structural.decorator.DecoratorComplex.__call__
|
||||
pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03:57 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/pypattyrn.structural.decorator.CallWrapper-class.html
vendored
Normal file
166
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.structural-module.html">Package structural</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.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="pypattyrn.structural.decorator-pysrc.html#CallWrapper">source code</a></span></p>
|
||||
<pre class="base-tree">
|
||||
<a href="pypattyrn.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="pypattyrn.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="pypattyrn.structural.decorator.DecoratorSimple-class.html">DecoratorSimple</a></code></b>:
|
||||
<code><a href="pypattyrn.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="pypattyrn-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 22:03:57 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/pypattyrn.structural.decorator.Decorator-class.html
vendored
Normal file
217
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.structural-module.html">Package structural</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03:57 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/pypattyrn.structural.decorator.DecoratorComplex-class.html
vendored
Normal file
257
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.structural-module.html">Package structural</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03:57 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/pypattyrn.structural.decorator.DecoratorSimple-class.html
vendored
Normal file
195
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.structural-module.html">Package structural</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03:57 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/pypattyrn.structural.flyweight-module.html
vendored
Normal file
156
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03: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>
|
||||
165
html/pypattyrn.structural.flyweight-pysrc.html
vendored
Normal file
165
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.structural.flyweight-pysrc.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h1 class="epydoc">Source Code for <a href="pypattyrn.structural.flyweight-module.html">Module pypattyrn.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="pypattyrn.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="pypattyrn.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 pypattyrn.structural.flyweight.FlyweightMeta=pypattyrn.structural.flyweight.FlyweightMeta-class.html"><a title="pypattyrn.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 pypattyrn.structural.flyweight.FlyweightMeta.__new__()=pypattyrn.structural.flyweight.FlyweightMeta-class.html#__new__"><a title="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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 pypattyrn.structural.flyweight.FlyweightMeta._serialize()=pypattyrn.structural.flyweight.FlyweightMeta-class.html#_serialize"><a title="pypattyrn.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 pypattyrn.creational.pool=pypattyrn.creational.pool-module.html"><a title="pypattyrn.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="pypattyrn.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="pypattyrn.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 pypattyrn.behavioral.null.Null.__call__()=pypattyrn.behavioral.null.Null-class.html#__call__,Method pypattyrn.creational.singleton.Singleton.__call__()=pypattyrn.creational.singleton.Singleton-class.html#__call__,Method pypattyrn.structural.decorator.CallWrapper.__call__()=pypattyrn.structural.decorator.CallWrapper-class.html#__call__,Method pypattyrn.structural.decorator.Decorator.__call__()=pypattyrn.structural.decorator.Decorator-class.html#__call__,Method pypattyrn.structural.decorator.DecoratorComplex.__call__()=pypattyrn.structural.decorator.DecoratorComplex-class.html#__call__,Method pypattyrn.structural.flyweight.FlyweightMeta.__call__()=pypattyrn.structural.flyweight.FlyweightMeta-class.html#__call__"><a title="pypattyrn.behavioral.null.Null.__call__
|
||||
pypattyrn.creational.singleton.Singleton.__call__
|
||||
pypattyrn.structural.decorator.CallWrapper.__call__
|
||||
pypattyrn.structural.decorator.Decorator.__call__
|
||||
pypattyrn.structural.decorator.DecoratorComplex.__call__
|
||||
pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03:57 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/pypattyrn.structural.flyweight.FlyweightMeta-class.html
vendored
Normal file
373
html/pypattyrn.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>pypattyrn.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="pypattyrn-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="pypattyrn-module.html">Package pypattyrn</a> ::
|
||||
<a href="pypattyrn.structural-module.html">Package structural</a> ::
|
||||
<a href="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn.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="pypattyrn-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 22:03:57 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>
|
||||
2
html/redirect.html
vendored
2
html/redirect.html
vendored
@@ -7,7 +7,7 @@
|
||||
<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 pages = ["pypattyrn.structural.decorator.DecoratorComplex-c", "pypattyrn.structural.decorator.DecoratorSimple-c", "pypattyrn.creational.factory.AbstractFactory-c", "pypattyrn.structural.flyweight.FlyweightMeta-c", "pypattyrn.structural.decorator.CallWrapper-c", "pypattyrn.behavioral.observer.Observable-c", "pypattyrn.creational.prototype.Prototype-c", "pypattyrn.creational.singleton.Singleton-c", "pypattyrn.structural.composite.Composite-c", "pypattyrn.structural.decorator.Decorator-c", "pypattyrn.behavioral.memento.Originator-c", "pypattyrn.behavioral.iterator.Iterable-c", "pypattyrn.behavioral.iterator.Iterator-c", "pypattyrn.behavioral.mediator.Mediator-c", "pypattyrn.behavioral.observer.Observer-c", "pypattyrn.behavioral.command.Receiver-c", "pypattyrn.creational.builder.Director-c", "pypattyrn.behavioral.chain.ChainLink-c", "pypattyrn.behavioral.command.Command-c", "pypattyrn.behavioral.command.Invoker-c", "pypattyrn.behavioral.memento.Memento-c", "pypattyrn.behavioral.visitor.Visitee-c", "pypattyrn.behavioral.visitor.Visitor-c", "pypattyrn.creational.builder.Builder-c", "pypattyrn.creational.factory.Factory-c", "pypattyrn.structural.adapter.Adapter-c", "pypattyrn.creational.pool.Reusable-c", "pypattyrn.behavioral.chain.Chain-c", "pypattyrn.creational.prototype-m", "pypattyrn.creational.singleton-m", "pypattyrn.structural.composite-m", "pypattyrn.structural.decorator-m", "pypattyrn.structural.flyweight-m", "pypattyrn.behavioral.null.Null-c", "pypattyrn.creational.pool.Pool-c", "pypattyrn.behavioral.iterator-m", "pypattyrn.behavioral.mediator-m", "pypattyrn.behavioral.observer-m", "pypattyrn.behavioral.command-m", "pypattyrn.behavioral.memento-m", "pypattyrn.behavioral.visitor-m", "pypattyrn.creational.builder-m", "pypattyrn.creational.factory-m", "pypattyrn.structural.adapter-m", "pypattyrn.behavioral.chain-m", "pypattyrn.behavioral.null-m", "pypattyrn.creational.pool-m", "pypattyrn.behavioral-m", "pypattyrn.creational-m", "pypattyrn.structural-m", "pypattyrn-m"];
|
||||
var dottedName = get_anchor();
|
||||
if (dottedName) {
|
||||
var target = redirect_url(dottedName);
|
||||
|
||||
88
html/toc-everything.html
vendored
88
html/toc-everything.html
vendored
@@ -13,50 +13,50 @@
|
||||
<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 />
|
||||
<a target="mainFrame" href="pypattyrn.behavioral.chain.Chain-class.html"
|
||||
>pypattyrn.behavioral.chain.Chain</a><br /> <a target="mainFrame" href="pypattyrn.behavioral.chain.ChainLink-class.html"
|
||||
>pypattyrn.behavioral.chain.ChainLink</a><br /> <a target="mainFrame" href="pypattyrn.behavioral.command.Command-class.html"
|
||||
>pypattyrn.behavioral.command.Command</a><br /> <a target="mainFrame" href="pypattyrn.behavioral.command.Invoker-class.html"
|
||||
>pypattyrn.behavioral.command.Invoker</a><br /> <a target="mainFrame" href="pypattyrn.behavioral.command.Receiver-class.html"
|
||||
>pypattyrn.behavioral.command.Receiver</a><br /> <a target="mainFrame" href="pypattyrn.behavioral.iterator.Iterable-class.html"
|
||||
>pypattyrn.behavioral.iterator.Iterable</a><br /> <a target="mainFrame" href="pypattyrn.behavioral.iterator.Iterator-class.html"
|
||||
>pypattyrn.behavioral.iterator.Iterator</a><br /> <a target="mainFrame" href="pypattyrn.behavioral.mediator.Mediator-class.html"
|
||||
>pypattyrn.behavioral.mediator.Mediator</a><br /> <a target="mainFrame" href="pypattyrn.behavioral.memento.Memento-class.html"
|
||||
>pypattyrn.behavioral.memento.Memento</a><br /> <a target="mainFrame" href="pypattyrn.behavioral.memento.Originator-class.html"
|
||||
>pypattyrn.behavioral.memento.Originator</a><br /> <a target="mainFrame" href="pypattyrn.behavioral.null.Null-class.html"
|
||||
>pypattyrn.behavioral.null.Null</a><br /> <a target="mainFrame" href="pypattyrn.behavioral.observer.Observable-class.html"
|
||||
>pypattyrn.behavioral.observer.Observable</a><br /> <a target="mainFrame" href="pypattyrn.behavioral.observer.Observer-class.html"
|
||||
>pypattyrn.behavioral.observer.Observer</a><br /> <a target="mainFrame" href="pypattyrn.behavioral.visitor.Visitee-class.html"
|
||||
>pypattyrn.behavioral.visitor.Visitee</a><br /> <a target="mainFrame" href="pypattyrn.behavioral.visitor.Visitor-class.html"
|
||||
>pypattyrn.behavioral.visitor.Visitor</a><br /> <a target="mainFrame" href="pypattyrn.creational.builder.Builder-class.html"
|
||||
>pypattyrn.creational.builder.Builder</a><br /> <a target="mainFrame" href="pypattyrn.creational.builder.Director-class.html"
|
||||
>pypattyrn.creational.builder.Director</a><br /> <a target="mainFrame" href="pypattyrn.creational.factory.AbstractFactory-class.html"
|
||||
>pypattyrn.creational.factory.AbstractFactory</a><br /> <a target="mainFrame" href="pypattyrn.creational.factory.Factory-class.html"
|
||||
>pypattyrn.creational.factory.Factory</a><br /> <a target="mainFrame" href="pypattyrn.creational.pool.Pool-class.html"
|
||||
>pypattyrn.creational.pool.Pool</a><br /> <a target="mainFrame" href="pypattyrn.creational.pool.Reusable-class.html"
|
||||
>pypattyrn.creational.pool.Reusable</a><br /> <a target="mainFrame" href="pypattyrn.creational.prototype.Prototype-class.html"
|
||||
>pypattyrn.creational.prototype.Prototype</a><br /> <a target="mainFrame" href="pypattyrn.creational.singleton.Singleton-class.html"
|
||||
>pypattyrn.creational.singleton.Singleton</a><br /> <a target="mainFrame" href="pypattyrn.structural.adapter.Adapter-class.html"
|
||||
>pypattyrn.structural.adapter.Adapter</a><br /> <a target="mainFrame" href="pypattyrn.structural.composite.Composite-class.html"
|
||||
>pypattyrn.structural.composite.Composite</a><br /> <a target="mainFrame" href="pypattyrn.structural.decorator.CallWrapper-class.html"
|
||||
>pypattyrn.structural.decorator.CallWrapper</a><br /> <a target="mainFrame" href="pypattyrn.structural.decorator.Decorator-class.html"
|
||||
>pypattyrn.structural.decorator.Decorator</a><br /> <a target="mainFrame" href="pypattyrn.structural.decorator.DecoratorComplex-class.html"
|
||||
>pypattyrn.structural.decorator.DecoratorComplex</a><br /> <a target="mainFrame" href="pypattyrn.structural.decorator.DecoratorSimple-class.html"
|
||||
>pypattyrn.structural.decorator.DecoratorSimple</a><br /> <a target="mainFrame" href="pypattyrn.structural.flyweight.FlyweightMeta-class.html"
|
||||
>pypattyrn.structural.flyweight.FlyweightMeta</a><br /> <h2 class="toc">All Variables</h2>
|
||||
<a target="mainFrame" href="pypattyrn-module.html#__package__"
|
||||
>pypattyrn.__package__</a><br /> <a target="mainFrame" href="pypattyrn.behavioral-module.html#__package__"
|
||||
>pypattyrn.behavioral.__package__</a><br /> <a target="mainFrame" href="pypattyrn.behavioral.mediator-module.html#__package__"
|
||||
>pypattyrn.behavioral.mediator.__package__</a><br /> <a target="mainFrame" href="pypattyrn.behavioral.memento-module.html#__package__"
|
||||
>pypattyrn.behavioral.memento.__package__</a><br /> <a target="mainFrame" href="pypattyrn.behavioral.null-module.html#__package__"
|
||||
>pypattyrn.behavioral.null.__package__</a><br /> <a target="mainFrame" href="pypattyrn.creational-module.html#__package__"
|
||||
>pypattyrn.creational.__package__</a><br /> <a target="mainFrame" href="pypattyrn.creational.prototype-module.html#__package__"
|
||||
>pypattyrn.creational.prototype.__package__</a><br /> <a target="mainFrame" href="pypattyrn.creational.singleton-module.html#__package__"
|
||||
>pypattyrn.creational.singleton.__package__</a><br /> <a target="mainFrame" href="pypattyrn.structural-module.html#__package__"
|
||||
>pypattyrn.structural.__package__</a><br /> <a target="mainFrame" href="pypattyrn.structural.adapter-module.html#__package__"
|
||||
>pypattyrn.structural.adapter.__package__</a><br /> <a target="mainFrame" href="pypattyrn.structural.composite-module.html#__package__"
|
||||
>pypattyrn.structural.composite.__package__</a><br /> <a target="mainFrame" href="pypattyrn.structural.flyweight-module.html#__package__"
|
||||
>pypattyrn.structural.flyweight.__package__</a><br /><hr />
|
||||
<span class="options">[<a href="javascript:void(0);" class="privatelink"
|
||||
onclick="toggle_private();">hide private</a>]</span>
|
||||
|
||||
|
||||
31
html/toc-pypattyrn-module.html
vendored
Normal file
31
html/toc-pypattyrn-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>pypattyrn</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 pypattyrn</h1>
|
||||
<hr />
|
||||
<h2 class="toc">Variables</h2>
|
||||
<a target="mainFrame" href="pypattyrn-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-pypattyrn.behavioral-module.html
vendored
Normal file
31
html/toc-pypattyrn.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="pypattyrn.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-pypattyrn.behavioral.chain-module.html
vendored
Normal file
32
html/toc-pypattyrn.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="pypattyrn.behavioral.chain.Chain-class.html"
|
||||
>Chain</a><br /> <a target="mainFrame" href="pypattyrn.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-pypattyrn.behavioral.command-module.html
vendored
Normal file
33
html/toc-pypattyrn.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="pypattyrn.behavioral.command.Command-class.html"
|
||||
>Command</a><br /> <a target="mainFrame" href="pypattyrn.behavioral.command.Invoker-class.html"
|
||||
>Invoker</a><br /> <a target="mainFrame" href="pypattyrn.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-pypattyrn.behavioral.iterator-module.html
vendored
Normal file
32
html/toc-pypattyrn.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="pypattyrn.behavioral.iterator.Iterable-class.html"
|
||||
>Iterable</a><br /> <a target="mainFrame" href="pypattyrn.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-pypattyrn.behavioral.mediator-module.html
vendored
Normal file
33
html/toc-pypattyrn.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="pypattyrn.behavioral.mediator.Mediator-class.html"
|
||||
>Mediator</a><br /> <h2 class="toc">Variables</h2>
|
||||
<a target="mainFrame" href="pypattyrn.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-pypattyrn.behavioral.memento-module.html
vendored
Normal file
34
html/toc-pypattyrn.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="pypattyrn.behavioral.memento.Memento-class.html"
|
||||
>Memento</a><br /> <a target="mainFrame" href="pypattyrn.behavioral.memento.Originator-class.html"
|
||||
>Originator</a><br /> <h2 class="toc">Variables</h2>
|
||||
<a target="mainFrame" href="pypattyrn.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-pypattyrn.behavioral.null-module.html
vendored
Normal file
33
html/toc-pypattyrn.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="pypattyrn.behavioral.null.Null-class.html"
|
||||
>Null</a><br /> <h2 class="toc">Variables</h2>
|
||||
<a target="mainFrame" href="pypattyrn.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-pypattyrn.behavioral.observer-module.html
vendored
Normal file
32
html/toc-pypattyrn.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="pypattyrn.behavioral.observer.Observable-class.html"
|
||||
>Observable</a><br /> <a target="mainFrame" href="pypattyrn.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-pypattyrn.behavioral.visitor-module.html
vendored
Normal file
32
html/toc-pypattyrn.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="pypattyrn.behavioral.visitor.Visitee-class.html"
|
||||
>Visitee</a><br /> <a target="mainFrame" href="pypattyrn.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-pypattyrn.creational-module.html
vendored
Normal file
31
html/toc-pypattyrn.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="pypattyrn.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-pypattyrn.creational.builder-module.html
vendored
Normal file
32
html/toc-pypattyrn.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="pypattyrn.creational.builder.Builder-class.html"
|
||||
>Builder</a><br /> <a target="mainFrame" href="pypattyrn.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-pypattyrn.creational.factory-module.html
vendored
Normal file
32
html/toc-pypattyrn.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="pypattyrn.creational.factory.AbstractFactory-class.html"
|
||||
>AbstractFactory</a><br /> <a target="mainFrame" href="pypattyrn.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-pypattyrn.creational.pool-module.html
vendored
Normal file
32
html/toc-pypattyrn.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="pypattyrn.creational.pool.Pool-class.html"
|
||||
>Pool</a><br /> <a target="mainFrame" href="pypattyrn.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>
|
||||
33
html/toc-pypattyrn.creational.prototype-module.html
vendored
Normal file
33
html/toc-pypattyrn.creational.prototype-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>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">
|
||||
<h1 class="toc">Module prototype</h1>
|
||||
<hr />
|
||||
<h2 class="toc">Classes</h2>
|
||||
<a target="mainFrame" href="pypattyrn.creational.prototype.Prototype-class.html"
|
||||
>Prototype</a><br /> <h2 class="toc">Variables</h2>
|
||||
<a target="mainFrame" href="pypattyrn.creational.prototype-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-pypattyrn.creational.singleton-module.html
vendored
Normal file
33
html/toc-pypattyrn.creational.singleton-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>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">
|
||||
<h1 class="toc">Module singleton</h1>
|
||||
<hr />
|
||||
<h2 class="toc">Classes</h2>
|
||||
<a target="mainFrame" href="pypattyrn.creational.singleton.Singleton-class.html"
|
||||
>Singleton</a><br /> <h2 class="toc">Variables</h2>
|
||||
<a target="mainFrame" href="pypattyrn.creational.singleton-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-pypattyrn.structural-module.html
vendored
Normal file
31
html/toc-pypattyrn.structural-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>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">
|
||||
<h1 class="toc">Module structural</h1>
|
||||
<hr />
|
||||
<h2 class="toc">Variables</h2>
|
||||
<a target="mainFrame" href="pypattyrn.structural-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-pypattyrn.structural.adapter-module.html
vendored
Normal file
33
html/toc-pypattyrn.structural.adapter-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>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">
|
||||
<h1 class="toc">Module adapter</h1>
|
||||
<hr />
|
||||
<h2 class="toc">Classes</h2>
|
||||
<a target="mainFrame" href="pypattyrn.structural.adapter.Adapter-class.html"
|
||||
>Adapter</a><br /> <h2 class="toc">Variables</h2>
|
||||
<a target="mainFrame" href="pypattyrn.structural.adapter-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-pypattyrn.structural.composite-module.html
vendored
Normal file
33
html/toc-pypattyrn.structural.composite-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>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">
|
||||
<h1 class="toc">Module composite</h1>
|
||||
<hr />
|
||||
<h2 class="toc">Classes</h2>
|
||||
<a target="mainFrame" href="pypattyrn.structural.composite.Composite-class.html"
|
||||
>Composite</a><br /> <h2 class="toc">Variables</h2>
|
||||
<a target="mainFrame" href="pypattyrn.structural.composite-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>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user