ddc
Public Member Functions | Public Attributes | List of all members
CQCountKeyExprList Class Reference

#include <QCount.h>

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

Public Member Functions

 CQCountKeyExprList ()
 
 CQCountKeyExprList (const CQCountKeyExprList &src)
 
virtual ~CQCountKeyExprList ()
 
virtual void Clear ()
 
bool empty () const
 
void PushKey (CQCountKeyExpr *expr)
 
virtual bool CanCountByFile () const
 
virtual BYTE GetMatchId () const
 Get current match-id (should return a nontrivial match-id if any was used, else 0; default just returns 0) More...
 
virtual bool Compile (CQueryCompiler *compiler)
 
virtual string & Evaluate (const CHit &Hit)
 
virtual ddcObjectList Children () const
 
virtual void DisownChildren ()
 
virtual string toString ()
 
virtual string jsonClass ()
 
virtual string jsonData ()
 
- Public Member Functions inherited from CQCountKeyExpr
 CQCountKeyExpr (const string &label="")
 
virtual ~CQCountKeyExpr ()
 
- Public Member Functions inherited from CQuery
 CQuery (const string &label=string(""))
 Default constructor. More...
 
virtual ~CQuery (void)
 
virtual bool CheckSatisfiable (CQueryCompiler *compiler)
 
virtual bool CompileOptions (CQueryCompiler *compiler=NULL)
 
virtual void Evaluate ()
 
virtual bool Negated ()
 For sanity checks. Default just returns false. More...
 
virtual bool Negate ()
 Toggle negation flag, returns new value. Default throws an exception. More...
 
virtual BYTE SetMatchId (BYTE matchId)
 Set match-id, returns new value. Default throws an exception. More...
 
virtual bool HasMatchId () const
 Returns true iff this query uses a nontrival match-id operator; default checks (this->GetMatchId() != 0) More...
 
virtual bool RootOK ()
 Is this query an admissible root of a compiled parse tree (default returns !this->Negated()) More...
 
virtual string optionsToString ()
 DEBUG: return canonical option string More...
 
virtual string optionsToJson ()
 return json format option string More...
 
virtual string toJson ()
 
void SetCompiler (CQueryCompiler *compiler)
 
virtual void ClearNode ()
 deletes m_Node if non-NULL More...
 
virtual void ClearOptions ()
 deletes m_Options if non-NULL More...
 
virtual void Clear (bool deep=true)
 clear query contents. if deep is true, propagates operation to daughters More...
 
virtual void SetOptions (CQueryOptions *opts)
 set global query options ; deletes any pre-existing m_Options More...
 
- Public Member Functions inherited from ddcObject
 ddcObject ()
 Default constructor. More...
 
virtual ~ddcObject ()
 virtual destructor does nothing More...
 
template<typename Visit >
ddcObjectTraverse (Visit &visit)
 
template<typename Visit >
ddcObjectTraverse (Visit &visit) const
 
template<typename Visit >
ddcObjectTraverseR (Visit &visit)
 
template<typename Visit >
ddcObjectTraverseR (Visit &visit) const
 
virtual ddcObjectList Descendants () const
 

Public Attributes

vector< CQCountKeyExpr * > m_Exprs
 
string m_Key
 
- Public Attributes inherited from CQuery
string m_Label
 arbitrary name for this query node (e.g. string from which it was parsed) More...
 
CQueryCompilerm_Compiler
 associated query compiler (only set on Compile()) More...
 
CQueryNodem_Node
 underlying CQueryNode (DDC-v1.x API) More...
 
CQueryOptionsm_Options
 root-level options (root queries only) More...
 
- Public Attributes inherited from ddcObject
void * m_User
 user data associated with this object (for use e.g. by perl wrappers) More...
 

Constructor & Destructor Documentation

◆ CQCountKeyExprList() [1/2]

CQCountKeyExprList::CQCountKeyExprList ( )
inline

◆ CQCountKeyExprList() [2/2]

CQCountKeyExprList::CQCountKeyExprList ( const CQCountKeyExprList src)
inline

◆ ~CQCountKeyExprList()

CQCountKeyExprList::~CQCountKeyExprList ( )
virtual

Member Function Documentation

◆ Clear()

void CQCountKeyExprList::Clear ( )
virtual

clear and delete all sub-expressions

Referenced by CQueryCompiler::CleanParser(), and CQueryCompiler::DeleteTree().

Here is the caller graph for this function:

◆ empty()

bool CQCountKeyExprList::empty ( void  ) const
inline

wrapper for m_Exprs.empty()

Referenced by CQFPrune::jsonData(), and CQFPrune::toString().

Here is the caller graph for this function:

◆ PushKey()

void CQCountKeyExprList::PushKey ( CQCountKeyExpr expr)
inline

append a count-by expression

◆ CanCountByFile()

bool CQCountKeyExprList::CanCountByFile ( ) const
virtual

returns true iff all sub-expressions can count by file

Reimplemented from CQCountKeyExpr.

Referenced by CQCount::CountLocal().

Here is the caller graph for this function:

◆ GetMatchId()

BYTE CQCountKeyExprList::GetMatchId ( ) const
virtual

Get current match-id (should return a nontrivial match-id if any was used, else 0; default just returns 0)

Reimplemented from CQuery.

◆ Compile()

bool CQCountKeyExprList::Compile ( CQueryCompiler compiler)
virtual

compile the expression relative to a CQueryCompiler and its associated index

Reimplemented from CQCountKeyExpr.

Referenced by CQFPrune::Compile().

Here is the caller graph for this function:

◆ Evaluate()

string & CQCountKeyExprList::Evaluate ( const CHit Hit)
virtual

get string key for the hit Hit ; default just throws an exception

Reimplemented from CQCountKeyExpr.

References globalCountKeyDelim.

Referenced by CQCount::CountLocal(), CQCount::CountUniversal(), and CQFPrune::PruneHitsIndex().

Here is the caller graph for this function:

◆ Children()

ddcObjectList CQCountKeyExprList::Children ( ) const
virtual

get a list of direct non-NULL CQuery direct daughters of this node

  • default just returns an empty list

Reimplemented from CQuery.

References CQuery::Children().

Here is the call graph for this function:

◆ DisownChildren()

void CQCountKeyExprList::DisownChildren ( )
virtual

"disown" any direct child nodes, preventing their destruction if the current object is deleted

  • default implementation does nothing

Reimplemented from CQuery.

References CQuery::DisownChildren().

Here is the call graph for this function:

◆ toString()

string CQCountKeyExprList::toString ( void  )
virtual

stringification (default returns m_Label)

Reimplemented from CQCountKeyExpr.

Referenced by CQFPrune::toString().

Here is the caller graph for this function:

◆ jsonClass()

virtual string CQCountKeyExprList::jsonClass ( void  )
inlinevirtual

json stringification: class

Reimplemented from CQCountKeyExpr.

◆ jsonData()

string CQCountKeyExprList::jsonData ( void  )
virtual

json stringification: data

Reimplemented from CQCountKeyExpr.

Member Data Documentation

◆ m_Exprs

vector<CQCountKeyExpr*> CQCountKeyExprList::m_Exprs

underlying expression list

Referenced by CQueryCompiler::newPruneFilter(), and CQueryCompiler::PushCountQuery().

◆ m_Key

string CQCountKeyExprList::m_Key

temporary key


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