public abstract void Accept( Visitor theVisitor);
public override void Accept( Visitor theVisitor) { theVisitor.VisitConcreteElement( this ); theVisitor.VisitConcreteElementB( this ); }
// 載入不同的Action(Visitor)來判斷 public void RunVisitor(Visitor theVisitor) { foreach(Element theElement in m_Context ) theElement.Accept( theVisitor); }