|
MarlinMT
0.1.0
|
helper to create a Condition. More...
#include <Condition.h>
Public Member Functions | |
| operator Condition () const | |
| implicit cast to Condition. More... | |
| Condition | condition () const |
| construct new Condition. More... | |
| ConditionBuilder & | setName (const std::string_view &name) |
| only accept when key.name is perfect match to name. More... | |
| ConditionBuilder & | setName (const std::basic_regex< char > &rgx) |
| only accept when key.name includes a match. More... | |
| ConditionBuilder & | setPath (const std::string_view &path) |
| only accept when key.path is perfect match to path. More... | |
| ConditionBuilder & | setPath (const std::basic_regex< char > &rgx) |
| only accept when key.path includes a match. More... | |
| ConditionBuilder & | setType (const std::type_index &type) |
| only accept when Entry type matches. More... | |
| template<typename T > | |
| ConditionBuilder & | setType () |
| only accept when entry type matches. More... | |
Private Attributes | |
| std::optional< std::string > | _name {} |
| stores perfect match for name, when setted. More... | |
| std::basic_regex< char > | _rgxName {".*", std::regex::optimize} |
| stores name regex. Default matches every string. More... | |
| std::optional< std::string > | _path {} |
| stores perfect match for path, when setted. More... | |
| std::basic_regex< char > | _rgxPath {".*", std::regex::optimize} |
| stores path regex. Default matches every string. More... | |
| std::optional< std::type_index > | _type {} |
| stores type index when setted. More... | |
helper to create a Condition.
Definition at line 92 of file Condition.h.
| Condition marlinmt::book::ConditionBuilder::condition | ( | ) | const |
construct new Condition.
Definition at line 48 of file Condition.cc.
References marlinmt::book::_type, marlinmt::book::Condition::Condition(), and marlinmt::book::rgxEvaluation().
| marlinmt::book::ConditionBuilder::operator Condition | ( | ) | const |
implicit cast to Condition.
Definition at line 43 of file Condition.cc.
| ConditionBuilder & marlinmt::book::ConditionBuilder::setName | ( | const std::string_view & | name | ) |
only accept when key.name is perfect match to name.
| name | string which must perfect match key.name to accept key. |
Definition at line 84 of file Condition.cc.
| ConditionBuilder & marlinmt::book::ConditionBuilder::setName | ( | const std::basic_regex< char > & | rgx | ) |
only accept when key.name includes a match.
| rgx | regular expression. |
Definition at line 92 of file Condition.cc.
| ConditionBuilder & marlinmt::book::ConditionBuilder::setPath | ( | const std::string_view & | path | ) |
only accept when key.path is perfect match to path.
| path | string which must perfect match key.path to accept key. |
Definition at line 100 of file Condition.cc.
| ConditionBuilder & marlinmt::book::ConditionBuilder::setPath | ( | const std::basic_regex< char > & | rgx | ) |
only accept when key.path includes a match.
| rgx | regular expression. |
Definition at line 108 of file Condition.cc.
| ConditionBuilder & marlinmt::book::ConditionBuilder::setType | ( | const std::type_index & | type | ) |
only accept when Entry type matches.
| type | type_index of type to match. |
Definition at line 115 of file Condition.cc.
References marlinmt::book::_type.
|
inline |
only accept when entry type matches.
| T | type to match. |
Definition at line 141 of file Condition.h.
|
private |
stores perfect match for name, when setted.
Definition at line 147 of file Condition.h.
|
private |
stores perfect match for path, when setted.
Definition at line 151 of file Condition.h.
|
private |
stores name regex. Default matches every string.
Definition at line 149 of file Condition.h.
|
private |
stores path regex. Default matches every string.
Definition at line 153 of file Condition.h.
|
private |
stores type index when setted.
Definition at line 155 of file Condition.h.