Lecture overview -- Keyboard shortcut: 'u'  Source programs in previous lecture -- Keyboard shortcut: 'p'  Source programs in next lecture -- Keyboard shortcut: 'n'  Course home

Source Programs
Abstraction Mechanisms, Part 2

The Note Context in the rightmost column is only shown in case an annotated program exists. - You can navigate to the annotated program via the annotated slide view (= 'the note context').

Constructors and single inheritance - C++11 initialization syntax.single-1-cpp11.ccSlide context--
Constructors and multiple inheritance.multiple-1.ccSlide context--
Constructors and multiple inheritance - implicit activation of default constructor in Base.multiple-2.ccSlide context--
Constructors and multiple inheritance - order of construction and destruction.multiple-4.ccSlide context--
Constructors and multiple inheritance - base classes are re-ordered.multiple-5.ccSlide context--
Attempting to inherit constructors - problems.inheriting-constructors-cpp11-problems.ccSlide context--
Attempting to inherit constructors - success.inheriting-constructors-cpp11.ccSlide context--
Illustration of object slicing.slice-1.ccSlide context--
Does this variant change the game.slice-2.ccSlide context--
Virtual versus non-virtual functions in an AB class hierarchy - relative to illustration on the previous slide.virtual-1-simplified.ccSlide context--
Base class A and derived class B with non-virtual destructors - motivation.prog2-f15.ccSlide context--
Base class A and derived class B with virtual destructors.prog3.ccSlide context--
Base class A and derived class B and C with virtual destructors.prog4.ccSlide context--
A class B inherits two virtual, overloaded functions from A - straightforward - no problems.prog0.ccSlide context--
Class B redefines one of the functions, and expects to inherit the other - problems.prog1.ccSlide context--
A variant were vf is a pure virtual function in class A.pure-virtual.ccSlide context--
A sample C# interface.gameobject.csSlide context--
The C++ counterpart to the C# Interface.interface-like-class.ccSlide context--
A C++ class that 'implements the interface' and uses the resulting class.interface-like-class-and-use.ccSlide context--
Class Outer that contains class Inner - does not compile.nested-1-f15-reorg.cppSlide context--
Class Outer that contains class Inner - friends of each other.nested-2-f14.cppSlide context--
A variant where class Inner is private in Outer - does not compile.nested-2a.cppSlide context--
Inner attempts to access to non-static variable in Outer - does not compile.nested-3.cppSlide context--
Problems solved - This program compiles.nested-3a.cppSlide context--
Illustration of how to prevent overriding a virtual function.prog1.ccSlide context--
Illustration of how to prevent overriding all virtual functions.prog2.ccSlide context--
Class variant of class Point with several different move functions.point.hSlide context--
Implementation of class Point and the tree move methods - not important for the example.point.ccSlide context--
A program that illustrates pointer to Point member functions.prog.ccSlide context--
Ambiguity - the compiler locates the problem.amb-1.ccSlide context--
Ambiguity resolution in the client of C.amb-2.ccSlide context--
Involving polomorphism - but there is a problem.amb-3-problems.ccSlide context--
Involving polomorphism - problem solved.amb-3.ccSlide context--
Illustration of replication of class A.non-virtual-1.ccSlide context--
Illustration of shared, virtual, base class A.virtual-1.ccSlide context--
Ignoring constructor in virtual base class.virtual-problem.ccSlide context--
Forcing use of a constructor in a virtual base class.virtual-problem-variant.ccSlide context--
Attempting repeated inheritance in C++.try-repeated-inheritance.ccSlide context--
Class D inherits privately from B and publically from C.base-class-access-1a.ccSlide context--
Same setup: Which variables can access which objects.base-class-access-2.ccSlide context--
A type parameterized variant of class Point - point.h.point.hSlide context--
The implementation of the template class Point - point.cc.point.ccSlide context--
A program that illustrate template instantiation.prog.ccSlide context--
A program that illustrate problematic template instantiation.prog1.ccSlide context--
A type parameterized variant of class Point - point.h.point.hSlide context--
The implementation of the template class Point - point.cc.point.ccSlide context--
A program that illustrate the template instantiation.prog.ccSlide context--
The template function compare, and various uses of it.cmp.ccSlide context--
Class Point with comparison operator friends.point.hSlide context--
The implementation of class Point.point.ccSlide context--
The template function compare used for Point comparison.cmp.ccSlide context--
Class Point parameterized with a policy class.prog.ccSlide context--
Four different policy classes - with type parameterized static methods.norms.ccSlide context--
The Point class template definition - policy parameterized.point.hSlide context--
Member functions in class Point.point.ccSlide context--
Two Point functions parameterized with a policy class.prog.ccSlide context--
Four different policy classes - with type parameterized static methods.norms.ccSlide context--
The Point class definition - not a template in this version.point.hSlide context--
Member functions in class Point - not essential to this example.point.ccSlide context--
The general class template Point followed by the specialized one.point.hSlide context--
The implementation of the template class Point - point.cc - nothing interesting here.point.ccSlide context--
A program that illustrate the instantiation of both the general and specialized template classes.prog.ccSlide context--
Full and partial specializations of a class template A.prog.cppSlide context--
Extended variant - revealing the specialization via a data member.prog.cppSlide context--

Generated: Tuesday August 1, 2017, 13:31:08