A class for checking if the content of two query-paradigm tags matches. More...
#include <CQueryParadigmMatcher.h>
Public Member Functions | |
bool | operator() (const CXMLElement &inQuery, const CXMLElement &inResult) const |
This function gives back, if the inQuery matches inResult. |
Protected Member Functions | |
bool | matches (const CXMLElement &inQuery, const CXMLElement &inResult) const |
Two XMLElements of type query-paradigm match, if the intersection of their attribute sets is identical. |
A class for checking if the content of two query-paradigm tags matches.
|
protected |
Two XMLElements of type query-paradigm match, if the intersection of their attribute sets is identical.
I.e.: If inQuery contains <query-paradigm a1="x" a2=y" />, inResult with <query-paradigm a1="x" a3="z" /> would match, because the intersection {a1,a2} {a1,a2} of the attribute sets is <query-paradigm a1="x" /> and <query-paradigm a1="x"/> for both inQuery and inResult.
<query-paradigm a1="x"/> <query-paradigm a2="x"/>
would also match (the intersection of {a1} and {a2} is empty)
<query-paradigm a1="x" a3="x" /> <query-paradigm a1="y" />
would not (the intersection of {a1,a3} and {a1} is non-empty, but the values in the two tags are differen)
bool CQueryParadigmMatcher::operator() | ( | const CXMLElement & | inQuery, |
const CXMLElement & | inResult | ||
) | const |
This function gives back, if the inQuery matches inResult.
Both parameters are elements of type query-paradigm-list
inQuery matches inResult, if one of the children (a query paradigm) of inQuery matches one of the children (also a query paradigm) of inResult.