#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 |
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().
Definition at line 214 of file klflib.h.
| 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] |
| 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().
| 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().
| 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::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::mkPropertyMatch | ( | PropertyMatch | pmatch | ) | [static] |
Definition at line 781 of file klflib.cpp.
References mPropertyMatch, and PropertyMatchType.
Referenced by KLFLibModelCache::fetchMore(), and KLFLibModelCache::rebuildCache().
| 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, and NegateMatchType.
Referenced by make_sql_condition().
| KLFLib::EntryMatchCondition KLFLib::EntryMatchCondition::mkOrMatch | ( | QList< EntryMatchCondition > | conditions | ) | [static] |
Definition at line 795 of file klflib.cpp.
References mConditionList, and OrMatchType.
Referenced by make_sql_condition().
| KLFLib::EntryMatchCondition KLFLib::EntryMatchCondition::mkAndMatch | ( | QList< EntryMatchCondition > | conditions | ) | [static] |
Type KLFLib::EntryMatchCondition::mType [protected] |
Definition at line 244 of file klflib.h.
Referenced by conditionList(), mkAndMatch(), mkNegateMatch(), and mkOrMatch().