Practical C++ Design: From Programming to Architecture

Singer, Adam B.

  • 出版商: Apress
  • 出版日期: 2021-12-11
  • 售價: $1,730
  • 貴賓價: 9.5$1,644
  • 語言: 英文
  • 頁數: 312
  • 裝訂: Quality Paper - also called trade paper
  • ISBN: 1484274067
  • ISBN-13: 9781484274064
  • 相關分類: C++ 程式語言
  • 海外代購書籍(需單獨結帳)

商品描述

Preface (5 pages)The preface details my motivation for writing the book, the target audience for the book, thegeneral structure of the book, and how to contact the author. Of particular importance is therationale behind choosing the case study, the target language (C++), and the GUI toolkit (Qt).Chapter 1: Defining the Case Study (6 pages)The first chapter describes, in detail, the case study to be examine in the book. The chapterdiscusses requirements in the abstract and then transitions to the calculator's specific requirements.This sets the stage for the remainder of the book, which describes, in detail, the design andimplementation of the calculator, pdCalc, proposed in Chapter 1.1. A Brief Introduction2. A Few Words About Requirements3. Reverse Polish Notation (RPN)4. The Calculator's Requirements5. The Source Code1The advice, information, and conclusions discussed in this book are those of the author and have not beenendorsed by, or reflect the opinions or practices of, ExxonMobil Corporation or its affiliates.5Chapter 2: Decomposition (18 pages)In this chapter, I explain the elements of a good decomposition and strategies for decomposing aproblem into manageable pieces. Subsequently, an architecture for pdCalc is selected, the calculatoris modularized, and use cases are used to develop interfaces for the high level calculator modules.The four high level modules are the stack, the command dispatcher, the user interface (subdividedinto a command line interface and a graphic user interface), and a plugin manager.1. The Elements of a Good Decomposition2. Selecting An Architecture3. Interfaces4. Assessment of Our Current Design5. Next StepsChapter 3: The Stack (20 pages)The stack is the first module discussed in detail. The stack is the fundamental data repositoryof the calculator. As part of the calculator's design and implementation, the singleton pattern isexplored. The stack also affords the first opportunity to discuss an event system for the calculator, which provides a backdrop for exploration of the observer pattern, including the design andimplementation of reusable publisher and observer abstract classes.1. Decomposition of the Stack Module2. The Stack Class3. Adding Events4. A Quick Note on TestingChapter 4: The Command Dispatcher (32 pages)This chapter describes the design and implementation of the command dispatcher, the module ofthe calculator responsible for the creation, storage, and execution of commands. Of particular notein this chapter is the exposition on the command pattern and how it can be used to implement apractical undo/redo framework. In addition to exploring a traditional deep hierarchy method forimplementing commands, a C++11 alternative using lambda expressions and the standard functiontemplate are presented as a modern alternative design.1. The Decomposition of the Command Dispatcher2. The Command Class3. The Command Repository4. The Command Manager5. The Command Dispatcher6. Revisiting Earlier Decisions6Chapter 5: The Command Line Interface (14 pages)This chapter marks an important milestone, the creation of the first user executable program.In addition to building a simple command line interface, we'll explore how to create an abstractsoftware interface suitable for both a command line interface and a graphical user interface. Withinthe context of the command line interface, we'