Skip to content

Commit 8990486

Browse files
committed
Started Chapter 9
1 parent 527e8f5 commit 8990486

12 files changed

+102
-121
lines changed

generalized_part.tex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ \part*{泛讲篇}
77
\import{generalized_parts/}{05_compound_types_and_their_use.tex}
88
\import{generalized_parts/}{06_custom_types_and_their_use.tex}
99
\import{generalized_parts/}{07_projecting.tex}
10-
\import{generalized_parts/}{08_a_step_forward_in_classes_and_functions.tex}
10+
\import{generalized_parts/}{08_a_step_forward_in_classes_and_functions.tex}
11+
\import{generalized_parts/}{09_class_inheritance.tex}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
\chapter{类的继承}
2+
在上一章中,我们讲过了类与函数的进阶知识,并完成了一个简单的 \lstinline@valarri@ 和一个稍复杂的 \lstinline@string@ 类。而在本章中,读者将看到有关类的另一个重要知识:继承。\par
3+
此前讲到的那些类,它们之间没有什么关联。\lstinline@std::vector@ 是 \lstinline@std::vector@, \lstinline@std::valarray@ 是 \lstinline@std::valarray@,是两个不同的事物。它们之间唯一的共同点可能就在于``它们表示的都是数组'',以及有一些名字比较相似的成员函数,仅此而已。\par
4+
而在本章,我们将见识到继承操作下,类的两种关系:一种是公有继承代表的``种与属''关系,另一种是私有继承代表的``整体与部分''关系。本章也是后续介绍多态性概念的基础,有着承上启下的作用。\par
5+
\import{09_class_inheritance/}{01_the_concepts_of_inheritance.tex}
6+
\import{09_class_inheritance/}{02_public_inheritance_and_protected_members.tex}
7+
\import{09_class_inheritance/}{03_private_inheritance.tex}
8+
\import{09_class_inheritance/}{04_sequential_inheriance.tex}

generalized_parts/09_class_inheritance/01_the_concepts_of_inheritance.tex

Whitespace-only changes.

generalized_parts/09_class_inheritance/02_public_inheritance_and_protected_members.tex

Whitespace-only changes.

generalized_parts/09_class_inheritance/03_private_inheritance.tex

Whitespace-only changes.

generalized_parts/09_class_inheritance/04_sequential_inheriance.tex

Whitespace-only changes.

main.aux

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -182,19 +182,22 @@
182182
\@writefile{toc}{\contentsline {section}{\numberline {8.7}实操:简单的\texttt {string}类}{217}{section.8.7}\protected@file@percent }
183183
\@writefile{lol}{\contentsline {lstlisting}{\numberline {8.3}\texttt {Header.h}}{231}{lstlisting.8.3}\protected@file@percent }
184184
\@writefile{lol}{\contentsline {lstlisting}{\numberline {8.4}\texttt {Definition.cpp}}{233}{lstlisting.8.4}\protected@file@percent }
185+
\@writefile{toc}{\contentsline {chapter}{\numberline {第九章\hspace {.3em}}类的继承}{241}{chapter.9}\protected@file@percent }
186+
\@writefile{lof}{\addvspace {10.0pt}}
187+
\@writefile{lot}{\addvspace {10.0pt}}
185188
\gdef \LT@ii {\LT@entry
186189
{1}{42.00002pt}\LT@entry
187190
{1}{136.19997pt}\LT@entry
188191
{1}{117.00002pt}\LT@entry
189192
{1}{52.00002pt}\LT@entry
190193
{1}{82.00002pt}}
191-
\@writefile{toc}{\contentsline {part}{精讲篇}{243}{part*.166}\protected@file@percent }
192-
\@writefile{toc}{\contentsline {chapter}{\numberline {附录 A\hspace {.3em}}C++运算符基本属性}{243}{appendix.A}\protected@file@percent }
194+
\@writefile{toc}{\contentsline {part}{精讲篇}{245}{part*.166}\protected@file@percent }
195+
\@writefile{toc}{\contentsline {chapter}{\numberline {附录 A\hspace {.3em}}C++运算符基本属性}{245}{appendix.A}\protected@file@percent }
193196
\@writefile{lof}{\addvspace {10.0pt}}
194197
\@writefile{lot}{\addvspace {10.0pt}}
195-
\newlabel{ch:appendix_A}{{A}{243}{C++运算符基本属性}{appendix.A}{}}
196-
\@writefile{lot}{\contentsline {table}{\numberline {A.1}{截至C++17的所有运算符}}{243}{table.A.1}\protected@file@percent }
197-
\newlabel{tab:A-1}{{A.1}{243}{截至C++17的所有运算符}{table.A.1}{}}
198+
\newlabel{ch:appendix_A}{{A}{245}{C++运算符基本属性}{appendix.A}{}}
199+
\@writefile{lot}{\contentsline {table}{\numberline {A.1}{截至C++17的所有运算符}}{245}{table.A.1}\protected@file@percent }
200+
\newlabel{tab:A-1}{{A.1}{245}{截至C++17的所有运算符}{table.A.1}{}}
198201
\gdef \LT@iii {\LT@entry
199202
{1}{33.67001pt}\LT@entry
200203
{1}{33.81001pt}\LT@entry
@@ -206,11 +209,11 @@
206209
{1}{26.72002pt}\LT@entry
207210
{1}{27.283pt}\LT@entry
208211
{1}{86.44002pt}}
209-
\@writefile{toc}{\contentsline {chapter}{\numberline {附录 B\hspace {.3em}}ASCII码表(0到127)}{245}{appendix.B}\protected@file@percent }
212+
\@writefile{toc}{\contentsline {chapter}{\numberline {附录 B\hspace {.3em}}ASCII码表(0到127)}{247}{appendix.B}\protected@file@percent }
210213
\@writefile{lof}{\addvspace {10.0pt}}
211214
\@writefile{lot}{\addvspace {10.0pt}}
212-
\@writefile{lot}{\contentsline {table}{\numberline {B.1}{33个ASCII控制字符}}{245}{table.B.1}\protected@file@percent }
213-
\newlabel{tab:B-1}{{B.1}{245}{33个ASCII控制字符}{table.B.1}{}}
215+
\@writefile{lot}{\contentsline {table}{\numberline {B.1}{33个ASCII控制字符}}{247}{table.B.1}\protected@file@percent }
216+
\newlabel{tab:B-1}{{B.1}{247}{33个ASCII控制字符}{table.B.1}{}}
214217
\gdef \LT@iv {\LT@entry
215218
{1}{33.67001pt}\LT@entry
216219
{1}{33.81001pt}\LT@entry
@@ -224,19 +227,19 @@
224227
{1}{33.67001pt}\LT@entry
225228
{1}{33.81001pt}\LT@entry
226229
{1}{26.72002pt}}
227-
\@writefile{lot}{\contentsline {table}{\numberline {B.2}{95个ASCII可打印字符}}{246}{table.B.2}\protected@file@percent }
228-
\newlabel{tab:B-2}{{B.2}{246}{95个ASCII可打印字符}{table.B.2}{}}
229-
\@writefile{toc}{\contentsline {chapter}{\numberline {附录 C\hspace {.3em}}相关数学知识}{247}{appendix.C}\protected@file@percent }
230+
\@writefile{lot}{\contentsline {table}{\numberline {B.2}{95个ASCII可打印字符}}{248}{table.B.2}\protected@file@percent }
231+
\newlabel{tab:B-2}{{B.2}{248}{95个ASCII可打印字符}{table.B.2}{}}
232+
\@writefile{toc}{\contentsline {chapter}{\numberline {附录 C\hspace {.3em}}相关数学知识}{249}{appendix.C}\protected@file@percent }
230233
\@writefile{lof}{\addvspace {10.0pt}}
231234
\@writefile{lot}{\addvspace {10.0pt}}
232-
\@writefile{toc}{\contentsline {section}{\numberline {C.1}数制转换}{247}{section.C.1}\protected@file@percent }
233-
\@writefile{lof}{\contentsline {figure}{\numberline {C.1}{\ignorespaces 一个简单的数字时钟}}{247}{figure.C.1}\protected@file@percent }
234-
\@writefile{lof}{\contentsline {figure}{\numberline {C.2}{\ignorespaces 从计数到乘方}}{248}{figure.C.2}\protected@file@percent }
235-
\@writefile{lof}{\contentsline {figure}{\numberline {C.3}{\ignorespaces 一个12进制乘法表}}{249}{figure.C.3}\protected@file@percent }
236-
\@writefile{lof}{\contentsline {figure}{\numberline {C.4}{\ignorespaces $(1a.c3)_{16}$的形式化表示}}{251}{figure.C.4}\protected@file@percent }
237-
\@writefile{lof}{\contentsline {figure}{\numberline {C.5}{\ignorespaces 通过短除法把十进制数转换成$R$进制}}{254}{figure.C.5}\protected@file@percent }
238-
\@writefile{lof}{\contentsline {figure}{\numberline {C.6}{\ignorespaces 二进制与八进制的转换}}{255}{figure.C.6}\protected@file@percent }
239-
\@writefile{lof}{\contentsline {figure}{\numberline {C.7}{\ignorespaces 二进制与十六进制的转换}}{256}{figure.C.7}\protected@file@percent }
240-
\@writefile{toc}{\contentsline {section}{\numberline {C.2}布尔代数基础}{256}{section.C.2}\protected@file@percent }
241-
\@writefile{toc}{\contentsline {chapter}{跋}{257}{appendix*.174}\protected@file@percent }
242-
\gdef \@abspage@last{264}
235+
\@writefile{toc}{\contentsline {section}{\numberline {C.1}数制转换}{249}{section.C.1}\protected@file@percent }
236+
\@writefile{lof}{\contentsline {figure}{\numberline {C.1}{\ignorespaces 一个简单的数字时钟}}{249}{figure.C.1}\protected@file@percent }
237+
\@writefile{lof}{\contentsline {figure}{\numberline {C.2}{\ignorespaces 从计数到乘方}}{250}{figure.C.2}\protected@file@percent }
238+
\@writefile{lof}{\contentsline {figure}{\numberline {C.3}{\ignorespaces 一个12进制乘法表}}{251}{figure.C.3}\protected@file@percent }
239+
\@writefile{lof}{\contentsline {figure}{\numberline {C.4}{\ignorespaces $(1a.c3)_{16}$的形式化表示}}{253}{figure.C.4}\protected@file@percent }
240+
\@writefile{lof}{\contentsline {figure}{\numberline {C.5}{\ignorespaces 通过短除法把十进制数转换成$R$进制}}{256}{figure.C.5}\protected@file@percent }
241+
\@writefile{lof}{\contentsline {figure}{\numberline {C.6}{\ignorespaces 二进制与八进制的转换}}{257}{figure.C.6}\protected@file@percent }
242+
\@writefile{lof}{\contentsline {figure}{\numberline {C.7}{\ignorespaces 二进制与十六进制的转换}}{258}{figure.C.7}\protected@file@percent }
243+
\@writefile{toc}{\contentsline {section}{\numberline {C.2}布尔代数基础}{258}{section.C.2}\protected@file@percent }
244+
\@writefile{toc}{\contentsline {chapter}{跋}{259}{appendix*.174}\protected@file@percent }
245+
\gdef \@abspage@last{266}

0 commit comments

Comments
 (0)