Přeskočit na obsah
Modul 2

Objektově orientovaný C++

Třídy, objekty, dědičnost, polymorfismus a pilíře OOP v C++.

Classes & Objects

  1. Třídy, struktury a zapouzdření

    Understand the difference between struct and class, access specifiers, encapsulation, const member functions, static members, and modern aggregate initialization.

  2. Constructors, Destructors & Rule of 0/3/5

    Master the full lifecycle of C++ objects — from construction through destruction — and learn when to write (or not write) special member functions.

  3. Copy Semantics: Deep vs Shallow

    Learn the difference between shallow and deep copies, how to implement correct copy operations for resource-owning classes, and the copy-and-swap idiom.

Dědičnost a polymorfismus

  1. Dědičnost a vztahy Is-A

    Naučte se veřejnou dědičnost, řetězení konstruktorů, problém krájení, vícenásobnou dědičnost a problém diamantu – a kdy je dědičnost vhodná.

  2. Virtuální funkce, vtables a polymorfismus

    Ponořte se do běhového polymorfismu: jak funguje virtuální odesílání pod pokličkou, kdy použít přepisovací a finální, abstraktní třídy a RTTI.

  3. Operator Overloading

    Learn how to overload operators correctly — member vs non-member, canonical forms, stream operators, the C++20 spaceship operator, and common pitfalls.

OOP Design

  1. Static Members, Singletons & PIMPL

    Explore static members, the Meyers Singleton pattern, the Factory pattern, and the PIMPL idiom for ABI stability and compile-time insulation.

  2. Složení, rozhraní a design

    Ovládněte kompozici nad dědičností, čistě abstraktní rozhraní, principy návrhu (ISP, DIP), std::variant jako alternativu k dědičnosti a vymazání typu.