ddc
Public Member Functions | Public Attributes | List of all members
CQOccurrenceIterator Struct Reference

CQOccurrenceIterator (formerly CQNearEvalItem) is used to iterate over query occurrences; used by near() queries. More...

#include <QueryNode.h>

Inheritance diagram for CQOccurrenceIterator:
Inheritance graph
[legend]
Collaboration diagram for CQOccurrenceIterator:
Collaboration graph
[legend]

Public Member Functions

 CQOccurrenceIterator (CQueryNode *node_=NULL)
 
 CQOccurrenceIterator (const CQOccurrenceIterator &b)
 
virtual ~CQOccurrenceIterator ()
 
void bind (CQueryTokenNode *node_, const CQOccurrenceIterator &src, int minOffset, int maxOffset)
 
CQOccurrenceIteratoroperator= (const CQOccurrenceIterator &b)
 
void assign (CQueryNode *node_)
 
CQOccurrenceIteratoroperator= (CQueryNode *node_)
 
bool valid () const
 
void invalidate ()
 
 operator bool () const
 
size_t chunksize () const
 
CTokenNo tocc (DWORD occ) const
 
CTokenNo tmin () const
 
CTokenNo tmax () const
 
CTokenNo tmax_prev () const
 
void operator++ ()
 
void seek (const CTokenNo Tok)
 
bool operator== (const CQOccurrenceIterator &b) const
 

Public Attributes

CQueryNodenode
 (sub)query node More...
 
int cnt
 limit for node->m_Occurrences[] More...
 
int cur
 index into node->m_Occurrences[] More...
 
DWORD chpos
 index into node->m_ChunkLengths[] (match occurrence) More...
 

Detailed Description

CQOccurrenceIterator (formerly CQNearEvalItem) is used to iterate over query occurrences; used by near() queries.

Constructor & Destructor Documentation

◆ CQOccurrenceIterator() [1/2]

CQOccurrenceIterator::CQOccurrenceIterator ( CQueryNode node_ = NULL)
inline

default constructor

◆ CQOccurrenceIterator() [2/2]

CQOccurrenceIterator::CQOccurrenceIterator ( const CQOccurrenceIterator b)
inline

copy constructor

◆ ~CQOccurrenceIterator()

virtual CQOccurrenceIterator::~CQOccurrenceIterator ( )
inlinevirtual

Member Function Documentation

◆ bind()

void CQOccurrenceIterator::bind ( CQueryTokenNode node_,
const CQOccurrenceIterator src,
int  minOffset,
int  maxOffset 
)

Create an iterator bound to the neighbors of src, used to avoid expensive EvaluateWithoutHits() for universal sub-queries as near() arguments. Destructively alters node_->m_Occurrences[] (and associated vectors). Generates a "bound" occurence in node_->m_Occurrences[] for each source-occurence occi = src.node->m_Occurrences[i] and each offset off with minOffset <= off <= maxOffset representing token *occi + off, modulo off==0.

Parameters
node_universal wildcard node in which to create bound occurrences.
srcsource iterator to use for occurrence generation (should already have been populated by EvaluateWithoutHits())
minOffsetminimum offset for bound occurrences wrt source-occurrence
maxOffsetmaximum offset for bound occurrences wrt source-occurrence (inclusive)

References cnt, CQueryTokenNode::m_bAny, CQueryTokenNode::m_MatchId, CQueryTokenNode::m_NodeIndex, CQueryNode::m_Occurrences, and node.

Referenced by CQueryNearNode::FindOccurrences2(), and CQueryNearNode::FindOccurrences3().

Here is the caller graph for this function:

◆ operator=() [1/2]

CQOccurrenceIterator& CQOccurrenceIterator::operator= ( const CQOccurrenceIterator b)
inline

assignment operator

References chpos, cnt, cur, and node.

Referenced by CQTokenOccurrenceIterator::operator=().

Here is the caller graph for this function:

◆ assign()

void CQOccurrenceIterator::assign ( CQueryNode node_)
inline

node-assignment

References CQueryNode::m_Occurrences.

Referenced by CQTokenOccurrenceIterator::assign(), CQueryNearNode::FindOccurrences2(), and CQueryNearNode::FindOccurrences3().

Here is the caller graph for this function:

◆ operator=() [2/2]

CQOccurrenceIterator& CQOccurrenceIterator::operator= ( CQueryNode node_)
inline

◆ valid()

bool CQOccurrenceIterator::valid ( void  ) const
inline

test whether iterator is valid

Referenced by CQueryWithNode::EvaluateWithoutHits(), CQueryNearNode::FindOccurrences2(), and CQueryNearNode::FindOccurrences3().

Here is the caller graph for this function:

◆ invalidate()

void CQOccurrenceIterator::invalidate ( )
inline

invalidate iterator

◆ operator bool()

CQOccurrenceIterator::operator bool ( ) const
inline

bool typecast just wraps valid()

◆ chunksize()

size_t CQOccurrenceIterator::chunksize ( ) const
inline

get size of current occurrence-chunk; assumes iterator is valid

References CQueryNode::m_ChunkLengths.

Referenced by CQueryNearNode::FindOccurrences2(), CQueryNearNode::FindOccurrences3(), and operator==().

Here is the caller graph for this function:

◆ tocc()

CTokenNo CQOccurrenceIterator::tocc ( DWORD  occ) const
inline

◆ tmin()

CTokenNo CQOccurrenceIterator::tmin ( ) const
inline

References CQueryNode::m_Occurrences.

Referenced by CQueryNearNode::FindOccurrences2(), and CQueryNearNode::FindOccurrences3().

Here is the caller graph for this function:

◆ tmax()

CTokenNo CQOccurrenceIterator::tmax ( ) const
inline

References CQueryNode::m_ChunkLengths, and CQueryNode::m_Occurrences.

Referenced by CQueryNearNode::FindOccurrences2(), and CQueryNearNode::FindOccurrences3().

Here is the caller graph for this function:

◆ tmax_prev()

CTokenNo CQOccurrenceIterator::tmax_prev ( ) const
inline

◆ operator++()

void CQOccurrenceIterator::operator++ ( )
inline

◆ seek()

void CQOccurrenceIterator::seek ( const CTokenNo  Tok)
inline

◆ operator==()

bool CQOccurrenceIterator::operator== ( const CQOccurrenceIterator b) const

References chunksize(), cur, CQueryNode::m_Occurrences, and node.

Here is the call graph for this function:

Member Data Documentation

◆ node

CQueryNode* CQOccurrenceIterator::node

◆ cnt

int CQOccurrenceIterator::cnt

◆ cur

int CQOccurrenceIterator::cur

◆ chpos

DWORD CQOccurrenceIterator::chpos

index into node->m_ChunkLengths[] (match occurrence)

Referenced by operator=().


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