Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Memento ¶
type Memento struct {
// contains filtered or unexported fields
}
备忘录 Memento 存储原发器 Originator 的状态
type Originator ¶
type Originator struct {
// contains filtered or unexported fields
}
Originator 代表一个可以被操作的整数
func (*Originator) CreateMemento ¶
func (n *Originator) CreateMemento() *Memento
使用原发器创建一个备忘录 Memento
func (*Originator) RestoreMemento ¶
func (n *Originator) RestoreMemento(memento *Memento)
将原发器 Originator 的值恢复为指定版本的备忘录的值
Click to show internal directories.
Click to hide internal directories.