template<typename T>
class maliput::drake::systems::SystemVisitor< T >
Provides a "Visitor Pattern" for System and Diagram.
Rather than adding more virtual methods to the System base class, or performing a dynamic_cast to test if a System is a Diagram, you may use the visitor pattern enabled by this class, e.g.:
template <typename T>
...
}
MySystemVisitor<T> visitor;
system.Accept(visitor);
will call the correct Visit
overload.
- Note
- This method does not recurse through the subsystems of a Diagram, but that is easy to do: just call Diagram::GetSystems() in your visitor and then call Accept on the subsystems.
@tparam_default_scalar