Preface |
Acknowledgments |
Abbreviations |
About the Companion Website |
Introduction / 1: |
Structure of the Book / 1.1: |
Format Conventions / 1.2: |
About the Code and Projects / 1.3: |
Introduction to Programming / 2: |
Hardware Model / 2.1: |
Software Development Ecosystem / 2.2: |
Software Development Steps / 2.3: |
Representing and Running Algorithms / 2.4: |
Representing Algorithms / 2.4.1: |
Using Online Compilers / 2.4.2: |
Structure of a C++ Program / 2.4.3: |
Code Analysis / 2.4.4: |
($$$) Building a Linux Executable / 2.4.5: |
Example Project - Compound Interest Calculator / 2.5: |
Compound Interest Analysis / 2.5.1: |
Implementation of the Interest Calculator / 2.5.2: |
Building and Running the Software / 2.5.3: |
Example Project - Counting Occurrences of Characters in Text / 2.6: |
Problem Analysis and Implementation / 2.6.1: |
Running the C++ Code with the Online Compiler / 2.6.2: |
Histogram Code, Explained / 2.6.3: |
Summary / 2.7: |
Questions and Exercises |
C++ Basics / 3: |
Constants and Variables - Built-in Data Types, Their Range, and Initialization / 3.1: |
Example Project - Collecting Student Grades / 3.2: |
Our Friend the Debugger / 3.3: |
The Basic Data Structure - std: : vector / 3.4: |
Example Project - Implementing a Matrix as a Vector of Vectors / 3.5: |
Special Vector to Store Text - std: : string / 3.6: |
Using the auto Keyword and decltype for Automatic Type Deduction / 3.7: |
Common Standard Algorithms / 3.8: |
Structures: Collecting Objects of Various Types / 3.9: |
($$$) Fixed-Size Arrays / 3.10: |
Multidimensional Fixed-Size Arrays / 3.10.1: |
References / 3.11: |
($$$) Pointers / 3.12: |
Object Access with Pointers / 3.12.1: |
Statements / 3.13: |
Blocks of Statements and Access to Variables - The Role of Braces / 3.13.1: |
C++ Statements / 3.13.2: |
Conditional Statements / 3.13.2.1: |
Loop Statements / 3.13.2.2: |
Auxiliary Statements - continue and break / 3.13.2.3: |
The goto Statement / 3.13.2.4: |
Structural Exception Handling - The try-catch Statement / 3.13.2.5: |
Functions / 3.14: |
Anatomy of a Function in C++ / 3.14.1: |
Passing Arguments to and from a Function / 3.14.2: |
Argument Passing by Copy (Value Semantics) / 3.14.2.1: |
Indirect Argument Passing by Reference / 3.14.2.2: |
($$$) Passing by Pointer / 3.14.2.3: |
Function Call Mechanism and Inline Functions / 3.14.3: |
Recursive Functions and the Call Stack / 3.14.4: |
Function Overloading - Resolving Visibility with Namespaces / 3.14.5: |
Lambda Functions / 3.14.6: |
($$$) More on Lambda Functions / 3.14.7: |
($$$) Function Pointers / 3.14.8: |
($$$) Functions in an Object-Oriented Framework / 3.14.9: |
Example Project - Wrapping Objects in a Structure with a Constructor / 3.15: |
EMatrix in an Object-Oriented Environment / 3.15.1: |
Basic Operations with EMatrix / 3.15.2: |
Input and Output Operations on EMatrix / 3.15.3: |
Basic Mathematical Operations on EMatrix / 3.15.4: |
Organizing the Project Files and Running the Application / 3.15.5: |
Extending Matrix Initialization with a Simple Random Number Generator / 3.15.6: |
Example Project - Representing Quadratic Equations / 3.16: |
Definition of a Class to Represent Quadratic Polynomials / 3.16.1: |
TQuadEq Member Implementation / 3.16.2: |
TQuadEq in Action / 3.16.3: |
Example Project - Tuples and Structured Bindings for Converting Roman Numerals / 3.17: |
More on std: : tuple and the Structured Binding / 3.17.1: |
How to Write a Software Unit Test / 3.17.2: |
Automating Unit Tests - Using the Standard Random Number Library / 3.17.3: |
Example Project - Building a Currency Calculator Component / 3.18: |
Currency Exchange Problem Analysis / 3.18.1: |
CurrencyCalc Software Design / 3.18.2: |
TCurrency Class Representing Currency Records / 3.18.3: |
C++Input/Output Manipulators / 3.18.3.1: |
TCurrencyExchanger Class for Exchanging Currency / 3.18.4: |
Putting It All Together - The Complete Currency Exchange Program / 3.18.5: |
Operators / 3.19: |
Summary of the C++ Operators / 3.19.1: |
Further Notes on Operators / 3.19.2: |
Delving into Object-Oriented Programming / 3.20: |
Basic Rules and Philosophy of Object-Oriented Design and Programming / 4.1: |
Anatomy of a Class / 4.2: |
Naming Conventions and Self-Documenting Code / 4.2.1: |
Rules for Accessing Class Members / 4.3: |
Example Project - TComplex Class for Operator Overloading / 4.4: |
Definition of the TComplex Class / 4.4.1: |
Definition of the TComplex Class Members / 4.4.2: |
Test Functions for the TComplex Class / 4.4.3: |
More on References / 4.5: |
Right and Forward References / 4.5.1: |
References vs. Pointers / 4.5.2: |
Pitfalls with References / 4.5.3: |
Example Project - Mastering Class Members with the TheCube Class / 4.6: |
Automatic vs. Explicit Definition of the Constructors / 4.6.1: |
TheCube Object Layout and Semantics / 4.6.2: |
Shallow vs. Deep Copy Semantics / 4.6.3: |
Move Constructor and Move Assignment Semantics / 4.6.4: |
Implementation of the TheCube Streaming Operators / 4.6.5: |
Validation of TheCube / 4.6.6: |
Example Project - Moving EMatrix to the Class / 4.7: |
Definition of the EMatrix Class / 4.7.1: |
Implementation of the Class Streaming Operators / 4.7.2: |
Implementation of the Arithmetic Operators / 4.7.3: |
Testing Matrix Operations / 4.7.4: |
Introduction to Templates and Generic Programming / 4.8: |
Generalizing a Class with Templates / 4.8.1: |
($$$) Template Specializations / 4.8.2: |
Template Functions and Type Checking / 4.8.3: |
Example Project - Designing Template Classes with TStack / 4.8.4: |
Design and Implementation of the TStackFor Class / 4.8.4.1: |
Testing TStack / 4.8.4.2: |
Template Member Functions / 4.8.5: |
Class Relations - "Know," "Has-A," and "Is-A" / 4.9: |
Example Project - Extending Functionality Through Class Inheritance with TComplexQuadEq / 4.10: |
Virtual Functions and Polymorphism / 4.11: |
($$$) More on the Virtual Mechanism / 4.12: |
($$$) The Curiously Recurring Template Pattern and Static Polymorphism / 4.13: |
($$$) Mixin Classes / 4.14: |
Example Project - The TLongNumberFor Class for Efficient Storage of Numbers of Any Length / 4.15: |
Binary-Coded Decimal Representation / 4.15.1: |
Endianness / 4.15.2: |
Definition of the TLongNumberFor Class / 4.15.3: |
Type-Converting Operations / 4.15.3.1: |
TLongNumberFor Test Function / 4.15.3.2: |
Designing Classes for PESEL IDs / 4.15.4: |
Aggregating PESEL / 4.15.4.1: |
Inherited PESEL / 4.15.4.2: |
LongNumber Project Organization / 4.15.4.3: |
($$$) Extending the Functionality of TLongNumberFor with the Proxy Pattern / 4.15.5: |
Definition of the Proxy Class / 4.15.5.1: |
Testing the Functionality of the TLongNumberFor Class with the Proxy Pattern / 4.15.5.2: |
Strong Types / 4.16: |
Memory Management / 4.17: |
Types of Data Storage / 5.1: |
Dynamic Memory Allocation - How to Avoid Memory Leaks / 5.2: |
Introduction to Smart Pointers and Resource Management / 5.2.1: |
RAII and Stack Unwinding / 5.2.1.1: |
Smart Pointers - An Overview with Examples / 5.3: |
($$$) More on std: :unique_ptr / 5.3.1: |
Context for Using std: :unique_ptr / 5.3.1.1: |
Factory Method Design Pattern / 5.3.1.2: |
Custom deletes for unique__ptr / 5.3.1.3: |
Constructions to Avoid When Using unique_ptr / 5.3.1.4: |
($$$) More on shared_ptr and weak_ptr / 5.3.2: |
Advanced Object-Oriented Programming / 5.4: |
Functional Objects / 6.1: |
Example Project - Extending the Currency Search in XML Files, and Using State Machine and Regular Expressions with the regex Library / 6.2: |
Pattern Matching with the Regular Expression Library / 6.2.1: |
State Machine Pattern / 6.2.2: |
Implementing the Extended Class / 6.2.3: |
Project Extension - Loading Currency Information from the Internet / 6.2.4: |
Launching the Extended Version of CurrencyCalc / 6.2.5: |
Building a Static Library and a Terminal Window Application / 6.2.6: |
C++ Filesystem / 6.2.7: |
User Interface / 6.2.8: |
Definition of the CC_GUI Class / 6.2.8.1: |
Definitions of Members of the CC_GUI Class and the Callback Mechanism / 6.2.8.2: |
Launching the GUI-Based Application / 6.2.8.3: |
System Clocks and Time Measurements / 6.3: |
($$$) Time Measurement for Function Execution / 6.4: |
Range Class / 6.5: |
Functional Programming and the Ranges Library / 6.5.1: |
Example Project - Parsing Expressions / 6.6: |
Defining Language Expressions with Formal Grammar Rules / 6.6.1: |
Design of the Expression-Processing Framework / 6.6.2: |
The First Expression Interpreter / 6.6.3: |
Building the Syntax Tree with the Composite Design Pattern / 6.6.4: |
The Composite Design Pattern to Define the Nodes of a Tree / 6.6.4.1: |
Implementation of the TNode Hierarchy and Cooperation with Visitors / 6.6.4.2: |
Implementation of the ValueLeafNode Class / 6.6.4.3: |
Implementation of the BinOperator Class / 6.6.4.4: |
Implementation of the PlusOperator Class / 6.6.4.5: |
Deep Copying Node Objects - The Prototyping Mechanism / 6.6.4.6: |
Interpreter to Build a Syntax Tree / 6.6.5: |
Stack for Smart Pointers / 6.6.6: |
Traversing Trees with the Visitor Design Pattern / 6.6.7: |
The Expression-Evaluating Visitor / 6.6.7.1: |
The Expression-Printing Visitor / 6.6.7.2: |
Testing the Interpreters / 6.6.8: |
Representing Expressions on a Stack in Reverse Polish Notation / 6.6.9: |
Reverse Polish Notation / 6.6.9.1: |
Algorithm for Evaluating an RPN Expression / 6.6.9.2: |
Computer Arithmetic / 6.7: |
Integer Value Representation / 7.1: |
Base Conversion Algorithm / 7.1.1: |
Hexadecimal and Octal Representations / 7.1.2: |
Binary Addition / 7.1.3: |
Negative Values and Subtraction / 7.1.4: |
Arithmetic Control Flags / 7.1.5: |
Representing Fractions / 7.1.6: |
Binary Shift Operations / 7.2: |
($$$) Example Project - Software Model for Fixed-Point Representations / 7.3: |
Fixed-Point Numbers and Their Arithmetic / 7.3.1: |
Definition of the FxFor Class / 7.3.2: |
Selected Methods of the FxFor Class / 7.3.3: |
Applications of FxFor / 7.3.4: |
Floating-Point Representations / 7.4: |
Number Representation in Floating-Point Format / 7.4.1: |
Distribution of Floating-Point Numbers and the Computational Consequences / 7.4.2: |
($$$) Real-Value Approximation Error with Floating-Point Representations / 7.4.3: |
The IEEE 754 Standard for Floating-Point Arithmetic / 7.4.4: |
The Standard FP Operation Model / 7.4.5: |
Computations That Are Conscious of Numerical Errors / 7.4.6: |
Example Project - Evaluating the Summation Algorithms / 7.4.7: |
Example Project - The Newton Method of Finding the Roots of a Function / 7.4.8: |
Function to Compute Square Roots Based on Newton's Iteration / 7.4.8.1: |
Basics of Parallel Programming / 7.5: |
Basic Concepts of Parallel Computations / 8.1: |
Adding Parallelism to the Standard Algorithms / 8.2: |
Launching Asynchronous Tasks / 8.3: |
Parallelization with the OpenMP Library / 8.4: |
Launching a Team of Threads and Providing Exclusive Access Protection / 8.4.1: |
Loop Parallelization and Reduction Operations / 8.4.2: |
Massive Data Parallelization / 8.4.3: |
Appendix / 8.5: |
Preprocessor Directives / A.l: |
Short Introduction to C / A.2: |
Built-in Arrays / A.2.1: |
Passing Arrays to Functions - The Main Function / A.2.1.1: |
C Structures / A.2.3: |
C Functions and Input/Output / A.2.4: |
Unions / A.2.5: |
Memory and String Operations / A.2.6: |
Binding C and C++ Code / A.2.7: |
Linking and Binary Organization of C/C++ Objects / A.3: |
Graphical User and Web Interfaces for C++ Projects / A.4: |
Converting Bin, Oct, Dec, and Hex Values with FixBinCalc / A.5: |
Programming Toolchain / A.6: |
Project-Generating Tool (CMake) / A.6.1: |
Source Version Control and Repositories / A.6.2: |
Profiler / A.6.3: |
Software Testing / A.7: |
Bibliography / A.8: |
Index |