version 1.5, 2005/02/05 22:59:16
|
version 1.6, 2005/05/15 13:09:52
|
|
|
// | // |
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
#include "CQLSimplePredicate.h" |
#include <Pegasus/CQL/CQLSimplePredicate.h> |
#include "CQLSimplePredicateRep.h" |
#include <Pegasus/CQL/CQLSimplePredicateRep.h> |
#include <Pegasus/CQL/CQLExpression.h> | #include <Pegasus/CQL/CQLExpression.h> |
#include <Pegasus/CQL/CQLFactory.h> | #include <Pegasus/CQL/CQLFactory.h> |
#include <Pegasus/Query/QueryCommon/QueryContext.h> | #include <Pegasus/Query/QueryCommon/QueryContext.h> |
| |
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
| |
CQLSimplePredicate::CQLSimplePredicate(){ |
CQLSimplePredicate::CQLSimplePredicate() |
|
{ |
_rep = new CQLSimplePredicateRep(); | _rep = new CQLSimplePredicateRep(); |
} | } |
| |
|
|
_rep = new CQLSimplePredicateRep(leftSideExpression,rightSideExpression,inOperator); | _rep = new CQLSimplePredicateRep(leftSideExpression,rightSideExpression,inOperator); |
} | } |
| |
CQLSimplePredicate::CQLSimplePredicate(const CQLSimplePredicate& inSimplePredicate){ |
CQLSimplePredicate::CQLSimplePredicate(const CQLSimplePredicate& inSimplePredicate) |
|
{ |
_rep = new CQLSimplePredicateRep(inSimplePredicate._rep); | _rep = new CQLSimplePredicateRep(inSimplePredicate._rep); |
} | } |
| |
CQLSimplePredicate::~CQLSimplePredicate(){ |
CQLSimplePredicate::~CQLSimplePredicate() |
if(_rep) |
{ |
delete _rep; | delete _rep; |
} | } |
| |
|
|
{ | { |
return _rep->toString(); | return _rep->toString(); |
} | } |
Boolean CQLSimplePredicate::isSimple()const{ |
|
|
Boolean CQLSimplePredicate::isSimple() const |
|
{ |
return _rep->isSimple(); | return _rep->isSimple(); |
} | } |
Boolean CQLSimplePredicate::isSimpleValue()const{ |
|
|
Boolean CQLSimplePredicate::isSimpleValue() const |
|
{ |
return _rep->isSimpleValue(); | return _rep->isSimpleValue(); |
} | } |
| |
CQLSimplePredicate& CQLSimplePredicate::operator=(const CQLSimplePredicate& rhs){ |
CQLSimplePredicate& CQLSimplePredicate::operator=(const CQLSimplePredicate& rhs) |
if(&rhs != this){ |
{ |
if(_rep) delete _rep; |
if(&rhs != this) |
|
{ |
|
delete _rep; |
|
_rep = 0; |
_rep = new CQLSimplePredicateRep(rhs._rep); | _rep = new CQLSimplePredicateRep(rhs._rep); |
} | } |
|
|
return *this; | return *this; |
} | } |
| |
void CQLSimplePredicate::setOperation(ExpressionOpType op){ |
void CQLSimplePredicate::setOperation(ExpressionOpType op) |
|
{ |
_rep->setOperation(op); | _rep->setOperation(op); |
} | } |
| |