Autowiring  1.0.3
A C++ Inversion of Control Framework
Autowired< T > Class Template Reference

Autowires a "slot" in a context to which an instance of the specified type will be wired when it becomes available. More...

#include <Autowired.h>

Inherits AutowirableSlot< T >.

Detailed Description

template<typename T>
class Autowired< T >

Autowires a "slot" in a context to which an instance of the specified type will be wired when it becomes available.

Parameters
TThe class whose type is to be found. Must be an EXACT match.

The Autowired template class forms the foundation of the context consumer system. It provides a quick way to import or create an instance of a specified class in the local context.

If an instance of the type specified in the template parameter already exists in the context, the dependency is satisfied using that instance immediately. Otherwise, the dependency is satisfied when an instance of the correct type is created in the context.

This class may be safely used even when the member in question is an abstract type.

Examples:
AutoFilterExample.cpp, and ContextExample.cpp.

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