ddc
|
#include <QueryFilter.h>
Public Member Functions | |
CQFSort (HitSortEnum ftype=NoSort, const string &arg0=string(""), const string &arg1=string(""), const string &arg2=string("")) | |
CQFSort (HitSortEnum ftype, const string &arg0, int arg1i, int arg2i) | |
virtual | ~CQFSort () |
virtual CQFilter * | Clone () |
clone this filter More... | |
virtual HitSortEnum | FilterType () const |
sort-type for this filter (if any) More... | |
void | SortBounds (void) |
swap lower- and upper-bounds if they not in logical order More... | |
virtual bool | Compile (CQueryCompiler *compiler, CQueryOptions *options) |
compile the filter. Default implementation just pushes m_Filter onto options->m_Filters More... | |
string | ResolveAttributeName (CQueryCompiler *compiler, const string &attrName, bool allowBiblExpander=false) |
CFreeBiblIndex * | GetBiblConstant (CQueryCompiler *compiler, const string &attrName, bool allowBiblExpander=true) |
compilation & satisfiability-check utility: return constant bibliographic index for attrName (if it is one), or NULL More... | |
string | argString (const string &arg) const |
stringification utility: quoted strign for arg, or empty string More... | |
virtual string | toString (void) |
convert filter to a canonical string More... | |
virtual string | jsonClass (void) |
virtual string | jsonMinMax (void) |
virtual string | jsonType (void) |
virtual string | jsonData (void) |
Public Member Functions inherited from CQFilter | |
CQFilter () | |
Default constructor. More... | |
virtual | ~CQFilter () |
Default destructor (empty) More... | |
virtual bool | CheckSatisfiable (CQueryCompiler *compiler, CQueryOptions *options) |
Run fast (un)satisfiability checks for filter before Compile() is called. Default just returns true. More... | |
Public Member Functions inherited from ddcObject | |
ddcObject () | |
Default constructor. More... | |
virtual | ~ddcObject () |
virtual destructor does nothing More... | |
virtual ddcObjectList | Children () const |
virtual void | DisownChildren () |
template<typename Visit > | |
ddcObject * | Traverse (Visit &visit) |
template<typename Visit > | |
ddcObject * | Traverse (Visit &visit) const |
template<typename Visit > | |
ddcObject * | TraverseR (Visit &visit) |
template<typename Visit > | |
ddcObject * | TraverseR (Visit &visit) const |
virtual ddcObjectList | Descendants () const |
virtual string | toJson () |
Public Attributes | |
CDDCFilterWithBounds | m_Filter |
underlying DDC Filter struct More... | |
std::string | m_arg0 |
0th argument (e.g. field name) More... | |
std::string | m_arg1 |
1st argument (e.g. lower bound) More... | |
std::string | m_arg2 |
2nd argument (e.g. upper bound) More... | |
Public Attributes inherited from ddcObject | |
void * | m_User |
user data associated with this object (for use e.g. by perl wrappers) More... | |
class for global query sort filters, associated with a CDDCFilterWithBounds object (ConcCommon.h) m_arg0: unused, m_arg1: lower_bound, m_arg2: upper_bound
CQFSort::CQFSort | ( | HitSortEnum | ftype = NoSort , |
const string & | arg0 = string("") , |
||
const string & | arg1 = string("") , |
||
const string & | arg2 = string("") |
||
) |
CQFSort::CQFSort | ( | HitSortEnum | ftype, |
const string & | arg0, | ||
int | arg1i, | ||
int | arg2i | ||
) |
References Format(), m_arg1, m_arg2, CDDCFilterWithBounds::m_AttrName, CDDCFilterWithBounds::m_bSet, m_Filter, CDDCFilterWithBounds::m_FilterType, CDDCFilterWithBounds::m_KeyHi, and CDDCFilterWithBounds::m_KeyLo.
|
inlinevirtual |
|
inlinevirtual |
clone this filter
Reimplemented from CQFilter.
Reimplemented in CQFPrune, CQFHasFieldSet, CQFHasFieldInfix, CQFHasFieldSuffix, CQFHasFieldPrefix, CQFHasFieldRegex, CQFHasFieldValue, CQFHasField, CQFContextSort, CQFBiblSort, CQFRandomSort, CQFSizeSort, CQFDateSort, and CQFRankSort.
|
inlinevirtual |
sort-type for this filter (if any)
Reimplemented from CQFilter.
References CQFilter::Compile(), CDDCFilterWithBounds::m_FilterType, and CQFilter::toString().
void CQFSort::SortBounds | ( | void | ) |
swap lower- and upper-bounds if they not in logical order
References m_Filter, CDDCFilterWithBounds::m_KeyHi, and CDDCFilterWithBounds::m_KeyLo.
|
virtual |
compile the filter. Default implementation just pushes m_Filter onto options->m_Filters
Reimplemented from CQFilter.
Reimplemented in CQFPrune, CQFHasFieldSet, CQFHasFieldRegex, CQFHasFieldValue, CQFHasField, CQFContextSort, CQFBiblSort, CQFRandomSort, CQFSizeSort, and CQFDateSort.
References m_Filter, CQueryOptions::m_Filters, and CDDCFilterWithBounds::m_Parent.
Referenced by CQFDateSort::Compile(), CQFSizeSort::Compile(), CQFRandomSort::Compile(), CQFBiblSort::Compile(), CQFContextSort::Compile(), CQFHasFieldValue::Compile(), CQFHasFieldRegex::Compile(), CQFHasFieldSet::Compile(), and CQFPrune::Compile().
string CQFSort::ResolveAttributeName | ( | CQueryCompiler * | compiler, |
const string & | attrName, | ||
bool | allowBiblExpander = false |
||
) |
compilation utility: return a valid bibliographic attribute for attrName
References CBiblIndex::HasBiblExpander(), CBiblIndex::HasFreeBiblIndex(), CConcordance::m_BiblIndex, CBiblIndex::m_DefaultAttrName, CConcSession::m_pConcordance, and CQueryCompiler::m_pHolder.
Referenced by CQFBiblSort::Compile(), CQFHasField::Compile(), and GetBiblConstant().
CFreeBiblIndex * CQFSort::GetBiblConstant | ( | CQueryCompiler * | compiler, |
const string & | attrName, | ||
bool | allowBiblExpander = true |
||
) |
compilation & satisfiability-check utility: return constant bibliographic index for attrName (if it is one), or NULL
References cfbiStringConstant, CBiblIndex::GetFreeBiblIndex(), CFreeBiblIndex::GetTypeId(), CConcordance::m_BiblIndex, CConcSession::m_pConcordance, CQueryCompiler::m_pHolder, and ResolveAttributeName().
Referenced by CQFHasFieldValue::CheckSatisfiable(), CQFHasFieldRegex::CheckSatisfiable(), and CQFHasFieldSet::CheckSatisfiable().
string CQFSort::argString | ( | const string & | arg | ) | const |
stringification utility: quoted strign for arg, or empty string
References escapeChars().
Referenced by CQFBiblSort::toString(), and CQFContextSort::toString().
|
virtual |
convert filter to a canonical string
Reimplemented from CQFilter.
Reimplemented in CQFPrune, CQFHasField, CQFContextSort, and CQFBiblSort.
References EngMakeUpper(), HitSortEnumStrings, m_arg0, m_arg1, m_arg2, m_Filter, and CDDCFilterWithBounds::m_FilterType.
Referenced by CQFBiblSort::Compile(), CQFContextSort::Compile(), CQFHasField::Compile(), CQFHasFieldValue::Compile(), CQFHasFieldRegex::Compile(), and CQFHasFieldSet::Compile().
|
inlinevirtual |
class-name for json strinfication
Reimplemented from CQFilter.
Reimplemented in CQFPrune, CQFHasFieldSet, CQFHasFieldInfix, CQFHasFieldSuffix, CQFHasFieldPrefix, CQFHasFieldRegex, CQFHasFieldValue, CQFHasField, CQFContextSort, CQFBiblSort, CQFRandomSort, CQFSizeSort, CQFDateSort, and CQFRankSort.
|
virtual |
Reimplemented in CQFHasField, and CQFBiblSort.
References jsonStr(), m_arg1, and m_arg2.
Referenced by CQFBiblSort::jsonData().
|
virtual |
References HitSortEnumStrings, jsonStr(), m_Filter, and CDDCFilterWithBounds::m_FilterType.
Referenced by CQFBiblSort::jsonData(), and CQFContextSort::jsonData().
|
inlinevirtual |
instance data for json stringification
Reimplemented from ddcObject.
Reimplemented in CQFPrune, CQFContextSort, CQFBiblSort, CQFRandomSort, and CQFRankSort.
CDDCFilterWithBounds CQFSort::m_Filter |
underlying DDC Filter struct
Referenced by CQFHasFieldRegex::CheckSatisfiable(), CQFHasFieldSet::CheckSatisfiable(), CQFPrune::Clone(), Compile(), CQFDateSort::Compile(), CQFSizeSort::Compile(), CQFBiblSort::Compile(), CQFContextSort::Compile(), CQFHasField::Compile(), CQFHasFieldValue::Compile(), CQFHasFieldRegex::Compile(), CQFHasFieldSet::Compile(), CQFPrune::CQFPrune(), CQFSort(), CQFContextSort::jsonData(), jsonType(), CQFPrune::PruneHitsIndex(), SortBounds(), toString(), CQFBiblSort::toString(), CQFContextSort::toString(), and CQFPrune::toString().
std::string CQFSort::m_arg0 |
0th argument (e.g. field name)
Referenced by CQFHasFieldValue::CheckSatisfiable(), CQFHasFieldRegex::CheckSatisfiable(), CQFHasFieldSet::CheckSatisfiable(), CQFBiblSort::Compile(), CQFContextSort::Compile(), CQFHasField::Compile(), CQFBiblSort::jsonData(), CQFContextSort::jsonData(), CQFHasField::jsonMinMax(), toString(), CQFBiblSort::toString(), CQFContextSort::toString(), and CQFHasField::toString().
std::string CQFSort::m_arg1 |
1st argument (e.g. lower bound)
Referenced by CQFHasFieldValue::CheckSatisfiable(), CQFDateSort::Compile(), CQFSizeSort::Compile(), CQFRandomSort::Compile(), CQFBiblSort::Compile(), CQFContextSort::Compile(), CQFHasField::Compile(), CQFHasFieldValue::Compile(), CQFRandomSort::CQFRandomSort(), CQFSizeSort::CQFSizeSort(), CQFSort(), jsonMinMax(), CQFBiblSort::jsonMinMax(), toString(), CQFBiblSort::toString(), CQFContextSort::toString(), CQFHasField::valueString(), CQFHasFieldRegex::valueString(), CQFHasFieldPrefix::valueString(), CQFHasFieldSuffix::valueString(), and CQFHasFieldInfix::valueString().
std::string CQFSort::m_arg2 |
2nd argument (e.g. upper bound)
Referenced by CQFDateSort::Compile(), CQFSizeSort::Compile(), CQFBiblSort::Compile(), CQFContextSort::Compile(), CQFSizeSort::CQFSizeSort(), CQFSort(), jsonMinMax(), CQFBiblSort::jsonMinMax(), toString(), CQFBiblSort::toString(), and CQFContextSort::toString().