MCPcopy Create free account

hub / github.com/RefactoringGuru/design-patterns-python / functions

Functions212 in github.com/RefactoringGuru/design-patterns-python

↓ 6 callersMethodadd
(self, component: Component)
src/Composite/Conceptual/main.py:61
↓ 5 callersMethodadd
(self, part: Any)
src/Builder/Conceptual/main.py:136
↓ 5 callersMethodhandle
(self, request)
src/ChainOfResponsibility/Conceptual/main.py:34
↓ 4 callersMethodnotify
(self, sender: object, event: str)
src/Mediator/Conceptual/main.py:30
↓ 4 callersMethodoperation
(self)
src/Decorator/Conceptual/main.py:23
↓ 3 callersMethodadd_item
(self, item: Any)
src/Iterator/Conceptual/main.py:120
↓ 3 callersMethodbackup
(self)
src/Memento/Conceptual/main.py:147
↓ 3 callersMethoddo_something
EN: The Originator's business logic may affect its internal state. Therefore, the client should backup the state before launching met
src/Memento/Conceptual/main.py:45
↓ 3 callersMethodlist_parts
(self)
src/Builder/Conceptual/main.py:139
↓ 3 callersMethodoperation
(self)
src/Composite/Conceptual/main.py:108
↓ 3 callersMethodproduce_part_a
(self)
src/Builder/Conceptual/main.py:36
↓ 3 callersMethodsome_business_logic
EN: Usually, the subscription logic is only a fraction of what a Subject can really do. Subjects commonly hold some important busines
src/Observer/Conceptual/main.py:118
↓ 3 callersMethodtransition_to
EN: The Context allows changing the State object at runtime. RU: Контекст позволяет изменять объект Состояния во время выполнения.
src/State/Conceptual/main.py:39
↓ 2 callersFunctionadd_car_to_police_database
( factory: FlyweightFactory, plates: str, owner: str, brand: str, model: str, color: str )
src/Flyweight/Conceptual/main.py:95
↓ 2 callersMethodattach
EN: Attach an observer to the subject. RU: Присоединяет наблюдателя к издателю.
src/Observer/Conceptual/main.py:40
↓ 2 callersFunctionclient_code
EN: The client code works with all objects using the Component interface. This way it can stay independent of the concrete classes of compone
src/Decorator/Conceptual/main.py:109
↓ 2 callersFunctionclient_code
EN: The client code is usually suited to work with a single handler. In most cases, it is not even aware that the handler is part of a chain.
src/ChainOfResponsibility/Conceptual/main.py:101
↓ 2 callersFunctionclient_code
EN: The client code can run visitor operations over any set of elements without figuring out their concrete classes. The accept operation dir
src/Visitor/Conceptual/main.py:138
↓ 2 callersFunctionclient_code
EN: The client code is supposed to work with all objects (both subjects and proxies) via the Subject interface in order to support both real
src/Proxy/Conceptual/main.py:89
↓ 2 callersFunctionclient_code
EN: The client code works with an instance of a concrete creator, albeit through its base interface. As long as the client keeps working with
src/FactoryMethod/Conceptual/main.py:131
↓ 2 callersFunctionclient_code
EN: The client code calls the template method to execute the algorithm. Client code does not have to know the concrete class of an object it
src/TemplateMethod/Conceptual/main.py:129
↓ 2 callersFunctionclient_code
EN: Except for the initialization phase, where an Abstraction object gets linked with a specific Implementation object, the client code shoul
src/Bridge/Conceptual/main.py:102
↓ 2 callersFunctionclient_code
EN: The client code works with factories and products only through abstract types: AbstractFactory and AbstractProduct. This lets you pass an
src/AbstractFactory/Conceptual/main.py:186
↓ 2 callersFunctionclient_code
EN: The client code supports all classes that follow the Target interface. RU: Клиентский код поддерживает все классы, использующие интерфей
src/Adapter/Conceptual/class/main.py:55
↓ 2 callersFunctionclient_code
EN: The client code supports all classes that follow the Target interface. RU: Клиентский код поддерживает все классы, использующие интерфей
src/Adapter/Conceptual/object/main.py:58
↓ 2 callersFunctionclient_code
EN: The client code works with all of the components via the base interface. RU: Клиентский код работает со всеми компонентами через базовый
src/Composite/Conceptual/main.py:164
↓ 2 callersMethoddo_c
(self)
src/Mediator/Conceptual/main.py:93
↓ 2 callersMethoddo_some_business_logic
EN: The Context delegates some work to the Strategy object instead of implementing multiple versions of the algorithm on its own.
src/Strategy/Conceptual/main.py:63
↓ 2 callersMethodexclusive_method_of_concrete_component_a
EN: Concrete Components may have special methods that don't exist in their base class or interface. The Visitor is still able to use
src/Visitor/Conceptual/main.py:55
↓ 2 callersMethodexecute
(self)
src/Command/Conceptual/main.py:29
↓ 2 callersMethodget_key
EN: Returns a Flyweight's string hash for a given state. RU: Возвращает хеш строки Легковеса для данного состояния.
src/Flyweight/Conceptual/main.py:61
↓ 2 callersMethodget_name
(self)
src/Memento/Conceptual/main.py:96
↓ 2 callersMethodlist_flyweights
(self)
src/Flyweight/Conceptual/main.py:89
↓ 2 callersMethodoperation1
(self)
src/Facade/Conceptual/main.py:76
↓ 2 callersMethodoperation_implementation
(self)
src/Bridge/Conceptual/main.py:79
↓ 2 callersMethodproduce_part_b
(self)
src/Builder/Conceptual/main.py:40
↓ 2 callersMethodremove
(self, component: Component)
src/Composite/Conceptual/main.py:64
↓ 2 callersMethodreset
(self)
src/Builder/Conceptual/main.py:69
↓ 2 callersMethodset_next
(self, handler: Handler)
src/ChainOfResponsibility/Conceptual/main.py:30
↓ 2 callersMethodspecial_method_of_concrete_component_b
(self)
src/Visitor/Conceptual/main.py:79
↓ 2 callersMethodspecific_request
(self)
src/Adapter/Conceptual/class/main.py:38
↓ 2 callersMethodspecific_request
(self)
src/Adapter/Conceptual/object/main.py:38
↓ 2 callersMethodundo
(self)
src/Memento/Conceptual/main.py:151
↓ 2 callersMethodupdate
EN: Receive update from subject. RU: Получить обновление от субъекта.
src/Observer/Conceptual/main.py:147
↓ 2 callersMethoduseful_function_a
(self)
src/AbstractFactory/Conceptual/main.py:87
↓ 1 callersMethod_generate_random_string
(length: int = 10)
src/Memento/Conceptual/main.py:61
↓ 1 callersMethodaccept
(self, visitor: Visitor)
src/Visitor/Conceptual/main.py:28
↓ 1 callersMethodanother_useful_function_b
EN: ...but it also can collaborate with the ProductA. The Abstract Factory makes sure that all products it creates are of the
src/AbstractFactory/Conceptual/main.py:128
↓ 1 callersMethodbase_operation1
(self)
src/TemplateMethod/Conceptual/main.py:55
↓ 1 callersMethodbase_operation2
(self)
src/TemplateMethod/Conceptual/main.py:58
↓ 1 callersMethodbase_operation3
(self)
src/TemplateMethod/Conceptual/main.py:61
↓ 1 callersMethodbuild_full_featured_product
(self)
src/Builder/Conceptual/main.py:187
↓ 1 callersMethodbuild_minimal_viable_product
(self)
src/Builder/Conceptual/main.py:184
↓ 1 callersMethodcheck_access
(self)
src/Proxy/Conceptual/main.py:81
↓ 1 callersFunctionclient_code
EN: The client code works with complex subsystems through a simple interface provided by the Facade. When a facade manages the lifecycle of t
src/Facade/Conceptual/main.py:101
↓ 1 callersFunctionclient_code2
EN: Thanks to the fact that the child-management operations are declared in the base Component class, the client code can work with any compo
src/Composite/Conceptual/main.py:174
↓ 1 callersMethodcreate_product_a
(self)
src/AbstractFactory/Conceptual/main.py:35
↓ 1 callersMethodcreate_product_b
(self)
src/AbstractFactory/Conceptual/main.py:39
↓ 1 callersMethoddetach
EN: Detach an observer from the subject. RU: Отсоединяет наблюдателя от издателя.
src/Observer/Conceptual/main.py:49
↓ 1 callersMethoddo_a
(self)
src/Mediator/Conceptual/main.py:83
↓ 1 callersMethoddo_algorithm
(self, data: List)
src/Strategy/Conceptual/main.py:97
↓ 1 callersMethoddo_b
(self)
src/Mediator/Conceptual/main.py:87
↓ 1 callersMethoddo_d
(self)
src/Mediator/Conceptual/main.py:97
↓ 1 callersMethoddo_something
(self, a: str)
src/Command/Conceptual/main.py:94
↓ 1 callersMethoddo_something_else
(self, b: str)
src/Command/Conceptual/main.py:97
↓ 1 callersMethoddo_something_important
EN: The Invoker does not depend on concrete command or receiver classes. The Invoker passes a request to a receiver indirectly, by ex
src/Command/Conceptual/main.py:125
↓ 1 callersMethodfactory_method
EN: Note that the Creator may also provide some default implementation of the factory method. RU: Обратите внимание, что Соз
src/FactoryMethod/Conceptual/main.py:30
↓ 1 callersMethodget_flyweight
EN: Returns an existing Flyweight with a given state or creates a new one. RU: Возвращает существующий Легковес с заданным с
src/Flyweight/Conceptual/main.py:70
↓ 1 callersMethodget_reverse_iterator
(self)
src/Iterator/Conceptual/main.py:117
↓ 1 callersMethodget_state
EN: The Originator uses this method when restoring its state. RU: Создатель использует этот метод, когда восстанавливает своё
src/Memento/Conceptual/main.py:109
↓ 1 callersMethodhandle1
(self)
src/State/Conceptual/main.py:85
↓ 1 callersMethodhandle2
(self)
src/State/Conceptual/main.py:89
↓ 1 callersMethodhook1
(self)
src/TemplateMethod/Conceptual/main.py:86
↓ 1 callersMethodhook2
(self)
src/TemplateMethod/Conceptual/main.py:89
↓ 1 callersMethodis_composite
EN: You can provide a method that lets the client code figure out whether a component can bear children. RU: Вы можете предо
src/Composite/Conceptual/main.py:67
↓ 1 callersMethodlog_access
(self)
src/Proxy/Conceptual/main.py:85
↓ 1 callersMethodnotify
EN: Trigger an update in each subscriber. RU: Запуск обновления в каждом подписчике.
src/Observer/Conceptual/main.py:107
↓ 1 callersMethodoperation
(self, unique_state: str)
src/Flyweight/Conceptual/main.py:36
↓ 1 callersMethodoperation
(self)
src/FactoryMethod/Conceptual/main.py:110
↓ 1 callersMethodoperation
(self)
src/Bridge/Conceptual/main.py:45
↓ 1 callersMethodoperation
EN: The Facade's methods are convenient shortcuts to the sophisticated functionality of the subsystems. However, clients get only to
src/Facade/Conceptual/main.py:45
↓ 1 callersMethodoperation_n
(self)
src/Facade/Conceptual/main.py:81
↓ 1 callersMethodoperation_z
(self)
src/Facade/Conceptual/main.py:97
↓ 1 callersMethodproduce_part_c
(self)
src/Builder/Conceptual/main.py:44
↓ 1 callersMethodrequest
EN: The most common applications of the Proxy pattern are lazy loading, caching, controlling the access, logging, etc. A Proxy can pe
src/Proxy/Conceptual/main.py:63
↓ 1 callersMethodrequest
(self)
src/Adapter/Conceptual/class/main.py:22
↓ 1 callersMethodrequest
(self)
src/Adapter/Conceptual/object/main.py:22
↓ 1 callersMethodrequest1
(self)
src/State/Conceptual/main.py:56
↓ 1 callersMethodrequest2
(self)
src/State/Conceptual/main.py:59
↓ 1 callersMethodrequired_operations1
(self)
src/TemplateMethod/Conceptual/main.py:69
↓ 1 callersMethodrequired_operations2
(self)
src/TemplateMethod/Conceptual/main.py:73
↓ 1 callersMethodrestore
EN: Restores the Originator's state from a memento object. RU: Восстанавливает состояние Создателя из объекта снимка.
src/Memento/Conceptual/main.py:73
↓ 1 callersMethodsave
EN: Saves the current state inside a memento. RU: Сохраняет текущее состояние внутри снимка.
src/Memento/Conceptual/main.py:64
↓ 1 callersMethodset_on_finish
(self, command: Command)
src/Command/Conceptual/main.py:122
↓ 1 callersMethodset_on_start
(self, command: Command)
src/Command/Conceptual/main.py:119
↓ 1 callersMethodset_parent
(self, parent)
src/Prototype/Conceptual/main.py:8
↓ 1 callersMethodshow_history
(self)
src/Memento/Conceptual/main.py:162
↓ 1 callersMethodsome_operation
EN: Also note that, despite its name, the Creator's primary responsibility is not creating products. Usually, it contains some core
src/FactoryMethod/Conceptual/main.py:40
↓ 1 callersMethodtemplate_method
EN: The template method defines the skeleton of an algorithm. RU: Шаблонный метод определяет скелет алгоритма.
src/TemplateMethod/Conceptual/main.py:36
↓ 1 callersMethoduseful_function_b
EN: Product B is able to do its own thing... RU: Продукт B способен работать самостоятельно...
src/AbstractFactory/Conceptual/main.py:119
next →1–100 of 212, ranked by callers