Skip to content

Latest commit

 

History

History

visitor

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Visitor pattern

  • 객체의 원소에 대해 수행할 연산을 분리하여 별도의 클래스로 구성
  • 구조를 변경하지 않고 복합 객체 구조에 새로운 기능을 추가할 수 있으나 복합 클래스의 캡슐화가 깨짐
    • 모든 항목을 접근 = 모든 객체가 자신의 상태를 외부로 노출시켜야 함

Structure

image

Reference