matador::di::strategy Class Referenceabstract
module module_

#include <di.hpp>

Inherited by matador::di::instance_strategy< T >, matador::di::singleton_per_thread_strategy< T >, matador::di::singleton_strategy< T >, and matador::di::transient_strategy< T >.

Public Member Functions

virtual ~strategy ()=default
 
virtual void * acquire ()=0
 Acquires an instance.
 

Detailed Description

Interface for the dependency injection creation strategy.

The injected service

Constructor & Destructor Documentation

◆ ~strategy()

virtual matador::di::strategy::~strategy ( )
virtualdefault

Destructor

Member Function Documentation

◆ acquire()

virtual void * matador::di::strategy::acquire ( )
pure virtual

Acquires an instance.

Acquires an instance based on the internal strategy and returns an anonymous pointer to the object

Returns
The current injected object depending of the strategy

Implemented in matador::di::transient_strategy< T >, matador::di::singleton_strategy< T >, matador::di::singleton_per_thread_strategy< T >, and matador::di::instance_strategy< T >.


The documentation for this class was generated from the following file:
  • matador/utils/di.hpp