C++ PROGRAMMING, PATTERNS & PRACTICES
Course Outline:
Module 1: Basic structure of C++ programme:
Layout of a Executable file
- Source file (.cpp)
- Header files ( .h)
- Object files (.obj)
- Complie time v/s link time v/s Runtime
- Preprocessor Definitions/ Compile time switches
- Executable File Format
- Code Segment
- Data Segment
- Heap
- Stack
- Static link library v/s Dynamic link library
- Creating a static link library
- Creating a dynamic link library
- C++ library Design
- What is a namespace?
- Using Namespace with Scope resolution
- Using Namespace with The using directive
- Using Namespace with The using declaration
- Namespace Aliases
- Unnamed Namespace
- Namespace Composition
- Selection
- Resolving Potential Clash
- Name spaces are open
- Function Stack Frame
- Calling Conventions
- Naming Conventions
- Inline function
- Function prototype
- Recursive Function
- Overloading Functions
- Pass by value v/s Pass by ref
- Unnamed Function Parameters
- Default function Arguments
- Variable Parameter List
- Temporary objects
- Template Function
- Overloading vs Generic Function
- Function Template Internals
- Full Specialization
- Partial Specialization
- Library Design Issue
- Simple Object Model
- Table driven object model
- C++ object model
- Class internals
- Generic class
- Class Template Full specialization
- Class Template Partial specialization
- Template Bloating
- static data members
- const data members & const_cast
- static const data member
- mutable data member
- Instance data member
- Instance function
- Static function
- Const function
- Friend functions
- Callbacks using Function Pointer
- Synchronize v/s Asyncronize calls
- Creating Container Class
- Iterator Pattern
- Standard containers(vector, stack, list, map, deque, set, multimap, multiset)
- Compiler Synthesized Constructor
- Deep copy v/s Shallow copy
- Overloaded constructor
- Copy constructor
- Explicit constructor
- Copy Constructor v/s Assignment operator
- Initialization List
- Order of Initialization
- Initialization v/s Assignment
- Default Arguments
- Calling base class constructor
- Destructor
- Compiler Synthesized Destructor
- Preventing destroying object instance
- Destroying instance in the constructor
- Preventing object Instance
- Preventing Stack based objects
- Prototype Pattern
- New vs malloc vs calloc
- Handling bad_alloc exception
- Using new with nothrow
- Placement new
- Overloading new operator
- Delete vs Free
- Destroying objects on heap
- Destroying array of objects
- Preventing Heap based objects
- Preventing Stack based objects
- Identifying object is on Heap or Stack
- Smart pointers
- Reference Counting
- Singleton pattern
- Containment
- Friend class
- Nested Class
- Containment v/s Inheritance
- Private v/s protected inheritance
- Changing scope of base member in derived class
- Derived class
- Virtual member function
- Pure virtual function
- Abstract class v/s Interface v/s Concrete class
- Calling virtual function from constructor
- Calling virtual function from destructor
- Calling virtual function from non virtual member function
- Object Slicing
- Virtual functions in Single Inheritance
- Virtual functions in Multiple Inheritance
- Virtual Inheritance
- typeid function
- type_info object
- dynamic_cast vs static_cast
- reinterpret_cast
- RTTI Internals
- RTTI on non polymorphic types
- Virtual destructor
- Virtual constructor using Prototype pattern
- Non member virtual function
- Dual dispatching
- Template Method
- Bridge Pattern
- Abstract Factory Pattern
- Resumption v/s Termination
- Throwing exception
- try block
- catch block
- multiple catch blocks
- catch any block
- set_terminate functions
- Order of catch blocks
- Catching exception by value
- Throwing exception in constructor
- Throwing exception in destructor
- auto_ptr
- standard exceptions
- creating custom exception class
- Exception handling internals
- Exception Handling Performance Issues
- C++ Primer by Lippman
- Inside Objects by Lippman
- C++ By Bjarne Stroustrup
- C++ Bible by AL Stevens
- Complete Reference by Herbert Schildt
- Advanced C++ james coplin
- Effective C++ Scott mayor
- More Effective C++ Scott mayor
- Effective STL Scott mayor
- Design Patterns (GOF)
- Test will be conducted for all participants at the end of the training.
- Monitoring of responses while the session is in progress, degree of interaction and Quality of doubts / questions raised is related to degree of training imbibed
- 5 days
Runtime memory layout of a application
Library
Namespace
Module 2: Functions
Function Internals
Parameters, Arguments & return value
Template Function
Module 3: Object Model
Object Model
Data Members
Member Function
Function Pointers
Container class
Module 4: Initialization & Clean up
Object Initialization
Initialization List
Object Cleanup
Patterns & Techniques for construction
Module 5: Dynamic Memory Management
New operator
Delete operator
Techniques for Memory Management
Patterns for Memory Management
Module 6: Inheritance & Containment
Techniques using containment
Techniques using Inheritance
Module 7: Virtual
Virtual functions
Virtual function Issues
Virtual Internals
Runtime Type Identification
Techniques using Virtual functions
Patterns using Virtual functions
Module 8: Exception Handling
Exception Handling
Exception Handling Issues
Advanced Exception Handling
Post Training Reading
Evaluation Criteria for the Training
Duration: