#include <klflib.h>
Public Types | |
enum | Type { MatchAllType = 0, PropertyMatchType, NegateMatchType, OrMatchType, AndMatchType } |
Public Member Functions | |
Type | type () const |
Get which type of condition this is. | |
PropertyMatch | propertyMatch () const |
Relevant for type PropertyMatchType. | |
QList< EntryMatchCondition > | conditionList () const |
Relevant for types OrMatchType and AndMatchType. | |
Static Public Member Functions | |
static EntryMatchCondition | mkMatchAll () |
static EntryMatchCondition | mkPropertyMatch (PropertyMatch pmatch) |
static EntryMatchCondition | mkNegateMatch (const EntryMatchCondition &condition) |
static EntryMatchCondition | mkOrMatch (QList< EntryMatchCondition > conditions) |
static EntryMatchCondition | mkAndMatch (QList< EntryMatchCondition > conditions) |
Protected Member Functions | |
EntryMatchCondition (Type type) | |
Protected Attributes | |
Type | mType |
PropertyMatch | mPropertyMatch |
QList< EntryMatchCondition > | mConditionList |
This is a generalized condition. It can be one of several types.
In the future, more match condition types may be added. For now, the following matching condition types are supported.
This class is meant for use with findEntries().
MatchAllType |
Matches all entries. |
PropertyMatchType |
Matches a property ID with a string (with a StringMatch) |
NegateMatchType |
Matches entries that don't match a condition. |
OrMatchType |
entries have to match with one of a list of conditions |
AndMatchType |
entries have to match with all given conditions |
KLFLib::EntryMatchCondition::EntryMatchCondition | ( | Type | type | ) | [inline, protected] |
Definition at line 239 of file klflib.h.
Referenced by mkMatchAll().
QList<EntryMatchCondition> KLFLib::EntryMatchCondition::conditionList | ( | ) | const [inline] |
Relevant for types OrMatchType and AndMatchType.
Definition at line 229 of file klflib.h.
References mConditionList.
Referenced by make_sql_condition(), operator<<(), and KLFLibResourceSimpleEngine::testEntryMatchConditionImpl().
KLFLib::EntryMatchCondition KLFLib::EntryMatchCondition::mkAndMatch | ( | QList< EntryMatchCondition > | conditions | ) | [static] |
Definition at line 802 of file klflib.cpp.
References mConditionList.
KLFLib::EntryMatchCondition KLFLib::EntryMatchCondition::mkMatchAll | ( | ) | [static] |
Definition at line 776 of file klflib.cpp.
References EntryMatchCondition(), and MatchAllType.
Referenced by make_sql_condition(), KLFLibDBEngine::query(), and KLFMainWin::slotEvaluate().
KLFLib::EntryMatchCondition KLFLib::EntryMatchCondition::mkNegateMatch | ( | const EntryMatchCondition & | condition | ) | [static] |
Stores condition
in first element of conditionList().
Definition at line 788 of file klflib.cpp.
References mConditionList.
Referenced by make_sql_condition().
KLFLib::EntryMatchCondition KLFLib::EntryMatchCondition::mkOrMatch | ( | QList< EntryMatchCondition > | conditions | ) | [static] |
Definition at line 795 of file klflib.cpp.
References mConditionList.
Referenced by make_sql_condition().
KLFLib::EntryMatchCondition KLFLib::EntryMatchCondition::mkPropertyMatch | ( | PropertyMatch | pmatch | ) | [static] |
Definition at line 781 of file klflib.cpp.
References mPropertyMatch.
Referenced by KLFLibModelCache::fetchMore(), and KLFLibModelCache::rebuildCache().
PropertyMatch KLFLib::EntryMatchCondition::propertyMatch | ( | ) | const [inline] |
Relevant for type PropertyMatchType.
Definition at line 227 of file klflib.h.
References mPropertyMatch.
Referenced by make_sql_condition(), operator<<(), and KLFLibResourceSimpleEngine::testEntryMatchConditionImpl().
Type KLFLib::EntryMatchCondition::type | ( | ) | const [inline] |
Get which type of condition this is.
Definition at line 225 of file klflib.h.
References mType.
Referenced by make_sql_condition(), operator<<(), and KLFLibResourceSimpleEngine::testEntryMatchConditionImpl().
Definition at line 244 of file klflib.h.
Referenced by conditionList(), mkAndMatch(), mkNegateMatch(), and mkOrMatch().
Definition at line 243 of file klflib.h.
Referenced by mkPropertyMatch(), and propertyMatch().
Type KLFLib::EntryMatchCondition::mType [protected] |