view src/alice/test/topology/aquarium/TakePnum.java @ 217:b5c642ba998e working

change as** method and remove "local" key in TEST
author sugi
date Wed, 27 Mar 2013 20:02:38 +0900
parents b5daccf36104
children
line wrap: on
line source

package alice.test.topology.aquarium;

import alice.codesegment.CodeSegment;
import alice.datasegment.CommandType;
import alice.datasegment.Receiver;

public class TakePnum extends CodeSegment {
	// this CodeSegment has bug
	
	private Receiver pnum = ids.create(CommandType.TAKE);
	private Receiver mynum;
	
	public TakePnum(Receiver data){
		this.pnum.setKey("parent", "num");
		this.mynum = data;
	}

	@Override
	public void run() {
		ods.update("parent", "num", 
				this.pnum.asInteger()+this.mynum.asInteger());
	}

}