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

Diff for /pegasus/src/Pegasus/CQL/CQLFactor.cpp between version 1.1 and 1.1.2.3

version 1.1, 2004/08/20 18:22:36 version 1.1.2.3, 2004/08/26 18:55:19
Line 0 
Line 1 
   #include "CQLFactor.h"
   #include <Pegasus/CQL/CQLExpression.h>
   #include <Pegasus/CQL/CQLFunction.h>
   PEGASUS_NAMESPACE_BEGIN
   
   #define PEGASUS_ARRAY_T CQLFactor
   #include <Pegasus/Common/ArrayImpl.h>
   #undef PEGASUS_ARRAY_T
   
   //##ModelId=40FC34920351
   CQLFactor::CQLFactor(const CQLFactor& inCQLFact)
   {
      _CQLVal = inCQLFact._CQLVal;
      _CQLFunct = inCQLFact._CQLFunct;
      _CQLExp = inCQLFact._CQLExp;
      _invert = inCQLFact._invert;
   }
   
   CQLFactor::CQLFactor(CQLValue inCQLVal)
   {
      _CQLVal = inCQLVal;
   }
   
   //##ModelId=40FC34BC0061
   CQLFactor::CQLFactor(CQLExpression& inCQLExp)
   {
      _CQLExp = new CQLExpression(inCQLExp);
   }
   
   //##ModelId=40FC34E30391
   CQLFactor::CQLFactor(CQLFunction inCQLFunc)
   {
      _CQLFunct = new CQLFunction(inCQLFunc);
   }
   
   //##ModelId=40FC33B70262
   CQLValue CQLFactor::getValue(CIMInstance CI, QueryContext& QueryCtx)
   {
      return _CQLVal;
   }
   
   CQLValue CQLFactor::resolveValue(CIMInstance CI, QueryContext& QueryCtx)
   {
      _CQLVal.resolve(CI,QueryCtx);
      return _CQLVal;
   }
   
   Boolean CQLFactor::isSimpleValue()
   {
      return (_CQLExp == NULL && _CQLFunct == NULL);
   }
   
   CQLFunction CQLFactor::getCQLFunction()
   {
      return *_CQLFunct;
   }
   
   CQLExpression CQLFactor::getCQLExpression()
   {
      return *_CQLExp;
   }
   
   String CQLFactor::toString()
   {
      if(_CQLFunct != NULL)
      {
         _CQLFunct->toString();
      }
      else if(_CQLExp != NULL)
      {
         _CQLExp->toString();
      }
      else
      {
         _CQLVal.toString();
      }
   }
   
   void CQLFactor::applyScopes(Array<CQLScope> inScopes)
   {
      // TODO:
      return;
   }
   
   
   PEGASUS_NAMESPACE_END


Legend:
Removed from v.1.1  
changed lines
  Added in v.1.1.2.3

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2