Esempio n. 1
0
 // 共用的訪問者界面
 public void RunVisitor(IShapeVisitor theVisitor)
 {
     foreach (IShape theShape in m_Shapes)
     {
         theShape.RunVisitor(theVisitor);
     }
 }
Esempio n. 2
0
 public override void RunVisitor(IShapeVisitor theVisitor)
 {
     theVisitor.VisitCube(this);
 }
Esempio n. 3
0
 public override void RunVisitor(IShapeVisitor theVisitor)
 {
     theVisitor.VisitCylinder(this);
 }
Esempio n. 4
0
 public abstract int             GetVectorCount(); // 取得頂點數
 public abstract void    RunVisitor(IShapeVisitor theVisitor);
		// 共用的訪問者界面
		public void RunVisitor(IShapeVisitor theVisitor)
		{
			foreach(IShape theShape in m_Shapes)
				theShape.RunVisitor( theVisitor );
		}
		public override void RunVisitor(IShapeVisitor theVisitor)
		{
			theVisitor.VisitCylinder(this);
		}
		public override void RunVisitor(IShapeVisitor theVisitor)
		{
			theVisitor.VisitCube(this);
		}
		public abstract int		GetVectorCount(); // 取得頂點數
		public abstract void 	RunVisitor(IShapeVisitor theVisitor);