diff options
author | HampusM <hampus@hampusmat.com> | 2022-06-14 18:31:39 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-06-14 18:31:39 +0200 |
commit | 845ff3d141553d24d4572738101fce948bf40e67 (patch) | |
tree | fff2a606ba04bc4526e69df0b7b1e3d28fdf63b3 /examples/basic/src/bootstrap.cpp | |
parent | 9d50e72892f84c602df3c328259cdfdd325bca12 (diff) |
refactor!: rename Container to DIContainer
Diffstat (limited to 'examples/basic/src/bootstrap.cpp')
-rw-r--r-- | examples/basic/src/bootstrap.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/examples/basic/src/bootstrap.cpp b/examples/basic/src/bootstrap.cpp index 104cf51..507cde7 100644 --- a/examples/basic/src/bootstrap.cpp +++ b/examples/basic/src/bootstrap.cpp @@ -12,15 +12,15 @@ #include "hero.hpp" #include "sword.hpp" -auto bootstrap() -> yacppdic::Container +auto bootstrap() -> yacppdic::DIContainer { - auto container = yacppdic::Container(); + auto di_container = yacppdic::DIContainer(); - container.bind<IHero>().to<Hero>(); - container.bind<IWeapon>().to<Sword>(); - container.bind<IEnemyCreator>().to<EnemyCreator>(); + di_container.bind<IHero>().to<Hero>(); + di_container.bind<IWeapon>().to<Sword>(); + di_container.bind<IEnemyCreator>().to<EnemyCreator>(); - container.bind<IEnemyFactory>() + di_container.bind<IEnemyFactory>() .to_factory( []() { @@ -29,7 +29,7 @@ auto bootstrap() -> yacppdic::Container ) .when_tagged<SMALL_ENEMY_TAG>(); - container.bind<IEnemyFactory>() + di_container.bind<IEnemyFactory>() .to_factory( []() { @@ -38,5 +38,5 @@ auto bootstrap() -> yacppdic::Container ) .when_tagged<BIG_ENEMY_TAG>(); - return container; + return di_container; } |