Skip to content

Commit 63a351f

Browse files
committed
Updated to Chapter 8, Section 4
1 parent 6930c69 commit 63a351f

File tree

13 files changed

+590
-55
lines changed

13 files changed

+590
-55
lines changed

Structure.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@
567567

568568
#### 常量成员
569569

570-
#### `const`限定的成员函数
570+
包括常成员函数
571571

572572
#### `mutable`
573573

generalized_parts/08_a_step_forward_in_classes_and_functions/04_property_of_member.tex

+314
Large diffs are not rendered by default.
Loading
123 KB
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
<mxfile host="Electron" modified="2024-01-14T13:04:56.550Z" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/22.1.18 Chrome/120.0.6099.199 Electron/28.1.2 Safari/537.36" etag="jskOQa98xR9m19FiIUCH" version="22.1.18" type="device">
2+
<diagram name="Page-1" id="rPlqULWlj6vqNOdLul_L">
3+
<mxGraphModel dx="558" dy="383" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
4+
<root>
5+
<mxCell id="0" />
6+
<mxCell id="1" parent="0" />
7+
<mxCell id="w1WyLb5uJCssOkJhTMv8-13" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#AE4132;" edge="1" parent="1" source="w1WyLb5uJCssOkJhTMv8-3" target="w1WyLb5uJCssOkJhTMv8-9">
8+
<mxGeometry relative="1" as="geometry">
9+
<Array as="points">
10+
<mxPoint x="280" y="100" />
11+
<mxPoint x="280" y="100" />
12+
</Array>
13+
</mxGeometry>
14+
</mxCell>
15+
<mxCell id="w1WyLb5uJCssOkJhTMv8-14" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#AE4132;" edge="1" parent="1" source="w1WyLb5uJCssOkJhTMv8-3" target="w1WyLb5uJCssOkJhTMv8-10">
16+
<mxGeometry relative="1" as="geometry">
17+
<Array as="points">
18+
<mxPoint x="260" y="100" />
19+
<mxPoint x="260" y="210" />
20+
</Array>
21+
</mxGeometry>
22+
</mxCell>
23+
<mxCell id="w1WyLb5uJCssOkJhTMv8-3" value="&lt;font face=&quot;consolas&quot;&gt;//Header.h&lt;br&gt;struct C {&lt;br&gt;&amp;nbsp; &amp;nbsp; static int sta;&lt;br&gt;};&lt;br&gt;&lt;/font&gt;" style="text;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;verticalAlign=middle;" vertex="1" parent="1">
24+
<mxGeometry x="80" y="70" width="160" height="60" as="geometry" />
25+
</mxCell>
26+
<mxCell id="w1WyLb5uJCssOkJhTMv8-15" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#B46504;" edge="1" parent="1" source="w1WyLb5uJCssOkJhTMv8-7" target="w1WyLb5uJCssOkJhTMv8-9">
27+
<mxGeometry relative="1" as="geometry">
28+
<Array as="points">
29+
<mxPoint x="275" y="175" />
30+
<mxPoint x="275" y="140" />
31+
</Array>
32+
</mxGeometry>
33+
</mxCell>
34+
<mxCell id="w1WyLb5uJCssOkJhTMv8-7" value="&lt;font face=&quot;consolas&quot;&gt;//Definition.cpp&lt;br&gt;&lt;b&gt;#include &quot;Header.h&quot;&lt;/b&gt;&lt;br&gt;int C::sta {};&lt;br&gt;&lt;/font&gt;" style="text;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;verticalAlign=middle;" vertex="1" parent="1">
35+
<mxGeometry x="80" y="150" width="160" height="50" as="geometry" />
36+
</mxCell>
37+
<mxCell id="w1WyLb5uJCssOkJhTMv8-12" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#10739E;" edge="1" parent="1" source="w1WyLb5uJCssOkJhTMv8-8" target="w1WyLb5uJCssOkJhTMv8-10">
38+
<mxGeometry relative="1" as="geometry">
39+
<Array as="points">
40+
<mxPoint x="290" y="240" />
41+
<mxPoint x="290" y="240" />
42+
</Array>
43+
</mxGeometry>
44+
</mxCell>
45+
<mxCell id="w1WyLb5uJCssOkJhTMv8-8" value="&lt;font face=&quot;consolas&quot;&gt;//main.cpp&lt;br&gt;&lt;b&gt;#include &quot;Header.h&quot;&lt;/b&gt;&lt;br&gt;int main() {&lt;br&gt;&amp;nbsp; &amp;nbsp;std::cout &amp;lt;&amp;lt; C::sta;&lt;br&gt;}&lt;br&gt;&lt;/font&gt;" style="text;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;verticalAlign=middle;" vertex="1" parent="1">
46+
<mxGeometry x="80" y="200" width="160" height="80" as="geometry" />
47+
</mxCell>
48+
<mxCell id="w1WyLb5uJCssOkJhTMv8-9" value="&lt;font face=&quot;consolas&quot;&gt;//Definition.cpp&lt;br&gt;&lt;b&gt;struct C {&lt;br style=&quot;border-color: var(--border-color);&quot;&gt;&amp;nbsp; &amp;nbsp; static int sta;&lt;br style=&quot;border-color: var(--border-color);&quot;&gt;};&lt;/b&gt;&lt;br&gt;int C::sta {};&lt;/font&gt;" style="text;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;verticalAlign=middle;" vertex="1" parent="1">
49+
<mxGeometry x="310" y="80" width="160" height="80" as="geometry" />
50+
</mxCell>
51+
<mxCell id="w1WyLb5uJCssOkJhTMv8-10" value="&lt;font face=&quot;consolas&quot;&gt;//main.cpp&lt;br&gt;&lt;b&gt;struct C {&lt;br style=&quot;border-color: var(--border-color);&quot;&gt;&amp;nbsp; &amp;nbsp; static int sta;&lt;br style=&quot;border-color: var(--border-color);&quot;&gt;};&lt;/b&gt;&lt;br&gt;int main() {&lt;br&gt;&amp;nbsp; &amp;nbsp;std::cout &amp;lt;&amp;lt; C::sta;&lt;br&gt;}&lt;/font&gt;" style="text;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;verticalAlign=middle;" vertex="1" parent="1">
52+
<mxGeometry x="310" y="160" width="160" height="110" as="geometry" />
53+
</mxCell>
54+
</root>
55+
</mxGraphModel>
56+
</diagram>
57+
</mxfile>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
<mxfile host="Electron" modified="2024-01-14T13:12:37.040Z" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/22.1.18 Chrome/120.0.6099.199 Electron/28.1.2 Safari/537.36" etag="GAma5_89aCQqUf5l9FPY" version="22.1.18" type="device">
2+
<diagram name="Page-1" id="rPlqULWlj6vqNOdLul_L">
3+
<mxGraphModel dx="465" dy="320" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
4+
<root>
5+
<mxCell id="0" />
6+
<mxCell id="1" parent="0" />
7+
<mxCell id="w1WyLb5uJCssOkJhTMv8-13" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#AE4132;" edge="1" parent="1" source="w1WyLb5uJCssOkJhTMv8-3" target="w1WyLb5uJCssOkJhTMv8-9">
8+
<mxGeometry relative="1" as="geometry">
9+
<Array as="points">
10+
<mxPoint x="280" y="100" />
11+
<mxPoint x="280" y="100" />
12+
</Array>
13+
</mxGeometry>
14+
</mxCell>
15+
<mxCell id="w1WyLb5uJCssOkJhTMv8-14" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#AE4132;" edge="1" parent="1" source="w1WyLb5uJCssOkJhTMv8-3" target="w1WyLb5uJCssOkJhTMv8-10">
16+
<mxGeometry relative="1" as="geometry">
17+
<Array as="points">
18+
<mxPoint x="260" y="100" />
19+
<mxPoint x="260" y="200" />
20+
</Array>
21+
</mxGeometry>
22+
</mxCell>
23+
<mxCell id="w1WyLb5uJCssOkJhTMv8-3" value="&lt;font face=&quot;consolas&quot;&gt;//Header.h&lt;br&gt;struct C {&lt;br&gt;&amp;nbsp; &amp;nbsp; static int sta;&lt;br&gt;};&lt;br&gt;int C::sta {};&lt;br&gt;&lt;/font&gt;" style="text;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;verticalAlign=middle;" vertex="1" parent="1">
24+
<mxGeometry x="80" y="60" width="160" height="80" as="geometry" />
25+
</mxCell>
26+
<mxCell id="w1WyLb5uJCssOkJhTMv8-15" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#B46504;" edge="1" parent="1" source="w1WyLb5uJCssOkJhTMv8-7" target="w1WyLb5uJCssOkJhTMv8-9">
27+
<mxGeometry relative="1" as="geometry">
28+
<Array as="points">
29+
<mxPoint x="280" y="165" />
30+
<mxPoint x="280" y="110" />
31+
</Array>
32+
</mxGeometry>
33+
</mxCell>
34+
<mxCell id="w1WyLb5uJCssOkJhTMv8-7" value="&lt;font face=&quot;consolas&quot;&gt;//Definition.cpp&lt;br&gt;&lt;b&gt;#include &quot;Header.h&quot;&lt;/b&gt;&lt;br&gt;&lt;/font&gt;" style="text;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;verticalAlign=middle;" vertex="1" parent="1">
35+
<mxGeometry x="80" y="150" width="160" height="30" as="geometry" />
36+
</mxCell>
37+
<mxCell id="w1WyLb5uJCssOkJhTMv8-12" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#10739E;" edge="1" parent="1" source="w1WyLb5uJCssOkJhTMv8-8" target="w1WyLb5uJCssOkJhTMv8-10">
38+
<mxGeometry relative="1" as="geometry">
39+
<Array as="points">
40+
<mxPoint x="270" y="220" />
41+
<mxPoint x="270" y="220" />
42+
</Array>
43+
</mxGeometry>
44+
</mxCell>
45+
<mxCell id="w1WyLb5uJCssOkJhTMv8-8" value="&lt;font face=&quot;consolas&quot;&gt;//main.cpp&lt;br&gt;&lt;b&gt;#include &quot;Header.h&quot;&lt;/b&gt;&lt;br&gt;int main() {&lt;br&gt;&amp;nbsp; &amp;nbsp;std::cout &amp;lt;&amp;lt; C::sta;&lt;br&gt;}&lt;br&gt;&lt;/font&gt;" style="text;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;verticalAlign=middle;" vertex="1" parent="1">
46+
<mxGeometry x="80" y="180" width="160" height="80" as="geometry" />
47+
</mxCell>
48+
<mxCell id="w1WyLb5uJCssOkJhTMv8-9" value="&lt;font face=&quot;consolas&quot;&gt;//Definition.cpp&lt;br&gt;&lt;b&gt;struct C {&lt;br style=&quot;border-color: var(--border-color);&quot;&gt;&amp;nbsp; &amp;nbsp; static int sta;&lt;br style=&quot;border-color: var(--border-color);&quot;&gt;};&lt;/b&gt;&lt;br&gt;&lt;b&gt;&lt;font color=&quot;#ff0000&quot;&gt;int C::sta {};&lt;/font&gt;&lt;/b&gt;&lt;/font&gt;" style="text;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;verticalAlign=middle;" vertex="1" parent="1">
49+
<mxGeometry x="310" y="60" width="160" height="80" as="geometry" />
50+
</mxCell>
51+
<mxCell id="w1WyLb5uJCssOkJhTMv8-10" value="&lt;font face=&quot;consolas&quot;&gt;//main.cpp&lt;br&gt;&lt;b&gt;struct C {&lt;/b&gt;&lt;br style=&quot;border-color: var(--border-color);&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; static int sta;&lt;/b&gt;&lt;br style=&quot;border-color: var(--border-color);&quot;&gt;&lt;b&gt;};&lt;/b&gt;&lt;br&gt;&lt;b&gt;&lt;font color=&quot;#ff0000&quot;&gt;int C::sta {};&lt;/font&gt;&lt;/b&gt;&lt;br&gt;int main() {&lt;br&gt;&amp;nbsp; &amp;nbsp;std::cout &amp;lt;&amp;lt; C::sta;&lt;br&gt;}&lt;/font&gt;" style="text;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;verticalAlign=middle;" vertex="1" parent="1">
52+
<mxGeometry x="310" y="140" width="160" height="120" as="geometry" />
53+
</mxCell>
54+
</root>
55+
</mxGraphModel>
56+
</diagram>
57+
</mxfile>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
<mxfile host="Electron" modified="2024-01-15T05:11:03.358Z" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/22.1.18 Chrome/120.0.6099.199 Electron/28.1.2 Safari/537.36" etag="eLXUrrP0K33-YHkS5GDz" version="22.1.18" type="device">
2+
<diagram name="Page-1" id="Caa9E9GEJXXpX6c3hobu">
3+
<mxGraphModel dx="558" dy="383" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
4+
<root>
5+
<mxCell id="0" />
6+
<mxCell id="1" parent="0" />
7+
<mxCell id="Jd0V6s8Q-409282UJGnS-2" value="" style="shape=flexArrow;endArrow=classic;html=1;rounded=0;fillColor=#f5f5f5;gradientColor=#b3b3b3;strokeColor=#666666;" edge="1" parent="1">
8+
<mxGeometry width="50" height="50" relative="1" as="geometry">
9+
<mxPoint x="320" y="40" as="sourcePoint" />
10+
<mxPoint x="320" y="270" as="targetPoint" />
11+
</mxGeometry>
12+
</mxCell>
13+
<mxCell id="Jd0V6s8Q-409282UJGnS-7" value="&lt;font style=&quot;font-size: 10px;&quot;&gt;生&lt;br&gt;存&lt;br&gt;期&lt;/font&gt;" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];labelBackgroundColor=none;" vertex="1" connectable="0" parent="Jd0V6s8Q-409282UJGnS-2">
14+
<mxGeometry x="-0.1516" y="-2" relative="1" as="geometry">
15+
<mxPoint x="2" y="2" as="offset" />
16+
</mxGeometry>
17+
</mxCell>
18+
<mxCell id="Jd0V6s8Q-409282UJGnS-9" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="Jd0V6s8Q-409282UJGnS-3" target="Jd0V6s8Q-409282UJGnS-8">
19+
<mxGeometry relative="1" as="geometry" />
20+
</mxCell>
21+
<mxCell id="Jd0V6s8Q-409282UJGnS-3" value="构造" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fad7ac;strokeColor=#b46504;fontFamily=consolas;" vertex="1" parent="1">
22+
<mxGeometry x="200" y="40" width="100" height="30" as="geometry" />
23+
</mxCell>
24+
<mxCell id="Jd0V6s8Q-409282UJGnS-4" value="对象a" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
25+
<mxGeometry x="220" y="10" width="60" height="30" as="geometry" />
26+
</mxCell>
27+
<mxCell id="Jd0V6s8Q-409282UJGnS-8" value="析构" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fad7ac;strokeColor=#b46504;fontFamily=consolas;" vertex="1" parent="1">
28+
<mxGeometry x="200" y="240" width="100" height="30" as="geometry" />
29+
</mxCell>
30+
<mxCell id="Jd0V6s8Q-409282UJGnS-16" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="Jd0V6s8Q-409282UJGnS-11" target="Jd0V6s8Q-409282UJGnS-15">
31+
<mxGeometry relative="1" as="geometry" />
32+
</mxCell>
33+
<mxCell id="Jd0V6s8Q-409282UJGnS-11" value="构造" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#b1ddf0;strokeColor=#10739e;fontFamily=consolas;" vertex="1" parent="1">
34+
<mxGeometry x="340" y="40" width="100" height="30" as="geometry" />
35+
</mxCell>
36+
<mxCell id="Jd0V6s8Q-409282UJGnS-12" value="对象b" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
37+
<mxGeometry x="360" y="10" width="60" height="30" as="geometry" />
38+
</mxCell>
39+
<mxCell id="Jd0V6s8Q-409282UJGnS-13" value="析构" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#b1ddf0;strokeColor=#10739e;fontFamily=consolas;" vertex="1" parent="1">
40+
<mxGeometry x="340" y="240" width="100" height="30" as="geometry" />
41+
</mxCell>
42+
<mxCell id="Jd0V6s8Q-409282UJGnS-18" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="Jd0V6s8Q-409282UJGnS-15" target="Jd0V6s8Q-409282UJGnS-17">
43+
<mxGeometry relative="1" as="geometry" />
44+
</mxCell>
45+
<mxCell id="Jd0V6s8Q-409282UJGnS-15" value="&lt;font face=&quot;consolas&quot;&gt;调用b.length()&lt;/font&gt;" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#b1ddf0;strokeColor=#10739e;" vertex="1" parent="1">
46+
<mxGeometry x="340" y="90" width="100" height="30" as="geometry" />
47+
</mxCell>
48+
<mxCell id="Jd0V6s8Q-409282UJGnS-20" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="Jd0V6s8Q-409282UJGnS-17" target="Jd0V6s8Q-409282UJGnS-19">
49+
<mxGeometry relative="1" as="geometry" />
50+
</mxCell>
51+
<mxCell id="Jd0V6s8Q-409282UJGnS-17" value="&lt;font face=&quot;consolas&quot;&gt;计算&lt;/font&gt;" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fad9d5;strokeColor=#ae4132;" vertex="1" parent="1">
52+
<mxGeometry x="460" y="90" width="100" height="30" as="geometry" />
53+
</mxCell>
54+
<mxCell id="Jd0V6s8Q-409282UJGnS-24" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="Jd0V6s8Q-409282UJGnS-19" target="Jd0V6s8Q-409282UJGnS-23">
55+
<mxGeometry relative="1" as="geometry" />
56+
</mxCell>
57+
<mxCell id="Jd0V6s8Q-409282UJGnS-19" value="&lt;font face=&quot;consolas&quot;&gt;存储&lt;br&gt;清除延迟标记&lt;br&gt;&lt;/font&gt;" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fad9d5;strokeColor=#ae4132;" vertex="1" parent="1">
58+
<mxGeometry x="460" y="140" width="100" height="30" as="geometry" />
59+
</mxCell>
60+
<mxCell id="Jd0V6s8Q-409282UJGnS-28" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="Jd0V6s8Q-409282UJGnS-23" target="Jd0V6s8Q-409282UJGnS-27">
61+
<mxGeometry relative="1" as="geometry" />
62+
</mxCell>
63+
<mxCell id="Jd0V6s8Q-409282UJGnS-23" value="&lt;font face=&quot;consolas&quot;&gt;返回b.length()&lt;/font&gt;" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#b1ddf0;strokeColor=#10739e;" vertex="1" parent="1">
64+
<mxGeometry x="340" y="140" width="100" height="30" as="geometry" />
65+
</mxCell>
66+
<mxCell id="Jd0V6s8Q-409282UJGnS-29" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="Jd0V6s8Q-409282UJGnS-27" target="Jd0V6s8Q-409282UJGnS-13">
67+
<mxGeometry relative="1" as="geometry" />
68+
</mxCell>
69+
<mxCell id="Jd0V6s8Q-409282UJGnS-27" value="&lt;font face=&quot;consolas&quot;&gt;调用b.length()&lt;/font&gt;" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#b1ddf0;strokeColor=#10739e;" vertex="1" parent="1">
70+
<mxGeometry x="340" y="190" width="100" height="30" as="geometry" />
71+
</mxCell>
72+
<mxCell id="Jd0V6s8Q-409282UJGnS-30" value="&lt;font face=&quot;consolas&quot;&gt;全程没有调用length()&lt;br&gt;所以不需要计算&lt;br&gt;节省时间&lt;br&gt;&lt;/font&gt;" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
73+
<mxGeometry x="180" y="280" width="140" height="60" as="geometry" />
74+
</mxCell>
75+
<mxCell id="Jd0V6s8Q-409282UJGnS-31" value="&lt;font face=&quot;consolas&quot;&gt;首次调用length()时计算&lt;br&gt;并清除延迟标记&lt;br&gt;以后调用时直接返回值&lt;br&gt;无需再算&lt;br&gt;&lt;/font&gt;" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
76+
<mxGeometry x="320" y="280" width="140" height="60" as="geometry" />
77+
</mxCell>
78+
</root>
79+
</mxGraphModel>
80+
</diagram>
81+
</mxfile>

0 commit comments

Comments
 (0)