Sauce-0.10.1
A C++ Dependency Injection Framework
named.h
1#ifndef SAUCE_NAMED_H_
2#define SAUCE_NAMED_H_
3
4#include <string>
5
6namespace sauce {
7
11template<typename Iface, typename Name>
12class Named {};
13
17class Unnamed {};
18
22inline std::string const & unnamed() {
23 static std::string const unnamed = "unnamed";
24 return unnamed;
25}
26
27}
28
29#endif // SAUCE_NAMED_H_
Wrap dependency requests with Named to choose one of several (statically) named alternatives.
Definition: named.h:12
The name of all statically unnamed dependencies.
Definition: named.h:17