From 9fce9dd2c3cd1c0a75a5cfe74ea0484186247cc3 Mon Sep 17 00:00:00 2001 From: HampusM Date: Thu, 28 Apr 2022 22:03:07 +0200 Subject: docs: add basic example --- examples/basic/src/bootstrap.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 examples/basic/src/bootstrap.cpp (limited to 'examples/basic/src/bootstrap.cpp') diff --git a/examples/basic/src/bootstrap.cpp b/examples/basic/src/bootstrap.cpp new file mode 100644 index 0000000..fe59c5d --- /dev/null +++ b/examples/basic/src/bootstrap.cpp @@ -0,0 +1,22 @@ +#include "bootstrap.hpp" + +// Interfaces +#include "interfaces/enemy.hpp" +#include "interfaces/hero.hpp" +#include "interfaces/weapon.hpp" + +// Concretes +#include "enemy.hpp" +#include "hero.hpp" +#include "sword.hpp" + +yacppdic::Container bootstrap() +{ + auto container = yacppdic::Container(); + + container.bind().to(); + container.bind().to(); + container.bind().to(); + + return container; +} -- cgit v1.2.3-18-g5258