Skip to content

Glossary: Software Design Patterns in C++

Constructor injection

Passing an object its dependencies in its constructor, to keep for its whole life. `OrderLog` receives its repo, clock and notifier this way.

Where the book teaches it

Related terms

Dependency injectionComposition root