NCBI C++ ToolKit
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Friends | List of all members
CQueryFunctionBase Class Referenceabstract

Search Toolkit Book for CQueryFunctionBase

Base class for evaluation functions. More...

#include <util/qparse/query_exec.hpp>

+ Inheritance diagram for CQueryFunctionBase:
+ Collaboration diagram for CQueryFunctionBase:

Public Types

typedef vector< CQueryParseTree::TNode * > TArgVector
 Vector for easy argument access. More...

Public Member Functions

virtual ~CQueryFunctionBase ()
virtual bool EvaluateChildrenFirst () const
 Do we evaluate before visiting the nodes children or after. More...
virtual void Evaluate (CQueryParseTree::TNode &qnode)=0
 Query node evaluation function (performs actual programmed by the node action) More...

Protected Member Functions

CQueryExecGetExec ()
 Get reference on parent execution environment. More...
CQueryParseTreeGetQueryTree ()
 Get query tree (execution context) More...
Utility functions
void MakeArgVector (CQueryParseTree::TNode &qnode, TArgVector &args)
 Created vector of arguments (translate sub-nodes to vector) More...
CQueryParseTree::TNodeGetArg0 (CQueryParseTree::TNode &qnode)
 Get first sub-node. More...

Protected Attributes


Private Member Functions

void SetExec (CQueryExec &qexec)
 Set reference on parent query execution class. More...


class CQueryExec

Detailed Description

Base class for evaluation functions.

Implementation guidelines for derived classes:
   1. Make it stateless. 
      All evaluation results should go to query node user object.
   2. Make it reentrant
   3. Make it thread safe and thread sync. (some functions may run in parallel)
      (stateless class satisfies both thread safety and reenterability)
See also

Definition at line 67 of file query_exec.hpp.

The documentation for this class was generated from the following files:
Modified on Thu Jul 18 16:01:52 2024 by rev. 669887