(file) Return to CQLPredicate.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / CQL

  1 humberto 1.1.2.1 #include "CQLPredicate.h"
  2 humberto 1.1.2.8 #include "CQLPredicateRep.h"
  3 humberto 1.1.2.7 #include <Pegasus/CQL/CQLFactory.h>
  4 humberto 1.1.2.8 #include <Pegasus/CQL/QueryContext.h>
  5 humberto 1.1.2.1 
  6                  PEGASUS_NAMESPACE_BEGIN
  7                  
  8                  #define PEGASUS_ARRAY_T CQLPredicate
  9                  #include <Pegasus/Common/ArrayImpl.h>
 10                  #undef PEGASUS_ARRAY_T
 11                  
 12 humberto 1.1.2.5 #define PEGASUS_ARRAY_T BooleanOpType
 13                  #include <Pegasus/Common/ArrayImpl.h>
 14                  #undef PEGASUS_ARRAY_T
 15 humberto 1.1.2.12 
 16 humberto 1.1.2.10 CQLPredicate::CQLPredicate(){
 17                   	_rep = new CQLPredicateRep();
 18                   }
 19 humberto 1.1.2.5  
 20 humberto 1.1.2.4  CQLPredicate::CQLPredicate(const CQLSimplePredicate& inSimplePredicate, Boolean inVerted)
 21 humberto 1.1.2.1  {
 22 humberto 1.1.2.8  	_rep = new CQLPredicateRep(inSimplePredicate,inVerted);
 23 humberto 1.1.2.1  }
 24                   
 25 humberto 1.1.2.4  CQLPredicate::CQLPredicate(const CQLPredicate& inPredicate, Boolean inInverted)
 26 humberto 1.1.2.1  {
 27 humberto 1.1.2.11 	_rep = new CQLPredicateRep(inPredicate._rep);
 28 humberto 1.1.2.8  }
 29                   
 30                   CQLPredicate::~CQLPredicate(){
 31                   	if(_rep)
 32                   		delete _rep;
 33 humberto 1.1.2.1  }
 34                   
 35                   Boolean CQLPredicate::evaluate(CIMInstance CI, QueryContext& QueryCtx)
 36                   {
 37 humberto 1.1.2.8     return _rep->evaluate(CI,QueryCtx);
 38 humberto 1.1.2.1  }
 39                   
 40 humberto 1.1.2.2  Boolean CQLPredicate::isTerminal(){
 41 humberto 1.1.2.8  	return _rep->isTerminal();
 42 humberto 1.1.2.2  }
 43                   Boolean CQLPredicate::getInverted(){
 44 humberto 1.1.2.8  	return _rep->getInverted();
 45 humberto 1.1.2.2  }
 46                   
 47 humberto 1.1.2.5  void CQLPredicate::setInverted(){
 48 humberto 1.1.2.8  	_rep->setInverted();
 49 humberto 1.1.2.2  }
 50                   
 51 humberto 1.1.2.14 void CQLPredicate::appendPredicate(const CQLPredicate& inPredicate){
 52                   	_rep->appendPredicate(inPredicate);
 53                   }
 54                   
 55                   void CQLPredicate::appendPredicate(const CQLPredicate& inPredicate, BooleanOpType inBooleanOperator)
 56 humberto 1.1.2.1  {
 57 humberto 1.1.2.8  	_rep->appendPredicate(inPredicate,inBooleanOperator);
 58 humberto 1.1.2.1  }
 59                   
 60 humberto 1.1.2.2  void CQLPredicate::appendPredicate(CQLSimplePredicate inSimplePredicate, BooleanOpType inBooleanOperator){
 61 humberto 1.1.2.8  	_rep->appendPredicate(inSimplePredicate,inBooleanOperator);
 62 humberto 1.1.2.2  }
 63                   
 64                   Array<CQLPredicate> CQLPredicate::getPredicates(){
 65 humberto 1.1.2.8  	return _rep->getPredicates();
 66 humberto 1.1.2.2  }
 67                   
 68                   CQLSimplePredicate CQLPredicate::getSimplePredicate(){
 69 humberto 1.1.2.8  	return _rep->getSimplePredicate();
 70 humberto 1.1.2.2  }
 71                   
 72 humberto 1.1.2.5  Array<BooleanOpType> CQLPredicate::getOperators(){
 73 humberto 1.1.2.8  	return _rep->getOperators();
 74 humberto 1.1.2.3  }
 75 humberto 1.1.2.2  
 76 chuck    1.1.2.13 void CQLPredicate::applyContext(QueryContext& queryContext) {
 77                     _rep->applyContext(queryContext);
 78 humberto 1.1.2.2  }
 79                   
 80 humberto 1.1.2.5  Boolean CQLPredicate::isSimple(){
 81 humberto 1.1.2.8  	return _rep->isSimple();
 82 humberto 1.1.2.2  }
 83                   
 84 humberto 1.1.2.9  Boolean CQLPredicate::isSimpleValue(){
 85                           return _rep->isSimpleValue();
 86                   }
 87                   
 88                   
 89 humberto 1.1.2.2  String CQLPredicate::toString(){
 90 humberto 1.1.2.8  	return _rep->toString();
 91 humberto 1.1.2.2  }
 92 humberto 1.1.2.6  
 93 humberto 1.1.2.10 CQLPredicate& CQLPredicate::operator=(const CQLPredicate& rhs){
 94                   	if(&rhs != this){
 95                   		if(_rep) delete _rep;
 96                   		_rep = new CQLPredicateRep(rhs._rep);
 97                   	}
 98                   	return *this;
 99                   }
100                   
101 humberto 1.1.2.1  PEGASUS_NAMESPACE_END

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2