summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2017-01-19 09:12:54 -0500
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2017-01-31 14:07:40 -0500
commit143522e341842505be3afd5d8cfd7cef714e64df (patch)
treeff1664895b52873fe609255d61347c40e1a87b8c
parent064c94a62f221533d36572d50bdbcfc3a42ef406 (diff)
downloadphosphor-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.hpp23
1 files changed, 12 insertions, 11 deletions
diff --git a/events.hpp b/events.hpp
index e029a6f..f591c42 100644
--- a/events.hpp
+++ b/events.hpp
@@ -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));
}
OpenPOWER on IntegriCloud