CSDN博客

img wangjiong

Visitor

发表于2004/9/16 17:21:00  535人阅读

Benefits:
• It simplifies the addition of new operations.
• It gathers related operations while separating unrelated ones.

Applicable Scenarios:
• An object structure contains many objects with differing interfaces and there is a need to perform operations on these objects in a way that depends on their concrete classes.
• Many distinct and unrelated operations need to be performed on objects in a structure and there is a need to avoid cluttering the classes with these operations.
• The classes defining the object structure rarely change but you frequently need to define new operations that perform over the structure.

0 0

相关博文

我的热门文章

img
取 消
img