|
| | 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 >
Generic Chem::MatchExpression specialization for the binary comparison between a query- and a target-derived property value retrieved through a user-supplied accessor function.
This class implements the two-object overload (primary plus secondary objects) of Chem::MatchExpression. The constructor either binds a fixed query value (taken verbatim from the constructor argument) or retrieves the query value through the same accessor as the target value. The actual comparison is delegated to the MatchFunc functor whose function call operator takes 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).
- 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. |
| 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. |
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]).
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 >.