annotate renderingEngine.tex @ 37:14267d61122d

commit
author tatsuki
date Sun, 19 Feb 2017 10:19:11 +0900
parents 4365c210d1cb
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
1 \section{HTML Rendering Engine}
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
2 HTMLRenderingEngineは、出力するデータが記述されたContents Tree、出力する形式が記述されたLayout Treeの2つの木構造を持ち、これらを参照しながらhtmlのレンダリングを行う。
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
3 またレンダリングする例題は日記を選択した。
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
4
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
5 \subsection{Contents TreeのJungle上での表現}
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
6 RenderingEngineではContents Treeに図\ref{contentTree}のように出力するデータを格納した。
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
7
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
8 \begin{figure}[h]
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
9 \begin{center}
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
10 \includegraphics[scale=0.25]{figures/contentTree.pdf}
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
11 \caption{ContentTree}
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
12 \label{contentTree}
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
13 \end{center}
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
14 \end{figure}
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
15
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
16
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
17 RootNodeはContentの{\tt title}、日時、レンダリングする時に参照するLayoutTreeのNodeNameを持つ。
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
18 そして子ノードが日記の本文等のデータを持つ。
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
19 表\ref{NodeAttribute}にノードが保持しているContentsの一覧を記述する。
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
20
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
21 \begin{table}[htb]
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
22 \begin{center}
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
23 \caption{ノードが保持しているContents一覧}
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
24 \begin{tabular}{|p{15em}|p{24em}|} \hline
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
25 属性名 & 属性値 \\ \hline
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
26 component & レンダリングする際に参照するLayoutTreeのNodeName \\ \hline
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
27 title & 日記のタイトル \\ \hline
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
28 date(rootNode) & 日記の日時 \\ \hline
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
29 type & そのノードが保持しているContextType。 text(日記本文) or image(画像データ) \\ \hline
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
30 body & 日記の本文 \\ \hline
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
31 date(image) & 画像の保存日時 \\ \hline
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
32 fileName & 画像の名前 \\ \hline
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
33 \end{tabular}
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
34 \label{NodeAttribute}
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
35 \end{center}
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
36 \end{table}
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
37
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
38 \subsection{Layout}
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
39 htmlの出力形式を定義するLayoutは、複数のComponentからなる。
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
40 表\ref{LayoutTreeTable}に、LayoutTreeの主要要素を記す。
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
41 Layout Treeには図\ref{layoutTree}のようにデータを格納した。
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
42 また、LayoutTreeはノード同士が{\tt NodeName}を用いて参照を行う。
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
43
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
44
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
45 \begin{figure}[h]
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
46 \begin{center}
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
47 \includegraphics[scale=0.25]{figures/LayoutTree.pdf}
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
48 \caption{LayoutTree}
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
49 \label{layoutTree}
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
50 \end{center}
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
51 \end{figure}
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
52
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
53
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
54 \begin{table}[htbH]
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
55 \begin{center}
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
56 \caption{LayoutTreeの主要な要素}
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
57 \begin{tabular}{|p{15em}|p{24em}|} \hline
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
58 属性名 & 属性値 \\ \hline
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
59 NodeName &ノードの名前。ノード同士の参照時に用いられる。例外としてルートノードだけはdisplayinformationという名前を持つ\\ \hline
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
60 displayComponent &参照するノードの名前。 \\ \hline
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
61 Name &この属性名で取得できる値を持つNodeNameを持つノードを参照する。\\ \hline
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
62 use &このノードが、どのContentsに対してのLayoutを持つかを記述するタグ。表\ref{tag}にタグとContentsの対応を記述する。\\ \hline
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
63 その他 &css等と同じ様な記述を行う。 例 属性名 {\tt font} 属性値 {\tt fontSize}など \\ \hline
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
64 \end{tabular}
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
65 \label{LayoutTreeTable}
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
66 \end{center}
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
67 \end{table}
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
68
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
69
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
70 Layout Treeは、ルートノードに属性名 {\tt NodeName} 属性値 {\tt displayinformation} の値を持つ(図\ref{layoutTree}では{\tt Node1}が該当する)。
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
71 ルートノードは、子ノードに複数のComponentを保持する(図\ref{layoutTree}では{\tt Node2}、{\tt Node3}がそれに該当する)。
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
72 {\tt Node2}は、属性名 {\tt use} 属性値 {\tt image}のペアでタグを保持しているため、日記の画像表示に対応する記述が行われている。
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
73 {\tt Node3}は、属性名 {\tt use} 属性値 {\tt text}のペアでタグを保持しているため、日記の本文に対応する記述が行われている。
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
74 表\ref{tag}にタグとContentsの対応を記述する。
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
75
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
76 \begin{table}[htb]
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
77 \begin{center}
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
78 \caption{tagとcontentsの対応}
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
79 \begin{tabular}{|p{15em}|p{24em}|} \hline
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
80 tag & content \\ \hline
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
81 image & 画像の表示 \\ \hline
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
82 cals & table \\ \hline
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
83 date & 日付の表示 \\ \hline
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
84 text & 日記の本文 \\ \hline
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
85 title & 日記のタイトル \\ \hline
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
86 \end{tabular}
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
87 \label{tag}
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
88 \end{center}
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
89 \end{table}
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
90
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
91
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
92 Layoutが複数のComponentを参照する際は図\ref{multiComponent}のような木構造を構築する(この木はLayoutTreeの一部であり、本来は参照先のノード等が存在している)。
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
93 \begin{figure}[h]
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
94 \begin{center}
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
95 \includegraphics[scale=0.25]{figures/multiComponent.pdf}
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
96 \caption{複数のComponentを参照するLayout}
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
97 \label{multiComponent}
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
98 \end{center}
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
99 \end{figure}
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
100
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
101 図\ref{multiComponent}の例では、{\tt diaryMulti@component}は{\tt diaryText@component}と{\tt diaryImage@component}を参照している。
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
102
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
103 以下に図\ref{contentTree}のContentsTree、図\ref{multiComponent}のLayoutTreeの2つを使用した、レンダリングの流れを記述する。
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
104 \begin{enumerate}
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
105
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
106 \item ContentsTreeのルートノードは、属性名 {\tt component} 属性値 {\tt Multi@Component}の組を持つので、LayoutTreeの{\tt Node2}を参照する。
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
107
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
108 \item {\tt Node2}は自身のNodeNameしか持たないので、子ノードである{\tt Node3、Node4}に記述されているデータの参照を行う。
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
109
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
110 \item {\tt Node3}は属性名 {\tt displayComponentName} 属性名 {\tt dialyImage@Component}の組を持つため、NodeNameが{\tt dialyImage@Component}のノードを参照している。
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
111
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
112 \item レンダリングエンジンは、参照先のノードに記述されたルールに則ってHtmlを生成する。
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
113
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
114 \item {\tt Node3}は、これ以上データを持たないため、次は{\tt Node4}を参照する。
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
115
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
116 \item {\tt Node4}は属性名 {\tt displayComponentName} 属性名 {\tt dialyText@Component}の組を持つため、NodeNameが{\tt dialyText@Component}のノードを参照している。
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
117
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
118 \item レンダリングエンジンは、参照先のノードに記述されているルールに則ってhtmlを生成する。
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
119
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
120 \end{enumerate}
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
121
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
122 (4)、(7)で参照しているノードに関しては、図\ref{layoutTree}の{\tt Node2、Node3}の様な記述が行われている。
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
123
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
124 \subsection{Layout Treeのデータ設計}
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
125 Jungleは汎用の木構造を持つので、データベースを特に設計しなくても、あるがままの形で格納することが可能である。
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
126 しかし、設計を行うことでより効率的に木構造を扱うことが可能になる。
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
127 図\ref{goodLayoutTree}、図\ref{badLayoutTree}は同じデータを格納した2つの木の一部である。
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
128
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
129
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
130 \begin{figure}[h]
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
131 \begin{center}
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
132 \includegraphics[scale=0.25]{figures/goodLayoutTree.pdf}
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
133 \caption{コードとギャップのないLayoutの格納方法}
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
134 \label{goodLayoutTree}
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
135 \end{center}
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
136 \end{figure}
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
137
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
138 \begin{figure}[h]
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
139 \begin{center}
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
140 \includegraphics[scale=0.25]{figures/badLayoutTree.pdf}
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
141 \caption{コードとギャップのあるLayoutの格納方法}
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
142 \label{badLayoutTree}
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
143 \end{center}
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
144 \end{figure}
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
145
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
146
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
147 図\ref{goodLayoutTree}のTreeは、1つのノードにレンダリングに必要な値が全て格納されている。
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
148 そのため、レンダリングを行う際、複数のノードをまたぐ必要が無く、簡潔にコードを書くことができる。
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
149
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
150
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
151
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
152 一方、図\ref{badLayoutTree}の木はレンダリングする際に必要な値が複数ノードに分散されて保存されている。
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
153 そのため、全てのノードを参照し、値を集める処理を行う必要があり、コードの可読性が下がり余計な処理も増えてしまう。
15
tatsuki
parents: 8
diff changeset
154 これより、Jungleの木構造を効率的に扱うためには、設計手法を確立する必要があることがわかった。
8
c1d7270965c5 add databases.tex jungleTreeBrowser renderingEngine.tex
tatsuki
parents:
diff changeset
155
26
tatsuki
parents: 15
diff changeset
156 \newpage