What should go into a class declaration in C++?
For example, I have the following in a header file:
class BoardState {
public:
BoardState();
bool HasWon() const;
bool HasMoves() const;
bool MakeMove(const int column);
bool UndoMove(const int column);
const Chip (&grid() const)[kGridHeight][kGridWidth] { return grid_; }
const Chip lastplayer() const { return lastplayer_; }
private:
Chip grid_[kGridHeight][kGridWidth];
Chip turn_;
Chip lastplayer_;
int lastmove_;
DISALLOW_COPY_AND_ASSIGN(BoardState);
};
The cpp file for this class defines many additional small utility functions, types, and enums. Should all of these also be defined in the private section of the class declaration?