Skip to Content
C++ソフトウェア設計 ―高品質設計の原則とデザインパターン
book

C++ソフトウェア設計 ―高品質設計の原則とデザインパターン

by Klaus Iglberger, 千住 治郎
October 2023
Intermediate to advanced
408 pages
6h 37m
Japanese
O'Reilly Japan, Inc.
Content preview from C++ソフトウェア設計 ―高品質設計の原則とデザインパターン

5章Strat­egy パターンと Com­mand パターン

本章ではもっとも使用されるデザインパターンを 2 つ解説します。Strat­egy パターンと Com­mand パターンです。C++ 標準ライブラリが内部で多用しているほどですし、読者自身もまず間違いなく何度も使用したことがあるでしょう。すべての開発者にとっての基礎ツールと言えます。

ガイドライン 19」では、Strat­egy パターンを紹介します。もっとも有用かつ重要なデザインパターンである理由や、多くの場面で認められるその有用性を示します。

ガイドライン 20」では、継承を俯瞰し、多くの開発者が不平を言う理由も述べます。どんなものにも言えることですが、継承自体が悪いわけではなく、制約があるとはいえ、利点がないわけではありません。もっとも重要なこととして、デザインパターンの多くは継承ではその威力を発揮できず、コンポジションにより威力を発揮している点を述べます。

ガイドライン 21」では、Com­mand パターンを紹介します。生産性を損ねない使用法を示し、Com­mand パターンと Strat­egy パターンを比較します。

ガイドライン 22」では、参照セマンティクス (ref­er­ence se­man­tics) の世界を旅します。しかし、その世界は旅人をそれほど親切にもてなしてくれるわけではなく、むしろ旅人は自分が開発したコードの質が下がりはしないかと心配になってしまいます。そこで値セマンティクス (value se­man­tics) の世界に居場所を戻します。こちらの世界は旅人を歓迎してくれ、旅人の開発コードにも有益なことが多くあります。

ガイドライン 23」では、Strat­egy パターンと ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

データベースリライアビリティエンジニアリング ―回復力のあるデータベースシステムの設計と運用

データベースリライアビリティエンジニアリング ―回復力のあるデータベースシステムの設計と運用

Laine Campbell, Charity Majors, 八木 和生

Publisher Resources

ISBN: 9784814400454Publisher Website