FORMATION C++
1. Syntaxe C++
- Types et littéraux
- Types
- Déclaration et initialisation
- Constantes
- Noms
- Objets
- Tableaux
- Expressions
- Expressions (II)
- Sûreté du typage
- Sûreté du typage (II)
- Affectation et incrémentation
- Violation de la sûreté du typage
- Violation de la sûreté du typage
- (Variables pas initialisées)
- Un détail technique
- Références en C++
- Références (II)
- Qu’est-ce que c’est un pointeur en C++?
- Pointeurs constants et Pointeurs aux Types constants
- Utilisation de références et pointeurs
- Casting
- Casting explicit simple
- Allocation dynamique de mémoire: new et delete
- Sémantique de new[n]
- Exemple de new
- Syntaxe et sémantique de delete
- Structures de control
- Fonctions
- Un autre exemple
- Fonctions: erreurs communes
- Références et Fonctions: appel par référence
- Utilisation du code C dans les programmes C++
- Incompatibilités entre C and C++
- Constantes symboliques
- Constantes symboliques (II)
2. Approche Orientée Objet
- Programmation Procédurale
- Data hiding
- Data Hiding: Définition d’une pile
- Data Hiding: Utilisation de la pile
- Abstraction des données
- Abstraction des données (II)
- Problèmes de l’Abstraction des données
- Problèmes de l’Abstraction des données (II)
- Problèmes de l’Abstraction des données (III)
- Programmation Orienté Objet
- Programmation Orienté Objet (II)
3. POO Classes et Objets
- Classes
- Membres d’une classe
- Accès au membres
- Exemple d’une classe: Date
- Membres statiques
- Membres statiques (II)
- Classes amies
- Fonctions et Classes amies
- Conception de Classe
- Conception de Classe (II)
- Interfaces et « fonctions d’aide »
- Fonctions d’aide
- Constructeur de copie
- Utilité du constructeur de copie
- Définition du constructeur de copie
4. POO Dérivation et Héritage
- Concept de dérivation et syntaxe des classes dérivées
- Première approximation
- Deuxième approximation: Dérivation
- Problème d’accès aux membres des classes dérivées
- Constructeurs et destructeurs des classes dérivées
- Control d’accès
- Fonctions Virtuelles et Polymorphisme
- Concept de fonction virtuelle
- Classes abstraites
- Héritage multiple
- Besoin de l’héritage multiple
- Problème ambigüité: duplication des membres
- Première Solution à l’ambiguïté
- Deuxième problème: encore plus d’ambiguïté
- Deuxième Solution à l’ambigüité
- Problèmes de l’héritage multiple
- Utilisation de l’héritage multiple avec des interfaces
- Factorisation du code
- Exceptions
- Namespaces (Espaces de noms)
5. Surcharge d’operateurs
- Surcharge d’operateurs
- Exemple d’utilisation
- Format général
- Conditions
- Surcharge d’opérateurs binaires
- Surcharge des opérateurs new et delete
- Surcharge des opérateurs << et >>
6. Modèles
- Surcharge vs Modèles
- Modèles de fonction
- Modèles de classe
- Modèles et héritage
- Modèles et héritage (II)
7. STL, entrée/sortie
- STL
- Eléments de la STL
- Vector: un template de la STL
- Vector: un template de la STL (II)
- Vector: un template de la STL (III)
- Iterateurs
- Utilisation des iterateurs
- Plus sur les vecteurs
8. Intégration du C++
- Cycle de vie du logiciel
Cours de Base C++
The goal of this course is to provide developers the most important
concepts of the C++ programming language.
C++ == A BETTER C
- Comments
- Streams
- Default function arguments
- Function overloading
- References
CONCEPTS OF OBJECT-ORIENTED PROGRAMMIG (OOP)
- Objects and Classes
- Abstraction/Encapsulation
- Data Hiding
- Inheritance
- Polymorphism
- Composition
- Aggregation
- OO Design
OBJECT BASED PROGRAMMING
- Objects and Classes
- Class members
- Class members visibility
- this-pointer
- Construction/destruction
- const-members and objects, best practices
- Dynamic memory allocation : new/delete
- static-members
- Class code management
- Friend classes/functions
IMPLEMENTING OO-CONCEPTS IN C++
- Inheritance
- Polymorphism
- Pure virtual-functions
- Abstract classes
- Interfaces
MIGRATING FROM C TO C++
- Calling conventions
- Name decoration or name mangling
- Under the hood
- Use of “extern C”
EXCEPTION HANDLING (EH)
- Robust programming
- Setting up an EH-scheme
- try/throw/catch
- Throwing objects
- Best practices
- Use of set_terminate()
- Best practices
CONVERSIONS
- Typecasts
- Conversion by constructor
- Conversion operator
- Avoiding ambiguities
OPERATOR OVERLOADING
- Introduction
- Overloading as a gadget
- using a member function
- using a friend function
- Overloading as a necessity
- overloading operator=()
- copy constructor
- Restrictions
TEMPLATES – STL
- Template functions
- Class templates
- Standard Template Library (STL)
MULTIPLE INHERITANCE
- Inheriting implementations
- Ambiguities
- virtual base classes
I/O-STREAMS : UNDER THE HOOD
- Definition of cin
- Definition of cout
- Persisting your own objects
- Formatted output
Cours avancé C++
This course is designed to provide an in-depth knowledge of C++
C++ REVISITED
- References
- Access-specifiers, this-pointer
- (explicit) constructor / destructor
- Copy constructor
- const -memberfunctions , – objects ; mutable
- Inheritance, polymorphism
- Templates + template specialization
ADVANCED TOPICS
- Namespaces
- RTTI
- Cast operators: static_cast, dynamic_cast, …
- Smart Pointers
STANDARD TEMPLATE LIBRARY (STL)
- Introduction to STL
- Containers : Sequences and Associative Containers
- Using Containers: string, vector, deque, list, set, map, …
- Iterators: an overview
- Using Iterators: mutable, constant, reverse, constant and reverse
- Algorithms: sort, reverse, search
UNDERSTANDING/IMPLEMENTING DESIGN PATTERNS USING C++
The importance in design patterns lies in the fact that application development can result in an architecture that is smaller, simpler and far more understandable than if these patterns were to be ignored.
Course material is based on the Design Patterns bible ‘Design Patterns’ by Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides.
- Introduction to design patterns
- Creational patterns: Abstract Factory, Factory Method, Singleton
- Structural Patterns: Composite, Façade
- Behavioral Patterns: Chain of Responsibility, Iterator, Interpreter,
Command, Observer, Visitor
If time permits, following Design Patterns can be discussed:
Bridge, Decorator, Mediator, Proxy, State
UNIT TESTING
Implementing Design Patterns in C++ (4 days)
Design patterns describe simple and elegant solutions to specific problems in Object Oriented Design.
Design patterns capture solutions that have developed and evolved over time. They play an important role in designing complex systems.
The importance in design patterns lies in the fact that application development can result in an architecture that is smaller, simpler and far more understandable than if these patterns were to be ignored.
Course material includes slides based on the book ‘Design Patterns’ by Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides.
At the end of the course, students will be able to: understand and implement different design patterns
Prerequisites
Before attending this course, students should be familiar with: at least 3 months C++ programming skills
Course Outline
Introduction
What are Design Patterns ?
Creational Patterns (theory + labs)
Creational patterns abstract the instantiation process.
Patterns described:
- Abstract Factory
- Factory Method
- Singleton
Structural Patterns (theory + labs)
Structural patterns are concerned with how classes and objects are composed
to form larger structures.
Patterns described:
- Bridge
- Composite
- Decorator
- Façade
- Proxy
Behavioural Patterns (theory + labs)
These patterns are concerned with algorithms and the assignments of responsibilities and communications between objects.
Patterns described:
- Chain of Responsibility
- Command
- Interpreter
- Iterator
- Mediator
- Observer
- State
- Strategy
- Visitor
Case Study
Putting theory into practice, students will analyze/develop a file-system. Based on the knowledge they have acquired during the course, students will decide what design patterns to use for the implementation.
Custom C++ course (3 days)
CONCEPTS OF OBJECT-ORIENTED PROGRAMMING (OOP) (2 HOURS)
- Objects and Classes
- Abstraction/Encapsulation
- Data Hiding
- Inheritance
- Polymorphism
- Composition
- Aggregation
C++ STANDARDS (2 HOURS)
- The C++ Standards Committee
- C++0x
- Extensions to the core language
- Rvalue reference and move semantics
- Type inference
- Lambda functions and expressions
- Null pointer constant: nullptr
- …
- C++ Technical Report 1
OBJECT ORIENTED DESIGN (.5 DAY)
- Introduction
- Single Responsibility Principle
- Open-Closed Principle
- Liskov Substitution Principle
- Interface Segregation Principle
- Dependency Inversion Principle
STANDARD TEMPLATE LIBRARY (STL) (1 DAY)
- Introduction to STL
- Containers
- string
- Sequences: vector, deque, list
- Associative Containers: set, map
- Iterators
- Container Adapters: queue, stack
- Algorithms: sort, reverse, search, for_each, fill
- Function Adapters: mem_fun_ref, mem_fun
- Parameter Binders: bind1st, bind2nd
Boost Libraries (1 day)
- Data structures: Any, Variant
- Miscellaneous: Noncopyable, Date_time, Lexical_cast
- String and text processing: Regex (regular expressions)
- Function Objects: Bind
- Memory: Smart Pointers
- Concurrent Programming: Thread, Interprocess
Plus d’infos sur Formation C++