version 1.1.2.4, 2004/08/26 20:43:04
|
version 1.1.2.5, 2004/08/26 21:23:13
|
|
|
#include <Pegasus/Common/ArrayImpl.h> | #include <Pegasus/Common/ArrayImpl.h> |
#undef PEGASUS_ARRAY_T | #undef PEGASUS_ARRAY_T |
| |
//##ModelId=40FC34920351 |
|
CQLFactor::CQLFactor(const CQLFactor& inCQLFact) | CQLFactor::CQLFactor(const CQLFactor& inCQLFact) |
{ | { |
_CQLVal = inCQLFact._CQLVal; | _CQLVal = inCQLFact._CQLVal; |
|
|
_CQLVal = inCQLVal; | _CQLVal = inCQLVal; |
} | } |
| |
//##ModelId=40FC34BC0061 |
|
CQLFactor::CQLFactor(CQLExpression& inCQLExp) | CQLFactor::CQLFactor(CQLExpression& inCQLExp) |
{ | { |
_CQLExp = new CQLExpression(inCQLExp); | _CQLExp = new CQLExpression(inCQLExp); |
} | } |
| |
//##ModelId=40FC34E30391 |
|
CQLFactor::CQLFactor(CQLFunction inCQLFunc) | CQLFactor::CQLFactor(CQLFunction inCQLFunc) |
{ | { |
_CQLFunct = new CQLFunction(inCQLFunc); | _CQLFunct = new CQLFunction(inCQLFunc); |
} | } |
| |
//##ModelId=40FC33B70262 |
|
CQLValue CQLFactor::getValue() | CQLValue CQLFactor::getValue() |
{ | { |
return _CQLVal; | return _CQLVal; |
|
|
| |
CQLValue CQLFactor::resolveValue(CIMInstance CI, QueryContext& QueryCtx) | CQLValue CQLFactor::resolveValue(CIMInstance CI, QueryContext& QueryCtx) |
{ | { |
|
if(_CQLExp != NULL) |
|
{ |
|
return _CQLExp->resolveValue(CI,QueryCtx); |
|
} |
|
else if (_CQLFunct != NULL) |
|
{ |
|
return _CQLFunct->resolveValue(CI,QueryCtx); |
|
} |
|
else |
|
{ |
_CQLVal.resolve(CI,QueryCtx); | _CQLVal.resolve(CI,QueryCtx); |
return _CQLVal; | return _CQLVal; |
} | } |
|
} |
| |
Boolean CQLFactor::isSimpleValue() | Boolean CQLFactor::isSimpleValue() |
{ | { |
|
|
{ | { |
if(_CQLFunct != NULL) | if(_CQLFunct != NULL) |
{ | { |
_CQLFunct->toString(); |
return _CQLFunct->toString(); |
} | } |
else if(_CQLExp != NULL) | else if(_CQLExp != NULL) |
{ | { |
_CQLExp->toString(); |
return _CQLExp->toString(); |
} | } |
else | else |
{ | { |
_CQLVal.toString(); |
return _CQLVal.toString(); |
} | } |
} | } |
| |
void CQLFactor::applyScopes(Array<CQLScope> inScopes) | void CQLFactor::applyScopes(Array<CQLScope> inScopes) |
{ | { |
// TODO: |
|
|
if(_CQLFunct != NULL) |
|
{ |
|
_CQLFunct->applyScopes(inScopes); |
|
} |
|
else if(_CQLExp != NULL) |
|
{ |
|
_CQLExp->applyScopes(inScopes); |
|
} |
|
else |
|
{ |
|
_CQLVal.applyScopes(inScopes); |
|
} |
return; | return; |
} | } |
| |