Fishtank
screen.h
Go to the documentation of this file.
1 #pragma once
2 
4 class Screen {
5 public:
8  explicit Screen(int width, int height);
10  int width() const;
12  int height() const;
18  virtual void charAtPut(int col, int row, char value) = 0;
21  virtual void clear() = 0;
22 
23 protected:
24  void checkCoordinates(int col, int row) const;
25 
26  int width_;
27  int height_;
28 };
Represents the abstract notion of a character-addressable writable screen.
Definition: screen.h:4
Screen(int width, int height)
Definition: screen.cpp:5
int width_
Definition: screen.h:26
int width() const
Definition: screen.cpp:17
void checkCoordinates(int col, int row) const
Definition: screen.cpp:10
virtual void charAtPut(int col, int row, char value)=0
int height_
Definition: screen.h:27
int height() const
Definition: screen.cpp:19
virtual void clear()=0