diff options
| author | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2017-01-19 09:12:54 -0500 |
|---|---|---|
| committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2017-01-31 14:07:40 -0500 |
| commit | 143522e341842505be3afd5d8cfd7cef714e64df (patch) | |
| tree | ff1664895b52873fe609255d61347c40e1a87b8c | |
| parent | 064c94a62f221533d36572d50bdbcfc3a42ef406 (diff) | |
| download | phosphor-inventory-manager-143522e341842505be3afd5d8cfd7cef714e64df.tar.gz phosphor-inventory-manager-143522e341842505be3afd5d8cfd7cef714e64df.zip | |
Rename PropertyCondition
Prepare for additional filters based on properties.
Change-Id: Ia063e306a5b4f6c7c48a93824e5cafbfe3e1f8a6
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
| -rw-r--r-- | events.hpp | 23 |
1 files changed, 12 insertions, 11 deletions
@@ -95,22 +95,23 @@ namespace details namespace property_condition { -/** @struct PropertyCondition +/** @struct PropertyChangedCondition * @brief Match filter functor that tests a property value. * * @tparam T - The type of the property being tested. * @tparam U - The type of the condition checking functor. */ template <typename T, typename U> -struct PropertyCondition +struct PropertyChangedCondition { - PropertyCondition() = delete; - ~PropertyCondition() = default; - PropertyCondition(const PropertyCondition&) = default; - PropertyCondition& operator=(const PropertyCondition&) = delete; - PropertyCondition(PropertyCondition&&) = default; - PropertyCondition& operator=(PropertyCondition&&) = default; - PropertyCondition(const char* iface, const char* property, U&& condition) : + PropertyChangedCondition() = delete; + ~PropertyChangedCondition() = default; + PropertyChangedCondition(const PropertyChangedCondition&) = default; + PropertyChangedCondition& operator=(const PropertyChangedCondition&) = delete; + PropertyChangedCondition(PropertyChangedCondition&&) = default; + PropertyChangedCondition& operator=(PropertyChangedCondition&&) = default; + PropertyChangedCondition(const char* iface, const char* property, + U&& condition) : _iface(iface), _property(property), _condition(std::forward<U>(condition)) { } @@ -153,7 +154,7 @@ struct PropertyCondition } // namespace property_condition } // namespace details -/** @brief Implicit type deduction for constructing PropertyCondition. */ +/** @brief Implicit type deduction for constructing PropertyChangedCondition. */ template <typename T> auto propertyChangedTo( const char* iface, @@ -165,7 +166,7 @@ auto propertyChangedTo( return arg == val; }; using U = decltype(condition); - return details::property_condition::PropertyCondition<T, U>( + return details::property_condition::PropertyChangedCondition<T, U>( iface, property, std::move(condition)); } |

