Description
Constantly evolving, the C++ language offers mechanisms such as genericity or metaprogramming which allow a robust and very rich design. The recent C++11 and C++14 standards integrate a significant part of the BOOST project libraries and significantly improve the Standard Template Library (STL). This training will allow you to deepen design in C++ by learning the latest developments in the language and the effective use of the STL.
Who is this training for ?
For whom ?Designers and developers of C++ applications, project managers, software architects.
Prerequisites
Training objectives
Training program
- Function libraries
- Language standard libraries: ctype.
- h, math.
- h, stdlib.
- h, time.
- h.
- and others.
- Advanced mathematical libraries: Linpack, Lapack.
- Dynamic allocation management: calloc() functions , realloc().
- Existing functions with variable number of arguments created by the programmer.
- Practical work Use of several function libraries.
- Reminders
- Memory allocation classes.
- Construction, initialization, embedding of objects.
- Memory leaks.
- Constance, the word -mutable key, Lazy Computation.
- C++ friendship and access control.
- Virtual destruction.
- Exception handling strategy.
- Namespaces.
- The new language features of C++11
- nullptr and other literals.
- The =delete, =default directives.
- Constructor delegation.
- The “type safe” enumerations .
- The keyword auto and loops over an interval.
- Reference rvalues and impacts the normal form of C++ classes.
- Lambda-expressions.
- Practical work Rewriting existing C++ code in C++11, comparison of the two implementations.
- Operator management
- Binary and unary operators.
- The indirection operator, use cases.
- The referencing operator.
- The prefixed and post-fixed increment/decrement operators.
- Other operators: comparison, assignment.
- The overloading of the [] operator, insertion operators ().
- Functors and operator overloading (), advantage over functions.
- Practical work r nCreation of functors and proxies (memory release, reference counting) with the operators studied.
- Conversion and RTTI
- Conversion operators.
- Implicit constructions, the explicit keyword.
- Casting operators const_cast, static_cast, reinterpret_cast.
- Dynamic conversion and Runtime Type Information.
- The typeid operator, related exceptions.
- The type_info class.
- Control of downcasting 'help for the dynamic_cast operator.
- Practical work Implementation of the idioms " is-a " and " is-kind-of " with dynamic_cast.
- Genericity
- Introduction to class patterns.
- Genericity and preprocessor.
- Generic function.
- Generic class.
- Generic composition.
- Generic generalization.
- Partial and total specialization.
- Introduction to meta-programming.
- Genericity, principle federator of the STL and BOOST libraries.
- Practical work Start of the case study which will be completed with the STL and BOOST.
- Implementation of the composition and generic generalization.
- Creating generic plug-ins.
- La STL (Standard Template Library)
- STL components: complementary types, containers, algorithms, iterators, function objects, adapters.
- STL character strings, the basic_string template class and its specializations.
- Sequential and associative containers: definition, role and selection criteria.
- Allocators and container memory management.
- Methods of insertion, deletion, iteration and access to the main containers: Vector, List, Set, Stack.
- The concept of iterator.
- Traversing a container.
- The different groups of STL algorithms: non-mutant, mutant, sorting and merging, numerical.
- Manipulation of containers (manipulation, search for values.
- ) .
- Configure generic algorithms using "function" objects.
- "Adapters" and modifying the behavior of a component.
- STL and processing on flows (files, memory.
- ).
- Principle of RAII: automatic pointers and the auto_ptr class.
- The standard STL exceptions.
- Practical work Implementation of relationships with STL collections.
- Use of any standard algorithms.
- The new C++11 features of the standard library
- Historical evolution: Boost --> TR1 --> C++11.
- The new containers: array, forward_list, unordered_set, unordered_map.
- The class tuple.
- Smart pointers: shared_ptr, weak_ptr, unique_ptr.
- The new functors and binders.
- Introduction to thread management.
- Regular expressions.
- Practical work Implementing robustness with smart pointers.
- Using regular expressions.
- BOOST
- The Pointer Container Library (destruction of pointer data from a container).
- The boost::any and boost::variant data structures.
- Programming (connections and signals).
- Process management, interprocess communication mechanisms and shared memory.
- Practical work Improvement of the implementation of the case study by use the Pointer Container Library.
- Advanced use of inheritance
- Inheritance versus embedding.
- Private inheritance.
- Protected inheritance.
- Exporting hidden members with the Using Clause.
- Multiple inheritance and member collision handling.
- Diamond inheritance.
- Virtual inheritance and dynamic_cast.
- Design principles: Liskov substitution, principle of opening/closing, inversion of dependencies.
- Rules for implementing interfaces in C++.
- Practical work Combination of multiple, private and export to design robust and highly scalable classes.