package depart.commun.modeles;

import ca.ntro.app.Ntro;
import ca.ntro.app.models.Model;
import ca.ntro.app.models.WriteObjectGraph;
import depart.commun.messages.MsgC;
import depart.frontal.vues.VueB;

public class ModeleB implements Model, WriteObjectGraph {
	
	private String id;

	private double attrA = 0.0;
	private transient double attrB = 0.0;

	public void setId(String id) {
		this.id = id;
	}

	public void methodeA(double paramA) {
		attrA = paramA;
		
		if(attrA > attrB) {
			attrB = attrA;

			Ntro.newMessage(MsgC.class)
			    .setId(id)
				.setParamA(attrA)
				.send();
		}
	}

	public void methodeB(VueB paramB) {
		paramB.methodeB(attrA);
	}



}
