Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Name of this design pattern?

I'm trying to figure out the name behind this design pattern. Basically, you have some arbitrary data that needs to be processed, and any arbitrary number of "handler" objects that may be capable of handling the data. The data gets passed to these handlers until something processes it.

For example, in Qt, QImage reads images via QImageReader. QImageReader queries QImageIOHandler objects to see if the given file format can be read by that QImageIOHandler. If so, it uses that handler to read the image.

Is there a name for this delegation of responsibility?

like image 473
Zac Avatar asked May 15 '11 02:05

Zac


People also ask

What is pattern name in design pattern?

A design pattern systematically names, motivates, and explains a general design that addresses a recurring design problem in object-oriented systems. It describes the problem, the solution, when to apply the solution, and its consequences. It also gives implementation hints and examples.

What are the patterns of design?

As per the design pattern reference book Design Patterns - Elements of Reusable Object-Oriented Software , there are 23 design patterns which can be classified in three categories: Creational, Structural and Behavioral patterns. We'll also discuss another category of design pattern: J2EE design patterns.


1 Answers

Chain of Responsibility

like image 61
Jordão Avatar answered Oct 02 '22 01:10

Jordão