[KLF Application][KLF Tools][KLF Backend][KLF Home]
KLatexFormula Project
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
KLFLib::EntryMatchCondition Struct Reference

#include <klflib.h>

Collaboration diagram for KLFLib::EntryMatchCondition:
Collaboration graph
[legend]

Public Types

enum  Type {
  MatchAllType = 0, PropertyMatchType, NegateMatchType, OrMatchType,
  AndMatchType
}
 

Public Member Functions

Type type () const
 Get which type of condition this is. More...
 
PropertyMatch propertyMatch () const
 Relevant for type PropertyMatchType. More...
 
QList< EntryMatchConditionconditionList () const
 Relevant for types OrMatchType and AndMatchType. More...
 

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< EntryMatchConditionmConditionList
 

Detailed Description

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().

Definition at line 214 of file klflib.h.

Member Enumeration Documentation

Enumerator
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

Definition at line 216 of file klflib.h.

Constructor & Destructor Documentation

KLFLib::EntryMatchCondition::EntryMatchCondition ( Type  type)
inlineprotected

Definition at line 239 of file klflib.h.

Member Function Documentation

QList<EntryMatchCondition> KLFLib::EntryMatchCondition::conditionList ( ) const
inline

Relevant for types OrMatchType and AndMatchType.

Definition at line 229 of file klflib.h.

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.

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.

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.

Referenced by make_sql_condition(), operator<<(), and KLFLibResourceSimpleEngine::testEntryMatchConditionImpl().

Member Data Documentation

QList<EntryMatchCondition> KLFLib::EntryMatchCondition::mConditionList
protected

Definition at line 244 of file klflib.h.

Referenced by mkAndMatch(), mkNegateMatch(), and mkOrMatch().

PropertyMatch KLFLib::EntryMatchCondition::mPropertyMatch
protected

Definition at line 243 of file klflib.h.

Referenced by mkPropertyMatch().

Type KLFLib::EntryMatchCondition::mType
protected

Definition at line 241 of file klflib.h.


The documentation for this struct was generated from the following files:

Generated by doxygen 1.8.11