slide097.html
来自「《Big C++ 》Third Edition电子书和代码全集-Part1」· HTML 代码 · 共 59 行
HTML
59 行
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="blendTrans(Duration=2)" http-equiv="Page-Enter">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" src="./config.js"></script>
<script language="JavaScript" src="./pageFormat.js"></script>
<script><!-- // Set title on page
title()
//--></script>
</head>
<body>
<div onclick="document.location='slide098.html'">
<h2><font color="#009999">More Patterns (cont.)</font></h2>
<font size="+1">
<table border='1' cellpadding='4'>
<tr bgcolor='#00ffff'>
<th>Pattern Name</th>
<th>Description</th>
<th>Example</th>
</tr>
<tr>
<th>Mediator</th>
<td>An object encapsulates the interaction of other objects</td>
<td>All components in a dialog box notify a mediator of state changes. The
mediator updates affected components</td>
</tr>
<tr>
<th>Memento</th>
<td>An object yields an opaque snapshot of a part of its state, and can
later return its state from that snapshot</td>
<td>An undo mechanism requests a memento from an object before mutating it.
If the operation is undone, the memento is used to roll the object back
to its old state</td>
</tr>
<tr>
<th>Observer</th>
<td>An object wants to be notified when another object generates an
event</td>
<td>User interface components generate events, such as button clicks and
text changes. A dialog box observes the events and repaints its
contents</td>
</tr>
</table>
</font>
<hr>
<center><small>
<a href='slide096.html'>prev</a>
|<a href='slide001.html'>top</a>
|<a href='slide098.html'>next</a>
</small></center>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?