Chain of Responsibility design pattern


Chain Of Responsibility design pattern

Table of Contents

  • 1 What is it?
  • 2 Practice this pattern in C

1 What is it?

According to Gof95, Chain of Responsibility belong to Behavioral Patterns. The definition of this pattern in Gof95 is:

Avoid coupling the sender of a request to its receiver by giving more than one object a chance to handle the request. Chain the receiving objects and pass the request along the chain until an object handles it.

2 Practice this pattern in C

In wikipadia, it gives an example code to illustrate this pattern in java code. And I translate those code into C.

I upload the source code into the github. chain of responsibility in C

Comments

Popular posts from this blog

Bluedroid stack in android

How to setup a NAT server?

Network programming in elisp