Maze_Solver  1.0
A Maze Solver Algorithm for BotnRoll ONE A
Intersection.h
Go to the documentation of this file.
1 #ifndef INTERSECTION_H
2 #define INTERSECTION_H
3 
4 #if defined(ARDUINO) && ARDUINO >= 100
5 #include "Arduino.h"
6 #else
7 #include "WProgram.h"
8 #endif
9 
10 #include "Path.h"
11 
23 };
24 
26 {
27  public:
28 
30  Intersection();
31 
33  inline bool operator==(const IntersectionType& rhs) const { return _intersectionType==rhs; }
34  inline void operator=(const Intersection& rhs) { _intersectionType=rhs._intersectionType; }
35 
37  inline void setType(const IntersectionType& type){_intersectionType = type;};
38 
40  inline IntersectionType getType() const {return _intersectionType;};
41 
43  void resetIntersection();
44 
46 
51 
53 
58  MoveType checkIntersectionInPath(Path &shortestPath);
59 
61 
65  void getIntersectionType(char lineSignature);
66 
68 };
69 
70 #endif /* INTERSECTION_H */
MoveType checkIntersectionInPath(Path &shortestPath)
Retrieves the next movement of the shortest path to be performed after recognising any valid intersec...
Definition: Intersection.cpp:62
bool operator==(const IntersectionType &rhs) const
operators overload
Definition: Intersection.h:33
void resetIntersection()
resets intersection
Definition: Intersection.cpp:18
IntersectionType getType() const
Retrieves the type of intersection.
Definition: Intersection.h:40
void operator=(const Intersection &rhs)
Definition: Intersection.h:34
Definition: Intersection.h:22
void setType(const IntersectionType &type)
Sets the type of intersection.
Definition: Intersection.h:37
Definition: Path.h:13
MoveType
Admissible movements.
Definition: Path.h:11
MoveType checkIntersection()
Retrieves the type of movement to be performed after a given intersection type been recognized...
Definition: Intersection.cpp:26
Definition: Intersection.h:15
IntersectionType
Intersection Types.
Definition: Intersection.h:13
void getIntersectionType(char lineSignature)
Sets the intersection type after successfully recognizing a sequence of line signatures.
Definition: Intersection.cpp:90
IntersectionType _intersectionType
the Type
Definition: Intersection.h:67
Definition: Intersection.h:25
Definition: Intersection.h:20
Definition: Intersection.h:17
Definition: Intersection.h:18
Definition: Intersection.h:16
Intersection()
default constructor
Definition: Intersection.cpp:13
Definition: Intersection.h:21
Definition: Intersection.h:14
Definition: Intersection.h:19