PropertyMatchExpression.
More...
#include <PropertyMatchExpression.hpp>
|
| PropertyMatchExpression (const PropertyFunction &property_func) |
| Constructs a PropertyMatchExpression instance that performs query/target object equivalence tests based on the property values returned by property_func. More...
|
|
| PropertyMatchExpression (const ValueType &value, const PropertyFunction &property_func) |
| Constructs a PropertyMatchExpression instance that performs query/target object equivalence tests based on the target object property values returned by property_func and the specified query value. More...
|
|
bool | operator() (const ObjType1 &query_obj1, const ObjType2 &query_obj2, const ObjType1 &target_obj1, const ObjType2 &target_obj2, const Base::Any &aux_data) const |
| Checks whether the value of the target object propery matches the query property value. More...
|
|
virtual | ~MatchExpression () |
| Virtual Destructor. More...
|
|
virtual bool | operator() (const ObjType1 &query_obj1, const void &query_obj2, const ObjType1 &target_obj1, const void &target_obj2, const AtomBondMapping &mapping, const Base::Any &aux_data) const |
| Performs an evaluation of the expression for the given query and target objects under consideration of the provided candidate atom/bond mapping. More...
|
|
virtual bool | requiresAtomBondMapping () const |
| Tells whether the expression must be reevaluated after a query to target atom/bond mapping candidate has been found. More...
|
|
template<typename ValueType, typename MatchFunc, typename ObjType1, typename ObjType2 = void>
class CDPL::Chem::PropertyMatchExpression< ValueType, MatchFunc, ObjType1, ObjType2 >
PropertyMatchExpression.
- Template Parameters
-
ValueType | The type of the checked property values. |
MatchFunc | The type of a binary functor class that implements the logic of testing the target property values against the query property values. The overloaded function call operator is required to take the target property value as its first argument and the query value as the second argument (both provided as const reference to ValueType ). The returned result must be implicitly convertible to type bool (true indicates a match, false a mismatch). |
ObjType1 | The type of the primary query/target objects for which the expression gets evaluated. |
ObjType2 | The type of secondary query/target objects which provide auxiliary information for expression evaluation. |
◆ SharedPointer
template<typename ValueType , typename MatchFunc , typename ObjType1 , typename ObjType2 = void>
A reference-counted smart pointer [SHPTR] for dynamically allocated PropertyMatchExpression
instances.
◆ PropertyFunction
template<typename ValueType , typename MatchFunc , typename ObjType1 , typename ObjType2 = void>
Type of the generic functor class used to store user-defined property accessor functions.
PropertyFunction
allows to wrap any function pointer or function object compatible with a return type of ValueType
and two arguments of type const ObjType1&
and const ObjType2&
(see [FUNWRP]).
◆ PropertyMatchExpression() [1/2]
template<typename ValueType , typename MatchFunc , typename ObjType1 , typename ObjType2 = void>
Constructs a PropertyMatchExpression
instance that performs query/target object equivalence tests based on the property values returned by property_func.
- Parameters
-
property_func | A PropertyMatchExpression::PropertyFunction2 instance that wraps the specified property value accessor function. |
◆ PropertyMatchExpression() [2/2]
template<typename ValueType , typename MatchFunc , typename ObjType1 , typename ObjType2 = void>
Constructs a PropertyMatchExpression
instance that performs query/target object equivalence tests based on the target object property values returned by property_func and the specified query value.
- Parameters
-
value | The query property value. |
property_func | A PropertyMatchExpression::PropertyFunction2 instance that wraps the specified target property value accessor function. |
◆ operator()()
template<typename ValueType , typename MatchFunc , typename ObjType1 , typename ObjType2 >
bool CDPL::Chem::PropertyMatchExpression< ValueType, MatchFunc, ObjType1, ObjType2 >::operator() |
( |
const ObjType1 & |
query_obj1, |
|
|
const ObjType2 & |
query_obj2, |
|
|
const ObjType1 & |
target_obj1, |
|
|
const ObjType2 & |
target_obj2, |
|
|
const Base::Any & |
aux_data |
|
) |
| const |
|
virtual |
Checks whether the value of the target object propery matches the query property value.
The actual equivalence test between the query and target property values is performed by an instance of the function object type that was provided as template argument for MatchFunc.
- Parameters
-
query_obj1 | The primary query object. |
query_obj2 | The secondary query object. |
target_obj1 | The primary target object. |
target_obj2 | The secondary target object. |
aux_data | Provides auxiliary information for the evaluation of the expression (ignored).
|
- Returns
true
if the target property value matches the query property value under the conditions defined by MatchFunc, and false
otherwise.
Reimplemented from CDPL::Chem::MatchExpression< ObjType1, void >.
The documentation for this class was generated from the following file: