When Pixie fetches an object of the Memento: : Set: : object class from the database, it will call the px_thaw method on it.
当Pixie从数据库访存Memento: Set: object类的对象时,它将调用该对象的px _ thaw方法。
When this happens, our new px_thaw method will create a Set::Object instance and place the contents of the Memento object in it.
当这个操作发生时,我们新的 px_thaw 方法将创建 Set::Object 实例并把 Memento 对象的内容放入其中。
But, fundamentally, reuse via design patterns is fine-grained: one solution (the Flyweight pattern, for example) is orthogonal to another (the Memento pattern).
但是,从根本上来说通过模式实现重用属于细粒度操作:一个解决方案是(比如享元(Flyweight)模式)与另一个解决方案(备忘录模式)正交。
应用推荐