#include <AttributeInjector.h>
|
template<InjectableAttribute Attribute> |
constexpr bool | setAttribute (const Attribute &attribute, bool overwrite=false) |
|
template<InjectableAttribute Attribute> |
constexpr bool | setAttribute (const Attribute &&attribute, bool overwrite=false) |
|
template<InjectableAttribute Attribute> |
constexpr bool | getAttribute (const std::function< void(Attribute &)> &onFound) const |
|
template<InjectableAttribute Attribute> |
constexpr void | getAttribute (const std::function< void(Attribute &)> &onFound, const std::function< void(const std::string &)> &onNotFound) const |
|
Definition at line 92 of file AttributeInjector.h.
◆ getAttribute() [1/2]
template<InjectableAttribute Attribute>
constexpr bool utils::SingleAttributeInjector::getAttribute |
( |
const std::function< void(Attribute &)> & |
onFound | ) |
const |
|
inlineconstexpr |
Definition at line 121 of file AttributeInjector.h.
121 {
122 const bool found = false;
123
125 onFound(**std::static_pointer_cast<AttributeProxy<Attribute>>(
attribute));
126 }
127
128 return found;
129 }
std::string attributeType
std::shared_ptr< void > attribute
◆ getAttribute() [2/2]
template<InjectableAttribute Attribute>
constexpr void utils::SingleAttributeInjector::getAttribute |
( |
const std::function< void(Attribute &)> & |
onFound, |
|
|
const std::function< void(const std::string &)> & |
onNotFound |
|
) |
| const |
|
inlineconstexpr |
Definition at line 132 of file AttributeInjector.h.
133 {
135 onFound(**std::static_pointer_cast<AttributeProxy<Attribute>>(
attribute));
136 } else {
137 onNotFound(std::string(typeid(Attribute).name()));
138 }
139 }
◆ setAttribute() [1/2]
template<InjectableAttribute Attribute>
constexpr bool utils::SingleAttributeInjector::setAttribute |
( |
const Attribute && |
attribute, |
|
|
bool |
overwrite = false |
|
) |
| |
|
inlineconstexpr |
Definition at line 108 of file AttributeInjector.h.
108 {
109 bool inserted = false;
110
114 inserted = true;
115 }
116
117 return inserted;
118 }
◆ setAttribute() [2/2]
template<InjectableAttribute Attribute>
constexpr bool utils::SingleAttributeInjector::setAttribute |
( |
const Attribute & |
attribute, |
|
|
bool |
overwrite = false |
|
) |
| |
|
inlineconstexpr |
Definition at line 95 of file AttributeInjector.h.
95 {
96 bool inserted = false;
97
101 inserted = true;
102 }
103
104 return inserted;
105 }
◆ attribute
std::shared_ptr<void> utils::SingleAttributeInjector::attribute {nullptr} |
|
private |
◆ attributeType
std::string utils::SingleAttributeInjector::attributeType |
|
private |
The documentation for this class was generated from the following file: