MCPcopy Create free account
hub / github.com/boost-ext/di / App

Class App

example/polymorphism/inheritance.cpp:20–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18};
19
20class App {
21 public:
22 explicit App(std::unique_ptr<const Drawable> drawable) : drawable{std::move(drawable)} {}
23 void draw(std::ostream& out) const { drawable->draw(out); }
24
25 private:
26 std::unique_ptr<const Drawable> drawable;
27};
28
29struct Square : Drawable {
30 void draw(std::ostream& out) const override { out << "Square"; }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected