(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.1  void CQLPredicate::appendPredicate(CQLPredicate inPredicate, BooleanOpType inBooleanOperator)
52                   {
53 humberto 1.1.2.8  	_rep->appendPredicate(inPredicate,inBooleanOperator);
54 humberto 1.1.2.1  }
55                   
56 humberto 1.1.2.2  void CQLPredicate::appendPredicate(CQLSimplePredicate inSimplePredicate, BooleanOpType inBooleanOperator){
57 humberto 1.1.2.8  	_rep->appendPredicate(inSimplePredicate,inBooleanOperator);
58 humberto 1.1.2.2  }
59                   
60                   Array<CQLPredicate> CQLPredicate::getPredicates(){
61 humberto 1.1.2.8  	return _rep->getPredicates();
62 humberto 1.1.2.2  }
63                   
64                   CQLSimplePredicate CQLPredicate::getSimplePredicate(){
65 humberto 1.1.2.8  	return _rep->getSimplePredicate();
66 humberto 1.1.2.2  }
67                   
68 humberto 1.1.2.5  Array<BooleanOpType> CQLPredicate::getOperators(){
69 humberto 1.1.2.8  	return _rep->getOperators();
70 humberto 1.1.2.3  }
71 humberto 1.1.2.2  
72 chuck    1.1.2.13 void CQLPredicate::applyContext(QueryContext& queryContext) {
73                     _rep->applyContext(queryContext);
74 humberto 1.1.2.2  }
75                   
76 humberto 1.1.2.5  Boolean CQLPredicate::isSimple(){
77 humberto 1.1.2.8  	return _rep->isSimple();
78 humberto 1.1.2.2  }
79                   
80 humberto 1.1.2.9  Boolean CQLPredicate::isSimpleValue(){
81                           return _rep->isSimpleValue();
82                   }
83                   
84                   
85 humberto 1.1.2.2  String CQLPredicate::toString(){
86 humberto 1.1.2.8  	return _rep->toString();
87 humberto 1.1.2.2  }
88 humberto 1.1.2.6  
89 humberto 1.1.2.10 CQLPredicate& CQLPredicate::operator=(const CQLPredicate& rhs){
90                   	if(&rhs != this){
91                   		if(_rep) delete _rep;
92                   		_rep = new CQLPredicateRep(rhs._rep);
93                   	}
94                   	return *this;
95                   }
96                   
97 humberto 1.1.2.1  PEGASUS_NAMESPACE_END

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2