changeset 9:c5abec609e35

add StartHelloWorld
author riono <e165729@ie.u-ryukyu.ac.jp>
date Tue, 04 May 2021 15:46:58 +0900
parents 48c1f1d9fc65
children 78129eaf8770
files Paper/riono-sigos.pdf Paper/riono-sigos.tex Paper/src/StartHelloWorld.java
diffstat 3 files changed, 35 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
Binary file Paper/riono-sigos.pdf has changed
--- a/Paper/riono-sigos.tex	Mon May 03 22:57:48 2021 +0900
+++ b/Paper/riono-sigos.tex	Tue May 04 15:46:58 2021 +0900
@@ -118,8 +118,15 @@
 \item[Peek] 先頭のDataGear を読み込むが、DataGear が削除されない。そのため、特に操作をしない場合は同じデータを参照し続ける。
 \item[TakeFrom (Remote DGM name)] Take と似ているが、Remote DGM nameを指定することで、その接続先(Remote) のDataGearManager からTake 操作を行える。
 \item[PeekFrom (Remote DGM name)] Peek と似ているが、Remote DGM name を指定することで、その接続先(Remote) のDataGearManager からPeek 操作を行える。
+\end{description}
 
-\end{description}
+\section{プログラムの例}
+Code \ref{code:javaSHW} はChrisite の機能を使用してhello world を出力する例題である。
+
+
+
+\lstinputlisting[caption=StartHelloWorld, label=code:javaSHW]{src/StartHelloWorld.java}
+
 
 \section{Unity}
 
@@ -127,7 +134,6 @@
 java 版ではDataGear を取得する際に、annotation という java の機能を用いて行った。C\#には annotation はなく、代わりにattribute を利用して DataGear の取得を行っている。
 以下のCode \ref{code:javaTake}、Code \ref{code:csTake}はjava とC\# におけるTakeの実装である。
 
-
 \lstinputlisting[caption=java における Take annotation, label=code:javaTake]{src/Take.java}
 
 \lstinputlisting[caption=C\# における Take attribute, label=code:csTake]{src/Take.cs}
@@ -137,11 +143,18 @@
 C\# でattribute を作成する際には、 System.Attributeを継承する必要がある。attribute の適用可能箇所については、Code \ref{code:csTake} の4行目でフィールド変数を指定している。
 
 \section{MessagePackの相違点}
+Christie ではデータを送信する際に、MessagePack を使用してデータを圧縮し、送信している。
+
+
+
+\section{C\#への書き換え後のプログラムの例}
+
+\section{Unityでの動作}
 
 
 \section{チート対策について}
 
-\section{まとめ}
+\section{実装の現状}
 
 
 \nocite{*}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Paper/src/StartHelloWorld.java	Tue May 04 15:46:58 2021 +0900
@@ -0,0 +1,19 @@
+package christie.example.HelloWorld;
+
+import christie.codegear.CodeGearManager;
+import christie.codegear.StartCodeGear;
+
+public class StartHelloWorld extends StartCodeGear {
+
+    public StartHelloWorld(CodeGearManager cgm) {
+        super(cgm);
+    }
+
+    public static void main(String[] args){
+        CodeGearManager cgm = createCGM(10000);
+        cgm.setup(new HelloWorldCodeGear());
+        cgm.setup(new FinishHelloWorld());
+        cgm.getLocalDGM().put("helloWorld","hello");
+        cgm.getLocalDGM().put("helloWorld","world");
+    }
+}