Advanced C++

Overview

This course consists of three modules:
    • An introductory segment reviews topic which includes inheritance, the ANSI C++ Standard Library, templates. Input and Output streams, and practical issues of C++ programming, such as reliability, testing, efficiency and interfacing to C.
    • The second segment covers advanced topics like advanced issues of inheritance and polymorphism. Principles of effective class design including the orthodox canonical form, use of composition, templates and interface inheritance. This training covers runtime type information – RTTI and exception handling.
    • Concepts of Advanced applications of C++ are covered, including smart pointers and reference counting
    • Standard Template Library (STL) is introduced in the 3rd segment.
    • The components of algorithms, iterators and data structures are covered. Illustrations are provided by a number of important containers, such as queues, vectors, lists, stacks and sets.

Duration
5 Days

Pre-Requisites
Prior experience in C++

Course Outline

  • Inheritance Concept
  • Inheritance in C++
  • Protected Members
  • Base Class Initializer List
  • Composition
  • Member Initialization List
  • Order of Initialization
  • Inheritance vs. Composition
  • Summary – Inheritance
  • A Case for Polymorphism
  • Dynamic Binding
  • Pointer Conversion in Inheritance
  • Polymorphism Using Dynamic Binding
  • Virtual Function Specification
  • Invoking Virtual Functions
  • VTable
  • Virtual Destructors
  • Abstract Class Using Pure Virtual Function
  • Employee as an Abstract Class
  • Heterogeneous Collections
  • Summary – Polymorphism
  • ANSI C++ Library
  • Hello ANSI C++
  • Namespaces
  • ANSI C++ String Class
  • Templates
  • General Purpose Functions
  • Macros
  • Function Templates
  • Template Parameters
  • Template Parameter Conversion
  • Function Template Problem
  • Generic Programming
  • General Purpose Classes
  • Class Templates
  • Array Class Implementation (array.h)
  • Using the Array Template
  • Template Parameters Class Template Instantiation
  • Non Type Parameter Conversion
  • Template Library
  • STL Components
  • Generic Programming
  • STL Elements of a Simple Program
  • Simple STL Program Map Container
  • Input/Output in C++
  • Built-in Stream Objects
  • Output Operator <<
  • Input Operator >>
  • Character Input
  • String Input
  • Formatted I/O
  • Streams Hierarchy (Simplified)
  • File I/O
  • File Opening
  • Integer File Copy
  • Character File Copy
  • Overloading Stream Operators
  • Implementing Overloaded Stream Operators
  • Interfacing C++ to Other Languages
  • Calling C from C++
  • cplusplus Macro
  • Calling C++ from C
  • Interface Module for Stack Class
  • Namespace Collisions
  • ANSI Namespace
  • Reliability Philosophies of Languages
  • Prototypes and Type Checking
  • Constant Types
  • Access Control in C++
  • Reviews and Inspections
  • Inspections and C++
  • Testing Strategies for C++
  • Performance Considerations
  • Class Libraries
  • Good Class Design
  • String Class
  • Public Inheritance
  • Public Inheritance Problems
  • Inheritance and Semantics
  • Private Inheritance
  • Composition
  • Composition vs. Private Inheritance
  • Templates vs. Inheritance
  • Protected Inheritance
  • Implementation Encapsulation
  • Interface Inheritance
  • Exception Handling
  • try and catch
  • Exception Flow of Control
  • Context and Stack Unwinding
  • Handling Exceptions in best Context
  • Benefits of Exception Handling
  • Unhandled Exceptions
  • Clean Up
  • Multiple Catch Handlers
  • Runtime Type and Polymorphism
  • type_info Class
  • typeid Operator
  • Compiler Options
  • Safe Pointer Conversions
  • Dynamic Cast
  • New C++ Style Casts
  • Static Cast
  • Reinterpret Cast
  • Const Cast
  • Class Hierarchy in Smalltalk
  • Smalltalk Class Hierarchy (Simplified)
  • Collection Classers
  • Multiple Inheritance Solution
  • Basic Derivation
  • Ambiguities in Multiple Inheritance
  • Resolving Ambiguity
  • Duplicate Subobjects
  • Virtual Base Classes
  • Orthodox Canonical Form (Review)
  • Object Validation
  • String Class
  • Smart Strings
  • Reference Counting Rules
  • Smart String Pointer
  • Generic Smart Pointers
  • Constructing Smart Pointers
  • Smart Pointer Difficulties
  • Templates
  • Overloading Functions
  • Template Functions
  • Specializing a Template Function
  • Disambiguation under Specialization
  • Template Classes
  • An Array Template Class
  • Instantiating a Template Class Object
  • Friends of Template Classes
  • Templates with Multiple Type Parameters
  • Non Class-type Parameters for Template Classes
  • Comments Regarding Templates
  • Templates and Inheritance
  • Perspective
  • History and Evolution
  • New Features
  • The Standard Template Library
  • Generic Programming
  • Design Goals
  • Header Files
  • STL Components
  • Containers
  • Algorithms
  • Iterators
  • Compiling STL Code
  • vector
  • Vector.cpp
  • list
  • List.cpp
  • map
  • Map.cpp
  • set
  • Set.cpp
  • multiset
  • Multiset.cpp
  • find
  • FindVector.cpp
  • find – list
  • merge
  • Overriding the Default Comparison
  • Iterators
  • Iterators.cpp
  • Functions
  • Functions.cpp
  • Function Objects
  • FunctionObject.cpp
  • Vectors
  • Vector.cpp
  • Vector Operations
  • Typedefs
  • Deques
  • deque as Stack
  • deque<T> Functionality
  • Lists
  • Generic Programming
  • Tradeoff with Lists
  • List Memory Allocation
  • list Functionality
  • Associate Containers
  • Sets
  • Sets with User Defined Objects
  • Multisets (Bags)
  • Maps
  • Multimaps
  • Pointers