# Visitor Pattern

## Intro

![Intro](https://554043693-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MSm3cZika9wPcLt2w9B%2Fsync%2Fdd505a1539125b67390096a2c7a58488cc044ed6.png?generation=1623580982085040\&alt=media)

![Reference](https://554043693-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MSm3cZika9wPcLt2w9B%2Fsync%2F804f3ee0a90d14591cdcc096fd4954d6d1fde210.png?generation=1623580975108971\&alt=media)

## Visitor 패턴이란?

![What is Visitor Pattern](https://554043693-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MSm3cZika9wPcLt2w9B%2Fsync%2Ff932c263d0189839c44283e6756eee0f147d199d.png?generation=1623580975984546\&alt=media)

## Visitor 패턴의 구성요소

![Components](https://554043693-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MSm3cZika9wPcLt2w9B%2Fsync%2F22f3762a97559d46524286f5da7fab0da91d1346.png?generation=1623580973012454\&alt=media)

## Visitor 패턴의 아키텍처

![Architecture](https://554043693-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MSm3cZika9wPcLt2w9B%2Fsync%2Fbafdae43a0943e71c8715759db39608620f30508.png?generation=1623580977065729\&alt=media)

## Visitor 패턴의 예시

![Example 1 - Visitors](https://554043693-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MSm3cZika9wPcLt2w9B%2Fsync%2F77e58973154468db2507f06b5e52b87f2d83dd97.png?generation=1623580981147263\&alt=media)

![Example 2 - Elements](https://554043693-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MSm3cZika9wPcLt2w9B%2Fsync%2F9a83f454109da7611c021fe91b8c2045cca46436.png?generation=1623580980198423\&alt=media)

## 적용 가능한 상황

![Applicability](https://554043693-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MSm3cZika9wPcLt2w9B%2Fsync%2F3214b02dd5affcdf8209ebb53b3e62c50bc97e03.png?generation=1623580973970737\&alt=media)

## 장 단점

![Pros and Cons](https://554043693-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MSm3cZika9wPcLt2w9B%2Fsync%2F8beb978156d3d48d1afbffd648605ad189d33c1e.png?generation=1623580979129730\&alt=media)

## 다른 디자인 패턴과의 관계

![Relations with Other Patterns](https://554043693-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MSm3cZika9wPcLt2w9B%2Fsync%2F980a6f48db262ca82d1ad8ed704f7d94bf349a8b.png?generation=1623580977992240\&alt=media)
