You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
333 B
25 lines
333 B
7 months ago
|
#include <iostream>
|
||
|
#include "constness.hpp"
|
||
|
|
||
|
using std::cout;
|
||
|
|
||
|
void RenderTarget::draw(const Drawable& drawable) {
|
||
|
drawable.draw(*this);
|
||
|
}
|
||
|
|
||
|
void Shape::draw(const RenderTarget& target) const {
|
||
|
cout << "shape draw\n";
|
||
|
}
|
||
|
|
||
|
using std::cout;
|
||
|
|
||
|
int main() {
|
||
|
|
||
|
RenderTarget target;
|
||
|
Shape shape;
|
||
|
|
||
|
target.draw(shape);
|
||
|
|
||
|
return 0;
|
||
|
}
|