# HG changeset patch # User riono # Date 1643963057 -32400 # Node ID 58042e63c4293cfc71a89bec8e8304f01e2633f0 # Parent cdf988e1ccf2eb9a9b363419ea2ea8c8c9191c46 add source code diff -r cdf988e1ccf2 -r 58042e63c429 Paper/chapter/3-ChristieSharp.tex --- 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} diff -r cdf988e1ccf2 -r 58042e63c429 Paper/master_paper.pdf Binary file Paper/master_paper.pdf has changed diff -r cdf988e1ccf2 -r 58042e63c429 Paper/src/cs/CodeGearExample.cs --- /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 diff -r cdf988e1ccf2 -r 58042e63c429 Paper/src/cs/CountObject.cs --- /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 diff -r cdf988e1ccf2 -r 58042e63c429 Paper/src/cs/StartCGExample.cs --- /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