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++ソフトウェア設計 ―高品質設計の原則とデザインパターン

9章Dec­o­ra­tor パターン

本章では古典的デザインパターン、Dec­o­ra­tor パターンを解説します。Dec­o­ra­tor パターンをさまざまに実装し、組み合わせ、再利用すると、もっとも便利になるデザインパターンの 1 つであることは長年にわたり実証されています。広く使用されており、その最大の実例は C++ 標準ライブラリであると聞いても、今さら驚くに値しない程です。本章の主な狙いは、ソフトウェア設計のどんな場面で、またどんな理由から、Dec­o­ra­tor パターンの使用が最適であるかと判断する考え方を示すことにあります。さらに、より値ベースに進化した現代 (mod­ern) の Dec­o­ra­tor パターンについても解説します。

ガイドライン 35」では、Dec­o­ra­tor パターンの設計について深く解説します。どんな時に Dec­o­ra­tor パターンを使用するのが良いのか、またどんな効果が得られるかを理解できるでしょう。さらに、他のデザインパターンと比較し、その相違点、および潜在的な短所についても解説します。

ガイドライン 36」では、Dec­o­ra­tor パターンの実装をさらに 2 つ解説します。いずれも値ベースの設計を基にした実装ですが、1 つは静的多態性 (static poly­mor­phism) を、もう 1 つは動的多態性 (dy­namic poly­mor­phism) を用います。両者を見比べると、目的は同じでも見た目は大きく異なり、デザインパターンを用いた設計の幅広さを感じられるでしょう。

ガイドライン 35:カスタマイズを階層化するには Dec­o­ra­tor パターン

読者が 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