Design Patterns
validator.h
Go to the documentation of this file.
1 // Created by Bartosz Rachwal.
2 // Copyright (c) 2015 Bartosz Rachwal. The National Institute of Advanced Industrial Science and Technology, Japan. All rights reserved.
3 
4 #ifndef CREATIONALTESTS_UTILS_VALIDATOR_H_
5 #define CREATIONALTESTS_UTILS_VALIDATOR_H_
6 
7 #include "../../../creational/src/mazeparts/maze.h"
8 
9 namespace creationaltests
10 {
11 namespace validation
12 {
13 using namespace creational::commons;
14 
15 class Validator
16 {
17  public:
18  static bool BasicMazeConfiguration(Maze* maze);
19  static bool FactoryMethodsMazeConfiguration(Maze* maze);
20  static bool BombedMazeFactoryMazeConfiguration(Maze* maze);
21  static bool EnchantedMazeFactoryMazeConfiguration(Maze* maze);
22  static bool MazeFactoryMazeConfiguration(Maze* maze);
23  static bool StandardMazeBuilderConfiguration(Maze* maze);
24 
25  private:
26  template<class east_side, class west_side, class north_side, class south_side>
27  static bool ValidateRoom(Maze* maze, int room_number);
28 
29  template<class room_type>
30  static bool ValidateRoomType(Maze* maze, int room_number);
31 
32  template<class side_type>
33  static bool ValidateSide(Room* room, Direction direction);
34 };
35 }
36 }
37 #endif
38 
Direction
Definition: direction.h:13
Definition: bombed_wall.cc:10
Definition: validator.h:15
Definition: room.h:16
Definition: maze_game_test.cc:17
Definition: maze.h:17