3 karl 1.5 // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
4 // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
5 // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
|
7 karl 1.5 // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
8 // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
9 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
10 // EMC Corporation; VERITAS Software Corporation; The Open Group.
|
11 chuck 1.2 //
12 // Permission is hereby granted, free of charge, to any person obtaining a copy
13 // of this software and associated documentation files (the "Software"), to
14 // deal in the Software without restriction, including without limitation the
15 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
16 // sell copies of the Software, and to permit persons to whom the Software is
17 // furnished to do so, subject to the following conditions:
18 //
19 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
20 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
21 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
22 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
23 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
25 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 //
28 //==============================================================================
29 //
30 // Authors: David Rosckes (rosckes@us.ibm.com)
31 // Bert Rivero (hurivero@us.ibm.com)
32 chuck 1.2 // Chuck Carmack (carmack@us.ibm.com)
33 // Brian Lucier (lucier@us.ibm.com)
34 //
|
59 chuck 1.2 {
60 _rep = new CQLSimplePredicateRep(inExpression,inOperator);
61 }
62
63 CQLSimplePredicate::CQLSimplePredicate(const CQLExpression& leftSideExpression,
64 const CQLExpression& rightSideExpression,
65 ExpressionOpType inOperator)
66 {
67 _rep = new CQLSimplePredicateRep(leftSideExpression,rightSideExpression,inOperator);
68 }
69
70 CQLSimplePredicate::CQLSimplePredicate(const CQLSimplePredicate& inSimplePredicate){
71 _rep = new CQLSimplePredicateRep(inSimplePredicate._rep);
72 }
73
74 CQLSimplePredicate::~CQLSimplePredicate(){
75 if(_rep)
76 delete _rep;
77 }
78
79 Boolean CQLSimplePredicate::evaluate(CIMInstance CI, QueryContext& QueryCtx)
80 chuck 1.2 {
81 return _rep->evaluate(CI,QueryCtx);
82 }
83
84 CQLExpression CQLSimplePredicate::getLeftExpression()const
85 {
86 return _rep->getLeftExpression();
87 }
88
89 CQLExpression CQLSimplePredicate::getRightExpression()const
90 {
91 return _rep->getRightExpression();
92 }
93
94 enum ExpressionOpType CQLSimplePredicate::getOperation()const
95 {
96 return _rep->getOperation();
97 }
98
99 void CQLSimplePredicate::applyContext(QueryContext& queryContext)
100 {
101 chuck 1.2 _rep->applyContext(queryContext);
102 }
103
104 String CQLSimplePredicate::toString()const
105 {
106 return _rep->toString();
107 }
108 Boolean CQLSimplePredicate::isSimple()const{
109 return _rep->isSimple();
110 }
111 Boolean CQLSimplePredicate::isSimpleValue()const{
112 return _rep->isSimpleValue();
113 }
114
115 CQLSimplePredicate& CQLSimplePredicate::operator=(const CQLSimplePredicate& rhs){
116 if(&rhs != this){
117 if(_rep) delete _rep;
118 _rep = new CQLSimplePredicateRep(rhs._rep);
119 }
120 return *this;
121 }
122 chuck 1.2
123 void CQLSimplePredicate::setOperation(ExpressionOpType op){
124 _rep->setOperation(op);
125 }
126
127 PEGASUS_NAMESPACE_END
|