tartan 1.2.2.1
Chess API
Loading...
Searching...
No Matches
tt::ex::foreign_piece Class Reference

Thrown when piece does not belong to Board object in which it is being processed. More...

#include <exceptions.hpp>

Inheritance diagram for tt::ex::foreign_piece:
[legend]
Collaboration diagram for tt::ex::foreign_piece:
[legend]

Public Member Functions

 foreign_piece (const Piece *p, const Board *b, const std::string &what_arg="Piece does not belong to this board")
 
const Boardboard () const
 Get the Board object.
 
- Public Member Functions inherited from tt::ex::bad_piece
 bad_piece (const Piece *p, const std::string &what_arg="Invalid piece")
 
const Piecepiece () const
 Get the reported tt::Piece object.
 
- Public Member Functions inherited from std::logic_error
logic_error (T... args)
 
what (T... args)
 
- Public Member Functions inherited from std::exception
what (T... args)
 
~exception (T... args)
 
operator= (T... args)
 
exception (T... args)
 

Detailed Description

Thrown when piece does not belong to Board object in which it is being processed.

Constructor & Destructor Documentation

◆ foreign_piece()

tt::ex::foreign_piece::foreign_piece ( const Piece p,
const Board b,
const std::string what_arg = "Piece does not belong to this board" 
)
inline
Parameters
pPiece that is foreign
bBoard which were trying to do something with p (p does not belong to b Board)
what_argmessage string

Member Function Documentation

◆ board()

const Board * tt::ex::foreign_piece::board ( ) const
inline

Get the Board object.

Returns
Board object that tried to process foreign Piece object

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