Visitor.cpp 591 B

1234567891011121314151617181920212223242526
  1. #include "Visitor.h"
  2. #include <iostream>
  3. using namespace std;
  4. Visitor::Visitor() {
  5. }
  6. Visitor::~Visitor() {
  7. }
  8. void ConcreteVisitorA::VisitConcreteElementA(Element* elm) {
  9. cout << "i will visit ConcreteElementA..." << endl;
  10. }
  11. void ConcreteVisitorA::VisitConcreteElementB(Element* elm) {
  12. cout << "i will visit ConcreteElementB..." << endl;
  13. }
  14. void ConcreteVisitorB::VisitConcreteElementA(Element* elm) {
  15. cout << "i will visit ConcreteElementA..." << endl;
  16. }
  17. void ConcreteVisitorB::VisitConcreteElementB(Element* elm) {
  18. cout << "i will visit ConcreteElementB..." << endl;
  19. }