Mercurial > hg > Papers > 2022 > riono-master
changeset 28:58042e63c429
add source code
author | riono <e165729@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 04 Feb 2022 17:24:17 +0900 |
parents | cdf988e1ccf2 |
children | 03402185cb9c |
files | Paper/chapter/3-ChristieSharp.tex Paper/master_paper.pdf Paper/src/cs/CodeGearExample.cs Paper/src/cs/CountObject.cs Paper/src/cs/StartCGExample.cs |
diffstat | 5 files changed, 38 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/Paper/chapter/3-ChristieSharp.tex Wed Feb 02 20:33:30 2022 +0900 +++ b/Paper/chapter/3-ChristieSharp.tex Fri Feb 04 17:24:17 2022 +0900 @@ -1,8 +1,8 @@ \chapter{Christie Sharp} +\section{Christie Sharpの記述方法} +ソースコード\ref{}、\ref{}、\ref{}はソースコード\ref{src:StartCGExample}、\ref{src:CGExample}、\ref{src:CounteObj}をChrisite Sharpで書き換えたものである。 -\section{例題?} - \section{Topology Manager}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Paper/src/cs/CodeGearExample.cs Fri Feb 04 17:24:17 2022 +0900 @@ -0,0 +1,15 @@ +public class CodeGearExample : CodeGear { + [Take] public CountObject count; + + public override void Run(CodeGearManager cgm) { + Console.WriteLine(count); + + if (count < 10) { + cgm.Setup(new CodeGearExample()); + count.number += 1; + put("count", count); + } else { + cgm.GetLocalDGM().Finish(); + } + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Paper/src/cs/CountObject.cs Fri Feb 04 17:24:17 2022 +0900 @@ -0,0 +1,8 @@ +[MessageObject] +public class CountObject { + public int number; + + public CountObject(int number) { + this.number = number; + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Paper/src/cs/StartCGExample.cs Fri Feb 04 17:24:17 2022 +0900 @@ -0,0 +1,13 @@ +public class StartCGExample : StartCodeGear { + public StartCGExample(CodeGearManager cgm) : base(cgm) { } + + public static void Main(string[] args) { + StartCGExample start = StartCGExample(createCGM(10001)); + } + + public override void Run(CodeGearManager cgm) { + cgm.Setup(new CodeGearExample()); + CountObject count = new CountObject(1); + put("count", count); + } +} \ No newline at end of file