<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>toburau</author_name>
  <author_url>https://blog.hatena.ne.jp/toburau/</author_url>
  <blog_title>ゲームが作れるようになるまでがんばる日記</blog_title>
  <blog_url>https://toburau.hatenablog.jp/</blog_url>
  <categories>
    <anon>デザパタ</anon>
  </categories>
  <description>親クラスで枠組みを決めて、具体的な処理は子クラスで実装するもの。親クラスでテンプレートとなるメソッドを抽象メソッドで定義し、具体的な処理は子クラスで実装する。 アルゴリズム的な部分は一緒だけど、具体的な部分は異なるような場合、コピーペーストで複数のクラスを作ってしまうと、アルゴリズムのどこかに変更があった場合、すべてのクラスを修正しなくてはならない。そこで親クラスを抽象クラスとしてアルゴリズムを記述し、具体的な部分は子クラスで実装するようにすればよい。そうすれば、アルゴリズムが変更された場合は親クラスのみを修正するだけで済む。 たとえば、Read()して何らかの処理を行い、Write()するよ…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftoburau.hatenablog.jp%2Fentry%2F20070805%2F1186325619&quot; title=&quot;Template Method - ゲームが作れるようになるまでがんばる日記&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2007-08-05 23:53:39</published>
  <title>Template Method</title>
  <type>rich</type>
  <url>https://toburau.hatenablog.jp/entry/20070805/1186325619</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
