Course
- Useful when you want to create only one unstance of object from a class
- Faunction that generate and returns an object from the specified class
- An imlementation to a state machine
- A set of objects that can pass a process throght a flow
- Each object is handling only one step
- The order of the steps is
- An implementation to containers and objects inside them
- An implementation to trees, subtrees and leaves
- Maked a deep Clone to an object
- To combine an existing functionallity to many classes
- To Add a new functionallity to many classes
- Disadvantage: You will always have to update the IVisitor after you add new class
- All the logic is implemented in the Visitor Class
- Useful for an old code
- Can be useful for a third party code
- Remineds Undo and Redo
- You can save a state and return to it when you decide
- Useful for code reuse
- Useful for running same code with minor changes each time
- Useful when set of functions run every time
- When you want to use Has-A instead of Is-A
- When you want to modify an object many times, every time modify the most updated object
- When you want to manage a set of objects and create an object from that set