OWBI1::WQLCompile Class Reference

#include <OWBI1_WQLCompile.hpp>

Collaboration diagram for OWBI1::WQLCompile:

Collaboration graph
[legend]
List of all members.

Public Types

typedef Array< term_elTableauRow
typedef Array< TableauRowTableau
enum  el_type { EVAL_HEAP, TERMINAL_HEAP, OPERAND }

Public Member Functions

 WQLCompile ()
 WQLCompile (const WQLSelectStatement &wqs)
 ~WQLCompile ()
void compile (const WQLSelectStatement *wqs)
const TableaugetTableau () const
bool evaluate (const WQLPropertySource &source) const
 Evalautes the where clause using the symbol table to resolve symbols.
void print (std::ostream &ostr)
void printTableau (std::ostream &ostr)

Private Member Functions

void _buildEvalHeap (const WQLSelectStatement *wqs)
void _pushNOTDown ()
void _factoring ()
void _gatherDisj (Array< stack_el > &stk)
void _gatherConj (Array< stack_el > &stk, stack_el sel)
void _gather (Array< stack_el > &stk, stack_el sel, bool or_flag)
void _sortTableau ()

Static Private Member Functions

static void _ResolveProperty (WQLOperand &op, const WQLPropertySource &source)

Private Attributes

Tableau _tableau
Array< term_elterminal_heap
Array< eval_eleval_heap

Classes

struct  eval_el
struct  stack_el
struct  term_el

Detailed Description

Definition at line 39 of file OWBI1_WQLCompile.hpp.


Member Typedef Documentation

typedef Array<TableauRow> OWBI1::WQLCompile::Tableau
 

Definition at line 119 of file OWBI1_WQLCompile.hpp.

typedef Array<term_el> OWBI1::WQLCompile::TableauRow
 

Definition at line 117 of file OWBI1_WQLCompile.hpp.


Member Enumeration Documentation

enum OWBI1::WQLCompile::el_type
 

Enumerator:
EVAL_HEAP 
TERMINAL_HEAP 
OPERAND 

Definition at line 61 of file OWBI1_WQLCompile.hpp.


Constructor & Destructor Documentation

OWBI1::WQLCompile::WQLCompile  ) 
 

Definition at line 197 of file OWBI1_WQLCompile.cpp.

OWBI1::WQLCompile::WQLCompile const WQLSelectStatement wqs  ) 
 

Definition at line 200 of file OWBI1_WQLCompile.cpp.

References compile().

OWBI1::WQLCompile::~WQLCompile  ) 
 

Definition at line 204 of file OWBI1_WQLCompile.cpp.


Member Function Documentation

void OWBI1::WQLCompile::_buildEvalHeap const WQLSelectStatement wqs  )  [private]
 

Definition at line 367 of file OWBI1_WQLCompile.cpp.

References OWBI1::WQLSelectStatement::_operStack, OWBI1::Array< T >::append(), EVAL_HEAP, eval_heap, i, OPERAND, OWBI1::WQLSelectStatement::OperandOrOperation::OPERAND, OWBI1::WQLCompile::stack_el::opn, OW_ASSERT, OWBI1::Array< T >::push_back(), OWBI1::Array< T >::size(), terminal_heap, TERMINAL_HEAP, OWBI1::WQLCompile::stack_el::type, OWBI1::WQL_AND, OWBI1::WQL_DO_NOTHING, OWBI1::WQL_EQ, OWBI1::WQL_GE, OWBI1::WQL_GT, OWBI1::WQL_ISA, OWBI1::WQL_LE, OWBI1::WQL_LT, OWBI1::WQL_NE, OWBI1::WQL_NOT, and OWBI1::WQL_OR.

void OWBI1::WQLCompile::_factoring  )  [private]
 

Definition at line 534 of file OWBI1_WQLCompile.cpp.

References OWBI1::Array< T >::append(), EVAL_HEAP, eval_heap, i, index, OWBI1::Array< T >::insert(), s, OWBI1::Array< T >::size(), OWBI1::WQL_AND, and OWBI1::WQL_OR.

void OWBI1::WQLCompile::_gather Array< stack_el > &  stk,
stack_el  sel,
bool  or_flag
[private]
 

Definition at line 628 of file OWBI1_WQLCompile.cpp.

References OWBI1::Array< T >::append(), OWBI1::Array< T >::empty(), EVAL_HEAP, eval_heap, i, OWBI1::Array< T >::insert(), OWBI1::Array< T >::remove(), OWBI1::Array< T >::size(), type, OWBI1::WQLCompile::stack_el::type, OWBI1::WQL_AND, OWBI1::WQL_DO_NOTHING, and OWBI1::WQL_OR.

Referenced by _gatherConj(), and _gatherDisj().

void OWBI1::WQLCompile::_gatherConj Array< stack_el > &  stk,
stack_el  sel
[private]
 

Definition at line 624 of file OWBI1_WQLCompile.cpp.

References _gather().

void OWBI1::WQLCompile::_gatherDisj Array< stack_el > &  stk  )  [private]
 

Definition at line 620 of file OWBI1_WQLCompile.cpp.

References _gather(), and TERMINAL_HEAP.

void OWBI1::WQLCompile::_pushNOTDown  )  [private]
 

Definition at line 448 of file OWBI1_WQLCompile.cpp.

References EVAL_HEAP, eval_heap, i, OWBI1::Array< T >::size(), OWBI1::WQL_DO_NOTHING, and OWBI1::WQL_NOT.

static void OWBI1::WQLCompile::_ResolveProperty WQLOperand op,
const WQLPropertySource source
[inline, static, private]
 

Definition at line 146 of file OWBI1_WQLCompile.hpp.

References OWBI1::WQLOperand::getPropertyName(), OWBI1::WQLOperand::getType(), OWBI1::WQLPropertySource::getValue(), OWBI1_THROW, and OWBI1::WQLOperand::PROPERTY_NAME.

void OWBI1::WQLCompile::_sortTableau  )  [private]
 

Definition at line 685 of file OWBI1_WQLCompile.cpp.

References _tableau, i, OWBI1::WQLOperand::PROPERTY_NAME, OWBI1::Array< T >::size(), OWBI1::WQL_GE, OWBI1::WQL_GT, OWBI1::WQL_LE, and OWBI1::WQL_LT.

void OWBI1::WQLCompile::compile const WQLSelectStatement wqs  ) 
 

Definition at line 207 of file OWBI1_WQLCompile.cpp.

References OWBI1::WQLSelectStatement::hasWhereClause().

Referenced by OWBI1::WQLSelectStatement::compileWhereClause(), and WQLCompile().

bool OWBI1::WQLCompile::evaluate const WQLPropertySource source  )  const
 

Evalautes the where clause using the symbol table to resolve symbols.

Returns:
true or false if the source passes the query
Exceptions:
NoSuchPropertyException if the where clause references a property that is unknown to source.
TypeMismatchException if the there is a type error in the where clause or if the property type of the source property doesn't match the query.

Definition at line 250 of file OWBI1_WQLCompile.cpp.

References _tableau, className, OWBI1::WQLPropertySource::evaluateISA(), i, OWBI1::WQLOperand::PROPERTY_NAME, OWBI1::Array< T >::size(), and OWBI1::WQL_ISA.

const Tableau& OWBI1::WQLCompile::getTableau  )  const [inline]
 

Definition at line 126 of file OWBI1_WQLCompile.hpp.

void OWBI1::WQLCompile::print std::ostream &  ostr  ) 
 

Definition at line 307 of file OWBI1_WQLCompile.cpp.

References EVAL_HEAP, eval_heap, i, OWBI1::Array< T >::size(), TERMINAL_HEAP, OWBI1::WQL_DO_NOTHING, and OWBI1::WQLOperationToString().

void OWBI1::WQLCompile::printTableau std::ostream &  ostr  ) 
 

Definition at line 353 of file OWBI1_WQLCompile.cpp.

References _tableau, i, OWBI1::Array< T >::size(), and OWBI1::WQLOperationToString().


Member Data Documentation

Tableau OWBI1::WQLCompile::_tableau [private]
 

Definition at line 167 of file OWBI1_WQLCompile.hpp.

Referenced by _sortTableau(), evaluate(), and printTableau().

Array<eval_el> OWBI1::WQLCompile::eval_heap [private]
 

Definition at line 174 of file OWBI1_WQLCompile.hpp.

Referenced by _buildEvalHeap(), _factoring(), _gather(), _pushNOTDown(), and print().

Array<term_el> OWBI1::WQLCompile::terminal_heap [private]
 

Definition at line 173 of file OWBI1_WQLCompile.hpp.

Referenced by _buildEvalHeap().


The documentation for this class was generated from the following files:
Generated on Thu Feb 9 09:18:45 2006 for openwbem by  doxygen 1.4.6