robot_api::RoboSimExecutionException Struct Reference

#include <robot_api.hpp>

Collaboration diagram for robot_api::RoboSimExecutionException:

Public Member Functions

 RoboSimExecutionException (const string &msg_)
 
 RoboSimExecutionException (const string &msg_, int player)
 
 RoboSimExecutionException (const string &msg_, int player, const GridCell &cell)
 
 RoboSimExecutionException (const string &msg_, int player, const GridCell &cell, const GridCell &cell2)
 
 RoboSimExecutionException (const string &msg_, int player, int x1, int y1, int x2, int y2)
 

Public Attributes

string msg
 

Detailed Description

Definition at line 176 of file robot_api.hpp.

Constructor & Destructor Documentation

robot_api::RoboSimExecutionException::RoboSimExecutionException ( const string &  msg_)
inline

Definition at line 180 of file robot_api.hpp.

180 : msg(msg_) {}
robot_api::RoboSimExecutionException::RoboSimExecutionException ( const string &  msg_,
int  player 
)
inline

Definition at line 182 of file robot_api.hpp.

183  {
184  msg = string("Player ")+std::to_string(player)+" "+msg_;
185  }
robot_api::RoboSimExecutionException::RoboSimExecutionException ( const string &  msg_,
int  player,
const GridCell cell 
)
inline

Definition at line 187 of file robot_api.hpp.

References robot_api::GridCell::x_coord, and robot_api::GridCell::y_coord.

188  {
189  msg = string("Player ")+std::to_string(player)+" "+msg_+" with robot at coordinates ["+std::to_string(cell.x_coord)+"]["+std::to_string(cell.y_coord)+"]";
190  }
robot_api::RoboSimExecutionException::RoboSimExecutionException ( const string &  msg_,
int  player,
const GridCell cell,
const GridCell cell2 
)
inline

Definition at line 192 of file robot_api.hpp.

References robot_api::GridCell::x_coord, and robot_api::GridCell::y_coord.

193  {
194  msg = string("Player ")+std::to_string(player)+" "+msg_+" with robot at coordinates ["+std::to_string(cell.x_coord)+"]["+std::to_string(cell.y_coord)+"], coordinates of invalid cell are ["+std::to_string(cell2.x_coord)+"]["+std::to_string(cell2.y_coord)+"]";
195  }
robot_api::RoboSimExecutionException::RoboSimExecutionException ( const string &  msg_,
int  player,
int  x1,
int  y1,
int  x2,
int  y2 
)
inline

Definition at line 197 of file robot_api.hpp.

198  {
199  msg = string("Player ")+std::to_string(player)+" "+msg_+" with robot at coordinates ["+std::to_string(x1)+"]["+std::to_string(y1)+"], coordinates of invalid cell are ["+std::to_string(x2)+"]["+std::to_string(y2)+"]";
200  }

Member Data Documentation

string robot_api::RoboSimExecutionException::msg

Definition at line 178 of file robot_api.hpp.

Referenced by DefenderBot::act(), and DemoBot::act().


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