Sauce-0.10.1
A C++ Dependency Injection Framework
Public Member Functions | List of all members
sauce::internal::SelfInjector< T > Class Template Reference

If a type requests injection of its own smart pointer, do so. More...

#include <sauce/internal/self_injector.h>

Public Member Functions

void setSelf (Ptr ptr)
 

Detailed Description

template<typename T>
class sauce::internal::SelfInjector< T >

If a type requests injection of its own smart pointer, do so.

A type requests self-injection by defining the RequestsSelfInjection typedef. If this typedef is present, void setSelf(sauce::weak_ptr<RequestsSelfInjection>) must be defined and will be passes a self weak pointer.

Member Function Documentation

◆ setSelf()

template<typename T >
void sauce::internal::SelfInjector< T >::setSelf ( Ptr  ptr)
inline
30 {
31 setSelfIfRequested<T>(ptr, 0);
32 }

The documentation for this class was generated from the following file: