betfsm.betfsm.Visitor

Bases: ABC

Visitor pattern.

Called by accept() methods of TickingState and its subclasses. The Visitor is a base class that you can inherit from to have your object called throughout the hierarchy of states. This mechanism is completely generic.

See also
  • Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides (1994). Design Patterns: Elements of Reusable Object-Oriented Software. Addison Wesley. (Gang of Four book)
  • wikipedia

post(state)

Processing done by the visitor after visiting the children.

returns nothing.

pre(state) abstractmethod

Processing done by visitor before visiting the children of the state.

returns true if children needs to be explored