OWBI1::WQLSelectStatement Class Reference

#include <OWBI1_WQLSelectStatement.hpp>

Collaboration diagram for OWBI1::WQLSelectStatement:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 WQLSelectStatement ()
 ~WQLSelectStatement ()
void clear ()
 Clears all data members of this object.
const StringgetClassName () const
void setClassName (const String &className)
 Modifier.
UInt32 getSelectPropertyNameCount () const
 Returns the number of property names which were indicated in the selection list.
const StringgetSelectPropertyName (UInt32 i) const
 Gets the i-th selected property name in the list.
const StringArraygetSelectPropertyNames () const
 Gets the selected property names in the list.
void appendSelectPropertyName (const String &x)
 Appends a property name to the property name list.
UInt32 getWherePropertyNameCount () const
 Returns the number of unique property names from the where clause.
const StringgetWherePropertyName (UInt32 i) const
 Gets the i-th unique property appearing in the where clause.
bool appendWherePropertyName (const String &x)
 Appends a property name to the where property name list.
void appendOperation (WQLOperation x)
 Appends an operation to the operation array.
void appendOperand (const WQLOperand &x)
 Appends an operand to the operation array.
bool hasWhereClause () const
 Returns true if this class has a where clause.
bool evaluateWhereClause (const WQLPropertySource *source) const
 Evalautes the where clause using the symbol table to resolve symbols.
void print (std::ostream &ostr) const
 Prints out the members of this class.
String toString () const
void compileWhereClause (const WQLPropertySource *source, WQLCompile &wcl)

Private Attributes

String _className
Array< String_selectPropertyNames
Array< String_wherePropertyNames
Array< OperandOrOperation_operStack

Friends

class WQLCompile

Classes

struct  OperandOrOperation

Detailed Description

Definition at line 54 of file OWBI1_WQLSelectStatement.hpp.


Constructor & Destructor Documentation

OWBI1::WQLSelectStatement::WQLSelectStatement  ) 
 

Definition at line 116 of file OWBI1_WQLSelectStatement.cpp.

References _operStack, and OWBI1::Array< T >::reserve().

OWBI1::WQLSelectStatement::~WQLSelectStatement  ) 
 

Definition at line 120 of file OWBI1_WQLSelectStatement.cpp.


Member Function Documentation

void OWBI1::WQLSelectStatement::appendOperand const WQLOperand x  )  [inline]
 

Appends an operand to the operation array.

This method should only be called by the parser itself.

Definition at line 127 of file OWBI1_WQLSelectStatement.hpp.

void OWBI1::WQLSelectStatement::appendOperation WQLOperation  x  )  [inline]
 

Appends an operation to the operation array.

This method should only be called by the parser itself.

Definition at line 120 of file OWBI1_WQLSelectStatement.hpp.

void OWBI1::WQLSelectStatement::appendSelectPropertyName const String x  )  [inline]
 

Appends a property name to the property name list.

This user should not call this method; it should only be called by the parser.

Definition at line 95 of file OWBI1_WQLSelectStatement.hpp.

bool OWBI1::WQLSelectStatement::appendWherePropertyName const String x  ) 
 

Appends a property name to the where property name list.

This user should not call this method; it should only be called by the parser.

Parameters:
x name of the property.
Returns:
false if a property with that name already exists.

Definition at line 129 of file OWBI1_WQLSelectStatement.cpp.

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

void OWBI1::WQLSelectStatement::clear  ) 
 

Clears all data members of this object.

Definition at line 123 of file OWBI1_WQLSelectStatement.cpp.

References _className, _operStack, _selectPropertyNames, OWBI1::Array< T >::clear(), and OWBI1::String::erase().

void OWBI1::WQLSelectStatement::compileWhereClause const WQLPropertySource source,
WQLCompile wcl
 

Definition at line 351 of file OWBI1_WQLSelectStatement.cpp.

References OWBI1::WQLCompile::compile().

bool OWBI1::WQLSelectStatement::evaluateWhereClause 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 164 of file OWBI1_WQLSelectStatement.cpp.

References OWBI1::_Evaluate(), _operStack, OWBI1::_ResolveProperty(), className, OWBI1::WQLOperand::getBooleanValue(), OWBI1::WQLOperand::getPropertyName(), OWBI1::WQLOperand::getType(), hasWhereClause(), i, OWBI1::WQLSelectStatement::OperandOrOperation::OPERAND, OW_ASSERT, OWBI1_THROW, OWBI1::WQLOperand::PROPERTY_NAME, OWBI1::Array< T >::size(), OWBI1::WQLOperand::STRING_VALUE, OWBI1::WQL_AND, OWBI1::WQL_BOOLEAN_VALUE_TAG, 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.

const String& OWBI1::WQLSelectStatement::getClassName  )  const [inline]
 

Definition at line 62 of file OWBI1_WQLSelectStatement.hpp.

const String& OWBI1::WQLSelectStatement::getSelectPropertyName UInt32  i  )  const [inline]
 

Gets the i-th selected property name in the list.

Definition at line 82 of file OWBI1_WQLSelectStatement.hpp.

UInt32 OWBI1::WQLSelectStatement::getSelectPropertyNameCount  )  const [inline]
 

Returns the number of property names which were indicated in the selection list.

Definition at line 76 of file OWBI1_WQLSelectStatement.hpp.

const StringArray& OWBI1::WQLSelectStatement::getSelectPropertyNames  )  const [inline]
 

Gets the selected property names in the list.

Definition at line 88 of file OWBI1_WQLSelectStatement.hpp.

const String& OWBI1::WQLSelectStatement::getWherePropertyName UInt32  i  )  const [inline]
 

Gets the i-th unique property appearing in the where clause.

Definition at line 107 of file OWBI1_WQLSelectStatement.hpp.

UInt32 OWBI1::WQLSelectStatement::getWherePropertyNameCount  )  const [inline]
 

Returns the number of unique property names from the where clause.

Definition at line 101 of file OWBI1_WQLSelectStatement.hpp.

bool OWBI1::WQLSelectStatement::hasWhereClause  )  const [inline]
 

Returns true if this class has a where clause.

Definition at line 133 of file OWBI1_WQLSelectStatement.hpp.

Referenced by OWBI1::WQLCompile::compile(), and evaluateWhereClause().

void OWBI1::WQLSelectStatement::print std::ostream &  ostr  )  const
 

Prints out the members of this class.

Definition at line 291 of file OWBI1_WQLSelectStatement.cpp.

References _className, _selectPropertyNames, i, and OWBI1::Array< T >::size().

void OWBI1::WQLSelectStatement::setClassName const String className  )  [inline]
 

Modifier.

This method should not be called by the user (only by the parser).

Definition at line 69 of file OWBI1_WQLSelectStatement.hpp.

References className.

String OWBI1::WQLSelectStatement::toString  )  const
 

Definition at line 317 of file OWBI1_WQLSelectStatement.cpp.

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


Friends And Related Function Documentation

friend class WQLCompile [friend]
 

Definition at line 236 of file OWBI1_WQLSelectStatement.hpp.


Member Data Documentation

String OWBI1::WQLSelectStatement::_className [private]
 

Definition at line 165 of file OWBI1_WQLSelectStatement.hpp.

Referenced by clear(), and print().

Array<OperandOrOperation> OWBI1::WQLSelectStatement::_operStack [private]
 

Definition at line 235 of file OWBI1_WQLSelectStatement.hpp.

Referenced by OWBI1::WQLCompile::_buildEvalHeap(), clear(), evaluateWhereClause(), and WQLSelectStatement().

Array<String> OWBI1::WQLSelectStatement::_selectPropertyNames [private]
 

Definition at line 174 of file OWBI1_WQLSelectStatement.hpp.

Referenced by clear(), print(), and toString().

Array<String> OWBI1::WQLSelectStatement::_wherePropertyNames [private]
 

Definition at line 180 of file OWBI1_WQLSelectStatement.hpp.

Referenced by appendWherePropertyName().


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