#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 70 of file AttributeInjector.h.
◆ getAttribute() [1/2]
template<InjectableAttribute Attribute>
bool utils::SingleAttributeInjector::getAttribute |
( |
const std::function< void(Attribute &)> & | onFound | ) |
const |
|
inlineconstexpr |
Definition at line 99 of file AttributeInjector.h.
99 {
100 const bool found = false;
101
103 onFound(**std::static_pointer_cast<AttributeProxy<Attribute>>(
attribute));
104 }
105
106 return found;
107 }
std::string attributeType
std::shared_ptr< void > attribute
◆ getAttribute() [2/2]
template<InjectableAttribute Attribute>
void utils::SingleAttributeInjector::getAttribute |
( |
const std::function< void(Attribute &)> & | onFound, |
|
|
const std::function< void(const std::string &)> & | onNotFound ) const |
|
inlineconstexpr |
Definition at line 110 of file AttributeInjector.h.
111 {
113 onFound(**std::static_pointer_cast<AttributeProxy<Attribute>>(
attribute));
114 } else {
115 onNotFound(std::string(typeid(Attribute).name()));
116 }
117 }
◆ setAttribute() [1/2]
template<InjectableAttribute Attribute>
bool utils::SingleAttributeInjector::setAttribute |
( |
const Attribute && | attribute, |
|
|
bool | overwrite = false ) |
|
inlineconstexpr |
Definition at line 86 of file AttributeInjector.h.
86 {
87 bool inserted = false;
88
92 inserted = true;
93 }
94
95 return inserted;
96 }
◆ setAttribute() [2/2]
template<InjectableAttribute Attribute>
bool utils::SingleAttributeInjector::setAttribute |
( |
const Attribute & | attribute, |
|
|
bool | overwrite = false ) |
|
inlineconstexpr |
Definition at line 73 of file AttributeInjector.h.
73 {
74 bool inserted = false;
75
79 inserted = true;
80 }
81
82 return inserted;
83 }
◆ 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: