소스 검색

work on adding class diagrams to documentation

Eren Yilmaz 6 년 전
부모
커밋
39dc93ef9a
2개의 변경된 파일43개의 추가작업 그리고 35개의 파일을 삭제
  1. 17 35
      doc/chapter/2architecture.tex
  2. 26 0
      doc/img/graph.json

+ 17 - 35
doc/chapter/2architecture.tex

@@ -18,7 +18,14 @@ The structure is as follows:
     \item An edge has the attributes that are displayed in table~\ref{table:edge-attributes}.
 \end{itemize}
 For parsing the JSON file the JSON-java library~\cite{leary_json-java:_2018} is used.
-
+The classes for reading and writing those JSON files are displayed in figure~\ref{fig:io}.
+The internal representation of graphs is further explained in the section~\ref{sec:model}.
+\begin{figure}[tp]
+    \centering
+    \includegraphics[width=\linewidth]{img/IO.pdf}
+    \caption{Class diagram of the IO package, containing utilities for reading and writing graphs.}
+    \label{fig:io}
+\end{figure}
 
 \centering
 \begin{longtable}{|p{1.8cm}|p{2cm}|p{1.8cm}|p{8.5cm}|}
@@ -31,8 +38,8 @@ For parsing the JSON file the JSON-java library~\cite{leary_json-java:_2018} is
     The node can be higher if it contains other nodes that need more space. \\\hline
     layers & list of lists of nodes & yes & The layers of nodes inside this node (Hierarchy). \\\hline
     edges & list of edges & yes & The edges between nodes whose parent node is this node. \\\hline
-\caption{Node Attributes}
-\label{table:node-attributes}
+    \caption{Node Attributes}
+    \label{table:node-attributes}
 \end{longtable}
 
 \begin{longtable}{|p{1.8cm}|p{2cm}|p{1.8cm}|p{8.5cm}|}
@@ -42,8 +49,8 @@ For parsing the JSON file the JSON-java library~\cite{leary_json-java:_2018} is
     Must be a node with the same parent node as the node specified by the \enquote{target} attribute. \\\hline
     target & string & no & The name of the target of this edge.
     Must be a node with the same parent node as the node specified by the \enquote{source} attribute. \\\hline
-\caption{Edge Attributes}
-\label{table:edge-attributes}
+    \caption{Edge Attributes}
+    \label{table:edge-attributes}
 \end{longtable}
 \raggedright
 
@@ -55,40 +62,15 @@ For parsing the JSON file the JSON-java library~\cite{leary_json-java:_2018} is
 %\end{figure}
 
 \begin{figure}
-    \begin{lstlisting}[language=json,emph={}]
-    {
-       "layers":[
-          [
-             {
-                "name":"n2",
-                "width":10,
-                "height":10
-             },
-             {
-                "name":"n1",
-                "width":10,
-                "height":10,
-                "layers":[
-                   [
-                      {
-                         "name":"n2",
-                         "width":10,
-                         "height":10
-                      }
-                   ]
-                ]
-             }
-          ]
-       ],
-       "name":"n0"
-    }
-    \end{lstlisting}
+    \begin{lstinputlisting}[language=json,emph={}]{img/graph.json}
+    \end{lstinputlisting}
     \caption[Example Input File]{Example Input file that is understood by \appname.}
     \label{fig:json-example}
 \end{figure}
 
-\section{Internal graph representation}\label{sec:internalGraphRepresentation}
-\TODO{some class diagram}
+\section{Internal graph representation, \enquote{Model}}\label{sec:model}
+One feature that is important to us, is to be able to work with hierarchical graphs (cf. chapter~\ref{ch:progress}).
+
 
 \section{TODO: More Class Diagrams}\label{sec:classDiagrams}
 \TODO{maybe even into appendix}

+ 26 - 0
doc/img/graph.json

@@ -0,0 +1,26 @@
+{
+   "layers":[
+      [
+         {
+            "name":"n2",
+            "width":10,
+            "height":10
+         },
+         {
+            "name":"n1",
+            "width":10,
+            "height":10,
+            "layers":[
+               [
+                  {
+                     "name":"n2",
+                     "width":10,
+                     "height":10
+                  }
+               ]
+            ]
+         }
+      ]
+   ],
+   "name":"n0"
+}