Thunderbots Project
Loading...
Searching...
No Matches
ObstacleVisitor Class Referenceabstract

#include <obstacle_visitor.h>

Public Member Functions

virtual void visit (const GeomObstacle< Circle > &geom_obstacle)=0
 
virtual void visit (const GeomObstacle< Polygon > &geom_obstacle)=0
 
virtual void visit (const GeomObstacle< Rectangle > &geom_obstacle)=0
 
virtual void visit (const GeomObstacle< Stadium > &geom_obstacle)=0
 

Detailed Description

This class provides an interface for all Obstacle Visitors. The Visitor design pattern allows us to perform operations on Obstacle objects without needing to check which concrete type it is with an if/else statement, and we don't need to pollute the Obstacle classes with information or functions that are specific to the task we want to perform.

Member Function Documentation

◆ visit()

virtual void visit ( const GeomObstacle< Circle > &  geom_obstacle)
pure virtual

Visits an Obstacle to perform an operation.

Parameters
TheObstacle to visit

The documentation for this class was generated from the following file: