Ejemplo n.º 1
0
		public object accept(foodvisitor v) // only accepts master visitor methods
		{	
			if (v is mastervisitor) return ((mastervisitor)v).visit(this);
    		else throw new Exception("this visitor will not work");

		} 
 // only accepts master visitor methods
 public object accept(foodvisitor v)
 {
     if (v is mastervisitor) return ((mastervisitor)v).visit(this);
     else throw new Exception("this visitor will not work");
 }
Ejemplo n.º 3
0
 public object accept(foodvisitor v)
 {
     return(v.visit(this));
 }