Skip to content

Commit d0b8285

Browse files
committed
added terms for chapter12
1 parent ee5379e commit d0b8285

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

Chapter12/terms.txt

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
abstract class a class that either has one or more pure virtual functions,
2+
or has protected constructors, which prevent users from directly
3+
creating objects of its types, only allowing using the type as a base class
4+
mutability modification of objects, access specifiers prevent users from modifying our
5+
implementation of our classes
6+
public access specifier that allows accessing a class' member from its own members,
7+
its derived classes and other functions
8+
access control a specifier that dictates who can access a selected member, where they can
9+
access it from:
10+
- public: everyone
11+
- protected: derived classes and from members
12+
- private: only own members
13+
object layout the layout of the objects in memory:
14+
data members are contiguously placed next to each other,
15+
base class members are placed before the derived members,
16+
classes with virtual functions have an additional vptr member that points to the vtable
17+
pure virtual function a virtual member function with no definition, the class it is defined in is an abstract class
18+
base class a class whose members are inherited to a derived class, and the derived class can be used
19+
in place of the base class
20+
object-oriented encapsulation, inheritance and polymorphism
21+
subclass AKA derived class
22+
derived class a class that inherits the members of a base class, and can be used as the base class
23+
it can also define additional members
24+
override a derived class can override any virtual function declared in its base class,
25+
when calling the base virtual function, it is determined at run-time, whose function to call
26+
superclass AKA base class
27+
dispatch AKA dynamic dispatch/run-time dispatch/run-time polymorphism
28+
the virtual function called from the base class is actually determined at run-time
29+
polymorphism a derived class can be used in place of its base class, through the base class' interfaces
30+
virtual function a member function that could be overridden by derived functions
31+
a class with virtual functions have an additional member, vptr that points to the vtable,
32+
that keeps track of currently defined virtual functions for the current class
33+
encapsulation the act of keeping the class implementation hidden from users, preventing them
34+
from messing up the state of our objects, providing well-defined interfaces for them to use
35+
instead to modify or read the current state
36+
private access specifier that permits only the members of the class to access the selected member
37+
virtual function call when calling a virtual function, the function that is executed is the one in the vtable
38+
inheritance AKA derivation, the act of inheriting from a class to write a new class, inheriting all of its members,
39+
letting users to extend that class with their own members alongside the existing ones,
40+
and letting them use those classes where the base classes are expected
41+
protected access specifier that allows access to a member for derived classes and its own class which it is defined in
42+
virtual function table the container that keeps track of the virtual function definitions to use when calling them
43+
=0 definition of a pure virtual function
44+
OOP object-oriented programming: using inheritance, polymorphism and encapsulation
45+
=delete definition of a deleted function, the compiler throws an error when trying to use a deleted function

0 commit comments

Comments
 (0)