Mercurial > hg > Papers > 2014 > nobuyasu-master
diff paper/chapter2.tex @ 48:6553b7a3717c
Modified chapter3
author | Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 31 Jan 2014 09:31:57 +0900 |
parents | b303f22d8b0d |
children | faa708c2958b |
line wrap: on
line diff
--- a/paper/chapter2.tex Fri Jan 31 05:46:50 2014 +0900 +++ b/paper/chapter2.tex Fri Jan 31 09:31:57 2014 +0900 @@ -141,7 +141,19 @@ Jungle 内部ではTreeOperationは順次ログに積まれていき, 最終的に commitされることで編集が完了する. この時, ログに積まれた複数のTreeOperationはTreeOperationLogとして扱われる. -以下にTreeOperationLogの具体的な例を示す(\ref{src:treelog}). +TreeOperationLogの仕様を\ref{src:treeoperationlog}に示す. +\begin{lstlisting}[frame=lrbt,label=src:treeoperationlog,caption=TreeOperationLogの仕様,numbers=left] +public interface TreeOperationLog extends Iterable<TreeOperation> +{ + public TreeOperationLog add(NodePath _p,NodeOperation _op); + public TreeOperationLog append(TreeOperationLog _log); + public int length(); +} +\end{lstlisting} +\verb|Iterable<TreeOperation>|を継承しているためIteratorによりTreeOperationを取り出せるようになっている. +addやappendメソッドを使ってTreeOperationを積み上げていくことができる + +次にデータ編集により発生するTreeOperationLogの具体的な例を示す(\ref{src:treelog}). \begin{lstlisting}[frame=lrbt,label=src:treelog,caption=トポロジーマネージャーの利用,numbers=left] [APPEND_CHILD:<-1>:pos:0] [PUT_ATTRIBUTE:<-1,0>:key:author,value:oshiro]